iclient-mapboxgl-react.js 1.6 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023
  1. /*!
  2. *
  3. * @supermap/react-iclient.(https://iclient.supermap.io)
  4. * Copyright© 2000 - 2021 SuperMap Software Co.Ltd
  5. * license: Apache-2.0
  6. * version: v10.1.1
  7. *
  8. */
  9. (function webpackUniversalModuleDefinition(root, factory) {
  10. if(typeof exports === 'object' && typeof module === 'object')
  11. module.exports = factory(require("react"), require("../public/libs/mapboxgl/mapbox-gl-enhance.js"), require("../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js"), require("antd"), require("echarts"), require("../public/libs/echarts-layer/EchartsLayer.js"), require("../public/libs/deckgl/deck.gl.min.js"), require("three/build/three"));
  12. else if(typeof define === 'function' && define.amd)
  13. define(["react", "../public/libs/mapboxgl/mapbox-gl-enhance.js", "../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js", "antd", "echarts", "../public/libs/echarts-layer/EchartsLayer.js", "../public/libs/deckgl/deck.gl.min.js", "three/build/three"], factory);
  14. else if(typeof exports === 'object')
  15. exports["Components"] = factory(require("react"), require("../public/libs/mapboxgl/mapbox-gl-enhance.js"), require("../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js"), require("antd"), require("echarts"), require("../public/libs/echarts-layer/EchartsLayer.js"), require("../public/libs/deckgl/deck.gl.min.js"), require("three/build/three"));
  16. else
  17. root["SuperMap"] = root["SuperMap"] || {}, root["SuperMap"]["Components"] = factory(root["React"], root["mapboxgl"], root["SuperMap"], root["antd"], root["echarts"], root["EchartsLayer"], root["DeckGL"], root["THREE"]);
  18. })(window, function(__WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__36__, __WEBPACK_EXTERNAL_MODULE__50__, __WEBPACK_EXTERNAL_MODULE__51__, __WEBPACK_EXTERNAL_MODULE__126__, __WEBPACK_EXTERNAL_MODULE__142__) {
  19. return /******/ (function(modules) { // webpackBootstrap
  20. /******/ // The module cache
  21. /******/ var installedModules = {};
  22. /******/
  23. /******/ // The require function
  24. /******/ function __webpack_require__(moduleId) {
  25. /******/
  26. /******/ // Check if module is in cache
  27. /******/ if(installedModules[moduleId]) {
  28. /******/ return installedModules[moduleId].exports;
  29. /******/ }
  30. /******/ // Create a new module (and put it into the cache)
  31. /******/ var module = installedModules[moduleId] = {
  32. /******/ i: moduleId,
  33. /******/ l: false,
  34. /******/ exports: {}
  35. /******/ };
  36. /******/
  37. /******/ // Execute the module function
  38. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  39. /******/
  40. /******/ // Flag the module as loaded
  41. /******/ module.l = true;
  42. /******/
  43. /******/ // Return the exports of the module
  44. /******/ return module.exports;
  45. /******/ }
  46. /******/
  47. /******/
  48. /******/ // expose the modules object (__webpack_modules__)
  49. /******/ __webpack_require__.m = modules;
  50. /******/
  51. /******/ // expose the module cache
  52. /******/ __webpack_require__.c = installedModules;
  53. /******/
  54. /******/ // define getter function for harmony exports
  55. /******/ __webpack_require__.d = function(exports, name, getter) {
  56. /******/ if(!__webpack_require__.o(exports, name)) {
  57. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  58. /******/ }
  59. /******/ };
  60. /******/
  61. /******/ // define __esModule on exports
  62. /******/ __webpack_require__.r = function(exports) {
  63. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  64. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  65. /******/ }
  66. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  67. /******/ };
  68. /******/
  69. /******/ // create a fake namespace object
  70. /******/ // mode & 1: value is a module id, require it
  71. /******/ // mode & 2: merge all properties of value into the ns
  72. /******/ // mode & 4: return value when already ns object
  73. /******/ // mode & 8|1: behave like require
  74. /******/ __webpack_require__.t = function(value, mode) {
  75. /******/ if(mode & 1) value = __webpack_require__(value);
  76. /******/ if(mode & 8) return value;
  77. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  78. /******/ var ns = Object.create(null);
  79. /******/ __webpack_require__.r(ns);
  80. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  81. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  82. /******/ return ns;
  83. /******/ };
  84. /******/
  85. /******/ // getDefaultExport function for compatibility with non-harmony modules
  86. /******/ __webpack_require__.n = function(module) {
  87. /******/ var getter = module && module.__esModule ?
  88. /******/ function getDefault() { return module['default']; } :
  89. /******/ function getModuleExports() { return module; };
  90. /******/ __webpack_require__.d(getter, 'a', getter);
  91. /******/ return getter;
  92. /******/ };
  93. /******/
  94. /******/ // Object.prototype.hasOwnProperty.call
  95. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  96. /******/
  97. /******/ // __webpack_public_path__
  98. /******/ __webpack_require__.p = "";
  99. /******/
  100. /******/
  101. /******/ // Load entry module and return exports
  102. /******/ return __webpack_require__(__webpack_require__.s = 60);
  103. /******/ })
  104. /************************************************************************/
  105. /******/ ([
  106. /* 0 */
  107. /***/ (function(module, exports) {
  108. function _interopRequireDefault(obj) {
  109. return obj && obj.__esModule ? obj : {
  110. "default": obj
  111. };
  112. }
  113. module.exports = _interopRequireDefault;
  114. /***/ }),
  115. /* 1 */
  116. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  117. "use strict";
  118. __webpack_require__.r(__webpack_exports__);
  119. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _classCallCheck; });
  120. function _classCallCheck(instance, Constructor) {
  121. if (!(instance instanceof Constructor)) {
  122. throw new TypeError("Cannot call a class as a function");
  123. }
  124. }
  125. /***/ }),
  126. /* 2 */
  127. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  128. "use strict";
  129. __webpack_require__.r(__webpack_exports__);
  130. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createClass; });
  131. function _defineProperties(target, props) {
  132. for (var i = 0; i < props.length; i++) {
  133. var descriptor = props[i];
  134. descriptor.enumerable = descriptor.enumerable || false;
  135. descriptor.configurable = true;
  136. if ("value" in descriptor) descriptor.writable = true;
  137. Object.defineProperty(target, descriptor.key, descriptor);
  138. }
  139. }
  140. function _createClass(Constructor, protoProps, staticProps) {
  141. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  142. if (staticProps) _defineProperties(Constructor, staticProps);
  143. return Constructor;
  144. }
  145. /***/ }),
  146. /* 3 */
  147. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  148. "use strict";
  149. __webpack_require__.r(__webpack_exports__);
  150. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
  151. function _getPrototypeOf(o) {
  152. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  153. return o.__proto__ || Object.getPrototypeOf(o);
  154. };
  155. return _getPrototypeOf(o);
  156. }
  157. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
  158. function _isNativeReflectConstruct() {
  159. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  160. if (Reflect.construct.sham) return false;
  161. if (typeof Proxy === "function") return true;
  162. try {
  163. Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
  164. return true;
  165. } catch (e) {
  166. return false;
  167. }
  168. }
  169. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/typeof.js
  170. function _typeof(obj) {
  171. "@babel/helpers - typeof";
  172. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  173. _typeof = function _typeof(obj) {
  174. return typeof obj;
  175. };
  176. } else {
  177. _typeof = function _typeof(obj) {
  178. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  179. };
  180. }
  181. return _typeof(obj);
  182. }
  183. // EXTERNAL MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
  184. var assertThisInitialized = __webpack_require__(18);
  185. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
  186. function _possibleConstructorReturn(self, call) {
  187. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  188. return call;
  189. }
  190. return Object(assertThisInitialized["default"])(self);
  191. }
  192. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper.js
  193. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createSuper; });
  194. function _createSuper(Derived) {
  195. return function () {
  196. var Super = _getPrototypeOf(Derived),
  197. result;
  198. if (_isNativeReflectConstruct()) {
  199. var NewTarget = _getPrototypeOf(this).constructor;
  200. result = Reflect.construct(Super, arguments, NewTarget);
  201. } else {
  202. result = Super.apply(this, arguments);
  203. }
  204. return _possibleConstructorReturn(this, result);
  205. };
  206. }
  207. /***/ }),
  208. /* 4 */
  209. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  210. "use strict";
  211. __webpack_require__.r(__webpack_exports__);
  212. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
  213. function _setPrototypeOf(o, p) {
  214. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  215. o.__proto__ = p;
  216. return o;
  217. };
  218. return _setPrototypeOf(o, p);
  219. }
  220. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js
  221. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _inherits; });
  222. function _inherits(subClass, superClass) {
  223. if (typeof superClass !== "function" && superClass !== null) {
  224. throw new TypeError("Super expression must either be null or a function");
  225. }
  226. subClass.prototype = Object.create(superClass && superClass.prototype, {
  227. constructor: {
  228. value: subClass,
  229. writable: true,
  230. configurable: true
  231. }
  232. });
  233. if (superClass) _setPrototypeOf(subClass, superClass);
  234. }
  235. /***/ }),
  236. /* 5 */
  237. /***/ (function(module, exports) {
  238. module.exports = __WEBPACK_EXTERNAL_MODULE__5__;
  239. /***/ }),
  240. /* 6 */
  241. /***/ (function(module, exports, __webpack_require__) {
  242. "use strict";
  243. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=mapGetter;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(18));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _wrapDisplayName2=_interopRequireDefault(__webpack_require__(55));var _react=_interopRequireDefault(__webpack_require__(5));var _hoistNonReactStatics=_interopRequireDefault(__webpack_require__(56));var _antd=__webpack_require__(36);var _mapEvent=_interopRequireDefault(__webpack_require__(27));var _globalEvent=_interopRequireDefault(__webpack_require__(40));var _util=__webpack_require__(11);function mapGetter(WrappedComponent){var MapGetter=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(MapGetter,_React$Component);var _super=(0,_createSuper2.default)(MapGetter);function MapGetter(props){var _this;(0,_classCallCheck2.default)(this,MapGetter);_this=_super.call(this,props);_this.map=void 0;_this.webmap=void 0;_this.instanceRef=void 0;_this.getComponentInstance=void 0;_this.loadMapSucceed=_this.loadMapSucceed.bind((0,_assertThisInitialized2.default)(_this));_this.deleteMapSucceed=_this.deleteMapSucceed.bind((0,_assertThisInitialized2.default)(_this));_this.getComponentInstance=_util.getComponentInstance.bind((0,_assertThisInitialized2.default)(_this));return _this;}(0,_createClass2.default)(MapGetter,[{key:"componentDidMount",value:function componentDidMount(){var targetName=this.getTargetName();if(_mapEvent.default.getMap(targetName)){this.loadMap(targetName);}_mapEvent.default.on('load-map',this.loadMapSucceed);_globalEvent.default.on('delete-map',this.deleteMapSucceed);}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var mapTarget=this.props.mapTarget;var prevMapTarget=prevProps.mapTarget;if(mapTarget&&prevMapTarget&&mapTarget!==prevMapTarget){this.mapTargetChanged(mapTarget);}}},{key:"componentWillUnmount",value:function componentWillUnmount(){_mapEvent.default.off('load-map',this.loadMapSucceed);_globalEvent.default.off('delete-map',this.deleteMapSucceed);}},{key:"getTargetName",value:function getTargetName(){/**
  244. * 便于区分存在多个map时,子组件对应的map的渲染;
  245. * map 和 webmap 的 props 属性是 target 其他组件都叫 mapTarget
  246. * 如果子组件包裹在 map 组件里面,若没有传 mapTarget, 则 targetName 直接取父元素的target 的值
  247. * 如果子组件和 map 同层级,且没有设置 mapTarget 时,则默认渲染到第一个 map 上
  248. *
  249. */ // const selfParent = this._reactInternalInstance._currentElement._owner._instance;
  250. // console.log(selfParent);
  251. // console.log('selfParent: ', selfParent);
  252. // const parentTarget =
  253. // selfParent && selfParent.name.toLowerCase() === 'smwebmap' &&
  254. // selfParent.target;
  255. // return this.props.mapTarget || parentTarget || Object.keys(mapEvent.getAllMaps())[0];
  256. var maps=_mapEvent.default.getAllMaps();return this.props.mapTarget||(0,_util.getFirstMapTarget)(maps);}},{key:"loadMapSucceed",value:function loadMapSucceed(map,target){var targetName=this.getTargetName();if(target===targetName){this.loadMap(target);}}},{key:"mapTargetChanged",value:function mapTargetChanged(target){// 多个map切换的时候,需要删除该组件与前一个map的图层绑定, 如果新的target没有对应的map,那么默认绑定第一个地图
  257. var maps=_mapEvent.default.getAllMaps();var targetName=(0,_util.getFirstMapTarget)(maps);var firstMap=_mapEvent.default.getMap(targetName);this.resetData();if(_mapEvent.default.getMap(target)||firstMap){this.loadMap(target);}}},{key:"loadMap",value:function loadMap(targetName){this.map=_mapEvent.default.getMap(targetName);this.webmap=_mapEvent.default.getWebMap(targetName);(0,_util.callHook)(this.instanceRef,'loaded',this.map);// 控制与map组件同级的组件的显示加载
  258. // setTimeout(() => {
  259. // /**
  260. // * @event loaded
  261. // * @desc 组件加载渲染完成之后触发。
  262. // */
  263. // this.$emit('loaded');
  264. // }, 0);
  265. }},{key:"deleteMapSucceed",value:function deleteMapSucceed(target){var targetName=this.getTargetName();if(target===targetName){this.resetData();}}},{key:"resetData",value:function resetData(){this.map=null;this.webmap=null;(0,_util.callHook)(this.instanceRef,'removed',this.map);}},{key:"mapNotLoadedTip",value:function mapNotLoadedTip(){if(!this.map){_antd.message.destroy();// TODO
  266. // message.warning(this.$t('warning.unassociatedMap'));
  267. _antd.message.warning('您需要配置关联地图!');return true;}return false;}},{key:"render",value:function render(){return/*#__PURE__*/_react.default.createElement(WrappedComponent,Object.assign({},this.props,{ref:this.getComponentInstance,mapNotLoadedTip:this.mapNotLoadedTip}));}}]);return MapGetter;}(_react.default.Component);MapGetter.displayName=(0,_wrapDisplayName2.default)(WrappedComponent,'mapGetter');return(0,_hoistNonReactStatics.default)(MapGetter,WrappedComponent);}
  268. /***/ }),
  269. /* 7 */
  270. /***/ (function(module, exports) {
  271. module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
  272. /***/ }),
  273. /* 8 */
  274. /***/ (function(module, exports, __webpack_require__) {
  275. "use strict";
  276. exports.__esModule = true;
  277. exports.default = void 0;
  278. var compose = function compose() {
  279. for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
  280. funcs[_key] = arguments[_key];
  281. }
  282. return funcs.reduce(function (a, b) {
  283. return function () {
  284. return a(b.apply(void 0, arguments));
  285. };
  286. }, function (arg) {
  287. return arg;
  288. });
  289. };
  290. var _default = compose;
  291. exports.default = _default;
  292. /***/ }),
  293. /* 9 */
  294. /***/ (function(module, exports, __webpack_require__) {
  295. "use strict";
  296. var _interopRequireWildcard=__webpack_require__(19);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=withLayer;var _objectSpread2=_interopRequireDefault(__webpack_require__(15));var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(18));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _wrapDisplayName2=_interopRequireDefault(__webpack_require__(55));var _react=_interopRequireWildcard(__webpack_require__(5));var _hoistNonReactStatics=_interopRequireDefault(__webpack_require__(56));var _lodash=_interopRequireDefault(__webpack_require__(52));var _lodash2=_interopRequireDefault(__webpack_require__(26));var _util=__webpack_require__(11);function withLayer(WrappedComponent){var BaseLayer=/*#__PURE__*/function(_PureComponent){(0,_inherits2.default)(BaseLayer,_PureComponent);var _super=(0,_createSuper2.default)(BaseLayer);function BaseLayer(props){var _this;(0,_classCallCheck2.default)(this,BaseLayer);_this=_super.call(this,props);_this.map=void 0;_this.instanceRef=void 0;_this.eventList=void 0;_this.registerEvents=[];_this.overLayer=void 0;_this.getComponentInstance=void 0;_this.$_emitEvent=function(name){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var originEventName="on".concat((0,_lodash2.default)(name));if((0,_util.isFunction)(_this.props[originEventName])){_this.props[originEventName]((0,_objectSpread2.default)({map:_this.map,layerId:_this.props.layerId},data));}};_this.$_emitLayerMapEvent=function(event){_this.$_emitEvent(event.type,{mapboxEvent:event});};_this.$_bindLayerEvents=function(){Object.keys(_this.props).forEach(function(eventName){if(_this.eventList.includes(eventName)){var layerId=_this.props.layerId;// @ts-ignore
  297. var layer=_this.map.overlayLayersManager[layerId];var name=eventName.replace('on','');var registerEventName=name.toLowerCase();_this.registerEvents.push(registerEventName);if(layer){_this.overLayer=layer;layer.on(registerEventName,_this.$_emitLayerMapEvent);}else{_this.map.on(registerEventName,layerId,_this.$_emitLayerMapEvent);}}});};_this.$_unbindLayerEvents=function(events){if(_this.map){events.forEach(function(eventName){!_this.overLayer&&_this.map.off(eventName,_this.props.layerId,_this.$_emitLayerMapEvent);});}};_this.move=function(beforeId){_this.map.moveLayer(_this.props.layerId,beforeId);_this.$_emitEvent('layer-moved',{beforeId:beforeId});};_this.remove=function(){var layerId=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_this.props.layerId;if(_this.registerEvents&&_this.registerEvents.length){_this.$_unbindLayerEvents(_this.registerEvents);}_this.map.removeLayer(layerId);_this.$_emitEvent('layer-removed');};_this.eventList=['onMousedown','onMouseup','onClick','onDblclick','onMousemove','onMouseenter','onMouseleave','onMouseover','onMouseout','onContextmenu','onTouchstart','onTouchend','onTouchcancel'];_this.getComponentInstance=_util.getComponentInstance.bind((0,_assertThisInitialized2.default)(_this));return _this;}(0,_createClass2.default)(BaseLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(prevProps.minzoom!==this.props.minzoom||prevProps.maxzoom!==this.props.maxzoom){this.map.setLayerZoomRange(this.props.layerId,this.props.minzoom,this.props.maxzoom);}if(prevProps.filter!==this.props.filter){this.map.setFilter(this.props.layerId,this.props.filter);}if(this.props.layout&&prevProps.layout!==this.props.layout){for(var _i=0,_Object$keys=Object.keys(this.props.layout);_i<_Object$keys.length;_i++){var prop=_Object$keys[_i];this.map.setLayoutProperty(this.props.layerId,prop,this.props.layout[prop]);}}if(this.props.paint&&prevProps.paint!==this.props.paint){for(var _i2=0,_Object$keys2=Object.keys(this.props.paint);_i2<_Object$keys2.length;_i2++){var _prop=_Object$keys2[_i2];this.map.setPaintProperty(this.props.layerId,_prop,this.props.paint[_prop]);}}if(this.props.metadata&&prevProps.metadata!==this.props.metadata){var layer=this.map.getLayer(this.props.layerId),metadata=layer.metadata;if(metadata){Object.assign(layer.metadata,this.props.metadata);}else{layer.metadata=this.props.metadata;}}if(prevProps.before!==this.props.before){this.move(this.props.before);}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.remove();}},{key:"loaded",value:function loaded(map){this.map=map;(0,_util.callHook)(this.instanceRef,'loaded',this.map);this.$_bindLayerEvents();}},{key:"removed",value:function removed(map){if(this.props.layerId&&this.map){this.remove();}this.map=map;(0,_util.callHook)(this.instanceRef,'removed',this.map);}},{key:"render",value:function render(){// const { layerId } = this.props;
  298. // const id = source || layerId;
  299. // const sourceLoaded =
  300. // this.map && layerId ? this.map.isSourceLoaded(layerId) : false;
  301. // const mapLayer = this.map ? this.map.getLayer(layerId) : null;
  302. // const mapSource =
  303. // this.map && layerId ? this.map.getSource(layerId) : null;
  304. var newProps=Object.assign({},this.props,{// sourceLoaded,
  305. // mapLayer,
  306. // mapSource
  307. });return/*#__PURE__*/_react.default.createElement(WrappedComponent,Object.assign({},newProps,{ref:this.getComponentInstance,move:this.move,remove:this.remove}));}}]);return BaseLayer;}(_react.PureComponent);BaseLayer.displayName=(0,_wrapDisplayName2.default)(WrappedComponent,'withLayer');BaseLayer.defaultProps={layerId:(0,_lodash.default)("".concat(WrappedComponent.name.toLowerCase(),"-")),minzoom:0,maxzoom:22,before:undefined};;return(0,_hoistNonReactStatics.default)(BaseLayer,WrappedComponent);};
  308. /***/ }),
  309. /* 10 */
  310. /***/ (function(module, exports) {
  311. var g;
  312. // This works in non-strict mode
  313. g = (function() {
  314. return this;
  315. })();
  316. try {
  317. // This works if eval is allowed (see CSP)
  318. g = g || new Function("return this")();
  319. } catch (e) {
  320. // This works if the window reference is available
  321. if (typeof window === "object") g = window;
  322. }
  323. // g can still be undefined, but nothing to do about it...
  324. // We return undefined, instead of nothing here, so it's
  325. // easier to handle this case. if(!global) { ...}
  326. module.exports = g;
  327. /***/ }),
  328. /* 11 */
  329. /***/ (function(module, exports, __webpack_require__) {
  330. "use strict";
  331. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.hexToRgba=hexToRgba;exports.reservedDecimal=reservedDecimal;exports.clearNumberComma=clearNumberComma;exports.isXField=isXField;exports.isYField=isYField;exports.getColorWithOpacity=getColorWithOpacity;exports.callHook=callHook;exports.getComponentInstance=getComponentInstance;exports.isFunction=isFunction;exports.getFirstMapTarget=getFirstMapTarget;var _colorcolor=_interopRequireDefault(__webpack_require__(41));// 获取当前时间返回置顶格式
  332. // export function getDateTime(timeType) {
  333. // return geti18n().d(new Date(), timeType.replace(/\+/g, '_'), getLanguage());
  334. // }
  335. // hex -> rgba
  336. function hexToRgba(hex,opacity){return'rgba('+parseInt('0x'+hex.slice(1,3))+','+parseInt('0x'+hex.slice(3,5))+','+parseInt('0x'+hex.slice(5,7))+','+opacity+')';}// export function isTransparent(color) {
  337. // const rgba = colorcolor(color, 'rgba');
  338. // return +rgba.match(/(\d(\.\d+)?)+/g)[3] === 0;
  339. // }
  340. // 保留指定位数的小数
  341. function reservedDecimal(val,precise){return Number(val).toFixed(precise);}// 清除数字(字符串型的)的逗号
  342. function clearNumberComma(num){if(num.replace){num=num.replace(/,/g,'');}return num;}/**
  343. * 判断是否地理X坐标
  344. * @param data
  345. */function isXField(data){var lowerdata=data.toLowerCase();return lowerdata==='x'||lowerdata==='smx'||lowerdata==='jd'||lowerdata==='经度'||lowerdata==='东经'||lowerdata==='longitude'||lowerdata==='lot'||lowerdata==='lon'||lowerdata==='lng'||lowerdata==='x坐标';}/**
  346. * 判断是否地理Y坐标
  347. * @param data
  348. */function isYField(data){var lowerdata=data.toLowerCase();return lowerdata==='y'||lowerdata==='smy'||lowerdata==='wd'||lowerdata==='纬度'||lowerdata==='北纬'||lowerdata==='latitude'||lowerdata==='lat'||lowerdata==='y坐标';}function getColorWithOpacity(color,opacity){if(color.indexOf('rgba')>-1){return color.substring(0,color.lastIndexOf(',')+1)+opacity+')';}var newColor=(0,_colorcolor.default)(color,'rgb');return'rgba'+newColor.substring(3,newColor.length-1)+",".concat(opacity,")");}var HOOKS=['loaded','removed'];function callHook(instanceRef,hook,map){HOOKS.includes(hook)&&instanceRef[hook]&&typeof instanceRef[hook]==='function'&&instanceRef[hook](map);}function getComponentInstance(ref){this.instanceRef=ref;}function isFunction(event){return Object.prototype.toString.call(event)==='[object Function]';}function getFirstMapTarget(maps){var firstTarget;for(var key in maps){if(!!key){firstTarget=key;break;}}return firstTarget;}
  349. /***/ }),
  350. /* 12 */
  351. /***/ (function(module, exports) {
  352. module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
  353. /***/ }),
  354. /* 13 */
  355. /***/ (function(module, exports, __webpack_require__) {
  356. /* WEBPACK VAR INJECTION */(function(global, module) {/**
  357. * Lodash (Custom Build) <https://lodash.com/>
  358. * Build: `lodash modularize exports="npm" -o ./`
  359. * Copyright JS Foundation and other contributors <https://js.foundation/>
  360. * Released under MIT license <https://lodash.com/license>
  361. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  362. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  363. */
  364. /** Used as the size to enable large array optimizations. */
  365. var LARGE_ARRAY_SIZE = 200;
  366. /** Used to stand-in for `undefined` hash values. */
  367. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  368. /** Used to compose bitmasks for value comparisons. */
  369. var COMPARE_PARTIAL_FLAG = 1,
  370. COMPARE_UNORDERED_FLAG = 2;
  371. /** Used as references for various `Number` constants. */
  372. var MAX_SAFE_INTEGER = 9007199254740991;
  373. /** `Object#toString` result references. */
  374. var argsTag = '[object Arguments]',
  375. arrayTag = '[object Array]',
  376. asyncTag = '[object AsyncFunction]',
  377. boolTag = '[object Boolean]',
  378. dateTag = '[object Date]',
  379. errorTag = '[object Error]',
  380. funcTag = '[object Function]',
  381. genTag = '[object GeneratorFunction]',
  382. mapTag = '[object Map]',
  383. numberTag = '[object Number]',
  384. nullTag = '[object Null]',
  385. objectTag = '[object Object]',
  386. promiseTag = '[object Promise]',
  387. proxyTag = '[object Proxy]',
  388. regexpTag = '[object RegExp]',
  389. setTag = '[object Set]',
  390. stringTag = '[object String]',
  391. symbolTag = '[object Symbol]',
  392. undefinedTag = '[object Undefined]',
  393. weakMapTag = '[object WeakMap]';
  394. var arrayBufferTag = '[object ArrayBuffer]',
  395. dataViewTag = '[object DataView]',
  396. float32Tag = '[object Float32Array]',
  397. float64Tag = '[object Float64Array]',
  398. int8Tag = '[object Int8Array]',
  399. int16Tag = '[object Int16Array]',
  400. int32Tag = '[object Int32Array]',
  401. uint8Tag = '[object Uint8Array]',
  402. uint8ClampedTag = '[object Uint8ClampedArray]',
  403. uint16Tag = '[object Uint16Array]',
  404. uint32Tag = '[object Uint32Array]';
  405. /**
  406. * Used to match `RegExp`
  407. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  408. */
  409. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  410. /** Used to detect host constructors (Safari). */
  411. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  412. /** Used to detect unsigned integer values. */
  413. var reIsUint = /^(?:0|[1-9]\d*)$/;
  414. /** Used to identify `toStringTag` values of typed arrays. */
  415. var typedArrayTags = {};
  416. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  417. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  418. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  419. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  420. typedArrayTags[uint32Tag] = true;
  421. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  422. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  423. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  424. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  425. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  426. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  427. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  428. typedArrayTags[weakMapTag] = false;
  429. /** Detect free variable `global` from Node.js. */
  430. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  431. /** Detect free variable `self`. */
  432. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  433. /** Used as a reference to the global object. */
  434. var root = freeGlobal || freeSelf || Function('return this')();
  435. /** Detect free variable `exports`. */
  436. var freeExports = true && exports && !exports.nodeType && exports;
  437. /** Detect free variable `module`. */
  438. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  439. /** Detect the popular CommonJS extension `module.exports`. */
  440. var moduleExports = freeModule && freeModule.exports === freeExports;
  441. /** Detect free variable `process` from Node.js. */
  442. var freeProcess = moduleExports && freeGlobal.process;
  443. /** Used to access faster Node.js helpers. */
  444. var nodeUtil = (function() {
  445. try {
  446. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  447. } catch (e) {}
  448. }());
  449. /* Node.js helper references. */
  450. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  451. /**
  452. * A specialized version of `_.filter` for arrays without support for
  453. * iteratee shorthands.
  454. *
  455. * @private
  456. * @param {Array} [array] The array to iterate over.
  457. * @param {Function} predicate The function invoked per iteration.
  458. * @returns {Array} Returns the new filtered array.
  459. */
  460. function arrayFilter(array, predicate) {
  461. var index = -1,
  462. length = array == null ? 0 : array.length,
  463. resIndex = 0,
  464. result = [];
  465. while (++index < length) {
  466. var value = array[index];
  467. if (predicate(value, index, array)) {
  468. result[resIndex++] = value;
  469. }
  470. }
  471. return result;
  472. }
  473. /**
  474. * Appends the elements of `values` to `array`.
  475. *
  476. * @private
  477. * @param {Array} array The array to modify.
  478. * @param {Array} values The values to append.
  479. * @returns {Array} Returns `array`.
  480. */
  481. function arrayPush(array, values) {
  482. var index = -1,
  483. length = values.length,
  484. offset = array.length;
  485. while (++index < length) {
  486. array[offset + index] = values[index];
  487. }
  488. return array;
  489. }
  490. /**
  491. * A specialized version of `_.some` for arrays without support for iteratee
  492. * shorthands.
  493. *
  494. * @private
  495. * @param {Array} [array] The array to iterate over.
  496. * @param {Function} predicate The function invoked per iteration.
  497. * @returns {boolean} Returns `true` if any element passes the predicate check,
  498. * else `false`.
  499. */
  500. function arraySome(array, predicate) {
  501. var index = -1,
  502. length = array == null ? 0 : array.length;
  503. while (++index < length) {
  504. if (predicate(array[index], index, array)) {
  505. return true;
  506. }
  507. }
  508. return false;
  509. }
  510. /**
  511. * The base implementation of `_.times` without support for iteratee shorthands
  512. * or max array length checks.
  513. *
  514. * @private
  515. * @param {number} n The number of times to invoke `iteratee`.
  516. * @param {Function} iteratee The function invoked per iteration.
  517. * @returns {Array} Returns the array of results.
  518. */
  519. function baseTimes(n, iteratee) {
  520. var index = -1,
  521. result = Array(n);
  522. while (++index < n) {
  523. result[index] = iteratee(index);
  524. }
  525. return result;
  526. }
  527. /**
  528. * The base implementation of `_.unary` without support for storing metadata.
  529. *
  530. * @private
  531. * @param {Function} func The function to cap arguments for.
  532. * @returns {Function} Returns the new capped function.
  533. */
  534. function baseUnary(func) {
  535. return function(value) {
  536. return func(value);
  537. };
  538. }
  539. /**
  540. * Checks if a `cache` value for `key` exists.
  541. *
  542. * @private
  543. * @param {Object} cache The cache to query.
  544. * @param {string} key The key of the entry to check.
  545. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  546. */
  547. function cacheHas(cache, key) {
  548. return cache.has(key);
  549. }
  550. /**
  551. * Gets the value at `key` of `object`.
  552. *
  553. * @private
  554. * @param {Object} [object] The object to query.
  555. * @param {string} key The key of the property to get.
  556. * @returns {*} Returns the property value.
  557. */
  558. function getValue(object, key) {
  559. return object == null ? undefined : object[key];
  560. }
  561. /**
  562. * Converts `map` to its key-value pairs.
  563. *
  564. * @private
  565. * @param {Object} map The map to convert.
  566. * @returns {Array} Returns the key-value pairs.
  567. */
  568. function mapToArray(map) {
  569. var index = -1,
  570. result = Array(map.size);
  571. map.forEach(function(value, key) {
  572. result[++index] = [key, value];
  573. });
  574. return result;
  575. }
  576. /**
  577. * Creates a unary function that invokes `func` with its argument transformed.
  578. *
  579. * @private
  580. * @param {Function} func The function to wrap.
  581. * @param {Function} transform The argument transform.
  582. * @returns {Function} Returns the new function.
  583. */
  584. function overArg(func, transform) {
  585. return function(arg) {
  586. return func(transform(arg));
  587. };
  588. }
  589. /**
  590. * Converts `set` to an array of its values.
  591. *
  592. * @private
  593. * @param {Object} set The set to convert.
  594. * @returns {Array} Returns the values.
  595. */
  596. function setToArray(set) {
  597. var index = -1,
  598. result = Array(set.size);
  599. set.forEach(function(value) {
  600. result[++index] = value;
  601. });
  602. return result;
  603. }
  604. /** Used for built-in method references. */
  605. var arrayProto = Array.prototype,
  606. funcProto = Function.prototype,
  607. objectProto = Object.prototype;
  608. /** Used to detect overreaching core-js shims. */
  609. var coreJsData = root['__core-js_shared__'];
  610. /** Used to resolve the decompiled source of functions. */
  611. var funcToString = funcProto.toString;
  612. /** Used to check objects for own properties. */
  613. var hasOwnProperty = objectProto.hasOwnProperty;
  614. /** Used to detect methods masquerading as native. */
  615. var maskSrcKey = (function() {
  616. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  617. return uid ? ('Symbol(src)_1.' + uid) : '';
  618. }());
  619. /**
  620. * Used to resolve the
  621. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  622. * of values.
  623. */
  624. var nativeObjectToString = objectProto.toString;
  625. /** Used to detect if a method is native. */
  626. var reIsNative = RegExp('^' +
  627. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  628. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  629. );
  630. /** Built-in value references. */
  631. var Buffer = moduleExports ? root.Buffer : undefined,
  632. Symbol = root.Symbol,
  633. Uint8Array = root.Uint8Array,
  634. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  635. splice = arrayProto.splice,
  636. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  637. /* Built-in method references for those with the same name as other `lodash` methods. */
  638. var nativeGetSymbols = Object.getOwnPropertySymbols,
  639. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  640. nativeKeys = overArg(Object.keys, Object);
  641. /* Built-in method references that are verified to be native. */
  642. var DataView = getNative(root, 'DataView'),
  643. Map = getNative(root, 'Map'),
  644. Promise = getNative(root, 'Promise'),
  645. Set = getNative(root, 'Set'),
  646. WeakMap = getNative(root, 'WeakMap'),
  647. nativeCreate = getNative(Object, 'create');
  648. /** Used to detect maps, sets, and weakmaps. */
  649. var dataViewCtorString = toSource(DataView),
  650. mapCtorString = toSource(Map),
  651. promiseCtorString = toSource(Promise),
  652. setCtorString = toSource(Set),
  653. weakMapCtorString = toSource(WeakMap);
  654. /** Used to convert symbols to primitives and strings. */
  655. var symbolProto = Symbol ? Symbol.prototype : undefined,
  656. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  657. /**
  658. * Creates a hash object.
  659. *
  660. * @private
  661. * @constructor
  662. * @param {Array} [entries] The key-value pairs to cache.
  663. */
  664. function Hash(entries) {
  665. var index = -1,
  666. length = entries == null ? 0 : entries.length;
  667. this.clear();
  668. while (++index < length) {
  669. var entry = entries[index];
  670. this.set(entry[0], entry[1]);
  671. }
  672. }
  673. /**
  674. * Removes all key-value entries from the hash.
  675. *
  676. * @private
  677. * @name clear
  678. * @memberOf Hash
  679. */
  680. function hashClear() {
  681. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  682. this.size = 0;
  683. }
  684. /**
  685. * Removes `key` and its value from the hash.
  686. *
  687. * @private
  688. * @name delete
  689. * @memberOf Hash
  690. * @param {Object} hash The hash to modify.
  691. * @param {string} key The key of the value to remove.
  692. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  693. */
  694. function hashDelete(key) {
  695. var result = this.has(key) && delete this.__data__[key];
  696. this.size -= result ? 1 : 0;
  697. return result;
  698. }
  699. /**
  700. * Gets the hash value for `key`.
  701. *
  702. * @private
  703. * @name get
  704. * @memberOf Hash
  705. * @param {string} key The key of the value to get.
  706. * @returns {*} Returns the entry value.
  707. */
  708. function hashGet(key) {
  709. var data = this.__data__;
  710. if (nativeCreate) {
  711. var result = data[key];
  712. return result === HASH_UNDEFINED ? undefined : result;
  713. }
  714. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  715. }
  716. /**
  717. * Checks if a hash value for `key` exists.
  718. *
  719. * @private
  720. * @name has
  721. * @memberOf Hash
  722. * @param {string} key The key of the entry to check.
  723. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  724. */
  725. function hashHas(key) {
  726. var data = this.__data__;
  727. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  728. }
  729. /**
  730. * Sets the hash `key` to `value`.
  731. *
  732. * @private
  733. * @name set
  734. * @memberOf Hash
  735. * @param {string} key The key of the value to set.
  736. * @param {*} value The value to set.
  737. * @returns {Object} Returns the hash instance.
  738. */
  739. function hashSet(key, value) {
  740. var data = this.__data__;
  741. this.size += this.has(key) ? 0 : 1;
  742. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  743. return this;
  744. }
  745. // Add methods to `Hash`.
  746. Hash.prototype.clear = hashClear;
  747. Hash.prototype['delete'] = hashDelete;
  748. Hash.prototype.get = hashGet;
  749. Hash.prototype.has = hashHas;
  750. Hash.prototype.set = hashSet;
  751. /**
  752. * Creates an list cache object.
  753. *
  754. * @private
  755. * @constructor
  756. * @param {Array} [entries] The key-value pairs to cache.
  757. */
  758. function ListCache(entries) {
  759. var index = -1,
  760. length = entries == null ? 0 : entries.length;
  761. this.clear();
  762. while (++index < length) {
  763. var entry = entries[index];
  764. this.set(entry[0], entry[1]);
  765. }
  766. }
  767. /**
  768. * Removes all key-value entries from the list cache.
  769. *
  770. * @private
  771. * @name clear
  772. * @memberOf ListCache
  773. */
  774. function listCacheClear() {
  775. this.__data__ = [];
  776. this.size = 0;
  777. }
  778. /**
  779. * Removes `key` and its value from the list cache.
  780. *
  781. * @private
  782. * @name delete
  783. * @memberOf ListCache
  784. * @param {string} key The key of the value to remove.
  785. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  786. */
  787. function listCacheDelete(key) {
  788. var data = this.__data__,
  789. index = assocIndexOf(data, key);
  790. if (index < 0) {
  791. return false;
  792. }
  793. var lastIndex = data.length - 1;
  794. if (index == lastIndex) {
  795. data.pop();
  796. } else {
  797. splice.call(data, index, 1);
  798. }
  799. --this.size;
  800. return true;
  801. }
  802. /**
  803. * Gets the list cache value for `key`.
  804. *
  805. * @private
  806. * @name get
  807. * @memberOf ListCache
  808. * @param {string} key The key of the value to get.
  809. * @returns {*} Returns the entry value.
  810. */
  811. function listCacheGet(key) {
  812. var data = this.__data__,
  813. index = assocIndexOf(data, key);
  814. return index < 0 ? undefined : data[index][1];
  815. }
  816. /**
  817. * Checks if a list cache value for `key` exists.
  818. *
  819. * @private
  820. * @name has
  821. * @memberOf ListCache
  822. * @param {string} key The key of the entry to check.
  823. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  824. */
  825. function listCacheHas(key) {
  826. return assocIndexOf(this.__data__, key) > -1;
  827. }
  828. /**
  829. * Sets the list cache `key` to `value`.
  830. *
  831. * @private
  832. * @name set
  833. * @memberOf ListCache
  834. * @param {string} key The key of the value to set.
  835. * @param {*} value The value to set.
  836. * @returns {Object} Returns the list cache instance.
  837. */
  838. function listCacheSet(key, value) {
  839. var data = this.__data__,
  840. index = assocIndexOf(data, key);
  841. if (index < 0) {
  842. ++this.size;
  843. data.push([key, value]);
  844. } else {
  845. data[index][1] = value;
  846. }
  847. return this;
  848. }
  849. // Add methods to `ListCache`.
  850. ListCache.prototype.clear = listCacheClear;
  851. ListCache.prototype['delete'] = listCacheDelete;
  852. ListCache.prototype.get = listCacheGet;
  853. ListCache.prototype.has = listCacheHas;
  854. ListCache.prototype.set = listCacheSet;
  855. /**
  856. * Creates a map cache object to store key-value pairs.
  857. *
  858. * @private
  859. * @constructor
  860. * @param {Array} [entries] The key-value pairs to cache.
  861. */
  862. function MapCache(entries) {
  863. var index = -1,
  864. length = entries == null ? 0 : entries.length;
  865. this.clear();
  866. while (++index < length) {
  867. var entry = entries[index];
  868. this.set(entry[0], entry[1]);
  869. }
  870. }
  871. /**
  872. * Removes all key-value entries from the map.
  873. *
  874. * @private
  875. * @name clear
  876. * @memberOf MapCache
  877. */
  878. function mapCacheClear() {
  879. this.size = 0;
  880. this.__data__ = {
  881. 'hash': new Hash,
  882. 'map': new (Map || ListCache),
  883. 'string': new Hash
  884. };
  885. }
  886. /**
  887. * Removes `key` and its value from the map.
  888. *
  889. * @private
  890. * @name delete
  891. * @memberOf MapCache
  892. * @param {string} key The key of the value to remove.
  893. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  894. */
  895. function mapCacheDelete(key) {
  896. var result = getMapData(this, key)['delete'](key);
  897. this.size -= result ? 1 : 0;
  898. return result;
  899. }
  900. /**
  901. * Gets the map value for `key`.
  902. *
  903. * @private
  904. * @name get
  905. * @memberOf MapCache
  906. * @param {string} key The key of the value to get.
  907. * @returns {*} Returns the entry value.
  908. */
  909. function mapCacheGet(key) {
  910. return getMapData(this, key).get(key);
  911. }
  912. /**
  913. * Checks if a map value for `key` exists.
  914. *
  915. * @private
  916. * @name has
  917. * @memberOf MapCache
  918. * @param {string} key The key of the entry to check.
  919. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  920. */
  921. function mapCacheHas(key) {
  922. return getMapData(this, key).has(key);
  923. }
  924. /**
  925. * Sets the map `key` to `value`.
  926. *
  927. * @private
  928. * @name set
  929. * @memberOf MapCache
  930. * @param {string} key The key of the value to set.
  931. * @param {*} value The value to set.
  932. * @returns {Object} Returns the map cache instance.
  933. */
  934. function mapCacheSet(key, value) {
  935. var data = getMapData(this, key),
  936. size = data.size;
  937. data.set(key, value);
  938. this.size += data.size == size ? 0 : 1;
  939. return this;
  940. }
  941. // Add methods to `MapCache`.
  942. MapCache.prototype.clear = mapCacheClear;
  943. MapCache.prototype['delete'] = mapCacheDelete;
  944. MapCache.prototype.get = mapCacheGet;
  945. MapCache.prototype.has = mapCacheHas;
  946. MapCache.prototype.set = mapCacheSet;
  947. /**
  948. *
  949. * Creates an array cache object to store unique values.
  950. *
  951. * @private
  952. * @constructor
  953. * @param {Array} [values] The values to cache.
  954. */
  955. function SetCache(values) {
  956. var index = -1,
  957. length = values == null ? 0 : values.length;
  958. this.__data__ = new MapCache;
  959. while (++index < length) {
  960. this.add(values[index]);
  961. }
  962. }
  963. /**
  964. * Adds `value` to the array cache.
  965. *
  966. * @private
  967. * @name add
  968. * @memberOf SetCache
  969. * @alias push
  970. * @param {*} value The value to cache.
  971. * @returns {Object} Returns the cache instance.
  972. */
  973. function setCacheAdd(value) {
  974. this.__data__.set(value, HASH_UNDEFINED);
  975. return this;
  976. }
  977. /**
  978. * Checks if `value` is in the array cache.
  979. *
  980. * @private
  981. * @name has
  982. * @memberOf SetCache
  983. * @param {*} value The value to search for.
  984. * @returns {number} Returns `true` if `value` is found, else `false`.
  985. */
  986. function setCacheHas(value) {
  987. return this.__data__.has(value);
  988. }
  989. // Add methods to `SetCache`.
  990. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  991. SetCache.prototype.has = setCacheHas;
  992. /**
  993. * Creates a stack cache object to store key-value pairs.
  994. *
  995. * @private
  996. * @constructor
  997. * @param {Array} [entries] The key-value pairs to cache.
  998. */
  999. function Stack(entries) {
  1000. var data = this.__data__ = new ListCache(entries);
  1001. this.size = data.size;
  1002. }
  1003. /**
  1004. * Removes all key-value entries from the stack.
  1005. *
  1006. * @private
  1007. * @name clear
  1008. * @memberOf Stack
  1009. */
  1010. function stackClear() {
  1011. this.__data__ = new ListCache;
  1012. this.size = 0;
  1013. }
  1014. /**
  1015. * Removes `key` and its value from the stack.
  1016. *
  1017. * @private
  1018. * @name delete
  1019. * @memberOf Stack
  1020. * @param {string} key The key of the value to remove.
  1021. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  1022. */
  1023. function stackDelete(key) {
  1024. var data = this.__data__,
  1025. result = data['delete'](key);
  1026. this.size = data.size;
  1027. return result;
  1028. }
  1029. /**
  1030. * Gets the stack value for `key`.
  1031. *
  1032. * @private
  1033. * @name get
  1034. * @memberOf Stack
  1035. * @param {string} key The key of the value to get.
  1036. * @returns {*} Returns the entry value.
  1037. */
  1038. function stackGet(key) {
  1039. return this.__data__.get(key);
  1040. }
  1041. /**
  1042. * Checks if a stack value for `key` exists.
  1043. *
  1044. * @private
  1045. * @name has
  1046. * @memberOf Stack
  1047. * @param {string} key The key of the entry to check.
  1048. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  1049. */
  1050. function stackHas(key) {
  1051. return this.__data__.has(key);
  1052. }
  1053. /**
  1054. * Sets the stack `key` to `value`.
  1055. *
  1056. * @private
  1057. * @name set
  1058. * @memberOf Stack
  1059. * @param {string} key The key of the value to set.
  1060. * @param {*} value The value to set.
  1061. * @returns {Object} Returns the stack cache instance.
  1062. */
  1063. function stackSet(key, value) {
  1064. var data = this.__data__;
  1065. if (data instanceof ListCache) {
  1066. var pairs = data.__data__;
  1067. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  1068. pairs.push([key, value]);
  1069. this.size = ++data.size;
  1070. return this;
  1071. }
  1072. data = this.__data__ = new MapCache(pairs);
  1073. }
  1074. data.set(key, value);
  1075. this.size = data.size;
  1076. return this;
  1077. }
  1078. // Add methods to `Stack`.
  1079. Stack.prototype.clear = stackClear;
  1080. Stack.prototype['delete'] = stackDelete;
  1081. Stack.prototype.get = stackGet;
  1082. Stack.prototype.has = stackHas;
  1083. Stack.prototype.set = stackSet;
  1084. /**
  1085. * Creates an array of the enumerable property names of the array-like `value`.
  1086. *
  1087. * @private
  1088. * @param {*} value The value to query.
  1089. * @param {boolean} inherited Specify returning inherited property names.
  1090. * @returns {Array} Returns the array of property names.
  1091. */
  1092. function arrayLikeKeys(value, inherited) {
  1093. var isArr = isArray(value),
  1094. isArg = !isArr && isArguments(value),
  1095. isBuff = !isArr && !isArg && isBuffer(value),
  1096. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  1097. skipIndexes = isArr || isArg || isBuff || isType,
  1098. result = skipIndexes ? baseTimes(value.length, String) : [],
  1099. length = result.length;
  1100. for (var key in value) {
  1101. if ((inherited || hasOwnProperty.call(value, key)) &&
  1102. !(skipIndexes && (
  1103. // Safari 9 has enumerable `arguments.length` in strict mode.
  1104. key == 'length' ||
  1105. // Node.js 0.10 has enumerable non-index properties on buffers.
  1106. (isBuff && (key == 'offset' || key == 'parent')) ||
  1107. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  1108. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  1109. // Skip index properties.
  1110. isIndex(key, length)
  1111. ))) {
  1112. result.push(key);
  1113. }
  1114. }
  1115. return result;
  1116. }
  1117. /**
  1118. * Gets the index at which the `key` is found in `array` of key-value pairs.
  1119. *
  1120. * @private
  1121. * @param {Array} array The array to inspect.
  1122. * @param {*} key The key to search for.
  1123. * @returns {number} Returns the index of the matched value, else `-1`.
  1124. */
  1125. function assocIndexOf(array, key) {
  1126. var length = array.length;
  1127. while (length--) {
  1128. if (eq(array[length][0], key)) {
  1129. return length;
  1130. }
  1131. }
  1132. return -1;
  1133. }
  1134. /**
  1135. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  1136. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  1137. * symbols of `object`.
  1138. *
  1139. * @private
  1140. * @param {Object} object The object to query.
  1141. * @param {Function} keysFunc The function to get the keys of `object`.
  1142. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  1143. * @returns {Array} Returns the array of property names and symbols.
  1144. */
  1145. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  1146. var result = keysFunc(object);
  1147. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  1148. }
  1149. /**
  1150. * The base implementation of `getTag` without fallbacks for buggy environments.
  1151. *
  1152. * @private
  1153. * @param {*} value The value to query.
  1154. * @returns {string} Returns the `toStringTag`.
  1155. */
  1156. function baseGetTag(value) {
  1157. if (value == null) {
  1158. return value === undefined ? undefinedTag : nullTag;
  1159. }
  1160. return (symToStringTag && symToStringTag in Object(value))
  1161. ? getRawTag(value)
  1162. : objectToString(value);
  1163. }
  1164. /**
  1165. * The base implementation of `_.isArguments`.
  1166. *
  1167. * @private
  1168. * @param {*} value The value to check.
  1169. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  1170. */
  1171. function baseIsArguments(value) {
  1172. return isObjectLike(value) && baseGetTag(value) == argsTag;
  1173. }
  1174. /**
  1175. * The base implementation of `_.isEqual` which supports partial comparisons
  1176. * and tracks traversed objects.
  1177. *
  1178. * @private
  1179. * @param {*} value The value to compare.
  1180. * @param {*} other The other value to compare.
  1181. * @param {boolean} bitmask The bitmask flags.
  1182. * 1 - Unordered comparison
  1183. * 2 - Partial comparison
  1184. * @param {Function} [customizer] The function to customize comparisons.
  1185. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  1186. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1187. */
  1188. function baseIsEqual(value, other, bitmask, customizer, stack) {
  1189. if (value === other) {
  1190. return true;
  1191. }
  1192. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  1193. return value !== value && other !== other;
  1194. }
  1195. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  1196. }
  1197. /**
  1198. * A specialized version of `baseIsEqual` for arrays and objects which performs
  1199. * deep comparisons and tracks traversed objects enabling objects with circular
  1200. * references to be compared.
  1201. *
  1202. * @private
  1203. * @param {Object} object The object to compare.
  1204. * @param {Object} other The other object to compare.
  1205. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  1206. * @param {Function} customizer The function to customize comparisons.
  1207. * @param {Function} equalFunc The function to determine equivalents of values.
  1208. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  1209. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  1210. */
  1211. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  1212. var objIsArr = isArray(object),
  1213. othIsArr = isArray(other),
  1214. objTag = objIsArr ? arrayTag : getTag(object),
  1215. othTag = othIsArr ? arrayTag : getTag(other);
  1216. objTag = objTag == argsTag ? objectTag : objTag;
  1217. othTag = othTag == argsTag ? objectTag : othTag;
  1218. var objIsObj = objTag == objectTag,
  1219. othIsObj = othTag == objectTag,
  1220. isSameTag = objTag == othTag;
  1221. if (isSameTag && isBuffer(object)) {
  1222. if (!isBuffer(other)) {
  1223. return false;
  1224. }
  1225. objIsArr = true;
  1226. objIsObj = false;
  1227. }
  1228. if (isSameTag && !objIsObj) {
  1229. stack || (stack = new Stack);
  1230. return (objIsArr || isTypedArray(object))
  1231. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  1232. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  1233. }
  1234. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  1235. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  1236. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  1237. if (objIsWrapped || othIsWrapped) {
  1238. var objUnwrapped = objIsWrapped ? object.value() : object,
  1239. othUnwrapped = othIsWrapped ? other.value() : other;
  1240. stack || (stack = new Stack);
  1241. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  1242. }
  1243. }
  1244. if (!isSameTag) {
  1245. return false;
  1246. }
  1247. stack || (stack = new Stack);
  1248. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  1249. }
  1250. /**
  1251. * The base implementation of `_.isNative` without bad shim checks.
  1252. *
  1253. * @private
  1254. * @param {*} value The value to check.
  1255. * @returns {boolean} Returns `true` if `value` is a native function,
  1256. * else `false`.
  1257. */
  1258. function baseIsNative(value) {
  1259. if (!isObject(value) || isMasked(value)) {
  1260. return false;
  1261. }
  1262. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  1263. return pattern.test(toSource(value));
  1264. }
  1265. /**
  1266. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  1267. *
  1268. * @private
  1269. * @param {*} value The value to check.
  1270. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  1271. */
  1272. function baseIsTypedArray(value) {
  1273. return isObjectLike(value) &&
  1274. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  1275. }
  1276. /**
  1277. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  1278. *
  1279. * @private
  1280. * @param {Object} object The object to query.
  1281. * @returns {Array} Returns the array of property names.
  1282. */
  1283. function baseKeys(object) {
  1284. if (!isPrototype(object)) {
  1285. return nativeKeys(object);
  1286. }
  1287. var result = [];
  1288. for (var key in Object(object)) {
  1289. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  1290. result.push(key);
  1291. }
  1292. }
  1293. return result;
  1294. }
  1295. /**
  1296. * A specialized version of `baseIsEqualDeep` for arrays with support for
  1297. * partial deep comparisons.
  1298. *
  1299. * @private
  1300. * @param {Array} array The array to compare.
  1301. * @param {Array} other The other array to compare.
  1302. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  1303. * @param {Function} customizer The function to customize comparisons.
  1304. * @param {Function} equalFunc The function to determine equivalents of values.
  1305. * @param {Object} stack Tracks traversed `array` and `other` objects.
  1306. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  1307. */
  1308. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  1309. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  1310. arrLength = array.length,
  1311. othLength = other.length;
  1312. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  1313. return false;
  1314. }
  1315. // Assume cyclic values are equal.
  1316. var stacked = stack.get(array);
  1317. if (stacked && stack.get(other)) {
  1318. return stacked == other;
  1319. }
  1320. var index = -1,
  1321. result = true,
  1322. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  1323. stack.set(array, other);
  1324. stack.set(other, array);
  1325. // Ignore non-index properties.
  1326. while (++index < arrLength) {
  1327. var arrValue = array[index],
  1328. othValue = other[index];
  1329. if (customizer) {
  1330. var compared = isPartial
  1331. ? customizer(othValue, arrValue, index, other, array, stack)
  1332. : customizer(arrValue, othValue, index, array, other, stack);
  1333. }
  1334. if (compared !== undefined) {
  1335. if (compared) {
  1336. continue;
  1337. }
  1338. result = false;
  1339. break;
  1340. }
  1341. // Recursively compare arrays (susceptible to call stack limits).
  1342. if (seen) {
  1343. if (!arraySome(other, function(othValue, othIndex) {
  1344. if (!cacheHas(seen, othIndex) &&
  1345. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  1346. return seen.push(othIndex);
  1347. }
  1348. })) {
  1349. result = false;
  1350. break;
  1351. }
  1352. } else if (!(
  1353. arrValue === othValue ||
  1354. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  1355. )) {
  1356. result = false;
  1357. break;
  1358. }
  1359. }
  1360. stack['delete'](array);
  1361. stack['delete'](other);
  1362. return result;
  1363. }
  1364. /**
  1365. * A specialized version of `baseIsEqualDeep` for comparing objects of
  1366. * the same `toStringTag`.
  1367. *
  1368. * **Note:** This function only supports comparing values with tags of
  1369. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  1370. *
  1371. * @private
  1372. * @param {Object} object The object to compare.
  1373. * @param {Object} other The other object to compare.
  1374. * @param {string} tag The `toStringTag` of the objects to compare.
  1375. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  1376. * @param {Function} customizer The function to customize comparisons.
  1377. * @param {Function} equalFunc The function to determine equivalents of values.
  1378. * @param {Object} stack Tracks traversed `object` and `other` objects.
  1379. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  1380. */
  1381. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  1382. switch (tag) {
  1383. case dataViewTag:
  1384. if ((object.byteLength != other.byteLength) ||
  1385. (object.byteOffset != other.byteOffset)) {
  1386. return false;
  1387. }
  1388. object = object.buffer;
  1389. other = other.buffer;
  1390. case arrayBufferTag:
  1391. if ((object.byteLength != other.byteLength) ||
  1392. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  1393. return false;
  1394. }
  1395. return true;
  1396. case boolTag:
  1397. case dateTag:
  1398. case numberTag:
  1399. // Coerce booleans to `1` or `0` and dates to milliseconds.
  1400. // Invalid dates are coerced to `NaN`.
  1401. return eq(+object, +other);
  1402. case errorTag:
  1403. return object.name == other.name && object.message == other.message;
  1404. case regexpTag:
  1405. case stringTag:
  1406. // Coerce regexes to strings and treat strings, primitives and objects,
  1407. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  1408. // for more details.
  1409. return object == (other + '');
  1410. case mapTag:
  1411. var convert = mapToArray;
  1412. case setTag:
  1413. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  1414. convert || (convert = setToArray);
  1415. if (object.size != other.size && !isPartial) {
  1416. return false;
  1417. }
  1418. // Assume cyclic values are equal.
  1419. var stacked = stack.get(object);
  1420. if (stacked) {
  1421. return stacked == other;
  1422. }
  1423. bitmask |= COMPARE_UNORDERED_FLAG;
  1424. // Recursively compare objects (susceptible to call stack limits).
  1425. stack.set(object, other);
  1426. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  1427. stack['delete'](object);
  1428. return result;
  1429. case symbolTag:
  1430. if (symbolValueOf) {
  1431. return symbolValueOf.call(object) == symbolValueOf.call(other);
  1432. }
  1433. }
  1434. return false;
  1435. }
  1436. /**
  1437. * A specialized version of `baseIsEqualDeep` for objects with support for
  1438. * partial deep comparisons.
  1439. *
  1440. * @private
  1441. * @param {Object} object The object to compare.
  1442. * @param {Object} other The other object to compare.
  1443. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  1444. * @param {Function} customizer The function to customize comparisons.
  1445. * @param {Function} equalFunc The function to determine equivalents of values.
  1446. * @param {Object} stack Tracks traversed `object` and `other` objects.
  1447. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  1448. */
  1449. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  1450. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  1451. objProps = getAllKeys(object),
  1452. objLength = objProps.length,
  1453. othProps = getAllKeys(other),
  1454. othLength = othProps.length;
  1455. if (objLength != othLength && !isPartial) {
  1456. return false;
  1457. }
  1458. var index = objLength;
  1459. while (index--) {
  1460. var key = objProps[index];
  1461. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  1462. return false;
  1463. }
  1464. }
  1465. // Assume cyclic values are equal.
  1466. var stacked = stack.get(object);
  1467. if (stacked && stack.get(other)) {
  1468. return stacked == other;
  1469. }
  1470. var result = true;
  1471. stack.set(object, other);
  1472. stack.set(other, object);
  1473. var skipCtor = isPartial;
  1474. while (++index < objLength) {
  1475. key = objProps[index];
  1476. var objValue = object[key],
  1477. othValue = other[key];
  1478. if (customizer) {
  1479. var compared = isPartial
  1480. ? customizer(othValue, objValue, key, other, object, stack)
  1481. : customizer(objValue, othValue, key, object, other, stack);
  1482. }
  1483. // Recursively compare objects (susceptible to call stack limits).
  1484. if (!(compared === undefined
  1485. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  1486. : compared
  1487. )) {
  1488. result = false;
  1489. break;
  1490. }
  1491. skipCtor || (skipCtor = key == 'constructor');
  1492. }
  1493. if (result && !skipCtor) {
  1494. var objCtor = object.constructor,
  1495. othCtor = other.constructor;
  1496. // Non `Object` object instances with different constructors are not equal.
  1497. if (objCtor != othCtor &&
  1498. ('constructor' in object && 'constructor' in other) &&
  1499. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  1500. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  1501. result = false;
  1502. }
  1503. }
  1504. stack['delete'](object);
  1505. stack['delete'](other);
  1506. return result;
  1507. }
  1508. /**
  1509. * Creates an array of own enumerable property names and symbols of `object`.
  1510. *
  1511. * @private
  1512. * @param {Object} object The object to query.
  1513. * @returns {Array} Returns the array of property names and symbols.
  1514. */
  1515. function getAllKeys(object) {
  1516. return baseGetAllKeys(object, keys, getSymbols);
  1517. }
  1518. /**
  1519. * Gets the data for `map`.
  1520. *
  1521. * @private
  1522. * @param {Object} map The map to query.
  1523. * @param {string} key The reference key.
  1524. * @returns {*} Returns the map data.
  1525. */
  1526. function getMapData(map, key) {
  1527. var data = map.__data__;
  1528. return isKeyable(key)
  1529. ? data[typeof key == 'string' ? 'string' : 'hash']
  1530. : data.map;
  1531. }
  1532. /**
  1533. * Gets the native function at `key` of `object`.
  1534. *
  1535. * @private
  1536. * @param {Object} object The object to query.
  1537. * @param {string} key The key of the method to get.
  1538. * @returns {*} Returns the function if it's native, else `undefined`.
  1539. */
  1540. function getNative(object, key) {
  1541. var value = getValue(object, key);
  1542. return baseIsNative(value) ? value : undefined;
  1543. }
  1544. /**
  1545. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  1546. *
  1547. * @private
  1548. * @param {*} value The value to query.
  1549. * @returns {string} Returns the raw `toStringTag`.
  1550. */
  1551. function getRawTag(value) {
  1552. var isOwn = hasOwnProperty.call(value, symToStringTag),
  1553. tag = value[symToStringTag];
  1554. try {
  1555. value[symToStringTag] = undefined;
  1556. var unmasked = true;
  1557. } catch (e) {}
  1558. var result = nativeObjectToString.call(value);
  1559. if (unmasked) {
  1560. if (isOwn) {
  1561. value[symToStringTag] = tag;
  1562. } else {
  1563. delete value[symToStringTag];
  1564. }
  1565. }
  1566. return result;
  1567. }
  1568. /**
  1569. * Creates an array of the own enumerable symbols of `object`.
  1570. *
  1571. * @private
  1572. * @param {Object} object The object to query.
  1573. * @returns {Array} Returns the array of symbols.
  1574. */
  1575. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  1576. if (object == null) {
  1577. return [];
  1578. }
  1579. object = Object(object);
  1580. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  1581. return propertyIsEnumerable.call(object, symbol);
  1582. });
  1583. };
  1584. /**
  1585. * Gets the `toStringTag` of `value`.
  1586. *
  1587. * @private
  1588. * @param {*} value The value to query.
  1589. * @returns {string} Returns the `toStringTag`.
  1590. */
  1591. var getTag = baseGetTag;
  1592. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  1593. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  1594. (Map && getTag(new Map) != mapTag) ||
  1595. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  1596. (Set && getTag(new Set) != setTag) ||
  1597. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  1598. getTag = function(value) {
  1599. var result = baseGetTag(value),
  1600. Ctor = result == objectTag ? value.constructor : undefined,
  1601. ctorString = Ctor ? toSource(Ctor) : '';
  1602. if (ctorString) {
  1603. switch (ctorString) {
  1604. case dataViewCtorString: return dataViewTag;
  1605. case mapCtorString: return mapTag;
  1606. case promiseCtorString: return promiseTag;
  1607. case setCtorString: return setTag;
  1608. case weakMapCtorString: return weakMapTag;
  1609. }
  1610. }
  1611. return result;
  1612. };
  1613. }
  1614. /**
  1615. * Checks if `value` is a valid array-like index.
  1616. *
  1617. * @private
  1618. * @param {*} value The value to check.
  1619. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  1620. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  1621. */
  1622. function isIndex(value, length) {
  1623. length = length == null ? MAX_SAFE_INTEGER : length;
  1624. return !!length &&
  1625. (typeof value == 'number' || reIsUint.test(value)) &&
  1626. (value > -1 && value % 1 == 0 && value < length);
  1627. }
  1628. /**
  1629. * Checks if `value` is suitable for use as unique object key.
  1630. *
  1631. * @private
  1632. * @param {*} value The value to check.
  1633. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  1634. */
  1635. function isKeyable(value) {
  1636. var type = typeof value;
  1637. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  1638. ? (value !== '__proto__')
  1639. : (value === null);
  1640. }
  1641. /**
  1642. * Checks if `func` has its source masked.
  1643. *
  1644. * @private
  1645. * @param {Function} func The function to check.
  1646. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  1647. */
  1648. function isMasked(func) {
  1649. return !!maskSrcKey && (maskSrcKey in func);
  1650. }
  1651. /**
  1652. * Checks if `value` is likely a prototype object.
  1653. *
  1654. * @private
  1655. * @param {*} value The value to check.
  1656. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  1657. */
  1658. function isPrototype(value) {
  1659. var Ctor = value && value.constructor,
  1660. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  1661. return value === proto;
  1662. }
  1663. /**
  1664. * Converts `value` to a string using `Object.prototype.toString`.
  1665. *
  1666. * @private
  1667. * @param {*} value The value to convert.
  1668. * @returns {string} Returns the converted string.
  1669. */
  1670. function objectToString(value) {
  1671. return nativeObjectToString.call(value);
  1672. }
  1673. /**
  1674. * Converts `func` to its source code.
  1675. *
  1676. * @private
  1677. * @param {Function} func The function to convert.
  1678. * @returns {string} Returns the source code.
  1679. */
  1680. function toSource(func) {
  1681. if (func != null) {
  1682. try {
  1683. return funcToString.call(func);
  1684. } catch (e) {}
  1685. try {
  1686. return (func + '');
  1687. } catch (e) {}
  1688. }
  1689. return '';
  1690. }
  1691. /**
  1692. * Performs a
  1693. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  1694. * comparison between two values to determine if they are equivalent.
  1695. *
  1696. * @static
  1697. * @memberOf _
  1698. * @since 4.0.0
  1699. * @category Lang
  1700. * @param {*} value The value to compare.
  1701. * @param {*} other The other value to compare.
  1702. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1703. * @example
  1704. *
  1705. * var object = { 'a': 1 };
  1706. * var other = { 'a': 1 };
  1707. *
  1708. * _.eq(object, object);
  1709. * // => true
  1710. *
  1711. * _.eq(object, other);
  1712. * // => false
  1713. *
  1714. * _.eq('a', 'a');
  1715. * // => true
  1716. *
  1717. * _.eq('a', Object('a'));
  1718. * // => false
  1719. *
  1720. * _.eq(NaN, NaN);
  1721. * // => true
  1722. */
  1723. function eq(value, other) {
  1724. return value === other || (value !== value && other !== other);
  1725. }
  1726. /**
  1727. * Checks if `value` is likely an `arguments` object.
  1728. *
  1729. * @static
  1730. * @memberOf _
  1731. * @since 0.1.0
  1732. * @category Lang
  1733. * @param {*} value The value to check.
  1734. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  1735. * else `false`.
  1736. * @example
  1737. *
  1738. * _.isArguments(function() { return arguments; }());
  1739. * // => true
  1740. *
  1741. * _.isArguments([1, 2, 3]);
  1742. * // => false
  1743. */
  1744. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  1745. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  1746. !propertyIsEnumerable.call(value, 'callee');
  1747. };
  1748. /**
  1749. * Checks if `value` is classified as an `Array` object.
  1750. *
  1751. * @static
  1752. * @memberOf _
  1753. * @since 0.1.0
  1754. * @category Lang
  1755. * @param {*} value The value to check.
  1756. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  1757. * @example
  1758. *
  1759. * _.isArray([1, 2, 3]);
  1760. * // => true
  1761. *
  1762. * _.isArray(document.body.children);
  1763. * // => false
  1764. *
  1765. * _.isArray('abc');
  1766. * // => false
  1767. *
  1768. * _.isArray(_.noop);
  1769. * // => false
  1770. */
  1771. var isArray = Array.isArray;
  1772. /**
  1773. * Checks if `value` is array-like. A value is considered array-like if it's
  1774. * not a function and has a `value.length` that's an integer greater than or
  1775. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  1776. *
  1777. * @static
  1778. * @memberOf _
  1779. * @since 4.0.0
  1780. * @category Lang
  1781. * @param {*} value The value to check.
  1782. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  1783. * @example
  1784. *
  1785. * _.isArrayLike([1, 2, 3]);
  1786. * // => true
  1787. *
  1788. * _.isArrayLike(document.body.children);
  1789. * // => true
  1790. *
  1791. * _.isArrayLike('abc');
  1792. * // => true
  1793. *
  1794. * _.isArrayLike(_.noop);
  1795. * // => false
  1796. */
  1797. function isArrayLike(value) {
  1798. return value != null && isLength(value.length) && !isFunction(value);
  1799. }
  1800. /**
  1801. * Checks if `value` is a buffer.
  1802. *
  1803. * @static
  1804. * @memberOf _
  1805. * @since 4.3.0
  1806. * @category Lang
  1807. * @param {*} value The value to check.
  1808. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  1809. * @example
  1810. *
  1811. * _.isBuffer(new Buffer(2));
  1812. * // => true
  1813. *
  1814. * _.isBuffer(new Uint8Array(2));
  1815. * // => false
  1816. */
  1817. var isBuffer = nativeIsBuffer || stubFalse;
  1818. /**
  1819. * Performs a deep comparison between two values to determine if they are
  1820. * equivalent.
  1821. *
  1822. * **Note:** This method supports comparing arrays, array buffers, booleans,
  1823. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  1824. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  1825. * by their own, not inherited, enumerable properties. Functions and DOM
  1826. * nodes are compared by strict equality, i.e. `===`.
  1827. *
  1828. * @static
  1829. * @memberOf _
  1830. * @since 0.1.0
  1831. * @category Lang
  1832. * @param {*} value The value to compare.
  1833. * @param {*} other The other value to compare.
  1834. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1835. * @example
  1836. *
  1837. * var object = { 'a': 1 };
  1838. * var other = { 'a': 1 };
  1839. *
  1840. * _.isEqual(object, other);
  1841. * // => true
  1842. *
  1843. * object === other;
  1844. * // => false
  1845. */
  1846. function isEqual(value, other) {
  1847. return baseIsEqual(value, other);
  1848. }
  1849. /**
  1850. * Checks if `value` is classified as a `Function` object.
  1851. *
  1852. * @static
  1853. * @memberOf _
  1854. * @since 0.1.0
  1855. * @category Lang
  1856. * @param {*} value The value to check.
  1857. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  1858. * @example
  1859. *
  1860. * _.isFunction(_);
  1861. * // => true
  1862. *
  1863. * _.isFunction(/abc/);
  1864. * // => false
  1865. */
  1866. function isFunction(value) {
  1867. if (!isObject(value)) {
  1868. return false;
  1869. }
  1870. // The use of `Object#toString` avoids issues with the `typeof` operator
  1871. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  1872. var tag = baseGetTag(value);
  1873. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  1874. }
  1875. /**
  1876. * Checks if `value` is a valid array-like length.
  1877. *
  1878. * **Note:** This method is loosely based on
  1879. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  1880. *
  1881. * @static
  1882. * @memberOf _
  1883. * @since 4.0.0
  1884. * @category Lang
  1885. * @param {*} value The value to check.
  1886. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1887. * @example
  1888. *
  1889. * _.isLength(3);
  1890. * // => true
  1891. *
  1892. * _.isLength(Number.MIN_VALUE);
  1893. * // => false
  1894. *
  1895. * _.isLength(Infinity);
  1896. * // => false
  1897. *
  1898. * _.isLength('3');
  1899. * // => false
  1900. */
  1901. function isLength(value) {
  1902. return typeof value == 'number' &&
  1903. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1904. }
  1905. /**
  1906. * Checks if `value` is the
  1907. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  1908. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1909. *
  1910. * @static
  1911. * @memberOf _
  1912. * @since 0.1.0
  1913. * @category Lang
  1914. * @param {*} value The value to check.
  1915. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  1916. * @example
  1917. *
  1918. * _.isObject({});
  1919. * // => true
  1920. *
  1921. * _.isObject([1, 2, 3]);
  1922. * // => true
  1923. *
  1924. * _.isObject(_.noop);
  1925. * // => true
  1926. *
  1927. * _.isObject(null);
  1928. * // => false
  1929. */
  1930. function isObject(value) {
  1931. var type = typeof value;
  1932. return value != null && (type == 'object' || type == 'function');
  1933. }
  1934. /**
  1935. * Checks if `value` is object-like. A value is object-like if it's not `null`
  1936. * and has a `typeof` result of "object".
  1937. *
  1938. * @static
  1939. * @memberOf _
  1940. * @since 4.0.0
  1941. * @category Lang
  1942. * @param {*} value The value to check.
  1943. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  1944. * @example
  1945. *
  1946. * _.isObjectLike({});
  1947. * // => true
  1948. *
  1949. * _.isObjectLike([1, 2, 3]);
  1950. * // => true
  1951. *
  1952. * _.isObjectLike(_.noop);
  1953. * // => false
  1954. *
  1955. * _.isObjectLike(null);
  1956. * // => false
  1957. */
  1958. function isObjectLike(value) {
  1959. return value != null && typeof value == 'object';
  1960. }
  1961. /**
  1962. * Checks if `value` is classified as a typed array.
  1963. *
  1964. * @static
  1965. * @memberOf _
  1966. * @since 3.0.0
  1967. * @category Lang
  1968. * @param {*} value The value to check.
  1969. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  1970. * @example
  1971. *
  1972. * _.isTypedArray(new Uint8Array);
  1973. * // => true
  1974. *
  1975. * _.isTypedArray([]);
  1976. * // => false
  1977. */
  1978. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  1979. /**
  1980. * Creates an array of the own enumerable property names of `object`.
  1981. *
  1982. * **Note:** Non-object values are coerced to objects. See the
  1983. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  1984. * for more details.
  1985. *
  1986. * @static
  1987. * @since 0.1.0
  1988. * @memberOf _
  1989. * @category Object
  1990. * @param {Object} object The object to query.
  1991. * @returns {Array} Returns the array of property names.
  1992. * @example
  1993. *
  1994. * function Foo() {
  1995. * this.a = 1;
  1996. * this.b = 2;
  1997. * }
  1998. *
  1999. * Foo.prototype.c = 3;
  2000. *
  2001. * _.keys(new Foo);
  2002. * // => ['a', 'b'] (iteration order is not guaranteed)
  2003. *
  2004. * _.keys('hi');
  2005. * // => ['0', '1']
  2006. */
  2007. function keys(object) {
  2008. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  2009. }
  2010. /**
  2011. * This method returns a new empty array.
  2012. *
  2013. * @static
  2014. * @memberOf _
  2015. * @since 4.13.0
  2016. * @category Util
  2017. * @returns {Array} Returns the new empty array.
  2018. * @example
  2019. *
  2020. * var arrays = _.times(2, _.stubArray);
  2021. *
  2022. * console.log(arrays);
  2023. * // => [[], []]
  2024. *
  2025. * console.log(arrays[0] === arrays[1]);
  2026. * // => false
  2027. */
  2028. function stubArray() {
  2029. return [];
  2030. }
  2031. /**
  2032. * This method returns `false`.
  2033. *
  2034. * @static
  2035. * @memberOf _
  2036. * @since 4.13.0
  2037. * @category Util
  2038. * @returns {boolean} Returns `false`.
  2039. * @example
  2040. *
  2041. * _.times(2, _.stubFalse);
  2042. * // => [false, false]
  2043. */
  2044. function stubFalse() {
  2045. return false;
  2046. }
  2047. module.exports = isEqual;
  2048. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10), __webpack_require__(38)(module)))
  2049. /***/ }),
  2050. /* 14 */
  2051. /***/ (function(module, exports, __webpack_require__) {
  2052. "use strict";
  2053. // Copyright Joyent, Inc. and other Node contributors.
  2054. //
  2055. // Permission is hereby granted, free of charge, to any person obtaining a
  2056. // copy of this software and associated documentation files (the
  2057. // "Software"), to deal in the Software without restriction, including
  2058. // without limitation the rights to use, copy, modify, merge, publish,
  2059. // distribute, sublicense, and/or sell copies of the Software, and to permit
  2060. // persons to whom the Software is furnished to do so, subject to the
  2061. // following conditions:
  2062. //
  2063. // The above copyright notice and this permission notice shall be included
  2064. // in all copies or substantial portions of the Software.
  2065. //
  2066. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  2067. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  2068. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  2069. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  2070. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  2071. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  2072. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  2073. // a duplex stream is just a stream that is both readable and writable.
  2074. // Since JS doesn't have multiple prototypal inheritance, this class
  2075. // prototypally inherits from Readable, and then parasitically from
  2076. // Writable.
  2077. /*<replacement>*/
  2078. var pna = __webpack_require__(24);
  2079. /*</replacement>*/
  2080. /*<replacement>*/
  2081. var objectKeys = Object.keys || function (obj) {
  2082. var keys = [];
  2083. for (var key in obj) {
  2084. keys.push(key);
  2085. }return keys;
  2086. };
  2087. /*</replacement>*/
  2088. module.exports = Duplex;
  2089. /*<replacement>*/
  2090. var util = __webpack_require__(21);
  2091. util.inherits = __webpack_require__(16);
  2092. /*</replacement>*/
  2093. var Readable = __webpack_require__(45);
  2094. var Writable = __webpack_require__(29);
  2095. util.inherits(Duplex, Readable);
  2096. {
  2097. // avoid scope creep, the keys array can then be collected
  2098. var keys = objectKeys(Writable.prototype);
  2099. for (var v = 0; v < keys.length; v++) {
  2100. var method = keys[v];
  2101. if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  2102. }
  2103. }
  2104. function Duplex(options) {
  2105. if (!(this instanceof Duplex)) return new Duplex(options);
  2106. Readable.call(this, options);
  2107. Writable.call(this, options);
  2108. if (options && options.readable === false) this.readable = false;
  2109. if (options && options.writable === false) this.writable = false;
  2110. this.allowHalfOpen = true;
  2111. if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
  2112. this.once('end', onend);
  2113. }
  2114. Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  2115. // making it explicit this property is not enumerable
  2116. // because otherwise some prototype manipulation in
  2117. // userland will fail
  2118. enumerable: false,
  2119. get: function () {
  2120. return this._writableState.highWaterMark;
  2121. }
  2122. });
  2123. // the no-half-open enforcer
  2124. function onend() {
  2125. // if we allow half-open state, or if the writable side ended,
  2126. // then we're ok.
  2127. if (this.allowHalfOpen || this._writableState.ended) return;
  2128. // no more data can be written.
  2129. // But allow more writes to happen in this tick.
  2130. pna.nextTick(onEndNT, this);
  2131. }
  2132. function onEndNT(self) {
  2133. self.end();
  2134. }
  2135. Object.defineProperty(Duplex.prototype, 'destroyed', {
  2136. get: function () {
  2137. if (this._readableState === undefined || this._writableState === undefined) {
  2138. return false;
  2139. }
  2140. return this._readableState.destroyed && this._writableState.destroyed;
  2141. },
  2142. set: function (value) {
  2143. // we ignore the value if the stream
  2144. // has not been initialized yet
  2145. if (this._readableState === undefined || this._writableState === undefined) {
  2146. return;
  2147. }
  2148. // backward compatibility, the user is explicitly
  2149. // managing destroyed
  2150. this._readableState.destroyed = value;
  2151. this._writableState.destroyed = value;
  2152. }
  2153. });
  2154. Duplex.prototype._destroy = function (err, cb) {
  2155. this.push(null);
  2156. this.end();
  2157. pna.nextTick(cb, err);
  2158. };
  2159. /***/ }),
  2160. /* 15 */
  2161. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2162. "use strict";
  2163. __webpack_require__.r(__webpack_exports__);
  2164. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty.js
  2165. function _defineProperty(obj, key, value) {
  2166. if (key in obj) {
  2167. Object.defineProperty(obj, key, {
  2168. value: value,
  2169. enumerable: true,
  2170. configurable: true,
  2171. writable: true
  2172. });
  2173. } else {
  2174. obj[key] = value;
  2175. }
  2176. return obj;
  2177. }
  2178. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  2179. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectSpread2; });
  2180. function ownKeys(object, enumerableOnly) {
  2181. var keys = Object.keys(object);
  2182. if (Object.getOwnPropertySymbols) {
  2183. var symbols = Object.getOwnPropertySymbols(object);
  2184. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  2185. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  2186. });
  2187. keys.push.apply(keys, symbols);
  2188. }
  2189. return keys;
  2190. }
  2191. function _objectSpread2(target) {
  2192. for (var i = 1; i < arguments.length; i++) {
  2193. var source = arguments[i] != null ? arguments[i] : {};
  2194. if (i % 2) {
  2195. ownKeys(Object(source), true).forEach(function (key) {
  2196. _defineProperty(target, key, source[key]);
  2197. });
  2198. } else if (Object.getOwnPropertyDescriptors) {
  2199. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  2200. } else {
  2201. ownKeys(Object(source)).forEach(function (key) {
  2202. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  2203. });
  2204. }
  2205. }
  2206. return target;
  2207. }
  2208. /***/ }),
  2209. /* 16 */
  2210. /***/ (function(module, exports) {
  2211. if (typeof Object.create === 'function') {
  2212. // implementation from standard node.js 'util' module
  2213. module.exports = function inherits(ctor, superCtor) {
  2214. if (superCtor) {
  2215. ctor.super_ = superCtor
  2216. ctor.prototype = Object.create(superCtor.prototype, {
  2217. constructor: {
  2218. value: ctor,
  2219. enumerable: false,
  2220. writable: true,
  2221. configurable: true
  2222. }
  2223. })
  2224. }
  2225. };
  2226. } else {
  2227. // old school shim for old browsers
  2228. module.exports = function inherits(ctor, superCtor) {
  2229. if (superCtor) {
  2230. ctor.super_ = superCtor
  2231. var TempCtor = function () {}
  2232. TempCtor.prototype = superCtor.prototype
  2233. ctor.prototype = new TempCtor()
  2234. ctor.prototype.constructor = ctor
  2235. }
  2236. }
  2237. }
  2238. /***/ }),
  2239. /* 17 */
  2240. /***/ (function(module, exports, __webpack_require__) {
  2241. "use strict";
  2242. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _util=__webpack_require__(11);var Marker=/*#__PURE__*/function(){function Marker(features){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,Marker);this.features=void 0;this.markersElement=[];this.options=void 0;this.features=features;this.options=options;}(0,_createClass2.default)(Marker,[{key:"setFeatures",value:function setFeatures(features){this.markersElement=[];this.features=features;this.features&&this._createMarker();}},{key:"getMarkersElement",value:function getMarkersElement(){return this.markersElement;}},{key:"setMarkersTextField",value:function setMarkersTextField(textField){if(!this.features||JSON.stringify(this.features)==='{}'){return;}this.options.textField=textField;var name=document.getElementsByClassName('sm-component-animate-marker__name');for(var i=0;i<name.length;i++){var properties=this.features.features[i]&&this.features.features[i].properties;if(properties&&properties[textField]){name[i].innerHTML=properties[textField];}else{name[i].innerHTML='';}}}},{key:"setMarkersTextFontSize",value:function setMarkersTextFontSize(textFontSize){this.options.textFontSize=textFontSize;var pulse=document.getElementsByClassName('sm-component-animate-marker__name-container');for(var i=0;i<pulse.length;i++){// @ts-ignore
  2243. pulse[i].style.fontSize=textFontSize+'px';}}},{key:"setMarkersTextColor",value:function setMarkersTextColor(textColor){this.options.textColor=textColor;var pulse=document.getElementsByClassName('sm-component-animate-marker__name-container');for(var i=0;i<pulse.length;i++){// @ts-ignore
  2244. pulse[i].style.color=textColor;}}},{key:"_getColorWithOpacity",value:function _getColorWithOpacity(color,opacity){return(0,_util.getColorWithOpacity)(color,opacity);}},{key:"_getTextContainer",value:function _getTextContainer(point,className){var name;if(point.properties&&Object.keys(point.properties).length!==0&&this.options.textField){name=point.properties[this.options.textField];}var nameContainer=document.createElement('div');nameContainer.className="sm-component-animate-marker__name-container sm-component-animate-marker__name-container--".concat(className);this.options.textColor&&(nameContainer.style.color=this.options.textColor);this.options.textFontSize&&(nameContainer.style.fontSize=this.options.textFontSize+'px');var nameSpan=document.createElement('span');nameSpan.className="sm-component-animate-marker__".concat(className," sm-component-animate-marker__name");nameSpan.innerHTML=name||'';nameContainer.appendChild(nameSpan);return nameContainer;}}]);return Marker;}();exports.default=Marker;
  2245. /***/ }),
  2246. /* 18 */
  2247. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2248. "use strict";
  2249. __webpack_require__.r(__webpack_exports__);
  2250. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _assertThisInitialized; });
  2251. function _assertThisInitialized(self) {
  2252. if (self === void 0) {
  2253. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2254. }
  2255. return self;
  2256. }
  2257. /***/ }),
  2258. /* 19 */
  2259. /***/ (function(module, exports, __webpack_require__) {
  2260. var _typeof = __webpack_require__(62);
  2261. function _getRequireWildcardCache() {
  2262. if (typeof WeakMap !== "function") return null;
  2263. var cache = new WeakMap();
  2264. _getRequireWildcardCache = function _getRequireWildcardCache() {
  2265. return cache;
  2266. };
  2267. return cache;
  2268. }
  2269. function _interopRequireWildcard(obj) {
  2270. if (obj && obj.__esModule) {
  2271. return obj;
  2272. }
  2273. if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
  2274. return {
  2275. "default": obj
  2276. };
  2277. }
  2278. var cache = _getRequireWildcardCache();
  2279. if (cache && cache.has(obj)) {
  2280. return cache.get(obj);
  2281. }
  2282. var newObj = {};
  2283. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  2284. for (var key in obj) {
  2285. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  2286. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  2287. if (desc && (desc.get || desc.set)) {
  2288. Object.defineProperty(newObj, key, desc);
  2289. } else {
  2290. newObj[key] = obj[key];
  2291. }
  2292. }
  2293. }
  2294. newObj["default"] = obj;
  2295. if (cache) {
  2296. cache.set(obj, newObj);
  2297. }
  2298. return newObj;
  2299. }
  2300. module.exports = _interopRequireWildcard;
  2301. /***/ }),
  2302. /* 20 */
  2303. /***/ (function(module, exports, __webpack_require__) {
  2304. "use strict";
  2305. // Copyright Joyent, Inc. and other Node contributors.
  2306. //
  2307. // Permission is hereby granted, free of charge, to any person obtaining a
  2308. // copy of this software and associated documentation files (the
  2309. // "Software"), to deal in the Software without restriction, including
  2310. // without limitation the rights to use, copy, modify, merge, publish,
  2311. // distribute, sublicense, and/or sell copies of the Software, and to permit
  2312. // persons to whom the Software is furnished to do so, subject to the
  2313. // following conditions:
  2314. //
  2315. // The above copyright notice and this permission notice shall be included
  2316. // in all copies or substantial portions of the Software.
  2317. //
  2318. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  2319. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  2320. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  2321. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  2322. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  2323. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  2324. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  2325. var R = typeof Reflect === 'object' ? Reflect : null
  2326. var ReflectApply = R && typeof R.apply === 'function'
  2327. ? R.apply
  2328. : function ReflectApply(target, receiver, args) {
  2329. return Function.prototype.apply.call(target, receiver, args);
  2330. }
  2331. var ReflectOwnKeys
  2332. if (R && typeof R.ownKeys === 'function') {
  2333. ReflectOwnKeys = R.ownKeys
  2334. } else if (Object.getOwnPropertySymbols) {
  2335. ReflectOwnKeys = function ReflectOwnKeys(target) {
  2336. return Object.getOwnPropertyNames(target)
  2337. .concat(Object.getOwnPropertySymbols(target));
  2338. };
  2339. } else {
  2340. ReflectOwnKeys = function ReflectOwnKeys(target) {
  2341. return Object.getOwnPropertyNames(target);
  2342. };
  2343. }
  2344. function ProcessEmitWarning(warning) {
  2345. if (console && console.warn) console.warn(warning);
  2346. }
  2347. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  2348. return value !== value;
  2349. }
  2350. function EventEmitter() {
  2351. EventEmitter.init.call(this);
  2352. }
  2353. module.exports = EventEmitter;
  2354. // Backwards-compat with node 0.10.x
  2355. EventEmitter.EventEmitter = EventEmitter;
  2356. EventEmitter.prototype._events = undefined;
  2357. EventEmitter.prototype._eventsCount = 0;
  2358. EventEmitter.prototype._maxListeners = undefined;
  2359. // By default EventEmitters will print a warning if more than 10 listeners are
  2360. // added to it. This is a useful default which helps finding memory leaks.
  2361. var defaultMaxListeners = 10;
  2362. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  2363. enumerable: true,
  2364. get: function() {
  2365. return defaultMaxListeners;
  2366. },
  2367. set: function(arg) {
  2368. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  2369. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  2370. }
  2371. defaultMaxListeners = arg;
  2372. }
  2373. });
  2374. EventEmitter.init = function() {
  2375. if (this._events === undefined ||
  2376. this._events === Object.getPrototypeOf(this)._events) {
  2377. this._events = Object.create(null);
  2378. this._eventsCount = 0;
  2379. }
  2380. this._maxListeners = this._maxListeners || undefined;
  2381. };
  2382. // Obviously not all Emitters should be limited to 10. This function allows
  2383. // that to be increased. Set to zero for unlimited.
  2384. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  2385. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  2386. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  2387. }
  2388. this._maxListeners = n;
  2389. return this;
  2390. };
  2391. function $getMaxListeners(that) {
  2392. if (that._maxListeners === undefined)
  2393. return EventEmitter.defaultMaxListeners;
  2394. return that._maxListeners;
  2395. }
  2396. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  2397. return $getMaxListeners(this);
  2398. };
  2399. EventEmitter.prototype.emit = function emit(type) {
  2400. var args = [];
  2401. for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
  2402. var doError = (type === 'error');
  2403. var events = this._events;
  2404. if (events !== undefined)
  2405. doError = (doError && events.error === undefined);
  2406. else if (!doError)
  2407. return false;
  2408. // If there is no 'error' event listener then throw.
  2409. if (doError) {
  2410. var er;
  2411. if (args.length > 0)
  2412. er = args[0];
  2413. if (er instanceof Error) {
  2414. // Note: The comments on the `throw` lines are intentional, they show
  2415. // up in Node's output if this results in an unhandled exception.
  2416. throw er; // Unhandled 'error' event
  2417. }
  2418. // At least give some kind of context to the user
  2419. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  2420. err.context = er;
  2421. throw err; // Unhandled 'error' event
  2422. }
  2423. var handler = events[type];
  2424. if (handler === undefined)
  2425. return false;
  2426. if (typeof handler === 'function') {
  2427. ReflectApply(handler, this, args);
  2428. } else {
  2429. var len = handler.length;
  2430. var listeners = arrayClone(handler, len);
  2431. for (var i = 0; i < len; ++i)
  2432. ReflectApply(listeners[i], this, args);
  2433. }
  2434. return true;
  2435. };
  2436. function _addListener(target, type, listener, prepend) {
  2437. var m;
  2438. var events;
  2439. var existing;
  2440. if (typeof listener !== 'function') {
  2441. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  2442. }
  2443. events = target._events;
  2444. if (events === undefined) {
  2445. events = target._events = Object.create(null);
  2446. target._eventsCount = 0;
  2447. } else {
  2448. // To avoid recursion in the case that type === "newListener"! Before
  2449. // adding it to the listeners, first emit "newListener".
  2450. if (events.newListener !== undefined) {
  2451. target.emit('newListener', type,
  2452. listener.listener ? listener.listener : listener);
  2453. // Re-assign `events` because a newListener handler could have caused the
  2454. // this._events to be assigned to a new object
  2455. events = target._events;
  2456. }
  2457. existing = events[type];
  2458. }
  2459. if (existing === undefined) {
  2460. // Optimize the case of one listener. Don't need the extra array object.
  2461. existing = events[type] = listener;
  2462. ++target._eventsCount;
  2463. } else {
  2464. if (typeof existing === 'function') {
  2465. // Adding the second element, need to change to array.
  2466. existing = events[type] =
  2467. prepend ? [listener, existing] : [existing, listener];
  2468. // If we've already got an array, just append.
  2469. } else if (prepend) {
  2470. existing.unshift(listener);
  2471. } else {
  2472. existing.push(listener);
  2473. }
  2474. // Check for listener leak
  2475. m = $getMaxListeners(target);
  2476. if (m > 0 && existing.length > m && !existing.warned) {
  2477. existing.warned = true;
  2478. // No error code for this since it is a Warning
  2479. // eslint-disable-next-line no-restricted-syntax
  2480. var w = new Error('Possible EventEmitter memory leak detected. ' +
  2481. existing.length + ' ' + String(type) + ' listeners ' +
  2482. 'added. Use emitter.setMaxListeners() to ' +
  2483. 'increase limit');
  2484. w.name = 'MaxListenersExceededWarning';
  2485. w.emitter = target;
  2486. w.type = type;
  2487. w.count = existing.length;
  2488. ProcessEmitWarning(w);
  2489. }
  2490. }
  2491. return target;
  2492. }
  2493. EventEmitter.prototype.addListener = function addListener(type, listener) {
  2494. return _addListener(this, type, listener, false);
  2495. };
  2496. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  2497. EventEmitter.prototype.prependListener =
  2498. function prependListener(type, listener) {
  2499. return _addListener(this, type, listener, true);
  2500. };
  2501. function onceWrapper() {
  2502. var args = [];
  2503. for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);
  2504. if (!this.fired) {
  2505. this.target.removeListener(this.type, this.wrapFn);
  2506. this.fired = true;
  2507. ReflectApply(this.listener, this.target, args);
  2508. }
  2509. }
  2510. function _onceWrap(target, type, listener) {
  2511. var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
  2512. var wrapped = onceWrapper.bind(state);
  2513. wrapped.listener = listener;
  2514. state.wrapFn = wrapped;
  2515. return wrapped;
  2516. }
  2517. EventEmitter.prototype.once = function once(type, listener) {
  2518. if (typeof listener !== 'function') {
  2519. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  2520. }
  2521. this.on(type, _onceWrap(this, type, listener));
  2522. return this;
  2523. };
  2524. EventEmitter.prototype.prependOnceListener =
  2525. function prependOnceListener(type, listener) {
  2526. if (typeof listener !== 'function') {
  2527. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  2528. }
  2529. this.prependListener(type, _onceWrap(this, type, listener));
  2530. return this;
  2531. };
  2532. // Emits a 'removeListener' event if and only if the listener was removed.
  2533. EventEmitter.prototype.removeListener =
  2534. function removeListener(type, listener) {
  2535. var list, events, position, i, originalListener;
  2536. if (typeof listener !== 'function') {
  2537. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  2538. }
  2539. events = this._events;
  2540. if (events === undefined)
  2541. return this;
  2542. list = events[type];
  2543. if (list === undefined)
  2544. return this;
  2545. if (list === listener || list.listener === listener) {
  2546. if (--this._eventsCount === 0)
  2547. this._events = Object.create(null);
  2548. else {
  2549. delete events[type];
  2550. if (events.removeListener)
  2551. this.emit('removeListener', type, list.listener || listener);
  2552. }
  2553. } else if (typeof list !== 'function') {
  2554. position = -1;
  2555. for (i = list.length - 1; i >= 0; i--) {
  2556. if (list[i] === listener || list[i].listener === listener) {
  2557. originalListener = list[i].listener;
  2558. position = i;
  2559. break;
  2560. }
  2561. }
  2562. if (position < 0)
  2563. return this;
  2564. if (position === 0)
  2565. list.shift();
  2566. else {
  2567. spliceOne(list, position);
  2568. }
  2569. if (list.length === 1)
  2570. events[type] = list[0];
  2571. if (events.removeListener !== undefined)
  2572. this.emit('removeListener', type, originalListener || listener);
  2573. }
  2574. return this;
  2575. };
  2576. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  2577. EventEmitter.prototype.removeAllListeners =
  2578. function removeAllListeners(type) {
  2579. var listeners, events, i;
  2580. events = this._events;
  2581. if (events === undefined)
  2582. return this;
  2583. // not listening for removeListener, no need to emit
  2584. if (events.removeListener === undefined) {
  2585. if (arguments.length === 0) {
  2586. this._events = Object.create(null);
  2587. this._eventsCount = 0;
  2588. } else if (events[type] !== undefined) {
  2589. if (--this._eventsCount === 0)
  2590. this._events = Object.create(null);
  2591. else
  2592. delete events[type];
  2593. }
  2594. return this;
  2595. }
  2596. // emit removeListener for all listeners on all events
  2597. if (arguments.length === 0) {
  2598. var keys = Object.keys(events);
  2599. var key;
  2600. for (i = 0; i < keys.length; ++i) {
  2601. key = keys[i];
  2602. if (key === 'removeListener') continue;
  2603. this.removeAllListeners(key);
  2604. }
  2605. this.removeAllListeners('removeListener');
  2606. this._events = Object.create(null);
  2607. this._eventsCount = 0;
  2608. return this;
  2609. }
  2610. listeners = events[type];
  2611. if (typeof listeners === 'function') {
  2612. this.removeListener(type, listeners);
  2613. } else if (listeners !== undefined) {
  2614. // LIFO order
  2615. for (i = listeners.length - 1; i >= 0; i--) {
  2616. this.removeListener(type, listeners[i]);
  2617. }
  2618. }
  2619. return this;
  2620. };
  2621. function _listeners(target, type, unwrap) {
  2622. var events = target._events;
  2623. if (events === undefined)
  2624. return [];
  2625. var evlistener = events[type];
  2626. if (evlistener === undefined)
  2627. return [];
  2628. if (typeof evlistener === 'function')
  2629. return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  2630. return unwrap ?
  2631. unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  2632. }
  2633. EventEmitter.prototype.listeners = function listeners(type) {
  2634. return _listeners(this, type, true);
  2635. };
  2636. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  2637. return _listeners(this, type, false);
  2638. };
  2639. EventEmitter.listenerCount = function(emitter, type) {
  2640. if (typeof emitter.listenerCount === 'function') {
  2641. return emitter.listenerCount(type);
  2642. } else {
  2643. return listenerCount.call(emitter, type);
  2644. }
  2645. };
  2646. EventEmitter.prototype.listenerCount = listenerCount;
  2647. function listenerCount(type) {
  2648. var events = this._events;
  2649. if (events !== undefined) {
  2650. var evlistener = events[type];
  2651. if (typeof evlistener === 'function') {
  2652. return 1;
  2653. } else if (evlistener !== undefined) {
  2654. return evlistener.length;
  2655. }
  2656. }
  2657. return 0;
  2658. }
  2659. EventEmitter.prototype.eventNames = function eventNames() {
  2660. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  2661. };
  2662. function arrayClone(arr, n) {
  2663. var copy = new Array(n);
  2664. for (var i = 0; i < n; ++i)
  2665. copy[i] = arr[i];
  2666. return copy;
  2667. }
  2668. function spliceOne(list, index) {
  2669. for (; index + 1 < list.length; index++)
  2670. list[index] = list[index + 1];
  2671. list.pop();
  2672. }
  2673. function unwrapListeners(arr) {
  2674. var ret = new Array(arr.length);
  2675. for (var i = 0; i < ret.length; ++i) {
  2676. ret[i] = arr[i].listener || arr[i];
  2677. }
  2678. return ret;
  2679. }
  2680. /***/ }),
  2681. /* 21 */
  2682. /***/ (function(module, exports, __webpack_require__) {
  2683. /* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
  2684. //
  2685. // Permission is hereby granted, free of charge, to any person obtaining a
  2686. // copy of this software and associated documentation files (the
  2687. // "Software"), to deal in the Software without restriction, including
  2688. // without limitation the rights to use, copy, modify, merge, publish,
  2689. // distribute, sublicense, and/or sell copies of the Software, and to permit
  2690. // persons to whom the Software is furnished to do so, subject to the
  2691. // following conditions:
  2692. //
  2693. // The above copyright notice and this permission notice shall be included
  2694. // in all copies or substantial portions of the Software.
  2695. //
  2696. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  2697. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  2698. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  2699. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  2700. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  2701. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  2702. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  2703. // NOTE: These type checking functions intentionally don't use `instanceof`
  2704. // because it is fragile and can be easily faked with `Object.create()`.
  2705. function isArray(arg) {
  2706. if (Array.isArray) {
  2707. return Array.isArray(arg);
  2708. }
  2709. return objectToString(arg) === '[object Array]';
  2710. }
  2711. exports.isArray = isArray;
  2712. function isBoolean(arg) {
  2713. return typeof arg === 'boolean';
  2714. }
  2715. exports.isBoolean = isBoolean;
  2716. function isNull(arg) {
  2717. return arg === null;
  2718. }
  2719. exports.isNull = isNull;
  2720. function isNullOrUndefined(arg) {
  2721. return arg == null;
  2722. }
  2723. exports.isNullOrUndefined = isNullOrUndefined;
  2724. function isNumber(arg) {
  2725. return typeof arg === 'number';
  2726. }
  2727. exports.isNumber = isNumber;
  2728. function isString(arg) {
  2729. return typeof arg === 'string';
  2730. }
  2731. exports.isString = isString;
  2732. function isSymbol(arg) {
  2733. return typeof arg === 'symbol';
  2734. }
  2735. exports.isSymbol = isSymbol;
  2736. function isUndefined(arg) {
  2737. return arg === void 0;
  2738. }
  2739. exports.isUndefined = isUndefined;
  2740. function isRegExp(re) {
  2741. return objectToString(re) === '[object RegExp]';
  2742. }
  2743. exports.isRegExp = isRegExp;
  2744. function isObject(arg) {
  2745. return typeof arg === 'object' && arg !== null;
  2746. }
  2747. exports.isObject = isObject;
  2748. function isDate(d) {
  2749. return objectToString(d) === '[object Date]';
  2750. }
  2751. exports.isDate = isDate;
  2752. function isError(e) {
  2753. return (objectToString(e) === '[object Error]' || e instanceof Error);
  2754. }
  2755. exports.isError = isError;
  2756. function isFunction(arg) {
  2757. return typeof arg === 'function';
  2758. }
  2759. exports.isFunction = isFunction;
  2760. function isPrimitive(arg) {
  2761. return arg === null ||
  2762. typeof arg === 'boolean' ||
  2763. typeof arg === 'number' ||
  2764. typeof arg === 'string' ||
  2765. typeof arg === 'symbol' || // ES6 symbol
  2766. typeof arg === 'undefined';
  2767. }
  2768. exports.isPrimitive = isPrimitive;
  2769. exports.isBuffer = Buffer.isBuffer;
  2770. function objectToString(o) {
  2771. return Object.prototype.toString.call(o);
  2772. }
  2773. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(22).Buffer))
  2774. /***/ }),
  2775. /* 22 */
  2776. /***/ (function(module, exports, __webpack_require__) {
  2777. "use strict";
  2778. /* WEBPACK VAR INJECTION */(function(global) {/*!
  2779. * The buffer module from node.js, for the browser.
  2780. *
  2781. * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
  2782. * @license MIT
  2783. */
  2784. /* eslint-disable no-proto */
  2785. var base64 = __webpack_require__(81)
  2786. var ieee754 = __webpack_require__(82)
  2787. var isArray = __webpack_require__(44)
  2788. exports.Buffer = Buffer
  2789. exports.SlowBuffer = SlowBuffer
  2790. exports.INSPECT_MAX_BYTES = 50
  2791. /**
  2792. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  2793. * === true Use Uint8Array implementation (fastest)
  2794. * === false Use Object implementation (most compatible, even IE6)
  2795. *
  2796. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  2797. * Opera 11.6+, iOS 4.2+.
  2798. *
  2799. * Due to various browser bugs, sometimes the Object implementation will be used even
  2800. * when the browser supports typed arrays.
  2801. *
  2802. * Note:
  2803. *
  2804. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  2805. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  2806. *
  2807. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  2808. *
  2809. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  2810. * incorrect length in some situations.
  2811. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  2812. * get the Object implementation, which is slower but behaves correctly.
  2813. */
  2814. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  2815. ? global.TYPED_ARRAY_SUPPORT
  2816. : typedArraySupport()
  2817. /*
  2818. * Export kMaxLength after typed array support is determined.
  2819. */
  2820. exports.kMaxLength = kMaxLength()
  2821. function typedArraySupport () {
  2822. try {
  2823. var arr = new Uint8Array(1)
  2824. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  2825. return arr.foo() === 42 && // typed array instances can be augmented
  2826. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  2827. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  2828. } catch (e) {
  2829. return false
  2830. }
  2831. }
  2832. function kMaxLength () {
  2833. return Buffer.TYPED_ARRAY_SUPPORT
  2834. ? 0x7fffffff
  2835. : 0x3fffffff
  2836. }
  2837. function createBuffer (that, length) {
  2838. if (kMaxLength() < length) {
  2839. throw new RangeError('Invalid typed array length')
  2840. }
  2841. if (Buffer.TYPED_ARRAY_SUPPORT) {
  2842. // Return an augmented `Uint8Array` instance, for best performance
  2843. that = new Uint8Array(length)
  2844. that.__proto__ = Buffer.prototype
  2845. } else {
  2846. // Fallback: Return an object instance of the Buffer class
  2847. if (that === null) {
  2848. that = new Buffer(length)
  2849. }
  2850. that.length = length
  2851. }
  2852. return that
  2853. }
  2854. /**
  2855. * The Buffer constructor returns instances of `Uint8Array` that have their
  2856. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  2857. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  2858. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  2859. * returns a single octet.
  2860. *
  2861. * The `Uint8Array` prototype remains unmodified.
  2862. */
  2863. function Buffer (arg, encodingOrOffset, length) {
  2864. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  2865. return new Buffer(arg, encodingOrOffset, length)
  2866. }
  2867. // Common case.
  2868. if (typeof arg === 'number') {
  2869. if (typeof encodingOrOffset === 'string') {
  2870. throw new Error(
  2871. 'If encoding is specified then the first argument must be a string'
  2872. )
  2873. }
  2874. return allocUnsafe(this, arg)
  2875. }
  2876. return from(this, arg, encodingOrOffset, length)
  2877. }
  2878. Buffer.poolSize = 8192 // not used by this implementation
  2879. // TODO: Legacy, not needed anymore. Remove in next major version.
  2880. Buffer._augment = function (arr) {
  2881. arr.__proto__ = Buffer.prototype
  2882. return arr
  2883. }
  2884. function from (that, value, encodingOrOffset, length) {
  2885. if (typeof value === 'number') {
  2886. throw new TypeError('"value" argument must not be a number')
  2887. }
  2888. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  2889. return fromArrayBuffer(that, value, encodingOrOffset, length)
  2890. }
  2891. if (typeof value === 'string') {
  2892. return fromString(that, value, encodingOrOffset)
  2893. }
  2894. return fromObject(that, value)
  2895. }
  2896. /**
  2897. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  2898. * if value is a number.
  2899. * Buffer.from(str[, encoding])
  2900. * Buffer.from(array)
  2901. * Buffer.from(buffer)
  2902. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  2903. **/
  2904. Buffer.from = function (value, encodingOrOffset, length) {
  2905. return from(null, value, encodingOrOffset, length)
  2906. }
  2907. if (Buffer.TYPED_ARRAY_SUPPORT) {
  2908. Buffer.prototype.__proto__ = Uint8Array.prototype
  2909. Buffer.__proto__ = Uint8Array
  2910. if (typeof Symbol !== 'undefined' && Symbol.species &&
  2911. Buffer[Symbol.species] === Buffer) {
  2912. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  2913. Object.defineProperty(Buffer, Symbol.species, {
  2914. value: null,
  2915. configurable: true
  2916. })
  2917. }
  2918. }
  2919. function assertSize (size) {
  2920. if (typeof size !== 'number') {
  2921. throw new TypeError('"size" argument must be a number')
  2922. } else if (size < 0) {
  2923. throw new RangeError('"size" argument must not be negative')
  2924. }
  2925. }
  2926. function alloc (that, size, fill, encoding) {
  2927. assertSize(size)
  2928. if (size <= 0) {
  2929. return createBuffer(that, size)
  2930. }
  2931. if (fill !== undefined) {
  2932. // Only pay attention to encoding if it's a string. This
  2933. // prevents accidentally sending in a number that would
  2934. // be interpretted as a start offset.
  2935. return typeof encoding === 'string'
  2936. ? createBuffer(that, size).fill(fill, encoding)
  2937. : createBuffer(that, size).fill(fill)
  2938. }
  2939. return createBuffer(that, size)
  2940. }
  2941. /**
  2942. * Creates a new filled Buffer instance.
  2943. * alloc(size[, fill[, encoding]])
  2944. **/
  2945. Buffer.alloc = function (size, fill, encoding) {
  2946. return alloc(null, size, fill, encoding)
  2947. }
  2948. function allocUnsafe (that, size) {
  2949. assertSize(size)
  2950. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  2951. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  2952. for (var i = 0; i < size; ++i) {
  2953. that[i] = 0
  2954. }
  2955. }
  2956. return that
  2957. }
  2958. /**
  2959. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  2960. * */
  2961. Buffer.allocUnsafe = function (size) {
  2962. return allocUnsafe(null, size)
  2963. }
  2964. /**
  2965. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  2966. */
  2967. Buffer.allocUnsafeSlow = function (size) {
  2968. return allocUnsafe(null, size)
  2969. }
  2970. function fromString (that, string, encoding) {
  2971. if (typeof encoding !== 'string' || encoding === '') {
  2972. encoding = 'utf8'
  2973. }
  2974. if (!Buffer.isEncoding(encoding)) {
  2975. throw new TypeError('"encoding" must be a valid string encoding')
  2976. }
  2977. var length = byteLength(string, encoding) | 0
  2978. that = createBuffer(that, length)
  2979. var actual = that.write(string, encoding)
  2980. if (actual !== length) {
  2981. // Writing a hex string, for example, that contains invalid characters will
  2982. // cause everything after the first invalid character to be ignored. (e.g.
  2983. // 'abxxcd' will be treated as 'ab')
  2984. that = that.slice(0, actual)
  2985. }
  2986. return that
  2987. }
  2988. function fromArrayLike (that, array) {
  2989. var length = array.length < 0 ? 0 : checked(array.length) | 0
  2990. that = createBuffer(that, length)
  2991. for (var i = 0; i < length; i += 1) {
  2992. that[i] = array[i] & 255
  2993. }
  2994. return that
  2995. }
  2996. function fromArrayBuffer (that, array, byteOffset, length) {
  2997. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  2998. if (byteOffset < 0 || array.byteLength < byteOffset) {
  2999. throw new RangeError('\'offset\' is out of bounds')
  3000. }
  3001. if (array.byteLength < byteOffset + (length || 0)) {
  3002. throw new RangeError('\'length\' is out of bounds')
  3003. }
  3004. if (byteOffset === undefined && length === undefined) {
  3005. array = new Uint8Array(array)
  3006. } else if (length === undefined) {
  3007. array = new Uint8Array(array, byteOffset)
  3008. } else {
  3009. array = new Uint8Array(array, byteOffset, length)
  3010. }
  3011. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3012. // Return an augmented `Uint8Array` instance, for best performance
  3013. that = array
  3014. that.__proto__ = Buffer.prototype
  3015. } else {
  3016. // Fallback: Return an object instance of the Buffer class
  3017. that = fromArrayLike(that, array)
  3018. }
  3019. return that
  3020. }
  3021. function fromObject (that, obj) {
  3022. if (Buffer.isBuffer(obj)) {
  3023. var len = checked(obj.length) | 0
  3024. that = createBuffer(that, len)
  3025. if (that.length === 0) {
  3026. return that
  3027. }
  3028. obj.copy(that, 0, 0, len)
  3029. return that
  3030. }
  3031. if (obj) {
  3032. if ((typeof ArrayBuffer !== 'undefined' &&
  3033. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  3034. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  3035. return createBuffer(that, 0)
  3036. }
  3037. return fromArrayLike(that, obj)
  3038. }
  3039. if (obj.type === 'Buffer' && isArray(obj.data)) {
  3040. return fromArrayLike(that, obj.data)
  3041. }
  3042. }
  3043. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  3044. }
  3045. function checked (length) {
  3046. // Note: cannot use `length < kMaxLength()` here because that fails when
  3047. // length is NaN (which is otherwise coerced to zero.)
  3048. if (length >= kMaxLength()) {
  3049. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  3050. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  3051. }
  3052. return length | 0
  3053. }
  3054. function SlowBuffer (length) {
  3055. if (+length != length) { // eslint-disable-line eqeqeq
  3056. length = 0
  3057. }
  3058. return Buffer.alloc(+length)
  3059. }
  3060. Buffer.isBuffer = function isBuffer (b) {
  3061. return !!(b != null && b._isBuffer)
  3062. }
  3063. Buffer.compare = function compare (a, b) {
  3064. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  3065. throw new TypeError('Arguments must be Buffers')
  3066. }
  3067. if (a === b) return 0
  3068. var x = a.length
  3069. var y = b.length
  3070. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  3071. if (a[i] !== b[i]) {
  3072. x = a[i]
  3073. y = b[i]
  3074. break
  3075. }
  3076. }
  3077. if (x < y) return -1
  3078. if (y < x) return 1
  3079. return 0
  3080. }
  3081. Buffer.isEncoding = function isEncoding (encoding) {
  3082. switch (String(encoding).toLowerCase()) {
  3083. case 'hex':
  3084. case 'utf8':
  3085. case 'utf-8':
  3086. case 'ascii':
  3087. case 'latin1':
  3088. case 'binary':
  3089. case 'base64':
  3090. case 'ucs2':
  3091. case 'ucs-2':
  3092. case 'utf16le':
  3093. case 'utf-16le':
  3094. return true
  3095. default:
  3096. return false
  3097. }
  3098. }
  3099. Buffer.concat = function concat (list, length) {
  3100. if (!isArray(list)) {
  3101. throw new TypeError('"list" argument must be an Array of Buffers')
  3102. }
  3103. if (list.length === 0) {
  3104. return Buffer.alloc(0)
  3105. }
  3106. var i
  3107. if (length === undefined) {
  3108. length = 0
  3109. for (i = 0; i < list.length; ++i) {
  3110. length += list[i].length
  3111. }
  3112. }
  3113. var buffer = Buffer.allocUnsafe(length)
  3114. var pos = 0
  3115. for (i = 0; i < list.length; ++i) {
  3116. var buf = list[i]
  3117. if (!Buffer.isBuffer(buf)) {
  3118. throw new TypeError('"list" argument must be an Array of Buffers')
  3119. }
  3120. buf.copy(buffer, pos)
  3121. pos += buf.length
  3122. }
  3123. return buffer
  3124. }
  3125. function byteLength (string, encoding) {
  3126. if (Buffer.isBuffer(string)) {
  3127. return string.length
  3128. }
  3129. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  3130. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  3131. return string.byteLength
  3132. }
  3133. if (typeof string !== 'string') {
  3134. string = '' + string
  3135. }
  3136. var len = string.length
  3137. if (len === 0) return 0
  3138. // Use a for loop to avoid recursion
  3139. var loweredCase = false
  3140. for (;;) {
  3141. switch (encoding) {
  3142. case 'ascii':
  3143. case 'latin1':
  3144. case 'binary':
  3145. return len
  3146. case 'utf8':
  3147. case 'utf-8':
  3148. case undefined:
  3149. return utf8ToBytes(string).length
  3150. case 'ucs2':
  3151. case 'ucs-2':
  3152. case 'utf16le':
  3153. case 'utf-16le':
  3154. return len * 2
  3155. case 'hex':
  3156. return len >>> 1
  3157. case 'base64':
  3158. return base64ToBytes(string).length
  3159. default:
  3160. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  3161. encoding = ('' + encoding).toLowerCase()
  3162. loweredCase = true
  3163. }
  3164. }
  3165. }
  3166. Buffer.byteLength = byteLength
  3167. function slowToString (encoding, start, end) {
  3168. var loweredCase = false
  3169. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  3170. // property of a typed array.
  3171. // This behaves neither like String nor Uint8Array in that we set start/end
  3172. // to their upper/lower bounds if the value passed is out of range.
  3173. // undefined is handled specially as per ECMA-262 6th Edition,
  3174. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  3175. if (start === undefined || start < 0) {
  3176. start = 0
  3177. }
  3178. // Return early if start > this.length. Done here to prevent potential uint32
  3179. // coercion fail below.
  3180. if (start > this.length) {
  3181. return ''
  3182. }
  3183. if (end === undefined || end > this.length) {
  3184. end = this.length
  3185. }
  3186. if (end <= 0) {
  3187. return ''
  3188. }
  3189. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  3190. end >>>= 0
  3191. start >>>= 0
  3192. if (end <= start) {
  3193. return ''
  3194. }
  3195. if (!encoding) encoding = 'utf8'
  3196. while (true) {
  3197. switch (encoding) {
  3198. case 'hex':
  3199. return hexSlice(this, start, end)
  3200. case 'utf8':
  3201. case 'utf-8':
  3202. return utf8Slice(this, start, end)
  3203. case 'ascii':
  3204. return asciiSlice(this, start, end)
  3205. case 'latin1':
  3206. case 'binary':
  3207. return latin1Slice(this, start, end)
  3208. case 'base64':
  3209. return base64Slice(this, start, end)
  3210. case 'ucs2':
  3211. case 'ucs-2':
  3212. case 'utf16le':
  3213. case 'utf-16le':
  3214. return utf16leSlice(this, start, end)
  3215. default:
  3216. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  3217. encoding = (encoding + '').toLowerCase()
  3218. loweredCase = true
  3219. }
  3220. }
  3221. }
  3222. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  3223. // Buffer instances.
  3224. Buffer.prototype._isBuffer = true
  3225. function swap (b, n, m) {
  3226. var i = b[n]
  3227. b[n] = b[m]
  3228. b[m] = i
  3229. }
  3230. Buffer.prototype.swap16 = function swap16 () {
  3231. var len = this.length
  3232. if (len % 2 !== 0) {
  3233. throw new RangeError('Buffer size must be a multiple of 16-bits')
  3234. }
  3235. for (var i = 0; i < len; i += 2) {
  3236. swap(this, i, i + 1)
  3237. }
  3238. return this
  3239. }
  3240. Buffer.prototype.swap32 = function swap32 () {
  3241. var len = this.length
  3242. if (len % 4 !== 0) {
  3243. throw new RangeError('Buffer size must be a multiple of 32-bits')
  3244. }
  3245. for (var i = 0; i < len; i += 4) {
  3246. swap(this, i, i + 3)
  3247. swap(this, i + 1, i + 2)
  3248. }
  3249. return this
  3250. }
  3251. Buffer.prototype.swap64 = function swap64 () {
  3252. var len = this.length
  3253. if (len % 8 !== 0) {
  3254. throw new RangeError('Buffer size must be a multiple of 64-bits')
  3255. }
  3256. for (var i = 0; i < len; i += 8) {
  3257. swap(this, i, i + 7)
  3258. swap(this, i + 1, i + 6)
  3259. swap(this, i + 2, i + 5)
  3260. swap(this, i + 3, i + 4)
  3261. }
  3262. return this
  3263. }
  3264. Buffer.prototype.toString = function toString () {
  3265. var length = this.length | 0
  3266. if (length === 0) return ''
  3267. if (arguments.length === 0) return utf8Slice(this, 0, length)
  3268. return slowToString.apply(this, arguments)
  3269. }
  3270. Buffer.prototype.equals = function equals (b) {
  3271. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  3272. if (this === b) return true
  3273. return Buffer.compare(this, b) === 0
  3274. }
  3275. Buffer.prototype.inspect = function inspect () {
  3276. var str = ''
  3277. var max = exports.INSPECT_MAX_BYTES
  3278. if (this.length > 0) {
  3279. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  3280. if (this.length > max) str += ' ... '
  3281. }
  3282. return '<Buffer ' + str + '>'
  3283. }
  3284. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  3285. if (!Buffer.isBuffer(target)) {
  3286. throw new TypeError('Argument must be a Buffer')
  3287. }
  3288. if (start === undefined) {
  3289. start = 0
  3290. }
  3291. if (end === undefined) {
  3292. end = target ? target.length : 0
  3293. }
  3294. if (thisStart === undefined) {
  3295. thisStart = 0
  3296. }
  3297. if (thisEnd === undefined) {
  3298. thisEnd = this.length
  3299. }
  3300. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  3301. throw new RangeError('out of range index')
  3302. }
  3303. if (thisStart >= thisEnd && start >= end) {
  3304. return 0
  3305. }
  3306. if (thisStart >= thisEnd) {
  3307. return -1
  3308. }
  3309. if (start >= end) {
  3310. return 1
  3311. }
  3312. start >>>= 0
  3313. end >>>= 0
  3314. thisStart >>>= 0
  3315. thisEnd >>>= 0
  3316. if (this === target) return 0
  3317. var x = thisEnd - thisStart
  3318. var y = end - start
  3319. var len = Math.min(x, y)
  3320. var thisCopy = this.slice(thisStart, thisEnd)
  3321. var targetCopy = target.slice(start, end)
  3322. for (var i = 0; i < len; ++i) {
  3323. if (thisCopy[i] !== targetCopy[i]) {
  3324. x = thisCopy[i]
  3325. y = targetCopy[i]
  3326. break
  3327. }
  3328. }
  3329. if (x < y) return -1
  3330. if (y < x) return 1
  3331. return 0
  3332. }
  3333. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  3334. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  3335. //
  3336. // Arguments:
  3337. // - buffer - a Buffer to search
  3338. // - val - a string, Buffer, or number
  3339. // - byteOffset - an index into `buffer`; will be clamped to an int32
  3340. // - encoding - an optional encoding, relevant is val is a string
  3341. // - dir - true for indexOf, false for lastIndexOf
  3342. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  3343. // Empty buffer means no match
  3344. if (buffer.length === 0) return -1
  3345. // Normalize byteOffset
  3346. if (typeof byteOffset === 'string') {
  3347. encoding = byteOffset
  3348. byteOffset = 0
  3349. } else if (byteOffset > 0x7fffffff) {
  3350. byteOffset = 0x7fffffff
  3351. } else if (byteOffset < -0x80000000) {
  3352. byteOffset = -0x80000000
  3353. }
  3354. byteOffset = +byteOffset // Coerce to Number.
  3355. if (isNaN(byteOffset)) {
  3356. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  3357. byteOffset = dir ? 0 : (buffer.length - 1)
  3358. }
  3359. // Normalize byteOffset: negative offsets start from the end of the buffer
  3360. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  3361. if (byteOffset >= buffer.length) {
  3362. if (dir) return -1
  3363. else byteOffset = buffer.length - 1
  3364. } else if (byteOffset < 0) {
  3365. if (dir) byteOffset = 0
  3366. else return -1
  3367. }
  3368. // Normalize val
  3369. if (typeof val === 'string') {
  3370. val = Buffer.from(val, encoding)
  3371. }
  3372. // Finally, search either indexOf (if dir is true) or lastIndexOf
  3373. if (Buffer.isBuffer(val)) {
  3374. // Special case: looking for empty string/buffer always fails
  3375. if (val.length === 0) {
  3376. return -1
  3377. }
  3378. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  3379. } else if (typeof val === 'number') {
  3380. val = val & 0xFF // Search for a byte value [0-255]
  3381. if (Buffer.TYPED_ARRAY_SUPPORT &&
  3382. typeof Uint8Array.prototype.indexOf === 'function') {
  3383. if (dir) {
  3384. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  3385. } else {
  3386. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  3387. }
  3388. }
  3389. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  3390. }
  3391. throw new TypeError('val must be string, number or Buffer')
  3392. }
  3393. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  3394. var indexSize = 1
  3395. var arrLength = arr.length
  3396. var valLength = val.length
  3397. if (encoding !== undefined) {
  3398. encoding = String(encoding).toLowerCase()
  3399. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  3400. encoding === 'utf16le' || encoding === 'utf-16le') {
  3401. if (arr.length < 2 || val.length < 2) {
  3402. return -1
  3403. }
  3404. indexSize = 2
  3405. arrLength /= 2
  3406. valLength /= 2
  3407. byteOffset /= 2
  3408. }
  3409. }
  3410. function read (buf, i) {
  3411. if (indexSize === 1) {
  3412. return buf[i]
  3413. } else {
  3414. return buf.readUInt16BE(i * indexSize)
  3415. }
  3416. }
  3417. var i
  3418. if (dir) {
  3419. var foundIndex = -1
  3420. for (i = byteOffset; i < arrLength; i++) {
  3421. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  3422. if (foundIndex === -1) foundIndex = i
  3423. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  3424. } else {
  3425. if (foundIndex !== -1) i -= i - foundIndex
  3426. foundIndex = -1
  3427. }
  3428. }
  3429. } else {
  3430. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  3431. for (i = byteOffset; i >= 0; i--) {
  3432. var found = true
  3433. for (var j = 0; j < valLength; j++) {
  3434. if (read(arr, i + j) !== read(val, j)) {
  3435. found = false
  3436. break
  3437. }
  3438. }
  3439. if (found) return i
  3440. }
  3441. }
  3442. return -1
  3443. }
  3444. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  3445. return this.indexOf(val, byteOffset, encoding) !== -1
  3446. }
  3447. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  3448. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  3449. }
  3450. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  3451. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  3452. }
  3453. function hexWrite (buf, string, offset, length) {
  3454. offset = Number(offset) || 0
  3455. var remaining = buf.length - offset
  3456. if (!length) {
  3457. length = remaining
  3458. } else {
  3459. length = Number(length)
  3460. if (length > remaining) {
  3461. length = remaining
  3462. }
  3463. }
  3464. // must be an even number of digits
  3465. var strLen = string.length
  3466. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  3467. if (length > strLen / 2) {
  3468. length = strLen / 2
  3469. }
  3470. for (var i = 0; i < length; ++i) {
  3471. var parsed = parseInt(string.substr(i * 2, 2), 16)
  3472. if (isNaN(parsed)) return i
  3473. buf[offset + i] = parsed
  3474. }
  3475. return i
  3476. }
  3477. function utf8Write (buf, string, offset, length) {
  3478. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  3479. }
  3480. function asciiWrite (buf, string, offset, length) {
  3481. return blitBuffer(asciiToBytes(string), buf, offset, length)
  3482. }
  3483. function latin1Write (buf, string, offset, length) {
  3484. return asciiWrite(buf, string, offset, length)
  3485. }
  3486. function base64Write (buf, string, offset, length) {
  3487. return blitBuffer(base64ToBytes(string), buf, offset, length)
  3488. }
  3489. function ucs2Write (buf, string, offset, length) {
  3490. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  3491. }
  3492. Buffer.prototype.write = function write (string, offset, length, encoding) {
  3493. // Buffer#write(string)
  3494. if (offset === undefined) {
  3495. encoding = 'utf8'
  3496. length = this.length
  3497. offset = 0
  3498. // Buffer#write(string, encoding)
  3499. } else if (length === undefined && typeof offset === 'string') {
  3500. encoding = offset
  3501. length = this.length
  3502. offset = 0
  3503. // Buffer#write(string, offset[, length][, encoding])
  3504. } else if (isFinite(offset)) {
  3505. offset = offset | 0
  3506. if (isFinite(length)) {
  3507. length = length | 0
  3508. if (encoding === undefined) encoding = 'utf8'
  3509. } else {
  3510. encoding = length
  3511. length = undefined
  3512. }
  3513. // legacy write(string, encoding, offset, length) - remove in v0.13
  3514. } else {
  3515. throw new Error(
  3516. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  3517. )
  3518. }
  3519. var remaining = this.length - offset
  3520. if (length === undefined || length > remaining) length = remaining
  3521. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  3522. throw new RangeError('Attempt to write outside buffer bounds')
  3523. }
  3524. if (!encoding) encoding = 'utf8'
  3525. var loweredCase = false
  3526. for (;;) {
  3527. switch (encoding) {
  3528. case 'hex':
  3529. return hexWrite(this, string, offset, length)
  3530. case 'utf8':
  3531. case 'utf-8':
  3532. return utf8Write(this, string, offset, length)
  3533. case 'ascii':
  3534. return asciiWrite(this, string, offset, length)
  3535. case 'latin1':
  3536. case 'binary':
  3537. return latin1Write(this, string, offset, length)
  3538. case 'base64':
  3539. // Warning: maxLength not taken into account in base64Write
  3540. return base64Write(this, string, offset, length)
  3541. case 'ucs2':
  3542. case 'ucs-2':
  3543. case 'utf16le':
  3544. case 'utf-16le':
  3545. return ucs2Write(this, string, offset, length)
  3546. default:
  3547. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  3548. encoding = ('' + encoding).toLowerCase()
  3549. loweredCase = true
  3550. }
  3551. }
  3552. }
  3553. Buffer.prototype.toJSON = function toJSON () {
  3554. return {
  3555. type: 'Buffer',
  3556. data: Array.prototype.slice.call(this._arr || this, 0)
  3557. }
  3558. }
  3559. function base64Slice (buf, start, end) {
  3560. if (start === 0 && end === buf.length) {
  3561. return base64.fromByteArray(buf)
  3562. } else {
  3563. return base64.fromByteArray(buf.slice(start, end))
  3564. }
  3565. }
  3566. function utf8Slice (buf, start, end) {
  3567. end = Math.min(buf.length, end)
  3568. var res = []
  3569. var i = start
  3570. while (i < end) {
  3571. var firstByte = buf[i]
  3572. var codePoint = null
  3573. var bytesPerSequence = (firstByte > 0xEF) ? 4
  3574. : (firstByte > 0xDF) ? 3
  3575. : (firstByte > 0xBF) ? 2
  3576. : 1
  3577. if (i + bytesPerSequence <= end) {
  3578. var secondByte, thirdByte, fourthByte, tempCodePoint
  3579. switch (bytesPerSequence) {
  3580. case 1:
  3581. if (firstByte < 0x80) {
  3582. codePoint = firstByte
  3583. }
  3584. break
  3585. case 2:
  3586. secondByte = buf[i + 1]
  3587. if ((secondByte & 0xC0) === 0x80) {
  3588. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  3589. if (tempCodePoint > 0x7F) {
  3590. codePoint = tempCodePoint
  3591. }
  3592. }
  3593. break
  3594. case 3:
  3595. secondByte = buf[i + 1]
  3596. thirdByte = buf[i + 2]
  3597. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  3598. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  3599. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  3600. codePoint = tempCodePoint
  3601. }
  3602. }
  3603. break
  3604. case 4:
  3605. secondByte = buf[i + 1]
  3606. thirdByte = buf[i + 2]
  3607. fourthByte = buf[i + 3]
  3608. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  3609. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  3610. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  3611. codePoint = tempCodePoint
  3612. }
  3613. }
  3614. }
  3615. }
  3616. if (codePoint === null) {
  3617. // we did not generate a valid codePoint so insert a
  3618. // replacement char (U+FFFD) and advance only 1 byte
  3619. codePoint = 0xFFFD
  3620. bytesPerSequence = 1
  3621. } else if (codePoint > 0xFFFF) {
  3622. // encode to utf16 (surrogate pair dance)
  3623. codePoint -= 0x10000
  3624. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  3625. codePoint = 0xDC00 | codePoint & 0x3FF
  3626. }
  3627. res.push(codePoint)
  3628. i += bytesPerSequence
  3629. }
  3630. return decodeCodePointsArray(res)
  3631. }
  3632. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  3633. // the lowest limit is Chrome, with 0x10000 args.
  3634. // We go 1 magnitude less, for safety
  3635. var MAX_ARGUMENTS_LENGTH = 0x1000
  3636. function decodeCodePointsArray (codePoints) {
  3637. var len = codePoints.length
  3638. if (len <= MAX_ARGUMENTS_LENGTH) {
  3639. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  3640. }
  3641. // Decode in chunks to avoid "call stack size exceeded".
  3642. var res = ''
  3643. var i = 0
  3644. while (i < len) {
  3645. res += String.fromCharCode.apply(
  3646. String,
  3647. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  3648. )
  3649. }
  3650. return res
  3651. }
  3652. function asciiSlice (buf, start, end) {
  3653. var ret = ''
  3654. end = Math.min(buf.length, end)
  3655. for (var i = start; i < end; ++i) {
  3656. ret += String.fromCharCode(buf[i] & 0x7F)
  3657. }
  3658. return ret
  3659. }
  3660. function latin1Slice (buf, start, end) {
  3661. var ret = ''
  3662. end = Math.min(buf.length, end)
  3663. for (var i = start; i < end; ++i) {
  3664. ret += String.fromCharCode(buf[i])
  3665. }
  3666. return ret
  3667. }
  3668. function hexSlice (buf, start, end) {
  3669. var len = buf.length
  3670. if (!start || start < 0) start = 0
  3671. if (!end || end < 0 || end > len) end = len
  3672. var out = ''
  3673. for (var i = start; i < end; ++i) {
  3674. out += toHex(buf[i])
  3675. }
  3676. return out
  3677. }
  3678. function utf16leSlice (buf, start, end) {
  3679. var bytes = buf.slice(start, end)
  3680. var res = ''
  3681. for (var i = 0; i < bytes.length; i += 2) {
  3682. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  3683. }
  3684. return res
  3685. }
  3686. Buffer.prototype.slice = function slice (start, end) {
  3687. var len = this.length
  3688. start = ~~start
  3689. end = end === undefined ? len : ~~end
  3690. if (start < 0) {
  3691. start += len
  3692. if (start < 0) start = 0
  3693. } else if (start > len) {
  3694. start = len
  3695. }
  3696. if (end < 0) {
  3697. end += len
  3698. if (end < 0) end = 0
  3699. } else if (end > len) {
  3700. end = len
  3701. }
  3702. if (end < start) end = start
  3703. var newBuf
  3704. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3705. newBuf = this.subarray(start, end)
  3706. newBuf.__proto__ = Buffer.prototype
  3707. } else {
  3708. var sliceLen = end - start
  3709. newBuf = new Buffer(sliceLen, undefined)
  3710. for (var i = 0; i < sliceLen; ++i) {
  3711. newBuf[i] = this[i + start]
  3712. }
  3713. }
  3714. return newBuf
  3715. }
  3716. /*
  3717. * Need to make sure that buffer isn't trying to write out of bounds.
  3718. */
  3719. function checkOffset (offset, ext, length) {
  3720. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  3721. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  3722. }
  3723. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  3724. offset = offset | 0
  3725. byteLength = byteLength | 0
  3726. if (!noAssert) checkOffset(offset, byteLength, this.length)
  3727. var val = this[offset]
  3728. var mul = 1
  3729. var i = 0
  3730. while (++i < byteLength && (mul *= 0x100)) {
  3731. val += this[offset + i] * mul
  3732. }
  3733. return val
  3734. }
  3735. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  3736. offset = offset | 0
  3737. byteLength = byteLength | 0
  3738. if (!noAssert) {
  3739. checkOffset(offset, byteLength, this.length)
  3740. }
  3741. var val = this[offset + --byteLength]
  3742. var mul = 1
  3743. while (byteLength > 0 && (mul *= 0x100)) {
  3744. val += this[offset + --byteLength] * mul
  3745. }
  3746. return val
  3747. }
  3748. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  3749. if (!noAssert) checkOffset(offset, 1, this.length)
  3750. return this[offset]
  3751. }
  3752. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  3753. if (!noAssert) checkOffset(offset, 2, this.length)
  3754. return this[offset] | (this[offset + 1] << 8)
  3755. }
  3756. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  3757. if (!noAssert) checkOffset(offset, 2, this.length)
  3758. return (this[offset] << 8) | this[offset + 1]
  3759. }
  3760. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  3761. if (!noAssert) checkOffset(offset, 4, this.length)
  3762. return ((this[offset]) |
  3763. (this[offset + 1] << 8) |
  3764. (this[offset + 2] << 16)) +
  3765. (this[offset + 3] * 0x1000000)
  3766. }
  3767. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  3768. if (!noAssert) checkOffset(offset, 4, this.length)
  3769. return (this[offset] * 0x1000000) +
  3770. ((this[offset + 1] << 16) |
  3771. (this[offset + 2] << 8) |
  3772. this[offset + 3])
  3773. }
  3774. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  3775. offset = offset | 0
  3776. byteLength = byteLength | 0
  3777. if (!noAssert) checkOffset(offset, byteLength, this.length)
  3778. var val = this[offset]
  3779. var mul = 1
  3780. var i = 0
  3781. while (++i < byteLength && (mul *= 0x100)) {
  3782. val += this[offset + i] * mul
  3783. }
  3784. mul *= 0x80
  3785. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  3786. return val
  3787. }
  3788. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  3789. offset = offset | 0
  3790. byteLength = byteLength | 0
  3791. if (!noAssert) checkOffset(offset, byteLength, this.length)
  3792. var i = byteLength
  3793. var mul = 1
  3794. var val = this[offset + --i]
  3795. while (i > 0 && (mul *= 0x100)) {
  3796. val += this[offset + --i] * mul
  3797. }
  3798. mul *= 0x80
  3799. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  3800. return val
  3801. }
  3802. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  3803. if (!noAssert) checkOffset(offset, 1, this.length)
  3804. if (!(this[offset] & 0x80)) return (this[offset])
  3805. return ((0xff - this[offset] + 1) * -1)
  3806. }
  3807. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  3808. if (!noAssert) checkOffset(offset, 2, this.length)
  3809. var val = this[offset] | (this[offset + 1] << 8)
  3810. return (val & 0x8000) ? val | 0xFFFF0000 : val
  3811. }
  3812. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  3813. if (!noAssert) checkOffset(offset, 2, this.length)
  3814. var val = this[offset + 1] | (this[offset] << 8)
  3815. return (val & 0x8000) ? val | 0xFFFF0000 : val
  3816. }
  3817. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  3818. if (!noAssert) checkOffset(offset, 4, this.length)
  3819. return (this[offset]) |
  3820. (this[offset + 1] << 8) |
  3821. (this[offset + 2] << 16) |
  3822. (this[offset + 3] << 24)
  3823. }
  3824. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  3825. if (!noAssert) checkOffset(offset, 4, this.length)
  3826. return (this[offset] << 24) |
  3827. (this[offset + 1] << 16) |
  3828. (this[offset + 2] << 8) |
  3829. (this[offset + 3])
  3830. }
  3831. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  3832. if (!noAssert) checkOffset(offset, 4, this.length)
  3833. return ieee754.read(this, offset, true, 23, 4)
  3834. }
  3835. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  3836. if (!noAssert) checkOffset(offset, 4, this.length)
  3837. return ieee754.read(this, offset, false, 23, 4)
  3838. }
  3839. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  3840. if (!noAssert) checkOffset(offset, 8, this.length)
  3841. return ieee754.read(this, offset, true, 52, 8)
  3842. }
  3843. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  3844. if (!noAssert) checkOffset(offset, 8, this.length)
  3845. return ieee754.read(this, offset, false, 52, 8)
  3846. }
  3847. function checkInt (buf, value, offset, ext, max, min) {
  3848. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  3849. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  3850. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  3851. }
  3852. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  3853. value = +value
  3854. offset = offset | 0
  3855. byteLength = byteLength | 0
  3856. if (!noAssert) {
  3857. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  3858. checkInt(this, value, offset, byteLength, maxBytes, 0)
  3859. }
  3860. var mul = 1
  3861. var i = 0
  3862. this[offset] = value & 0xFF
  3863. while (++i < byteLength && (mul *= 0x100)) {
  3864. this[offset + i] = (value / mul) & 0xFF
  3865. }
  3866. return offset + byteLength
  3867. }
  3868. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  3869. value = +value
  3870. offset = offset | 0
  3871. byteLength = byteLength | 0
  3872. if (!noAssert) {
  3873. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  3874. checkInt(this, value, offset, byteLength, maxBytes, 0)
  3875. }
  3876. var i = byteLength - 1
  3877. var mul = 1
  3878. this[offset + i] = value & 0xFF
  3879. while (--i >= 0 && (mul *= 0x100)) {
  3880. this[offset + i] = (value / mul) & 0xFF
  3881. }
  3882. return offset + byteLength
  3883. }
  3884. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  3885. value = +value
  3886. offset = offset | 0
  3887. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  3888. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  3889. this[offset] = (value & 0xff)
  3890. return offset + 1
  3891. }
  3892. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  3893. if (value < 0) value = 0xffff + value + 1
  3894. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  3895. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  3896. (littleEndian ? i : 1 - i) * 8
  3897. }
  3898. }
  3899. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  3900. value = +value
  3901. offset = offset | 0
  3902. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  3903. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3904. this[offset] = (value & 0xff)
  3905. this[offset + 1] = (value >>> 8)
  3906. } else {
  3907. objectWriteUInt16(this, value, offset, true)
  3908. }
  3909. return offset + 2
  3910. }
  3911. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  3912. value = +value
  3913. offset = offset | 0
  3914. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  3915. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3916. this[offset] = (value >>> 8)
  3917. this[offset + 1] = (value & 0xff)
  3918. } else {
  3919. objectWriteUInt16(this, value, offset, false)
  3920. }
  3921. return offset + 2
  3922. }
  3923. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  3924. if (value < 0) value = 0xffffffff + value + 1
  3925. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  3926. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  3927. }
  3928. }
  3929. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  3930. value = +value
  3931. offset = offset | 0
  3932. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  3933. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3934. this[offset + 3] = (value >>> 24)
  3935. this[offset + 2] = (value >>> 16)
  3936. this[offset + 1] = (value >>> 8)
  3937. this[offset] = (value & 0xff)
  3938. } else {
  3939. objectWriteUInt32(this, value, offset, true)
  3940. }
  3941. return offset + 4
  3942. }
  3943. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  3944. value = +value
  3945. offset = offset | 0
  3946. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  3947. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3948. this[offset] = (value >>> 24)
  3949. this[offset + 1] = (value >>> 16)
  3950. this[offset + 2] = (value >>> 8)
  3951. this[offset + 3] = (value & 0xff)
  3952. } else {
  3953. objectWriteUInt32(this, value, offset, false)
  3954. }
  3955. return offset + 4
  3956. }
  3957. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  3958. value = +value
  3959. offset = offset | 0
  3960. if (!noAssert) {
  3961. var limit = Math.pow(2, 8 * byteLength - 1)
  3962. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  3963. }
  3964. var i = 0
  3965. var mul = 1
  3966. var sub = 0
  3967. this[offset] = value & 0xFF
  3968. while (++i < byteLength && (mul *= 0x100)) {
  3969. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  3970. sub = 1
  3971. }
  3972. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  3973. }
  3974. return offset + byteLength
  3975. }
  3976. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  3977. value = +value
  3978. offset = offset | 0
  3979. if (!noAssert) {
  3980. var limit = Math.pow(2, 8 * byteLength - 1)
  3981. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  3982. }
  3983. var i = byteLength - 1
  3984. var mul = 1
  3985. var sub = 0
  3986. this[offset + i] = value & 0xFF
  3987. while (--i >= 0 && (mul *= 0x100)) {
  3988. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  3989. sub = 1
  3990. }
  3991. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  3992. }
  3993. return offset + byteLength
  3994. }
  3995. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  3996. value = +value
  3997. offset = offset | 0
  3998. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  3999. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  4000. if (value < 0) value = 0xff + value + 1
  4001. this[offset] = (value & 0xff)
  4002. return offset + 1
  4003. }
  4004. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  4005. value = +value
  4006. offset = offset | 0
  4007. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  4008. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4009. this[offset] = (value & 0xff)
  4010. this[offset + 1] = (value >>> 8)
  4011. } else {
  4012. objectWriteUInt16(this, value, offset, true)
  4013. }
  4014. return offset + 2
  4015. }
  4016. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  4017. value = +value
  4018. offset = offset | 0
  4019. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  4020. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4021. this[offset] = (value >>> 8)
  4022. this[offset + 1] = (value & 0xff)
  4023. } else {
  4024. objectWriteUInt16(this, value, offset, false)
  4025. }
  4026. return offset + 2
  4027. }
  4028. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  4029. value = +value
  4030. offset = offset | 0
  4031. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  4032. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4033. this[offset] = (value & 0xff)
  4034. this[offset + 1] = (value >>> 8)
  4035. this[offset + 2] = (value >>> 16)
  4036. this[offset + 3] = (value >>> 24)
  4037. } else {
  4038. objectWriteUInt32(this, value, offset, true)
  4039. }
  4040. return offset + 4
  4041. }
  4042. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  4043. value = +value
  4044. offset = offset | 0
  4045. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  4046. if (value < 0) value = 0xffffffff + value + 1
  4047. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4048. this[offset] = (value >>> 24)
  4049. this[offset + 1] = (value >>> 16)
  4050. this[offset + 2] = (value >>> 8)
  4051. this[offset + 3] = (value & 0xff)
  4052. } else {
  4053. objectWriteUInt32(this, value, offset, false)
  4054. }
  4055. return offset + 4
  4056. }
  4057. function checkIEEE754 (buf, value, offset, ext, max, min) {
  4058. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  4059. if (offset < 0) throw new RangeError('Index out of range')
  4060. }
  4061. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  4062. if (!noAssert) {
  4063. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  4064. }
  4065. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  4066. return offset + 4
  4067. }
  4068. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  4069. return writeFloat(this, value, offset, true, noAssert)
  4070. }
  4071. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  4072. return writeFloat(this, value, offset, false, noAssert)
  4073. }
  4074. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  4075. if (!noAssert) {
  4076. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  4077. }
  4078. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  4079. return offset + 8
  4080. }
  4081. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  4082. return writeDouble(this, value, offset, true, noAssert)
  4083. }
  4084. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  4085. return writeDouble(this, value, offset, false, noAssert)
  4086. }
  4087. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  4088. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  4089. if (!start) start = 0
  4090. if (!end && end !== 0) end = this.length
  4091. if (targetStart >= target.length) targetStart = target.length
  4092. if (!targetStart) targetStart = 0
  4093. if (end > 0 && end < start) end = start
  4094. // Copy 0 bytes; we're done
  4095. if (end === start) return 0
  4096. if (target.length === 0 || this.length === 0) return 0
  4097. // Fatal error conditions
  4098. if (targetStart < 0) {
  4099. throw new RangeError('targetStart out of bounds')
  4100. }
  4101. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  4102. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  4103. // Are we oob?
  4104. if (end > this.length) end = this.length
  4105. if (target.length - targetStart < end - start) {
  4106. end = target.length - targetStart + start
  4107. }
  4108. var len = end - start
  4109. var i
  4110. if (this === target && start < targetStart && targetStart < end) {
  4111. // descending copy from end
  4112. for (i = len - 1; i >= 0; --i) {
  4113. target[i + targetStart] = this[i + start]
  4114. }
  4115. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  4116. // ascending copy from start
  4117. for (i = 0; i < len; ++i) {
  4118. target[i + targetStart] = this[i + start]
  4119. }
  4120. } else {
  4121. Uint8Array.prototype.set.call(
  4122. target,
  4123. this.subarray(start, start + len),
  4124. targetStart
  4125. )
  4126. }
  4127. return len
  4128. }
  4129. // Usage:
  4130. // buffer.fill(number[, offset[, end]])
  4131. // buffer.fill(buffer[, offset[, end]])
  4132. // buffer.fill(string[, offset[, end]][, encoding])
  4133. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  4134. // Handle string cases:
  4135. if (typeof val === 'string') {
  4136. if (typeof start === 'string') {
  4137. encoding = start
  4138. start = 0
  4139. end = this.length
  4140. } else if (typeof end === 'string') {
  4141. encoding = end
  4142. end = this.length
  4143. }
  4144. if (val.length === 1) {
  4145. var code = val.charCodeAt(0)
  4146. if (code < 256) {
  4147. val = code
  4148. }
  4149. }
  4150. if (encoding !== undefined && typeof encoding !== 'string') {
  4151. throw new TypeError('encoding must be a string')
  4152. }
  4153. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  4154. throw new TypeError('Unknown encoding: ' + encoding)
  4155. }
  4156. } else if (typeof val === 'number') {
  4157. val = val & 255
  4158. }
  4159. // Invalid ranges are not set to a default, so can range check early.
  4160. if (start < 0 || this.length < start || this.length < end) {
  4161. throw new RangeError('Out of range index')
  4162. }
  4163. if (end <= start) {
  4164. return this
  4165. }
  4166. start = start >>> 0
  4167. end = end === undefined ? this.length : end >>> 0
  4168. if (!val) val = 0
  4169. var i
  4170. if (typeof val === 'number') {
  4171. for (i = start; i < end; ++i) {
  4172. this[i] = val
  4173. }
  4174. } else {
  4175. var bytes = Buffer.isBuffer(val)
  4176. ? val
  4177. : utf8ToBytes(new Buffer(val, encoding).toString())
  4178. var len = bytes.length
  4179. for (i = 0; i < end - start; ++i) {
  4180. this[i + start] = bytes[i % len]
  4181. }
  4182. }
  4183. return this
  4184. }
  4185. // HELPER FUNCTIONS
  4186. // ================
  4187. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  4188. function base64clean (str) {
  4189. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  4190. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  4191. // Node converts strings with length < 2 to ''
  4192. if (str.length < 2) return ''
  4193. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  4194. while (str.length % 4 !== 0) {
  4195. str = str + '='
  4196. }
  4197. return str
  4198. }
  4199. function stringtrim (str) {
  4200. if (str.trim) return str.trim()
  4201. return str.replace(/^\s+|\s+$/g, '')
  4202. }
  4203. function toHex (n) {
  4204. if (n < 16) return '0' + n.toString(16)
  4205. return n.toString(16)
  4206. }
  4207. function utf8ToBytes (string, units) {
  4208. units = units || Infinity
  4209. var codePoint
  4210. var length = string.length
  4211. var leadSurrogate = null
  4212. var bytes = []
  4213. for (var i = 0; i < length; ++i) {
  4214. codePoint = string.charCodeAt(i)
  4215. // is surrogate component
  4216. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  4217. // last char was a lead
  4218. if (!leadSurrogate) {
  4219. // no lead yet
  4220. if (codePoint > 0xDBFF) {
  4221. // unexpected trail
  4222. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  4223. continue
  4224. } else if (i + 1 === length) {
  4225. // unpaired lead
  4226. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  4227. continue
  4228. }
  4229. // valid lead
  4230. leadSurrogate = codePoint
  4231. continue
  4232. }
  4233. // 2 leads in a row
  4234. if (codePoint < 0xDC00) {
  4235. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  4236. leadSurrogate = codePoint
  4237. continue
  4238. }
  4239. // valid surrogate pair
  4240. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  4241. } else if (leadSurrogate) {
  4242. // valid bmp char, but last char was a lead
  4243. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  4244. }
  4245. leadSurrogate = null
  4246. // encode utf8
  4247. if (codePoint < 0x80) {
  4248. if ((units -= 1) < 0) break
  4249. bytes.push(codePoint)
  4250. } else if (codePoint < 0x800) {
  4251. if ((units -= 2) < 0) break
  4252. bytes.push(
  4253. codePoint >> 0x6 | 0xC0,
  4254. codePoint & 0x3F | 0x80
  4255. )
  4256. } else if (codePoint < 0x10000) {
  4257. if ((units -= 3) < 0) break
  4258. bytes.push(
  4259. codePoint >> 0xC | 0xE0,
  4260. codePoint >> 0x6 & 0x3F | 0x80,
  4261. codePoint & 0x3F | 0x80
  4262. )
  4263. } else if (codePoint < 0x110000) {
  4264. if ((units -= 4) < 0) break
  4265. bytes.push(
  4266. codePoint >> 0x12 | 0xF0,
  4267. codePoint >> 0xC & 0x3F | 0x80,
  4268. codePoint >> 0x6 & 0x3F | 0x80,
  4269. codePoint & 0x3F | 0x80
  4270. )
  4271. } else {
  4272. throw new Error('Invalid code point')
  4273. }
  4274. }
  4275. return bytes
  4276. }
  4277. function asciiToBytes (str) {
  4278. var byteArray = []
  4279. for (var i = 0; i < str.length; ++i) {
  4280. // Node's code seems to be doing this and not & 0x7F..
  4281. byteArray.push(str.charCodeAt(i) & 0xFF)
  4282. }
  4283. return byteArray
  4284. }
  4285. function utf16leToBytes (str, units) {
  4286. var c, hi, lo
  4287. var byteArray = []
  4288. for (var i = 0; i < str.length; ++i) {
  4289. if ((units -= 2) < 0) break
  4290. c = str.charCodeAt(i)
  4291. hi = c >> 8
  4292. lo = c % 256
  4293. byteArray.push(lo)
  4294. byteArray.push(hi)
  4295. }
  4296. return byteArray
  4297. }
  4298. function base64ToBytes (str) {
  4299. return base64.toByteArray(base64clean(str))
  4300. }
  4301. function blitBuffer (src, dst, offset, length) {
  4302. for (var i = 0; i < length; ++i) {
  4303. if ((i + offset >= dst.length) || (i >= src.length)) break
  4304. dst[i + offset] = src[i]
  4305. }
  4306. return i
  4307. }
  4308. function isnan (val) {
  4309. return val !== val // eslint-disable-line no-self-compare
  4310. }
  4311. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  4312. /***/ }),
  4313. /* 23 */
  4314. /***/ (function(module, exports) {
  4315. // shim for using process in browser
  4316. var process = module.exports = {};
  4317. // cached from whatever global is present so that test runners that stub it
  4318. // don't break things. But we need to wrap it in a try catch in case it is
  4319. // wrapped in strict mode code which doesn't define any globals. It's inside a
  4320. // function because try/catches deoptimize in certain engines.
  4321. var cachedSetTimeout;
  4322. var cachedClearTimeout;
  4323. function defaultSetTimout() {
  4324. throw new Error('setTimeout has not been defined');
  4325. }
  4326. function defaultClearTimeout () {
  4327. throw new Error('clearTimeout has not been defined');
  4328. }
  4329. (function () {
  4330. try {
  4331. if (typeof setTimeout === 'function') {
  4332. cachedSetTimeout = setTimeout;
  4333. } else {
  4334. cachedSetTimeout = defaultSetTimout;
  4335. }
  4336. } catch (e) {
  4337. cachedSetTimeout = defaultSetTimout;
  4338. }
  4339. try {
  4340. if (typeof clearTimeout === 'function') {
  4341. cachedClearTimeout = clearTimeout;
  4342. } else {
  4343. cachedClearTimeout = defaultClearTimeout;
  4344. }
  4345. } catch (e) {
  4346. cachedClearTimeout = defaultClearTimeout;
  4347. }
  4348. } ())
  4349. function runTimeout(fun) {
  4350. if (cachedSetTimeout === setTimeout) {
  4351. //normal enviroments in sane situations
  4352. return setTimeout(fun, 0);
  4353. }
  4354. // if setTimeout wasn't available but was latter defined
  4355. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  4356. cachedSetTimeout = setTimeout;
  4357. return setTimeout(fun, 0);
  4358. }
  4359. try {
  4360. // when when somebody has screwed with setTimeout but no I.E. maddness
  4361. return cachedSetTimeout(fun, 0);
  4362. } catch(e){
  4363. try {
  4364. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  4365. return cachedSetTimeout.call(null, fun, 0);
  4366. } catch(e){
  4367. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  4368. return cachedSetTimeout.call(this, fun, 0);
  4369. }
  4370. }
  4371. }
  4372. function runClearTimeout(marker) {
  4373. if (cachedClearTimeout === clearTimeout) {
  4374. //normal enviroments in sane situations
  4375. return clearTimeout(marker);
  4376. }
  4377. // if clearTimeout wasn't available but was latter defined
  4378. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  4379. cachedClearTimeout = clearTimeout;
  4380. return clearTimeout(marker);
  4381. }
  4382. try {
  4383. // when when somebody has screwed with setTimeout but no I.E. maddness
  4384. return cachedClearTimeout(marker);
  4385. } catch (e){
  4386. try {
  4387. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  4388. return cachedClearTimeout.call(null, marker);
  4389. } catch (e){
  4390. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  4391. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  4392. return cachedClearTimeout.call(this, marker);
  4393. }
  4394. }
  4395. }
  4396. var queue = [];
  4397. var draining = false;
  4398. var currentQueue;
  4399. var queueIndex = -1;
  4400. function cleanUpNextTick() {
  4401. if (!draining || !currentQueue) {
  4402. return;
  4403. }
  4404. draining = false;
  4405. if (currentQueue.length) {
  4406. queue = currentQueue.concat(queue);
  4407. } else {
  4408. queueIndex = -1;
  4409. }
  4410. if (queue.length) {
  4411. drainQueue();
  4412. }
  4413. }
  4414. function drainQueue() {
  4415. if (draining) {
  4416. return;
  4417. }
  4418. var timeout = runTimeout(cleanUpNextTick);
  4419. draining = true;
  4420. var len = queue.length;
  4421. while(len) {
  4422. currentQueue = queue;
  4423. queue = [];
  4424. while (++queueIndex < len) {
  4425. if (currentQueue) {
  4426. currentQueue[queueIndex].run();
  4427. }
  4428. }
  4429. queueIndex = -1;
  4430. len = queue.length;
  4431. }
  4432. currentQueue = null;
  4433. draining = false;
  4434. runClearTimeout(timeout);
  4435. }
  4436. process.nextTick = function (fun) {
  4437. var args = new Array(arguments.length - 1);
  4438. if (arguments.length > 1) {
  4439. for (var i = 1; i < arguments.length; i++) {
  4440. args[i - 1] = arguments[i];
  4441. }
  4442. }
  4443. queue.push(new Item(fun, args));
  4444. if (queue.length === 1 && !draining) {
  4445. runTimeout(drainQueue);
  4446. }
  4447. };
  4448. // v8 likes predictible objects
  4449. function Item(fun, array) {
  4450. this.fun = fun;
  4451. this.array = array;
  4452. }
  4453. Item.prototype.run = function () {
  4454. this.fun.apply(null, this.array);
  4455. };
  4456. process.title = 'browser';
  4457. process.browser = true;
  4458. process.env = {};
  4459. process.argv = [];
  4460. process.version = ''; // empty string to avoid regexp issues
  4461. process.versions = {};
  4462. function noop() {}
  4463. process.on = noop;
  4464. process.addListener = noop;
  4465. process.once = noop;
  4466. process.off = noop;
  4467. process.removeListener = noop;
  4468. process.removeAllListeners = noop;
  4469. process.emit = noop;
  4470. process.prependListener = noop;
  4471. process.prependOnceListener = noop;
  4472. process.listeners = function (name) { return [] }
  4473. process.binding = function (name) {
  4474. throw new Error('process.binding is not supported');
  4475. };
  4476. process.cwd = function () { return '/' };
  4477. process.chdir = function (dir) {
  4478. throw new Error('process.chdir is not supported');
  4479. };
  4480. process.umask = function() { return 0; };
  4481. /***/ }),
  4482. /* 24 */
  4483. /***/ (function(module, exports, __webpack_require__) {
  4484. "use strict";
  4485. /* WEBPACK VAR INJECTION */(function(process) {
  4486. if (typeof process === 'undefined' ||
  4487. !process.version ||
  4488. process.version.indexOf('v0.') === 0 ||
  4489. process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
  4490. module.exports = { nextTick: nextTick };
  4491. } else {
  4492. module.exports = process
  4493. }
  4494. function nextTick(fn, arg1, arg2, arg3) {
  4495. if (typeof fn !== 'function') {
  4496. throw new TypeError('"callback" argument must be a function');
  4497. }
  4498. var len = arguments.length;
  4499. var args, i;
  4500. switch (len) {
  4501. case 0:
  4502. case 1:
  4503. return process.nextTick(fn);
  4504. case 2:
  4505. return process.nextTick(function afterTickOne() {
  4506. fn.call(null, arg1);
  4507. });
  4508. case 3:
  4509. return process.nextTick(function afterTickTwo() {
  4510. fn.call(null, arg1, arg2);
  4511. });
  4512. case 4:
  4513. return process.nextTick(function afterTickThree() {
  4514. fn.call(null, arg1, arg2, arg3);
  4515. });
  4516. default:
  4517. args = new Array(len - 1);
  4518. i = 0;
  4519. while (i < args.length) {
  4520. args[i++] = arguments[i];
  4521. }
  4522. return process.nextTick(function afterTick() {
  4523. fn.apply(null, args);
  4524. });
  4525. }
  4526. }
  4527. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(23)))
  4528. /***/ }),
  4529. /* 25 */
  4530. /***/ (function(module, exports, __webpack_require__) {
  4531. /* eslint-disable node/no-deprecated-api */
  4532. var buffer = __webpack_require__(22)
  4533. var Buffer = buffer.Buffer
  4534. // alternative to using Object.keys for old browsers
  4535. function copyProps (src, dst) {
  4536. for (var key in src) {
  4537. dst[key] = src[key]
  4538. }
  4539. }
  4540. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  4541. module.exports = buffer
  4542. } else {
  4543. // Copy properties from require('buffer')
  4544. copyProps(buffer, exports)
  4545. exports.Buffer = SafeBuffer
  4546. }
  4547. function SafeBuffer (arg, encodingOrOffset, length) {
  4548. return Buffer(arg, encodingOrOffset, length)
  4549. }
  4550. // Copy static methods from Buffer
  4551. copyProps(Buffer, SafeBuffer)
  4552. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  4553. if (typeof arg === 'number') {
  4554. throw new TypeError('Argument must not be a number')
  4555. }
  4556. return Buffer(arg, encodingOrOffset, length)
  4557. }
  4558. SafeBuffer.alloc = function (size, fill, encoding) {
  4559. if (typeof size !== 'number') {
  4560. throw new TypeError('Argument must be a number')
  4561. }
  4562. var buf = Buffer(size)
  4563. if (fill !== undefined) {
  4564. if (typeof encoding === 'string') {
  4565. buf.fill(fill, encoding)
  4566. } else {
  4567. buf.fill(fill)
  4568. }
  4569. } else {
  4570. buf.fill(0)
  4571. }
  4572. return buf
  4573. }
  4574. SafeBuffer.allocUnsafe = function (size) {
  4575. if (typeof size !== 'number') {
  4576. throw new TypeError('Argument must be a number')
  4577. }
  4578. return Buffer(size)
  4579. }
  4580. SafeBuffer.allocUnsafeSlow = function (size) {
  4581. if (typeof size !== 'number') {
  4582. throw new TypeError('Argument must be a number')
  4583. }
  4584. return buffer.SlowBuffer(size)
  4585. }
  4586. /***/ }),
  4587. /* 26 */
  4588. /***/ (function(module, exports, __webpack_require__) {
  4589. /* WEBPACK VAR INJECTION */(function(global) {/**
  4590. * lodash (Custom Build) <https://lodash.com/>
  4591. * Build: `lodash modularize exports="npm" -o ./`
  4592. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  4593. * Released under MIT license <https://lodash.com/license>
  4594. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  4595. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  4596. */
  4597. /** Used as references for various `Number` constants. */
  4598. var INFINITY = 1 / 0;
  4599. /** `Object#toString` result references. */
  4600. var symbolTag = '[object Symbol]';
  4601. /** Used to compose unicode character classes. */
  4602. var rsAstralRange = '\\ud800-\\udfff',
  4603. rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
  4604. rsComboSymbolsRange = '\\u20d0-\\u20f0',
  4605. rsVarRange = '\\ufe0e\\ufe0f';
  4606. /** Used to compose unicode capture groups. */
  4607. var rsAstral = '[' + rsAstralRange + ']',
  4608. rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
  4609. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  4610. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  4611. rsNonAstral = '[^' + rsAstralRange + ']',
  4612. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  4613. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  4614. rsZWJ = '\\u200d';
  4615. /** Used to compose unicode regexes. */
  4616. var reOptMod = rsModifier + '?',
  4617. rsOptVar = '[' + rsVarRange + ']?',
  4618. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  4619. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  4620. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  4621. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  4622. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  4623. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  4624. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
  4625. /** Detect free variable `global` from Node.js. */
  4626. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  4627. /** Detect free variable `self`. */
  4628. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  4629. /** Used as a reference to the global object. */
  4630. var root = freeGlobal || freeSelf || Function('return this')();
  4631. /**
  4632. * Converts an ASCII `string` to an array.
  4633. *
  4634. * @private
  4635. * @param {string} string The string to convert.
  4636. * @returns {Array} Returns the converted array.
  4637. */
  4638. function asciiToArray(string) {
  4639. return string.split('');
  4640. }
  4641. /**
  4642. * Checks if `string` contains Unicode symbols.
  4643. *
  4644. * @private
  4645. * @param {string} string The string to inspect.
  4646. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  4647. */
  4648. function hasUnicode(string) {
  4649. return reHasUnicode.test(string);
  4650. }
  4651. /**
  4652. * Converts `string` to an array.
  4653. *
  4654. * @private
  4655. * @param {string} string The string to convert.
  4656. * @returns {Array} Returns the converted array.
  4657. */
  4658. function stringToArray(string) {
  4659. return hasUnicode(string)
  4660. ? unicodeToArray(string)
  4661. : asciiToArray(string);
  4662. }
  4663. /**
  4664. * Converts a Unicode `string` to an array.
  4665. *
  4666. * @private
  4667. * @param {string} string The string to convert.
  4668. * @returns {Array} Returns the converted array.
  4669. */
  4670. function unicodeToArray(string) {
  4671. return string.match(reUnicode) || [];
  4672. }
  4673. /** Used for built-in method references. */
  4674. var objectProto = Object.prototype;
  4675. /**
  4676. * Used to resolve the
  4677. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  4678. * of values.
  4679. */
  4680. var objectToString = objectProto.toString;
  4681. /** Built-in value references. */
  4682. var Symbol = root.Symbol;
  4683. /** Used to convert symbols to primitives and strings. */
  4684. var symbolProto = Symbol ? Symbol.prototype : undefined,
  4685. symbolToString = symbolProto ? symbolProto.toString : undefined;
  4686. /**
  4687. * The base implementation of `_.slice` without an iteratee call guard.
  4688. *
  4689. * @private
  4690. * @param {Array} array The array to slice.
  4691. * @param {number} [start=0] The start position.
  4692. * @param {number} [end=array.length] The end position.
  4693. * @returns {Array} Returns the slice of `array`.
  4694. */
  4695. function baseSlice(array, start, end) {
  4696. var index = -1,
  4697. length = array.length;
  4698. if (start < 0) {
  4699. start = -start > length ? 0 : (length + start);
  4700. }
  4701. end = end > length ? length : end;
  4702. if (end < 0) {
  4703. end += length;
  4704. }
  4705. length = start > end ? 0 : ((end - start) >>> 0);
  4706. start >>>= 0;
  4707. var result = Array(length);
  4708. while (++index < length) {
  4709. result[index] = array[index + start];
  4710. }
  4711. return result;
  4712. }
  4713. /**
  4714. * The base implementation of `_.toString` which doesn't convert nullish
  4715. * values to empty strings.
  4716. *
  4717. * @private
  4718. * @param {*} value The value to process.
  4719. * @returns {string} Returns the string.
  4720. */
  4721. function baseToString(value) {
  4722. // Exit early for strings to avoid a performance hit in some environments.
  4723. if (typeof value == 'string') {
  4724. return value;
  4725. }
  4726. if (isSymbol(value)) {
  4727. return symbolToString ? symbolToString.call(value) : '';
  4728. }
  4729. var result = (value + '');
  4730. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  4731. }
  4732. /**
  4733. * Casts `array` to a slice if it's needed.
  4734. *
  4735. * @private
  4736. * @param {Array} array The array to inspect.
  4737. * @param {number} start The start position.
  4738. * @param {number} [end=array.length] The end position.
  4739. * @returns {Array} Returns the cast slice.
  4740. */
  4741. function castSlice(array, start, end) {
  4742. var length = array.length;
  4743. end = end === undefined ? length : end;
  4744. return (!start && end >= length) ? array : baseSlice(array, start, end);
  4745. }
  4746. /**
  4747. * Creates a function like `_.lowerFirst`.
  4748. *
  4749. * @private
  4750. * @param {string} methodName The name of the `String` case method to use.
  4751. * @returns {Function} Returns the new case function.
  4752. */
  4753. function createCaseFirst(methodName) {
  4754. return function(string) {
  4755. string = toString(string);
  4756. var strSymbols = hasUnicode(string)
  4757. ? stringToArray(string)
  4758. : undefined;
  4759. var chr = strSymbols
  4760. ? strSymbols[0]
  4761. : string.charAt(0);
  4762. var trailing = strSymbols
  4763. ? castSlice(strSymbols, 1).join('')
  4764. : string.slice(1);
  4765. return chr[methodName]() + trailing;
  4766. };
  4767. }
  4768. /**
  4769. * Checks if `value` is object-like. A value is object-like if it's not `null`
  4770. * and has a `typeof` result of "object".
  4771. *
  4772. * @static
  4773. * @memberOf _
  4774. * @since 4.0.0
  4775. * @category Lang
  4776. * @param {*} value The value to check.
  4777. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  4778. * @example
  4779. *
  4780. * _.isObjectLike({});
  4781. * // => true
  4782. *
  4783. * _.isObjectLike([1, 2, 3]);
  4784. * // => true
  4785. *
  4786. * _.isObjectLike(_.noop);
  4787. * // => false
  4788. *
  4789. * _.isObjectLike(null);
  4790. * // => false
  4791. */
  4792. function isObjectLike(value) {
  4793. return !!value && typeof value == 'object';
  4794. }
  4795. /**
  4796. * Checks if `value` is classified as a `Symbol` primitive or object.
  4797. *
  4798. * @static
  4799. * @memberOf _
  4800. * @since 4.0.0
  4801. * @category Lang
  4802. * @param {*} value The value to check.
  4803. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  4804. * @example
  4805. *
  4806. * _.isSymbol(Symbol.iterator);
  4807. * // => true
  4808. *
  4809. * _.isSymbol('abc');
  4810. * // => false
  4811. */
  4812. function isSymbol(value) {
  4813. return typeof value == 'symbol' ||
  4814. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  4815. }
  4816. /**
  4817. * Converts `value` to a string. An empty string is returned for `null`
  4818. * and `undefined` values. The sign of `-0` is preserved.
  4819. *
  4820. * @static
  4821. * @memberOf _
  4822. * @since 4.0.0
  4823. * @category Lang
  4824. * @param {*} value The value to process.
  4825. * @returns {string} Returns the string.
  4826. * @example
  4827. *
  4828. * _.toString(null);
  4829. * // => ''
  4830. *
  4831. * _.toString(-0);
  4832. * // => '-0'
  4833. *
  4834. * _.toString([1, 2, 3]);
  4835. * // => '1,2,3'
  4836. */
  4837. function toString(value) {
  4838. return value == null ? '' : baseToString(value);
  4839. }
  4840. /**
  4841. * Converts the first character of `string` to upper case and the remaining
  4842. * to lower case.
  4843. *
  4844. * @static
  4845. * @memberOf _
  4846. * @since 3.0.0
  4847. * @category String
  4848. * @param {string} [string=''] The string to capitalize.
  4849. * @returns {string} Returns the capitalized string.
  4850. * @example
  4851. *
  4852. * _.capitalize('FRED');
  4853. * // => 'Fred'
  4854. */
  4855. function capitalize(string) {
  4856. return upperFirst(toString(string).toLowerCase());
  4857. }
  4858. /**
  4859. * Converts the first character of `string` to upper case.
  4860. *
  4861. * @static
  4862. * @memberOf _
  4863. * @since 4.0.0
  4864. * @category String
  4865. * @param {string} [string=''] The string to convert.
  4866. * @returns {string} Returns the converted string.
  4867. * @example
  4868. *
  4869. * _.upperFirst('fred');
  4870. * // => 'Fred'
  4871. *
  4872. * _.upperFirst('FRED');
  4873. * // => 'FRED'
  4874. */
  4875. var upperFirst = createCaseFirst('toUpperCase');
  4876. module.exports = capitalize;
  4877. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  4878. /***/ }),
  4879. /* 27 */
  4880. /***/ (function(module, exports, __webpack_require__) {
  4881. "use strict";
  4882. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _events=__webpack_require__(20);var _SourceListModel=_interopRequireDefault(__webpack_require__(39));var _globalEvent=_interopRequireDefault(__webpack_require__(40));var MapEvent=/*#__PURE__*/function(_EventEmitter){(0,_inherits2.default)(MapEvent,_EventEmitter);var _super=(0,_createSuper2.default)(MapEvent);function MapEvent(){var _this;(0,_classCallCheck2.default)(this,MapEvent);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.mapCache={};_this.webMapCache={};return _this;}(0,_createClass2.default)(MapEvent,[{key:"getMap",value:function getMap(mapTarget){return this.mapCache[mapTarget];}},{key:"getWebMap",value:function getWebMap(webmapTarget){return this.webMapCache[webmapTarget];}},{key:"getAllMaps",value:function getAllMaps(){return this.mapCache;}},{key:"getAllWebMap",value:function getAllWebMap(){return this.webMapCache;}},{key:"setMap",value:function setMap(mapTarget,map){this.mapCache[mapTarget]=map;}},{key:"setWebMap",value:function setWebMap(webmapTarget,webmap){this.webMapCache[webmapTarget]=webmap;}},{key:"deleteMap",value:function deleteMap(mapTarget){_globalEvent.default.emit('delete-map',mapTarget);// drawEvent.$options.deletDrawOfMap(mapTarget);
  4883. delete this.mapCache[mapTarget];}},{key:"deleteWebMap",value:function deleteWebMap(webmapTarget){delete this.webMapCache[webmapTarget];}},{key:"getMapSource",value:function getMapSource(mapTarget){var sources=[];var map=this.getMap(mapTarget);if(map){var sourceListModel=new _SourceListModel.default({map:map});var sourceList=sourceListModel.getSourceList();for(var key in sourceList){if(key){var layers=sourceList[key].layers||[];layers.forEach(function(item){if(item.source&&item.type!=='raster'){sources.push(item.source);}});}}}return sources;}}]);return MapEvent;}(_events.EventEmitter);var _default=new MapEvent();exports.default=_default;
  4884. /***/ }),
  4885. /* 28 */
  4886. /***/ (function(module, exports, __webpack_require__) {
  4887. exports = module.exports = __webpack_require__(45);
  4888. exports.Stream = exports;
  4889. exports.Readable = exports;
  4890. exports.Writable = __webpack_require__(29);
  4891. exports.Duplex = __webpack_require__(14);
  4892. exports.Transform = __webpack_require__(48);
  4893. exports.PassThrough = __webpack_require__(90);
  4894. /***/ }),
  4895. /* 29 */
  4896. /***/ (function(module, exports, __webpack_require__) {
  4897. "use strict";
  4898. /* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
  4899. //
  4900. // Permission is hereby granted, free of charge, to any person obtaining a
  4901. // copy of this software and associated documentation files (the
  4902. // "Software"), to deal in the Software without restriction, including
  4903. // without limitation the rights to use, copy, modify, merge, publish,
  4904. // distribute, sublicense, and/or sell copies of the Software, and to permit
  4905. // persons to whom the Software is furnished to do so, subject to the
  4906. // following conditions:
  4907. //
  4908. // The above copyright notice and this permission notice shall be included
  4909. // in all copies or substantial portions of the Software.
  4910. //
  4911. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  4912. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  4913. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  4914. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  4915. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  4916. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  4917. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  4918. // A bit simpler than readable streams.
  4919. // Implement an async ._write(chunk, encoding, cb), and it'll handle all
  4920. // the drain event emission and buffering.
  4921. /*<replacement>*/
  4922. var pna = __webpack_require__(24);
  4923. /*</replacement>*/
  4924. module.exports = Writable;
  4925. /* <replacement> */
  4926. function WriteReq(chunk, encoding, cb) {
  4927. this.chunk = chunk;
  4928. this.encoding = encoding;
  4929. this.callback = cb;
  4930. this.next = null;
  4931. }
  4932. // It seems a linked list but it is not
  4933. // there will be only 2 of these for each stream
  4934. function CorkedRequest(state) {
  4935. var _this = this;
  4936. this.next = null;
  4937. this.entry = null;
  4938. this.finish = function () {
  4939. onCorkedFinish(_this, state);
  4940. };
  4941. }
  4942. /* </replacement> */
  4943. /*<replacement>*/
  4944. var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
  4945. /*</replacement>*/
  4946. /*<replacement>*/
  4947. var Duplex;
  4948. /*</replacement>*/
  4949. Writable.WritableState = WritableState;
  4950. /*<replacement>*/
  4951. var util = __webpack_require__(21);
  4952. util.inherits = __webpack_require__(16);
  4953. /*</replacement>*/
  4954. /*<replacement>*/
  4955. var internalUtil = {
  4956. deprecate: __webpack_require__(89)
  4957. };
  4958. /*</replacement>*/
  4959. /*<replacement>*/
  4960. var Stream = __webpack_require__(46);
  4961. /*</replacement>*/
  4962. /*<replacement>*/
  4963. var Buffer = __webpack_require__(25).Buffer;
  4964. var OurUint8Array = global.Uint8Array || function () {};
  4965. function _uint8ArrayToBuffer(chunk) {
  4966. return Buffer.from(chunk);
  4967. }
  4968. function _isUint8Array(obj) {
  4969. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  4970. }
  4971. /*</replacement>*/
  4972. var destroyImpl = __webpack_require__(47);
  4973. util.inherits(Writable, Stream);
  4974. function nop() {}
  4975. function WritableState(options, stream) {
  4976. Duplex = Duplex || __webpack_require__(14);
  4977. options = options || {};
  4978. // Duplex streams are both readable and writable, but share
  4979. // the same options object.
  4980. // However, some cases require setting options to different
  4981. // values for the readable and the writable sides of the duplex stream.
  4982. // These options can be provided separately as readableXXX and writableXXX.
  4983. var isDuplex = stream instanceof Duplex;
  4984. // object stream flag to indicate whether or not this stream
  4985. // contains buffers or objects.
  4986. this.objectMode = !!options.objectMode;
  4987. if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
  4988. // the point at which write() starts returning false
  4989. // Note: 0 is a valid value, means that we always return false if
  4990. // the entire buffer is not flushed immediately on write()
  4991. var hwm = options.highWaterMark;
  4992. var writableHwm = options.writableHighWaterMark;
  4993. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  4994. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
  4995. // cast to ints.
  4996. this.highWaterMark = Math.floor(this.highWaterMark);
  4997. // if _final has been called
  4998. this.finalCalled = false;
  4999. // drain event flag.
  5000. this.needDrain = false;
  5001. // at the start of calling end()
  5002. this.ending = false;
  5003. // when end() has been called, and returned
  5004. this.ended = false;
  5005. // when 'finish' is emitted
  5006. this.finished = false;
  5007. // has it been destroyed
  5008. this.destroyed = false;
  5009. // should we decode strings into buffers before passing to _write?
  5010. // this is here so that some node-core streams can optimize string
  5011. // handling at a lower level.
  5012. var noDecode = options.decodeStrings === false;
  5013. this.decodeStrings = !noDecode;
  5014. // Crypto is kind of old and crusty. Historically, its default string
  5015. // encoding is 'binary' so we have to make this configurable.
  5016. // Everything else in the universe uses 'utf8', though.
  5017. this.defaultEncoding = options.defaultEncoding || 'utf8';
  5018. // not an actual buffer we keep track of, but a measurement
  5019. // of how much we're waiting to get pushed to some underlying
  5020. // socket or file.
  5021. this.length = 0;
  5022. // a flag to see when we're in the middle of a write.
  5023. this.writing = false;
  5024. // when true all writes will be buffered until .uncork() call
  5025. this.corked = 0;
  5026. // a flag to be able to tell if the onwrite cb is called immediately,
  5027. // or on a later tick. We set this to true at first, because any
  5028. // actions that shouldn't happen until "later" should generally also
  5029. // not happen before the first write call.
  5030. this.sync = true;
  5031. // a flag to know if we're processing previously buffered items, which
  5032. // may call the _write() callback in the same tick, so that we don't
  5033. // end up in an overlapped onwrite situation.
  5034. this.bufferProcessing = false;
  5035. // the callback that's passed to _write(chunk,cb)
  5036. this.onwrite = function (er) {
  5037. onwrite(stream, er);
  5038. };
  5039. // the callback that the user supplies to write(chunk,encoding,cb)
  5040. this.writecb = null;
  5041. // the amount that is being written when _write is called.
  5042. this.writelen = 0;
  5043. this.bufferedRequest = null;
  5044. this.lastBufferedRequest = null;
  5045. // number of pending user-supplied write callbacks
  5046. // this must be 0 before 'finish' can be emitted
  5047. this.pendingcb = 0;
  5048. // emit prefinish if the only thing we're waiting for is _write cbs
  5049. // This is relevant for synchronous Transform streams
  5050. this.prefinished = false;
  5051. // True if the error was already emitted and should not be thrown again
  5052. this.errorEmitted = false;
  5053. // count buffered requests
  5054. this.bufferedRequestCount = 0;
  5055. // allocate the first CorkedRequest, there is always
  5056. // one allocated and free to use, and we maintain at most two
  5057. this.corkedRequestsFree = new CorkedRequest(this);
  5058. }
  5059. WritableState.prototype.getBuffer = function getBuffer() {
  5060. var current = this.bufferedRequest;
  5061. var out = [];
  5062. while (current) {
  5063. out.push(current);
  5064. current = current.next;
  5065. }
  5066. return out;
  5067. };
  5068. (function () {
  5069. try {
  5070. Object.defineProperty(WritableState.prototype, 'buffer', {
  5071. get: internalUtil.deprecate(function () {
  5072. return this.getBuffer();
  5073. }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
  5074. });
  5075. } catch (_) {}
  5076. })();
  5077. // Test _writableState for inheritance to account for Duplex streams,
  5078. // whose prototype chain only points to Readable.
  5079. var realHasInstance;
  5080. if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  5081. realHasInstance = Function.prototype[Symbol.hasInstance];
  5082. Object.defineProperty(Writable, Symbol.hasInstance, {
  5083. value: function (object) {
  5084. if (realHasInstance.call(this, object)) return true;
  5085. if (this !== Writable) return false;
  5086. return object && object._writableState instanceof WritableState;
  5087. }
  5088. });
  5089. } else {
  5090. realHasInstance = function (object) {
  5091. return object instanceof this;
  5092. };
  5093. }
  5094. function Writable(options) {
  5095. Duplex = Duplex || __webpack_require__(14);
  5096. // Writable ctor is applied to Duplexes, too.
  5097. // `realHasInstance` is necessary because using plain `instanceof`
  5098. // would return false, as no `_writableState` property is attached.
  5099. // Trying to use the custom `instanceof` for Writable here will also break the
  5100. // Node.js LazyTransform implementation, which has a non-trivial getter for
  5101. // `_writableState` that would lead to infinite recursion.
  5102. if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
  5103. return new Writable(options);
  5104. }
  5105. this._writableState = new WritableState(options, this);
  5106. // legacy.
  5107. this.writable = true;
  5108. if (options) {
  5109. if (typeof options.write === 'function') this._write = options.write;
  5110. if (typeof options.writev === 'function') this._writev = options.writev;
  5111. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  5112. if (typeof options.final === 'function') this._final = options.final;
  5113. }
  5114. Stream.call(this);
  5115. }
  5116. // Otherwise people can pipe Writable streams, which is just wrong.
  5117. Writable.prototype.pipe = function () {
  5118. this.emit('error', new Error('Cannot pipe, not readable'));
  5119. };
  5120. function writeAfterEnd(stream, cb) {
  5121. var er = new Error('write after end');
  5122. // TODO: defer error events consistently everywhere, not just the cb
  5123. stream.emit('error', er);
  5124. pna.nextTick(cb, er);
  5125. }
  5126. // Checks that a user-supplied chunk is valid, especially for the particular
  5127. // mode the stream is in. Currently this means that `null` is never accepted
  5128. // and undefined/non-string values are only allowed in object mode.
  5129. function validChunk(stream, state, chunk, cb) {
  5130. var valid = true;
  5131. var er = false;
  5132. if (chunk === null) {
  5133. er = new TypeError('May not write null values to stream');
  5134. } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  5135. er = new TypeError('Invalid non-string/buffer chunk');
  5136. }
  5137. if (er) {
  5138. stream.emit('error', er);
  5139. pna.nextTick(cb, er);
  5140. valid = false;
  5141. }
  5142. return valid;
  5143. }
  5144. Writable.prototype.write = function (chunk, encoding, cb) {
  5145. var state = this._writableState;
  5146. var ret = false;
  5147. var isBuf = !state.objectMode && _isUint8Array(chunk);
  5148. if (isBuf && !Buffer.isBuffer(chunk)) {
  5149. chunk = _uint8ArrayToBuffer(chunk);
  5150. }
  5151. if (typeof encoding === 'function') {
  5152. cb = encoding;
  5153. encoding = null;
  5154. }
  5155. if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  5156. if (typeof cb !== 'function') cb = nop;
  5157. if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
  5158. state.pendingcb++;
  5159. ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  5160. }
  5161. return ret;
  5162. };
  5163. Writable.prototype.cork = function () {
  5164. var state = this._writableState;
  5165. state.corked++;
  5166. };
  5167. Writable.prototype.uncork = function () {
  5168. var state = this._writableState;
  5169. if (state.corked) {
  5170. state.corked--;
  5171. if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  5172. }
  5173. };
  5174. Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  5175. // node::ParseEncoding() requires lower case.
  5176. if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  5177. if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
  5178. this._writableState.defaultEncoding = encoding;
  5179. return this;
  5180. };
  5181. function decodeChunk(state, chunk, encoding) {
  5182. if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
  5183. chunk = Buffer.from(chunk, encoding);
  5184. }
  5185. return chunk;
  5186. }
  5187. Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  5188. // making it explicit this property is not enumerable
  5189. // because otherwise some prototype manipulation in
  5190. // userland will fail
  5191. enumerable: false,
  5192. get: function () {
  5193. return this._writableState.highWaterMark;
  5194. }
  5195. });
  5196. // if we're already writing something, then just put this
  5197. // in the queue, and wait our turn. Otherwise, call _write
  5198. // If we return false, then we need a drain event, so set that flag.
  5199. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  5200. if (!isBuf) {
  5201. var newChunk = decodeChunk(state, chunk, encoding);
  5202. if (chunk !== newChunk) {
  5203. isBuf = true;
  5204. encoding = 'buffer';
  5205. chunk = newChunk;
  5206. }
  5207. }
  5208. var len = state.objectMode ? 1 : chunk.length;
  5209. state.length += len;
  5210. var ret = state.length < state.highWaterMark;
  5211. // we must ensure that previous needDrain will not be reset to false.
  5212. if (!ret) state.needDrain = true;
  5213. if (state.writing || state.corked) {
  5214. var last = state.lastBufferedRequest;
  5215. state.lastBufferedRequest = {
  5216. chunk: chunk,
  5217. encoding: encoding,
  5218. isBuf: isBuf,
  5219. callback: cb,
  5220. next: null
  5221. };
  5222. if (last) {
  5223. last.next = state.lastBufferedRequest;
  5224. } else {
  5225. state.bufferedRequest = state.lastBufferedRequest;
  5226. }
  5227. state.bufferedRequestCount += 1;
  5228. } else {
  5229. doWrite(stream, state, false, len, chunk, encoding, cb);
  5230. }
  5231. return ret;
  5232. }
  5233. function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  5234. state.writelen = len;
  5235. state.writecb = cb;
  5236. state.writing = true;
  5237. state.sync = true;
  5238. if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  5239. state.sync = false;
  5240. }
  5241. function onwriteError(stream, state, sync, er, cb) {
  5242. --state.pendingcb;
  5243. if (sync) {
  5244. // defer the callback if we are being called synchronously
  5245. // to avoid piling up things on the stack
  5246. pna.nextTick(cb, er);
  5247. // this can emit finish, and it will always happen
  5248. // after error
  5249. pna.nextTick(finishMaybe, stream, state);
  5250. stream._writableState.errorEmitted = true;
  5251. stream.emit('error', er);
  5252. } else {
  5253. // the caller expect this to happen before if
  5254. // it is async
  5255. cb(er);
  5256. stream._writableState.errorEmitted = true;
  5257. stream.emit('error', er);
  5258. // this can emit finish, but finish must
  5259. // always follow error
  5260. finishMaybe(stream, state);
  5261. }
  5262. }
  5263. function onwriteStateUpdate(state) {
  5264. state.writing = false;
  5265. state.writecb = null;
  5266. state.length -= state.writelen;
  5267. state.writelen = 0;
  5268. }
  5269. function onwrite(stream, er) {
  5270. var state = stream._writableState;
  5271. var sync = state.sync;
  5272. var cb = state.writecb;
  5273. onwriteStateUpdate(state);
  5274. if (er) onwriteError(stream, state, sync, er, cb);else {
  5275. // Check if we're actually ready to finish, but don't emit yet
  5276. var finished = needFinish(state);
  5277. if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
  5278. clearBuffer(stream, state);
  5279. }
  5280. if (sync) {
  5281. /*<replacement>*/
  5282. asyncWrite(afterWrite, stream, state, finished, cb);
  5283. /*</replacement>*/
  5284. } else {
  5285. afterWrite(stream, state, finished, cb);
  5286. }
  5287. }
  5288. }
  5289. function afterWrite(stream, state, finished, cb) {
  5290. if (!finished) onwriteDrain(stream, state);
  5291. state.pendingcb--;
  5292. cb();
  5293. finishMaybe(stream, state);
  5294. }
  5295. // Must force callback to be called on nextTick, so that we don't
  5296. // emit 'drain' before the write() consumer gets the 'false' return
  5297. // value, and has a chance to attach a 'drain' listener.
  5298. function onwriteDrain(stream, state) {
  5299. if (state.length === 0 && state.needDrain) {
  5300. state.needDrain = false;
  5301. stream.emit('drain');
  5302. }
  5303. }
  5304. // if there's something in the buffer waiting, then process it
  5305. function clearBuffer(stream, state) {
  5306. state.bufferProcessing = true;
  5307. var entry = state.bufferedRequest;
  5308. if (stream._writev && entry && entry.next) {
  5309. // Fast case, write everything using _writev()
  5310. var l = state.bufferedRequestCount;
  5311. var buffer = new Array(l);
  5312. var holder = state.corkedRequestsFree;
  5313. holder.entry = entry;
  5314. var count = 0;
  5315. var allBuffers = true;
  5316. while (entry) {
  5317. buffer[count] = entry;
  5318. if (!entry.isBuf) allBuffers = false;
  5319. entry = entry.next;
  5320. count += 1;
  5321. }
  5322. buffer.allBuffers = allBuffers;
  5323. doWrite(stream, state, true, state.length, buffer, '', holder.finish);
  5324. // doWrite is almost always async, defer these to save a bit of time
  5325. // as the hot path ends with doWrite
  5326. state.pendingcb++;
  5327. state.lastBufferedRequest = null;
  5328. if (holder.next) {
  5329. state.corkedRequestsFree = holder.next;
  5330. holder.next = null;
  5331. } else {
  5332. state.corkedRequestsFree = new CorkedRequest(state);
  5333. }
  5334. state.bufferedRequestCount = 0;
  5335. } else {
  5336. // Slow case, write chunks one-by-one
  5337. while (entry) {
  5338. var chunk = entry.chunk;
  5339. var encoding = entry.encoding;
  5340. var cb = entry.callback;
  5341. var len = state.objectMode ? 1 : chunk.length;
  5342. doWrite(stream, state, false, len, chunk, encoding, cb);
  5343. entry = entry.next;
  5344. state.bufferedRequestCount--;
  5345. // if we didn't call the onwrite immediately, then
  5346. // it means that we need to wait until it does.
  5347. // also, that means that the chunk and cb are currently
  5348. // being processed, so move the buffer counter past them.
  5349. if (state.writing) {
  5350. break;
  5351. }
  5352. }
  5353. if (entry === null) state.lastBufferedRequest = null;
  5354. }
  5355. state.bufferedRequest = entry;
  5356. state.bufferProcessing = false;
  5357. }
  5358. Writable.prototype._write = function (chunk, encoding, cb) {
  5359. cb(new Error('_write() is not implemented'));
  5360. };
  5361. Writable.prototype._writev = null;
  5362. Writable.prototype.end = function (chunk, encoding, cb) {
  5363. var state = this._writableState;
  5364. if (typeof chunk === 'function') {
  5365. cb = chunk;
  5366. chunk = null;
  5367. encoding = null;
  5368. } else if (typeof encoding === 'function') {
  5369. cb = encoding;
  5370. encoding = null;
  5371. }
  5372. if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
  5373. // .end() fully uncorks
  5374. if (state.corked) {
  5375. state.corked = 1;
  5376. this.uncork();
  5377. }
  5378. // ignore unnecessary end() calls.
  5379. if (!state.ending && !state.finished) endWritable(this, state, cb);
  5380. };
  5381. function needFinish(state) {
  5382. return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
  5383. }
  5384. function callFinal(stream, state) {
  5385. stream._final(function (err) {
  5386. state.pendingcb--;
  5387. if (err) {
  5388. stream.emit('error', err);
  5389. }
  5390. state.prefinished = true;
  5391. stream.emit('prefinish');
  5392. finishMaybe(stream, state);
  5393. });
  5394. }
  5395. function prefinish(stream, state) {
  5396. if (!state.prefinished && !state.finalCalled) {
  5397. if (typeof stream._final === 'function') {
  5398. state.pendingcb++;
  5399. state.finalCalled = true;
  5400. pna.nextTick(callFinal, stream, state);
  5401. } else {
  5402. state.prefinished = true;
  5403. stream.emit('prefinish');
  5404. }
  5405. }
  5406. }
  5407. function finishMaybe(stream, state) {
  5408. var need = needFinish(state);
  5409. if (need) {
  5410. prefinish(stream, state);
  5411. if (state.pendingcb === 0) {
  5412. state.finished = true;
  5413. stream.emit('finish');
  5414. }
  5415. }
  5416. return need;
  5417. }
  5418. function endWritable(stream, state, cb) {
  5419. state.ending = true;
  5420. finishMaybe(stream, state);
  5421. if (cb) {
  5422. if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  5423. }
  5424. state.ended = true;
  5425. stream.writable = false;
  5426. }
  5427. function onCorkedFinish(corkReq, state, err) {
  5428. var entry = corkReq.entry;
  5429. corkReq.entry = null;
  5430. while (entry) {
  5431. var cb = entry.callback;
  5432. state.pendingcb--;
  5433. cb(err);
  5434. entry = entry.next;
  5435. }
  5436. if (state.corkedRequestsFree) {
  5437. state.corkedRequestsFree.next = corkReq;
  5438. } else {
  5439. state.corkedRequestsFree = corkReq;
  5440. }
  5441. }
  5442. Object.defineProperty(Writable.prototype, 'destroyed', {
  5443. get: function () {
  5444. if (this._writableState === undefined) {
  5445. return false;
  5446. }
  5447. return this._writableState.destroyed;
  5448. },
  5449. set: function (value) {
  5450. // we ignore the value if the stream
  5451. // has not been initialized yet
  5452. if (!this._writableState) {
  5453. return;
  5454. }
  5455. // backward compatibility, the user is explicitly
  5456. // managing destroyed
  5457. this._writableState.destroyed = value;
  5458. }
  5459. });
  5460. Writable.prototype.destroy = destroyImpl.destroy;
  5461. Writable.prototype._undestroy = destroyImpl.undestroy;
  5462. Writable.prototype._destroy = function (err, cb) {
  5463. this.end();
  5464. cb(err);
  5465. };
  5466. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(23), __webpack_require__(87).setImmediate, __webpack_require__(10)))
  5467. /***/ }),
  5468. /* 30 */
  5469. /***/ (function(module, exports, __webpack_require__) {
  5470. "use strict";
  5471. // Copyright Joyent, Inc. and other Node contributors.
  5472. //
  5473. // Permission is hereby granted, free of charge, to any person obtaining a
  5474. // copy of this software and associated documentation files (the
  5475. // "Software"), to deal in the Software without restriction, including
  5476. // without limitation the rights to use, copy, modify, merge, publish,
  5477. // distribute, sublicense, and/or sell copies of the Software, and to permit
  5478. // persons to whom the Software is furnished to do so, subject to the
  5479. // following conditions:
  5480. //
  5481. // The above copyright notice and this permission notice shall be included
  5482. // in all copies or substantial portions of the Software.
  5483. //
  5484. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  5485. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  5486. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  5487. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  5488. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  5489. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  5490. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  5491. /*<replacement>*/
  5492. var Buffer = __webpack_require__(25).Buffer;
  5493. /*</replacement>*/
  5494. var isEncoding = Buffer.isEncoding || function (encoding) {
  5495. encoding = '' + encoding;
  5496. switch (encoding && encoding.toLowerCase()) {
  5497. case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
  5498. return true;
  5499. default:
  5500. return false;
  5501. }
  5502. };
  5503. function _normalizeEncoding(enc) {
  5504. if (!enc) return 'utf8';
  5505. var retried;
  5506. while (true) {
  5507. switch (enc) {
  5508. case 'utf8':
  5509. case 'utf-8':
  5510. return 'utf8';
  5511. case 'ucs2':
  5512. case 'ucs-2':
  5513. case 'utf16le':
  5514. case 'utf-16le':
  5515. return 'utf16le';
  5516. case 'latin1':
  5517. case 'binary':
  5518. return 'latin1';
  5519. case 'base64':
  5520. case 'ascii':
  5521. case 'hex':
  5522. return enc;
  5523. default:
  5524. if (retried) return; // undefined
  5525. enc = ('' + enc).toLowerCase();
  5526. retried = true;
  5527. }
  5528. }
  5529. };
  5530. // Do not cache `Buffer.isEncoding` when checking encoding names as some
  5531. // modules monkey-patch it to support additional encodings
  5532. function normalizeEncoding(enc) {
  5533. var nenc = _normalizeEncoding(enc);
  5534. if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  5535. return nenc || enc;
  5536. }
  5537. // StringDecoder provides an interface for efficiently splitting a series of
  5538. // buffers into a series of JS strings without breaking apart multi-byte
  5539. // characters.
  5540. exports.StringDecoder = StringDecoder;
  5541. function StringDecoder(encoding) {
  5542. this.encoding = normalizeEncoding(encoding);
  5543. var nb;
  5544. switch (this.encoding) {
  5545. case 'utf16le':
  5546. this.text = utf16Text;
  5547. this.end = utf16End;
  5548. nb = 4;
  5549. break;
  5550. case 'utf8':
  5551. this.fillLast = utf8FillLast;
  5552. nb = 4;
  5553. break;
  5554. case 'base64':
  5555. this.text = base64Text;
  5556. this.end = base64End;
  5557. nb = 3;
  5558. break;
  5559. default:
  5560. this.write = simpleWrite;
  5561. this.end = simpleEnd;
  5562. return;
  5563. }
  5564. this.lastNeed = 0;
  5565. this.lastTotal = 0;
  5566. this.lastChar = Buffer.allocUnsafe(nb);
  5567. }
  5568. StringDecoder.prototype.write = function (buf) {
  5569. if (buf.length === 0) return '';
  5570. var r;
  5571. var i;
  5572. if (this.lastNeed) {
  5573. r = this.fillLast(buf);
  5574. if (r === undefined) return '';
  5575. i = this.lastNeed;
  5576. this.lastNeed = 0;
  5577. } else {
  5578. i = 0;
  5579. }
  5580. if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  5581. return r || '';
  5582. };
  5583. StringDecoder.prototype.end = utf8End;
  5584. // Returns only complete characters in a Buffer
  5585. StringDecoder.prototype.text = utf8Text;
  5586. // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
  5587. StringDecoder.prototype.fillLast = function (buf) {
  5588. if (this.lastNeed <= buf.length) {
  5589. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
  5590. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  5591. }
  5592. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  5593. this.lastNeed -= buf.length;
  5594. };
  5595. // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
  5596. // continuation byte. If an invalid byte is detected, -2 is returned.
  5597. function utf8CheckByte(byte) {
  5598. if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  5599. return byte >> 6 === 0x02 ? -1 : -2;
  5600. }
  5601. // Checks at most 3 bytes at the end of a Buffer in order to detect an
  5602. // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
  5603. // needed to complete the UTF-8 character (if applicable) are returned.
  5604. function utf8CheckIncomplete(self, buf, i) {
  5605. var j = buf.length - 1;
  5606. if (j < i) return 0;
  5607. var nb = utf8CheckByte(buf[j]);
  5608. if (nb >= 0) {
  5609. if (nb > 0) self.lastNeed = nb - 1;
  5610. return nb;
  5611. }
  5612. if (--j < i || nb === -2) return 0;
  5613. nb = utf8CheckByte(buf[j]);
  5614. if (nb >= 0) {
  5615. if (nb > 0) self.lastNeed = nb - 2;
  5616. return nb;
  5617. }
  5618. if (--j < i || nb === -2) return 0;
  5619. nb = utf8CheckByte(buf[j]);
  5620. if (nb >= 0) {
  5621. if (nb > 0) {
  5622. if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
  5623. }
  5624. return nb;
  5625. }
  5626. return 0;
  5627. }
  5628. // Validates as many continuation bytes for a multi-byte UTF-8 character as
  5629. // needed or are available. If we see a non-continuation byte where we expect
  5630. // one, we "replace" the validated continuation bytes we've seen so far with
  5631. // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
  5632. // behavior. The continuation byte check is included three times in the case
  5633. // where all of the continuation bytes for a character exist in the same buffer.
  5634. // It is also done this way as a slight performance increase instead of using a
  5635. // loop.
  5636. function utf8CheckExtraBytes(self, buf, p) {
  5637. if ((buf[0] & 0xC0) !== 0x80) {
  5638. self.lastNeed = 0;
  5639. return '\ufffd';
  5640. }
  5641. if (self.lastNeed > 1 && buf.length > 1) {
  5642. if ((buf[1] & 0xC0) !== 0x80) {
  5643. self.lastNeed = 1;
  5644. return '\ufffd';
  5645. }
  5646. if (self.lastNeed > 2 && buf.length > 2) {
  5647. if ((buf[2] & 0xC0) !== 0x80) {
  5648. self.lastNeed = 2;
  5649. return '\ufffd';
  5650. }
  5651. }
  5652. }
  5653. }
  5654. // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
  5655. function utf8FillLast(buf) {
  5656. var p = this.lastTotal - this.lastNeed;
  5657. var r = utf8CheckExtraBytes(this, buf, p);
  5658. if (r !== undefined) return r;
  5659. if (this.lastNeed <= buf.length) {
  5660. buf.copy(this.lastChar, p, 0, this.lastNeed);
  5661. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  5662. }
  5663. buf.copy(this.lastChar, p, 0, buf.length);
  5664. this.lastNeed -= buf.length;
  5665. }
  5666. // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
  5667. // partial character, the character's bytes are buffered until the required
  5668. // number of bytes are available.
  5669. function utf8Text(buf, i) {
  5670. var total = utf8CheckIncomplete(this, buf, i);
  5671. if (!this.lastNeed) return buf.toString('utf8', i);
  5672. this.lastTotal = total;
  5673. var end = buf.length - (total - this.lastNeed);
  5674. buf.copy(this.lastChar, 0, end);
  5675. return buf.toString('utf8', i, end);
  5676. }
  5677. // For UTF-8, a replacement character is added when ending on a partial
  5678. // character.
  5679. function utf8End(buf) {
  5680. var r = buf && buf.length ? this.write(buf) : '';
  5681. if (this.lastNeed) return r + '\ufffd';
  5682. return r;
  5683. }
  5684. // UTF-16LE typically needs two bytes per character, but even if we have an even
  5685. // number of bytes available, we need to check if we end on a leading/high
  5686. // surrogate. In that case, we need to wait for the next two bytes in order to
  5687. // decode the last character properly.
  5688. function utf16Text(buf, i) {
  5689. if ((buf.length - i) % 2 === 0) {
  5690. var r = buf.toString('utf16le', i);
  5691. if (r) {
  5692. var c = r.charCodeAt(r.length - 1);
  5693. if (c >= 0xD800 && c <= 0xDBFF) {
  5694. this.lastNeed = 2;
  5695. this.lastTotal = 4;
  5696. this.lastChar[0] = buf[buf.length - 2];
  5697. this.lastChar[1] = buf[buf.length - 1];
  5698. return r.slice(0, -1);
  5699. }
  5700. }
  5701. return r;
  5702. }
  5703. this.lastNeed = 1;
  5704. this.lastTotal = 2;
  5705. this.lastChar[0] = buf[buf.length - 1];
  5706. return buf.toString('utf16le', i, buf.length - 1);
  5707. }
  5708. // For UTF-16LE we do not explicitly append special replacement characters if we
  5709. // end on a partial character, we simply let v8 handle that.
  5710. function utf16End(buf) {
  5711. var r = buf && buf.length ? this.write(buf) : '';
  5712. if (this.lastNeed) {
  5713. var end = this.lastTotal - this.lastNeed;
  5714. return r + this.lastChar.toString('utf16le', 0, end);
  5715. }
  5716. return r;
  5717. }
  5718. function base64Text(buf, i) {
  5719. var n = (buf.length - i) % 3;
  5720. if (n === 0) return buf.toString('base64', i);
  5721. this.lastNeed = 3 - n;
  5722. this.lastTotal = 3;
  5723. if (n === 1) {
  5724. this.lastChar[0] = buf[buf.length - 1];
  5725. } else {
  5726. this.lastChar[0] = buf[buf.length - 2];
  5727. this.lastChar[1] = buf[buf.length - 1];
  5728. }
  5729. return buf.toString('base64', i, buf.length - n);
  5730. }
  5731. function base64End(buf) {
  5732. var r = buf && buf.length ? this.write(buf) : '';
  5733. if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  5734. return r;
  5735. }
  5736. // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
  5737. function simpleWrite(buf) {
  5738. return buf.toString(this.encoding);
  5739. }
  5740. function simpleEnd(buf) {
  5741. return buf && buf.length ? this.write(buf) : '';
  5742. }
  5743. /***/ }),
  5744. /* 31 */
  5745. /***/ (function(module, exports, __webpack_require__) {
  5746. var isArray = __webpack_require__(32).isArray;
  5747. module.exports = {
  5748. copyOptions: function (options) {
  5749. var key, copy = {};
  5750. for (key in options) {
  5751. if (options.hasOwnProperty(key)) {
  5752. copy[key] = options[key];
  5753. }
  5754. }
  5755. return copy;
  5756. },
  5757. ensureFlagExists: function (item, options) {
  5758. if (!(item in options) || typeof options[item] !== 'boolean') {
  5759. options[item] = false;
  5760. }
  5761. },
  5762. ensureSpacesExists: function (options) {
  5763. if (!('spaces' in options) || (typeof options.spaces !== 'number' && typeof options.spaces !== 'string')) {
  5764. options.spaces = 0;
  5765. }
  5766. },
  5767. ensureAlwaysArrayExists: function (options) {
  5768. if (!('alwaysArray' in options) || (typeof options.alwaysArray !== 'boolean' && !isArray(options.alwaysArray))) {
  5769. options.alwaysArray = false;
  5770. }
  5771. },
  5772. ensureKeyExists: function (key, options) {
  5773. if (!(key + 'Key' in options) || typeof options[key + 'Key'] !== 'string') {
  5774. options[key + 'Key'] = options.compact ? '_' + key : key;
  5775. }
  5776. },
  5777. checkFnExists: function (key, options) {
  5778. return key + 'Fn' in options;
  5779. }
  5780. };
  5781. /***/ }),
  5782. /* 32 */
  5783. /***/ (function(module, exports) {
  5784. module.exports = {
  5785. isArray: function(value) {
  5786. if (Array.isArray) {
  5787. return Array.isArray(value);
  5788. }
  5789. // fallback for older browsers like IE 8
  5790. return Object.prototype.toString.call( value ) === '[object Array]';
  5791. }
  5792. };
  5793. /***/ }),
  5794. /* 33 */
  5795. /***/ (function(module, exports, __webpack_require__) {
  5796. "use strict";
  5797. Object.defineProperty(exports,"__esModule",{value:true});exports.addListener=addListener;exports.removeListener=removeListener;var raf=null;function requestAnimationFrame(callback){if(!raf){raf=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(callback){return setTimeout(callback,16);}).bind(window);}return raf(callback);}var caf=null;function cancelAnimationFrame(id){if(!caf){caf=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(id){clearTimeout(id);}).bind(window);}caf(id);}function createStyles(styleText){var style=document.createElement('style');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText=styleText;}else{style.appendChild(document.createTextNode(styleText));}(document.querySelector('head')||document.body).appendChild(style);return style;}function createElement(tagName){var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var elem=document.createElement(tagName);Object.keys(props).forEach(function(key){elem[key]=props[key];});return elem;}function getComputedStyle(elem,prop,pseudo){// for older versions of Firefox, `getComputedStyle` required
  5798. // the second argument and may return `null` for some elements
  5799. // when `display: none`
  5800. var computedStyle=window.getComputedStyle(elem,pseudo||null)||{display:'none'};return computedStyle[prop];}function getRenderInfo(elem){if(!document.documentElement.contains(elem)){return{detached:true,rendered:false};}var current=elem;while(current!==document){if(getComputedStyle(current,'display')==='none'){return{detached:false,rendered:false};}current=current.parentNode;}return{detached:false,rendered:true};}var css=".resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:\"\";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}";var total=0;var style=null;function addListener(elem,callback){if(!elem.__resize_mutation_handler__){elem.__resize_mutation_handler__=handleMutation.bind(elem);}var listeners=elem.__resize_listeners__;if(!listeners){elem.__resize_listeners__=[];if(window.ResizeObserver){var offsetWidth=elem.offsetWidth,offsetHeight=elem.offsetHeight;var ro=new ResizeObserver(function(){if(!elem.__resize_observer_triggered__){elem.__resize_observer_triggered__=true;if(elem.offsetWidth===offsetWidth&&elem.offsetHeight===offsetHeight){return;}}runCallbacks(elem);});// initially display none won't trigger ResizeObserver callback
  5801. var _getRenderInfo=getRenderInfo(elem),detached=_getRenderInfo.detached,rendered=_getRenderInfo.rendered;elem.__resize_observer_triggered__=detached===false&&rendered===false;elem.__resize_observer__=ro;ro.observe(elem);}else if(elem.attachEvent&&elem.addEventListener){// targeting IE9/10
  5802. elem.__resize_legacy_resize_handler__=function handleLegacyResize(){runCallbacks(elem);};elem.attachEvent('onresize',elem.__resize_legacy_resize_handler__);document.addEventListener('DOMSubtreeModified',elem.__resize_mutation_handler__);}else{if(!total){style=createStyles(css);}initTriggers(elem);elem.__resize_rendered__=getRenderInfo(elem).rendered;if(window.MutationObserver){var mo=new MutationObserver(elem.__resize_mutation_handler__);mo.observe(document,{attributes:true,childList:true,characterData:true,subtree:true});elem.__resize_mutation_observer__=mo;}}}elem.__resize_listeners__.push(callback);total++;}function removeListener(elem,callback){var listeners=elem.__resize_listeners__;if(!listeners){return;}if(callback){listeners.splice(listeners.indexOf(callback),1);}// no listeners exist, or removing all listeners
  5803. if(!listeners.length||!callback){// targeting IE9/10
  5804. if(elem.detachEvent&&elem.removeEventListener){elem.detachEvent('onresize',elem.__resize_legacy_resize_handler__);document.removeEventListener('DOMSubtreeModified',elem.__resize_mutation_handler__);return;}if(elem.__resize_observer__){elem.__resize_observer__.unobserve(elem);elem.__resize_observer__.disconnect();elem.__resize_observer__=null;}else{if(elem.__resize_mutation_observer__){elem.__resize_mutation_observer__.disconnect();elem.__resize_mutation_observer__=null;}elem.removeEventListener('scroll',handleScroll);elem.removeChild(elem.__resize_triggers__.triggers);elem.__resize_triggers__=null;}elem.__resize_listeners__=null;}if(! --total&&style){style.parentNode.removeChild(style);}}function getUpdatedSize(elem){var _elem$__resize_last__=elem.__resize_last__,width=_elem$__resize_last__.width,height=_elem$__resize_last__.height;var offsetWidth=elem.offsetWidth,offsetHeight=elem.offsetHeight;if(offsetWidth!==width||offsetHeight!==height){return{width:offsetWidth,height:offsetHeight};}return null;}function handleMutation(){// `this` denotes the scrolling element
  5805. var _getRenderInfo2=getRenderInfo(this),rendered=_getRenderInfo2.rendered,detached=_getRenderInfo2.detached;if(rendered!==this.__resize_rendered__){if(!detached&&this.__resize_triggers__){resetTriggers(this);this.addEventListener('scroll',handleScroll,true);}this.__resize_rendered__=rendered;runCallbacks(this);}}function handleScroll(){var _this=this;// `this` denotes the scrolling element
  5806. resetTriggers(this);if(this.__resize_raf__){cancelAnimationFrame(this.__resize_raf__);}this.__resize_raf__=requestAnimationFrame(function(){var updated=getUpdatedSize(_this);if(updated){_this.__resize_last__=updated;runCallbacks(_this);}});}function runCallbacks(elem){if(!elem||!elem.__resize_listeners__){return;}elem.__resize_listeners__.forEach(function(callback){callback.call(elem,elem);});}function initTriggers(elem){var position=getComputedStyle(elem,'position');if(!position||position==='static'){elem.style.position='relative';}elem.__resize_old_position__=position;elem.__resize_last__={};var triggers=createElement('div',{className:'resize-triggers'});var expand=createElement('div',{className:'resize-expand-trigger'});var expandChild=createElement('div');var contract=createElement('div',{className:'resize-contract-trigger'});expand.appendChild(expandChild);triggers.appendChild(expand);triggers.appendChild(contract);elem.appendChild(triggers);elem.__resize_triggers__={triggers:triggers,expand:expand,expandChild:expandChild,contract:contract};resetTriggers(elem);elem.addEventListener('scroll',handleScroll,true);elem.__resize_last__={width:elem.offsetWidth,height:elem.offsetHeight};}function resetTriggers(elem){var _elem$__resize_trigge=elem.__resize_triggers__,expand=_elem$__resize_trigge.expand,expandChild=_elem$__resize_trigge.expandChild,contract=_elem$__resize_trigge.contract;// batch read
  5807. var csw=contract.scrollWidth,csh=contract.scrollHeight;var eow=expand.offsetWidth,eoh=expand.offsetHeight,esw=expand.scrollWidth,esh=expand.scrollHeight;// batch write
  5808. contract.scrollLeft=csw;contract.scrollTop=csh;expandChild.style.width=eow+1+'px';expandChild.style.height=eoh+1+'px';expand.scrollLeft=esw;expand.scrollTop=esh;}
  5809. /***/ }),
  5810. /* 34 */
  5811. /***/ (function(module, exports, __webpack_require__) {
  5812. /* WEBPACK VAR INJECTION */(function(global) {/**
  5813. * lodash (Custom Build) <https://lodash.com/>
  5814. * Build: `lodash modularize exports="npm" -o ./`
  5815. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  5816. * Released under MIT license <https://lodash.com/license>
  5817. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  5818. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  5819. */
  5820. /** Used as the `TypeError` message for "Functions" methods. */
  5821. var FUNC_ERROR_TEXT = 'Expected a function';
  5822. /** Used as references for various `Number` constants. */
  5823. var NAN = 0 / 0;
  5824. /** `Object#toString` result references. */
  5825. var symbolTag = '[object Symbol]';
  5826. /** Used to match leading and trailing whitespace. */
  5827. var reTrim = /^\s+|\s+$/g;
  5828. /** Used to detect bad signed hexadecimal string values. */
  5829. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  5830. /** Used to detect binary string values. */
  5831. var reIsBinary = /^0b[01]+$/i;
  5832. /** Used to detect octal string values. */
  5833. var reIsOctal = /^0o[0-7]+$/i;
  5834. /** Built-in method references without a dependency on `root`. */
  5835. var freeParseInt = parseInt;
  5836. /** Detect free variable `global` from Node.js. */
  5837. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  5838. /** Detect free variable `self`. */
  5839. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  5840. /** Used as a reference to the global object. */
  5841. var root = freeGlobal || freeSelf || Function('return this')();
  5842. /** Used for built-in method references. */
  5843. var objectProto = Object.prototype;
  5844. /**
  5845. * Used to resolve the
  5846. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  5847. * of values.
  5848. */
  5849. var objectToString = objectProto.toString;
  5850. /* Built-in method references for those with the same name as other `lodash` methods. */
  5851. var nativeMax = Math.max,
  5852. nativeMin = Math.min;
  5853. /**
  5854. * Gets the timestamp of the number of milliseconds that have elapsed since
  5855. * the Unix epoch (1 January 1970 00:00:00 UTC).
  5856. *
  5857. * @static
  5858. * @memberOf _
  5859. * @since 2.4.0
  5860. * @category Date
  5861. * @returns {number} Returns the timestamp.
  5862. * @example
  5863. *
  5864. * _.defer(function(stamp) {
  5865. * console.log(_.now() - stamp);
  5866. * }, _.now());
  5867. * // => Logs the number of milliseconds it took for the deferred invocation.
  5868. */
  5869. var now = function() {
  5870. return root.Date.now();
  5871. };
  5872. /**
  5873. * Creates a debounced function that delays invoking `func` until after `wait`
  5874. * milliseconds have elapsed since the last time the debounced function was
  5875. * invoked. The debounced function comes with a `cancel` method to cancel
  5876. * delayed `func` invocations and a `flush` method to immediately invoke them.
  5877. * Provide `options` to indicate whether `func` should be invoked on the
  5878. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  5879. * with the last arguments provided to the debounced function. Subsequent
  5880. * calls to the debounced function return the result of the last `func`
  5881. * invocation.
  5882. *
  5883. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  5884. * invoked on the trailing edge of the timeout only if the debounced function
  5885. * is invoked more than once during the `wait` timeout.
  5886. *
  5887. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  5888. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  5889. *
  5890. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  5891. * for details over the differences between `_.debounce` and `_.throttle`.
  5892. *
  5893. * @static
  5894. * @memberOf _
  5895. * @since 0.1.0
  5896. * @category Function
  5897. * @param {Function} func The function to debounce.
  5898. * @param {number} [wait=0] The number of milliseconds to delay.
  5899. * @param {Object} [options={}] The options object.
  5900. * @param {boolean} [options.leading=false]
  5901. * Specify invoking on the leading edge of the timeout.
  5902. * @param {number} [options.maxWait]
  5903. * The maximum time `func` is allowed to be delayed before it's invoked.
  5904. * @param {boolean} [options.trailing=true]
  5905. * Specify invoking on the trailing edge of the timeout.
  5906. * @returns {Function} Returns the new debounced function.
  5907. * @example
  5908. *
  5909. * // Avoid costly calculations while the window size is in flux.
  5910. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  5911. *
  5912. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  5913. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  5914. * 'leading': true,
  5915. * 'trailing': false
  5916. * }));
  5917. *
  5918. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  5919. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  5920. * var source = new EventSource('/stream');
  5921. * jQuery(source).on('message', debounced);
  5922. *
  5923. * // Cancel the trailing debounced invocation.
  5924. * jQuery(window).on('popstate', debounced.cancel);
  5925. */
  5926. function debounce(func, wait, options) {
  5927. var lastArgs,
  5928. lastThis,
  5929. maxWait,
  5930. result,
  5931. timerId,
  5932. lastCallTime,
  5933. lastInvokeTime = 0,
  5934. leading = false,
  5935. maxing = false,
  5936. trailing = true;
  5937. if (typeof func != 'function') {
  5938. throw new TypeError(FUNC_ERROR_TEXT);
  5939. }
  5940. wait = toNumber(wait) || 0;
  5941. if (isObject(options)) {
  5942. leading = !!options.leading;
  5943. maxing = 'maxWait' in options;
  5944. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  5945. trailing = 'trailing' in options ? !!options.trailing : trailing;
  5946. }
  5947. function invokeFunc(time) {
  5948. var args = lastArgs,
  5949. thisArg = lastThis;
  5950. lastArgs = lastThis = undefined;
  5951. lastInvokeTime = time;
  5952. result = func.apply(thisArg, args);
  5953. return result;
  5954. }
  5955. function leadingEdge(time) {
  5956. // Reset any `maxWait` timer.
  5957. lastInvokeTime = time;
  5958. // Start the timer for the trailing edge.
  5959. timerId = setTimeout(timerExpired, wait);
  5960. // Invoke the leading edge.
  5961. return leading ? invokeFunc(time) : result;
  5962. }
  5963. function remainingWait(time) {
  5964. var timeSinceLastCall = time - lastCallTime,
  5965. timeSinceLastInvoke = time - lastInvokeTime,
  5966. result = wait - timeSinceLastCall;
  5967. return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
  5968. }
  5969. function shouldInvoke(time) {
  5970. var timeSinceLastCall = time - lastCallTime,
  5971. timeSinceLastInvoke = time - lastInvokeTime;
  5972. // Either this is the first call, activity has stopped and we're at the
  5973. // trailing edge, the system time has gone backwards and we're treating
  5974. // it as the trailing edge, or we've hit the `maxWait` limit.
  5975. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  5976. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  5977. }
  5978. function timerExpired() {
  5979. var time = now();
  5980. if (shouldInvoke(time)) {
  5981. return trailingEdge(time);
  5982. }
  5983. // Restart the timer.
  5984. timerId = setTimeout(timerExpired, remainingWait(time));
  5985. }
  5986. function trailingEdge(time) {
  5987. timerId = undefined;
  5988. // Only invoke if we have `lastArgs` which means `func` has been
  5989. // debounced at least once.
  5990. if (trailing && lastArgs) {
  5991. return invokeFunc(time);
  5992. }
  5993. lastArgs = lastThis = undefined;
  5994. return result;
  5995. }
  5996. function cancel() {
  5997. if (timerId !== undefined) {
  5998. clearTimeout(timerId);
  5999. }
  6000. lastInvokeTime = 0;
  6001. lastArgs = lastCallTime = lastThis = timerId = undefined;
  6002. }
  6003. function flush() {
  6004. return timerId === undefined ? result : trailingEdge(now());
  6005. }
  6006. function debounced() {
  6007. var time = now(),
  6008. isInvoking = shouldInvoke(time);
  6009. lastArgs = arguments;
  6010. lastThis = this;
  6011. lastCallTime = time;
  6012. if (isInvoking) {
  6013. if (timerId === undefined) {
  6014. return leadingEdge(lastCallTime);
  6015. }
  6016. if (maxing) {
  6017. // Handle invocations in a tight loop.
  6018. timerId = setTimeout(timerExpired, wait);
  6019. return invokeFunc(lastCallTime);
  6020. }
  6021. }
  6022. if (timerId === undefined) {
  6023. timerId = setTimeout(timerExpired, wait);
  6024. }
  6025. return result;
  6026. }
  6027. debounced.cancel = cancel;
  6028. debounced.flush = flush;
  6029. return debounced;
  6030. }
  6031. /**
  6032. * Checks if `value` is the
  6033. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  6034. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  6035. *
  6036. * @static
  6037. * @memberOf _
  6038. * @since 0.1.0
  6039. * @category Lang
  6040. * @param {*} value The value to check.
  6041. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  6042. * @example
  6043. *
  6044. * _.isObject({});
  6045. * // => true
  6046. *
  6047. * _.isObject([1, 2, 3]);
  6048. * // => true
  6049. *
  6050. * _.isObject(_.noop);
  6051. * // => true
  6052. *
  6053. * _.isObject(null);
  6054. * // => false
  6055. */
  6056. function isObject(value) {
  6057. var type = typeof value;
  6058. return !!value && (type == 'object' || type == 'function');
  6059. }
  6060. /**
  6061. * Checks if `value` is object-like. A value is object-like if it's not `null`
  6062. * and has a `typeof` result of "object".
  6063. *
  6064. * @static
  6065. * @memberOf _
  6066. * @since 4.0.0
  6067. * @category Lang
  6068. * @param {*} value The value to check.
  6069. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  6070. * @example
  6071. *
  6072. * _.isObjectLike({});
  6073. * // => true
  6074. *
  6075. * _.isObjectLike([1, 2, 3]);
  6076. * // => true
  6077. *
  6078. * _.isObjectLike(_.noop);
  6079. * // => false
  6080. *
  6081. * _.isObjectLike(null);
  6082. * // => false
  6083. */
  6084. function isObjectLike(value) {
  6085. return !!value && typeof value == 'object';
  6086. }
  6087. /**
  6088. * Checks if `value` is classified as a `Symbol` primitive or object.
  6089. *
  6090. * @static
  6091. * @memberOf _
  6092. * @since 4.0.0
  6093. * @category Lang
  6094. * @param {*} value The value to check.
  6095. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  6096. * @example
  6097. *
  6098. * _.isSymbol(Symbol.iterator);
  6099. * // => true
  6100. *
  6101. * _.isSymbol('abc');
  6102. * // => false
  6103. */
  6104. function isSymbol(value) {
  6105. return typeof value == 'symbol' ||
  6106. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  6107. }
  6108. /**
  6109. * Converts `value` to a number.
  6110. *
  6111. * @static
  6112. * @memberOf _
  6113. * @since 4.0.0
  6114. * @category Lang
  6115. * @param {*} value The value to process.
  6116. * @returns {number} Returns the number.
  6117. * @example
  6118. *
  6119. * _.toNumber(3.2);
  6120. * // => 3.2
  6121. *
  6122. * _.toNumber(Number.MIN_VALUE);
  6123. * // => 5e-324
  6124. *
  6125. * _.toNumber(Infinity);
  6126. * // => Infinity
  6127. *
  6128. * _.toNumber('3.2');
  6129. * // => 3.2
  6130. */
  6131. function toNumber(value) {
  6132. if (typeof value == 'number') {
  6133. return value;
  6134. }
  6135. if (isSymbol(value)) {
  6136. return NAN;
  6137. }
  6138. if (isObject(value)) {
  6139. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  6140. value = isObject(other) ? (other + '') : other;
  6141. }
  6142. if (typeof value != 'string') {
  6143. return value === 0 ? value : +value;
  6144. }
  6145. value = value.replace(reTrim, '');
  6146. var isBinary = reIsBinary.test(value);
  6147. return (isBinary || reIsOctal.test(value))
  6148. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  6149. : (reIsBadHex.test(value) ? NAN : +value);
  6150. }
  6151. module.exports = debounce;
  6152. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  6153. /***/ }),
  6154. /* 35 */
  6155. /***/ (function(module, exports, __webpack_require__) {
  6156. /* WEBPACK VAR INJECTION */(function(global) {/**
  6157. * lodash (Custom Build) <https://lodash.com/>
  6158. * Build: `lodash modularize exports="npm" -o ./`
  6159. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  6160. * Released under MIT license <https://lodash.com/license>
  6161. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  6162. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  6163. */
  6164. /** Used as references for various `Number` constants. */
  6165. var INFINITY = 1 / 0;
  6166. /** `Object#toString` result references. */
  6167. var symbolTag = '[object Symbol]';
  6168. /** Used to compose unicode character classes. */
  6169. var rsAstralRange = '\\ud800-\\udfff',
  6170. rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
  6171. rsComboSymbolsRange = '\\u20d0-\\u20f0',
  6172. rsVarRange = '\\ufe0e\\ufe0f';
  6173. /** Used to compose unicode capture groups. */
  6174. var rsAstral = '[' + rsAstralRange + ']',
  6175. rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
  6176. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  6177. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  6178. rsNonAstral = '[^' + rsAstralRange + ']',
  6179. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  6180. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  6181. rsZWJ = '\\u200d';
  6182. /** Used to compose unicode regexes. */
  6183. var reOptMod = rsModifier + '?',
  6184. rsOptVar = '[' + rsVarRange + ']?',
  6185. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  6186. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  6187. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  6188. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  6189. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  6190. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  6191. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
  6192. /** Detect free variable `global` from Node.js. */
  6193. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  6194. /** Detect free variable `self`. */
  6195. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  6196. /** Used as a reference to the global object. */
  6197. var root = freeGlobal || freeSelf || Function('return this')();
  6198. /**
  6199. * Converts an ASCII `string` to an array.
  6200. *
  6201. * @private
  6202. * @param {string} string The string to convert.
  6203. * @returns {Array} Returns the converted array.
  6204. */
  6205. function asciiToArray(string) {
  6206. return string.split('');
  6207. }
  6208. /**
  6209. * Checks if `string` contains Unicode symbols.
  6210. *
  6211. * @private
  6212. * @param {string} string The string to inspect.
  6213. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  6214. */
  6215. function hasUnicode(string) {
  6216. return reHasUnicode.test(string);
  6217. }
  6218. /**
  6219. * Converts `string` to an array.
  6220. *
  6221. * @private
  6222. * @param {string} string The string to convert.
  6223. * @returns {Array} Returns the converted array.
  6224. */
  6225. function stringToArray(string) {
  6226. return hasUnicode(string)
  6227. ? unicodeToArray(string)
  6228. : asciiToArray(string);
  6229. }
  6230. /**
  6231. * Converts a Unicode `string` to an array.
  6232. *
  6233. * @private
  6234. * @param {string} string The string to convert.
  6235. * @returns {Array} Returns the converted array.
  6236. */
  6237. function unicodeToArray(string) {
  6238. return string.match(reUnicode) || [];
  6239. }
  6240. /** Used for built-in method references. */
  6241. var objectProto = Object.prototype;
  6242. /**
  6243. * Used to resolve the
  6244. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  6245. * of values.
  6246. */
  6247. var objectToString = objectProto.toString;
  6248. /** Built-in value references. */
  6249. var Symbol = root.Symbol;
  6250. /** Used to convert symbols to primitives and strings. */
  6251. var symbolProto = Symbol ? Symbol.prototype : undefined,
  6252. symbolToString = symbolProto ? symbolProto.toString : undefined;
  6253. /**
  6254. * The base implementation of `_.slice` without an iteratee call guard.
  6255. *
  6256. * @private
  6257. * @param {Array} array The array to slice.
  6258. * @param {number} [start=0] The start position.
  6259. * @param {number} [end=array.length] The end position.
  6260. * @returns {Array} Returns the slice of `array`.
  6261. */
  6262. function baseSlice(array, start, end) {
  6263. var index = -1,
  6264. length = array.length;
  6265. if (start < 0) {
  6266. start = -start > length ? 0 : (length + start);
  6267. }
  6268. end = end > length ? length : end;
  6269. if (end < 0) {
  6270. end += length;
  6271. }
  6272. length = start > end ? 0 : ((end - start) >>> 0);
  6273. start >>>= 0;
  6274. var result = Array(length);
  6275. while (++index < length) {
  6276. result[index] = array[index + start];
  6277. }
  6278. return result;
  6279. }
  6280. /**
  6281. * The base implementation of `_.toString` which doesn't convert nullish
  6282. * values to empty strings.
  6283. *
  6284. * @private
  6285. * @param {*} value The value to process.
  6286. * @returns {string} Returns the string.
  6287. */
  6288. function baseToString(value) {
  6289. // Exit early for strings to avoid a performance hit in some environments.
  6290. if (typeof value == 'string') {
  6291. return value;
  6292. }
  6293. if (isSymbol(value)) {
  6294. return symbolToString ? symbolToString.call(value) : '';
  6295. }
  6296. var result = (value + '');
  6297. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  6298. }
  6299. /**
  6300. * Casts `array` to a slice if it's needed.
  6301. *
  6302. * @private
  6303. * @param {Array} array The array to inspect.
  6304. * @param {number} start The start position.
  6305. * @param {number} [end=array.length] The end position.
  6306. * @returns {Array} Returns the cast slice.
  6307. */
  6308. function castSlice(array, start, end) {
  6309. var length = array.length;
  6310. end = end === undefined ? length : end;
  6311. return (!start && end >= length) ? array : baseSlice(array, start, end);
  6312. }
  6313. /**
  6314. * Creates a function like `_.lowerFirst`.
  6315. *
  6316. * @private
  6317. * @param {string} methodName The name of the `String` case method to use.
  6318. * @returns {Function} Returns the new case function.
  6319. */
  6320. function createCaseFirst(methodName) {
  6321. return function(string) {
  6322. string = toString(string);
  6323. var strSymbols = hasUnicode(string)
  6324. ? stringToArray(string)
  6325. : undefined;
  6326. var chr = strSymbols
  6327. ? strSymbols[0]
  6328. : string.charAt(0);
  6329. var trailing = strSymbols
  6330. ? castSlice(strSymbols, 1).join('')
  6331. : string.slice(1);
  6332. return chr[methodName]() + trailing;
  6333. };
  6334. }
  6335. /**
  6336. * Checks if `value` is object-like. A value is object-like if it's not `null`
  6337. * and has a `typeof` result of "object".
  6338. *
  6339. * @static
  6340. * @memberOf _
  6341. * @since 4.0.0
  6342. * @category Lang
  6343. * @param {*} value The value to check.
  6344. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  6345. * @example
  6346. *
  6347. * _.isObjectLike({});
  6348. * // => true
  6349. *
  6350. * _.isObjectLike([1, 2, 3]);
  6351. * // => true
  6352. *
  6353. * _.isObjectLike(_.noop);
  6354. * // => false
  6355. *
  6356. * _.isObjectLike(null);
  6357. * // => false
  6358. */
  6359. function isObjectLike(value) {
  6360. return !!value && typeof value == 'object';
  6361. }
  6362. /**
  6363. * Checks if `value` is classified as a `Symbol` primitive or object.
  6364. *
  6365. * @static
  6366. * @memberOf _
  6367. * @since 4.0.0
  6368. * @category Lang
  6369. * @param {*} value The value to check.
  6370. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  6371. * @example
  6372. *
  6373. * _.isSymbol(Symbol.iterator);
  6374. * // => true
  6375. *
  6376. * _.isSymbol('abc');
  6377. * // => false
  6378. */
  6379. function isSymbol(value) {
  6380. return typeof value == 'symbol' ||
  6381. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  6382. }
  6383. /**
  6384. * Converts `value` to a string. An empty string is returned for `null`
  6385. * and `undefined` values. The sign of `-0` is preserved.
  6386. *
  6387. * @static
  6388. * @memberOf _
  6389. * @since 4.0.0
  6390. * @category Lang
  6391. * @param {*} value The value to process.
  6392. * @returns {string} Returns the string.
  6393. * @example
  6394. *
  6395. * _.toString(null);
  6396. * // => ''
  6397. *
  6398. * _.toString(-0);
  6399. * // => '-0'
  6400. *
  6401. * _.toString([1, 2, 3]);
  6402. * // => '1,2,3'
  6403. */
  6404. function toString(value) {
  6405. return value == null ? '' : baseToString(value);
  6406. }
  6407. /**
  6408. * Converts the first character of `string` to upper case.
  6409. *
  6410. * @static
  6411. * @memberOf _
  6412. * @since 4.0.0
  6413. * @category String
  6414. * @param {string} [string=''] The string to convert.
  6415. * @returns {string} Returns the converted string.
  6416. * @example
  6417. *
  6418. * _.upperFirst('fred');
  6419. * // => 'Fred'
  6420. *
  6421. * _.upperFirst('FRED');
  6422. * // => 'FRED'
  6423. */
  6424. var upperFirst = createCaseFirst('toUpperCase');
  6425. module.exports = upperFirst;
  6426. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  6427. /***/ }),
  6428. /* 36 */
  6429. /***/ (function(module, exports) {
  6430. module.exports = __WEBPACK_EXTERNAL_MODULE__36__;
  6431. /***/ }),
  6432. /* 37 */
  6433. /***/ (function(module, exports, __webpack_require__) {
  6434. /* WEBPACK VAR INJECTION */(function(global) {/**
  6435. * lodash (Custom Build) <https://lodash.com/>
  6436. * Build: `lodash modularize exports="npm" -o ./`
  6437. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  6438. * Released under MIT license <https://lodash.com/license>
  6439. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  6440. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  6441. */
  6442. /** Used as the `TypeError` message for "Functions" methods. */
  6443. var FUNC_ERROR_TEXT = 'Expected a function';
  6444. /** Used to stand-in for `undefined` hash values. */
  6445. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  6446. /** Used as references for various `Number` constants. */
  6447. var INFINITY = 1 / 0;
  6448. /** `Object#toString` result references. */
  6449. var funcTag = '[object Function]',
  6450. genTag = '[object GeneratorFunction]',
  6451. symbolTag = '[object Symbol]';
  6452. /** Used to match property names within property paths. */
  6453. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  6454. reIsPlainProp = /^\w*$/,
  6455. reLeadingDot = /^\./,
  6456. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  6457. /**
  6458. * Used to match `RegExp`
  6459. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  6460. */
  6461. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  6462. /** Used to match backslashes in property paths. */
  6463. var reEscapeChar = /\\(\\)?/g;
  6464. /** Used to detect host constructors (Safari). */
  6465. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  6466. /** Detect free variable `global` from Node.js. */
  6467. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  6468. /** Detect free variable `self`. */
  6469. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  6470. /** Used as a reference to the global object. */
  6471. var root = freeGlobal || freeSelf || Function('return this')();
  6472. /**
  6473. * Gets the value at `key` of `object`.
  6474. *
  6475. * @private
  6476. * @param {Object} [object] The object to query.
  6477. * @param {string} key The key of the property to get.
  6478. * @returns {*} Returns the property value.
  6479. */
  6480. function getValue(object, key) {
  6481. return object == null ? undefined : object[key];
  6482. }
  6483. /**
  6484. * Checks if `value` is a host object in IE < 9.
  6485. *
  6486. * @private
  6487. * @param {*} value The value to check.
  6488. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  6489. */
  6490. function isHostObject(value) {
  6491. // Many host objects are `Object` objects that can coerce to strings
  6492. // despite having improperly defined `toString` methods.
  6493. var result = false;
  6494. if (value != null && typeof value.toString != 'function') {
  6495. try {
  6496. result = !!(value + '');
  6497. } catch (e) {}
  6498. }
  6499. return result;
  6500. }
  6501. /** Used for built-in method references. */
  6502. var arrayProto = Array.prototype,
  6503. funcProto = Function.prototype,
  6504. objectProto = Object.prototype;
  6505. /** Used to detect overreaching core-js shims. */
  6506. var coreJsData = root['__core-js_shared__'];
  6507. /** Used to detect methods masquerading as native. */
  6508. var maskSrcKey = (function() {
  6509. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  6510. return uid ? ('Symbol(src)_1.' + uid) : '';
  6511. }());
  6512. /** Used to resolve the decompiled source of functions. */
  6513. var funcToString = funcProto.toString;
  6514. /** Used to check objects for own properties. */
  6515. var hasOwnProperty = objectProto.hasOwnProperty;
  6516. /**
  6517. * Used to resolve the
  6518. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  6519. * of values.
  6520. */
  6521. var objectToString = objectProto.toString;
  6522. /** Used to detect if a method is native. */
  6523. var reIsNative = RegExp('^' +
  6524. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  6525. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  6526. );
  6527. /** Built-in value references. */
  6528. var Symbol = root.Symbol,
  6529. splice = arrayProto.splice;
  6530. /* Built-in method references that are verified to be native. */
  6531. var Map = getNative(root, 'Map'),
  6532. nativeCreate = getNative(Object, 'create');
  6533. /** Used to convert symbols to primitives and strings. */
  6534. var symbolProto = Symbol ? Symbol.prototype : undefined,
  6535. symbolToString = symbolProto ? symbolProto.toString : undefined;
  6536. /**
  6537. * Creates a hash object.
  6538. *
  6539. * @private
  6540. * @constructor
  6541. * @param {Array} [entries] The key-value pairs to cache.
  6542. */
  6543. function Hash(entries) {
  6544. var index = -1,
  6545. length = entries ? entries.length : 0;
  6546. this.clear();
  6547. while (++index < length) {
  6548. var entry = entries[index];
  6549. this.set(entry[0], entry[1]);
  6550. }
  6551. }
  6552. /**
  6553. * Removes all key-value entries from the hash.
  6554. *
  6555. * @private
  6556. * @name clear
  6557. * @memberOf Hash
  6558. */
  6559. function hashClear() {
  6560. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  6561. }
  6562. /**
  6563. * Removes `key` and its value from the hash.
  6564. *
  6565. * @private
  6566. * @name delete
  6567. * @memberOf Hash
  6568. * @param {Object} hash The hash to modify.
  6569. * @param {string} key The key of the value to remove.
  6570. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  6571. */
  6572. function hashDelete(key) {
  6573. return this.has(key) && delete this.__data__[key];
  6574. }
  6575. /**
  6576. * Gets the hash value for `key`.
  6577. *
  6578. * @private
  6579. * @name get
  6580. * @memberOf Hash
  6581. * @param {string} key The key of the value to get.
  6582. * @returns {*} Returns the entry value.
  6583. */
  6584. function hashGet(key) {
  6585. var data = this.__data__;
  6586. if (nativeCreate) {
  6587. var result = data[key];
  6588. return result === HASH_UNDEFINED ? undefined : result;
  6589. }
  6590. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  6591. }
  6592. /**
  6593. * Checks if a hash value for `key` exists.
  6594. *
  6595. * @private
  6596. * @name has
  6597. * @memberOf Hash
  6598. * @param {string} key The key of the entry to check.
  6599. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  6600. */
  6601. function hashHas(key) {
  6602. var data = this.__data__;
  6603. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  6604. }
  6605. /**
  6606. * Sets the hash `key` to `value`.
  6607. *
  6608. * @private
  6609. * @name set
  6610. * @memberOf Hash
  6611. * @param {string} key The key of the value to set.
  6612. * @param {*} value The value to set.
  6613. * @returns {Object} Returns the hash instance.
  6614. */
  6615. function hashSet(key, value) {
  6616. var data = this.__data__;
  6617. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  6618. return this;
  6619. }
  6620. // Add methods to `Hash`.
  6621. Hash.prototype.clear = hashClear;
  6622. Hash.prototype['delete'] = hashDelete;
  6623. Hash.prototype.get = hashGet;
  6624. Hash.prototype.has = hashHas;
  6625. Hash.prototype.set = hashSet;
  6626. /**
  6627. * Creates an list cache object.
  6628. *
  6629. * @private
  6630. * @constructor
  6631. * @param {Array} [entries] The key-value pairs to cache.
  6632. */
  6633. function ListCache(entries) {
  6634. var index = -1,
  6635. length = entries ? entries.length : 0;
  6636. this.clear();
  6637. while (++index < length) {
  6638. var entry = entries[index];
  6639. this.set(entry[0], entry[1]);
  6640. }
  6641. }
  6642. /**
  6643. * Removes all key-value entries from the list cache.
  6644. *
  6645. * @private
  6646. * @name clear
  6647. * @memberOf ListCache
  6648. */
  6649. function listCacheClear() {
  6650. this.__data__ = [];
  6651. }
  6652. /**
  6653. * Removes `key` and its value from the list cache.
  6654. *
  6655. * @private
  6656. * @name delete
  6657. * @memberOf ListCache
  6658. * @param {string} key The key of the value to remove.
  6659. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  6660. */
  6661. function listCacheDelete(key) {
  6662. var data = this.__data__,
  6663. index = assocIndexOf(data, key);
  6664. if (index < 0) {
  6665. return false;
  6666. }
  6667. var lastIndex = data.length - 1;
  6668. if (index == lastIndex) {
  6669. data.pop();
  6670. } else {
  6671. splice.call(data, index, 1);
  6672. }
  6673. return true;
  6674. }
  6675. /**
  6676. * Gets the list cache value for `key`.
  6677. *
  6678. * @private
  6679. * @name get
  6680. * @memberOf ListCache
  6681. * @param {string} key The key of the value to get.
  6682. * @returns {*} Returns the entry value.
  6683. */
  6684. function listCacheGet(key) {
  6685. var data = this.__data__,
  6686. index = assocIndexOf(data, key);
  6687. return index < 0 ? undefined : data[index][1];
  6688. }
  6689. /**
  6690. * Checks if a list cache value for `key` exists.
  6691. *
  6692. * @private
  6693. * @name has
  6694. * @memberOf ListCache
  6695. * @param {string} key The key of the entry to check.
  6696. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  6697. */
  6698. function listCacheHas(key) {
  6699. return assocIndexOf(this.__data__, key) > -1;
  6700. }
  6701. /**
  6702. * Sets the list cache `key` to `value`.
  6703. *
  6704. * @private
  6705. * @name set
  6706. * @memberOf ListCache
  6707. * @param {string} key The key of the value to set.
  6708. * @param {*} value The value to set.
  6709. * @returns {Object} Returns the list cache instance.
  6710. */
  6711. function listCacheSet(key, value) {
  6712. var data = this.__data__,
  6713. index = assocIndexOf(data, key);
  6714. if (index < 0) {
  6715. data.push([key, value]);
  6716. } else {
  6717. data[index][1] = value;
  6718. }
  6719. return this;
  6720. }
  6721. // Add methods to `ListCache`.
  6722. ListCache.prototype.clear = listCacheClear;
  6723. ListCache.prototype['delete'] = listCacheDelete;
  6724. ListCache.prototype.get = listCacheGet;
  6725. ListCache.prototype.has = listCacheHas;
  6726. ListCache.prototype.set = listCacheSet;
  6727. /**
  6728. * Creates a map cache object to store key-value pairs.
  6729. *
  6730. * @private
  6731. * @constructor
  6732. * @param {Array} [entries] The key-value pairs to cache.
  6733. */
  6734. function MapCache(entries) {
  6735. var index = -1,
  6736. length = entries ? entries.length : 0;
  6737. this.clear();
  6738. while (++index < length) {
  6739. var entry = entries[index];
  6740. this.set(entry[0], entry[1]);
  6741. }
  6742. }
  6743. /**
  6744. * Removes all key-value entries from the map.
  6745. *
  6746. * @private
  6747. * @name clear
  6748. * @memberOf MapCache
  6749. */
  6750. function mapCacheClear() {
  6751. this.__data__ = {
  6752. 'hash': new Hash,
  6753. 'map': new (Map || ListCache),
  6754. 'string': new Hash
  6755. };
  6756. }
  6757. /**
  6758. * Removes `key` and its value from the map.
  6759. *
  6760. * @private
  6761. * @name delete
  6762. * @memberOf MapCache
  6763. * @param {string} key The key of the value to remove.
  6764. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  6765. */
  6766. function mapCacheDelete(key) {
  6767. return getMapData(this, key)['delete'](key);
  6768. }
  6769. /**
  6770. * Gets the map value for `key`.
  6771. *
  6772. * @private
  6773. * @name get
  6774. * @memberOf MapCache
  6775. * @param {string} key The key of the value to get.
  6776. * @returns {*} Returns the entry value.
  6777. */
  6778. function mapCacheGet(key) {
  6779. return getMapData(this, key).get(key);
  6780. }
  6781. /**
  6782. * Checks if a map value for `key` exists.
  6783. *
  6784. * @private
  6785. * @name has
  6786. * @memberOf MapCache
  6787. * @param {string} key The key of the entry to check.
  6788. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  6789. */
  6790. function mapCacheHas(key) {
  6791. return getMapData(this, key).has(key);
  6792. }
  6793. /**
  6794. * Sets the map `key` to `value`.
  6795. *
  6796. * @private
  6797. * @name set
  6798. * @memberOf MapCache
  6799. * @param {string} key The key of the value to set.
  6800. * @param {*} value The value to set.
  6801. * @returns {Object} Returns the map cache instance.
  6802. */
  6803. function mapCacheSet(key, value) {
  6804. getMapData(this, key).set(key, value);
  6805. return this;
  6806. }
  6807. // Add methods to `MapCache`.
  6808. MapCache.prototype.clear = mapCacheClear;
  6809. MapCache.prototype['delete'] = mapCacheDelete;
  6810. MapCache.prototype.get = mapCacheGet;
  6811. MapCache.prototype.has = mapCacheHas;
  6812. MapCache.prototype.set = mapCacheSet;
  6813. /**
  6814. * Gets the index at which the `key` is found in `array` of key-value pairs.
  6815. *
  6816. * @private
  6817. * @param {Array} array The array to inspect.
  6818. * @param {*} key The key to search for.
  6819. * @returns {number} Returns the index of the matched value, else `-1`.
  6820. */
  6821. function assocIndexOf(array, key) {
  6822. var length = array.length;
  6823. while (length--) {
  6824. if (eq(array[length][0], key)) {
  6825. return length;
  6826. }
  6827. }
  6828. return -1;
  6829. }
  6830. /**
  6831. * The base implementation of `_.get` without support for default values.
  6832. *
  6833. * @private
  6834. * @param {Object} object The object to query.
  6835. * @param {Array|string} path The path of the property to get.
  6836. * @returns {*} Returns the resolved value.
  6837. */
  6838. function baseGet(object, path) {
  6839. path = isKey(path, object) ? [path] : castPath(path);
  6840. var index = 0,
  6841. length = path.length;
  6842. while (object != null && index < length) {
  6843. object = object[toKey(path[index++])];
  6844. }
  6845. return (index && index == length) ? object : undefined;
  6846. }
  6847. /**
  6848. * The base implementation of `_.isNative` without bad shim checks.
  6849. *
  6850. * @private
  6851. * @param {*} value The value to check.
  6852. * @returns {boolean} Returns `true` if `value` is a native function,
  6853. * else `false`.
  6854. */
  6855. function baseIsNative(value) {
  6856. if (!isObject(value) || isMasked(value)) {
  6857. return false;
  6858. }
  6859. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  6860. return pattern.test(toSource(value));
  6861. }
  6862. /**
  6863. * The base implementation of `_.toString` which doesn't convert nullish
  6864. * values to empty strings.
  6865. *
  6866. * @private
  6867. * @param {*} value The value to process.
  6868. * @returns {string} Returns the string.
  6869. */
  6870. function baseToString(value) {
  6871. // Exit early for strings to avoid a performance hit in some environments.
  6872. if (typeof value == 'string') {
  6873. return value;
  6874. }
  6875. if (isSymbol(value)) {
  6876. return symbolToString ? symbolToString.call(value) : '';
  6877. }
  6878. var result = (value + '');
  6879. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  6880. }
  6881. /**
  6882. * Casts `value` to a path array if it's not one.
  6883. *
  6884. * @private
  6885. * @param {*} value The value to inspect.
  6886. * @returns {Array} Returns the cast property path array.
  6887. */
  6888. function castPath(value) {
  6889. return isArray(value) ? value : stringToPath(value);
  6890. }
  6891. /**
  6892. * Gets the data for `map`.
  6893. *
  6894. * @private
  6895. * @param {Object} map The map to query.
  6896. * @param {string} key The reference key.
  6897. * @returns {*} Returns the map data.
  6898. */
  6899. function getMapData(map, key) {
  6900. var data = map.__data__;
  6901. return isKeyable(key)
  6902. ? data[typeof key == 'string' ? 'string' : 'hash']
  6903. : data.map;
  6904. }
  6905. /**
  6906. * Gets the native function at `key` of `object`.
  6907. *
  6908. * @private
  6909. * @param {Object} object The object to query.
  6910. * @param {string} key The key of the method to get.
  6911. * @returns {*} Returns the function if it's native, else `undefined`.
  6912. */
  6913. function getNative(object, key) {
  6914. var value = getValue(object, key);
  6915. return baseIsNative(value) ? value : undefined;
  6916. }
  6917. /**
  6918. * Checks if `value` is a property name and not a property path.
  6919. *
  6920. * @private
  6921. * @param {*} value The value to check.
  6922. * @param {Object} [object] The object to query keys on.
  6923. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  6924. */
  6925. function isKey(value, object) {
  6926. if (isArray(value)) {
  6927. return false;
  6928. }
  6929. var type = typeof value;
  6930. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  6931. value == null || isSymbol(value)) {
  6932. return true;
  6933. }
  6934. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  6935. (object != null && value in Object(object));
  6936. }
  6937. /**
  6938. * Checks if `value` is suitable for use as unique object key.
  6939. *
  6940. * @private
  6941. * @param {*} value The value to check.
  6942. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  6943. */
  6944. function isKeyable(value) {
  6945. var type = typeof value;
  6946. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  6947. ? (value !== '__proto__')
  6948. : (value === null);
  6949. }
  6950. /**
  6951. * Checks if `func` has its source masked.
  6952. *
  6953. * @private
  6954. * @param {Function} func The function to check.
  6955. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  6956. */
  6957. function isMasked(func) {
  6958. return !!maskSrcKey && (maskSrcKey in func);
  6959. }
  6960. /**
  6961. * Converts `string` to a property path array.
  6962. *
  6963. * @private
  6964. * @param {string} string The string to convert.
  6965. * @returns {Array} Returns the property path array.
  6966. */
  6967. var stringToPath = memoize(function(string) {
  6968. string = toString(string);
  6969. var result = [];
  6970. if (reLeadingDot.test(string)) {
  6971. result.push('');
  6972. }
  6973. string.replace(rePropName, function(match, number, quote, string) {
  6974. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  6975. });
  6976. return result;
  6977. });
  6978. /**
  6979. * Converts `value` to a string key if it's not a string or symbol.
  6980. *
  6981. * @private
  6982. * @param {*} value The value to inspect.
  6983. * @returns {string|symbol} Returns the key.
  6984. */
  6985. function toKey(value) {
  6986. if (typeof value == 'string' || isSymbol(value)) {
  6987. return value;
  6988. }
  6989. var result = (value + '');
  6990. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  6991. }
  6992. /**
  6993. * Converts `func` to its source code.
  6994. *
  6995. * @private
  6996. * @param {Function} func The function to process.
  6997. * @returns {string} Returns the source code.
  6998. */
  6999. function toSource(func) {
  7000. if (func != null) {
  7001. try {
  7002. return funcToString.call(func);
  7003. } catch (e) {}
  7004. try {
  7005. return (func + '');
  7006. } catch (e) {}
  7007. }
  7008. return '';
  7009. }
  7010. /**
  7011. * Creates a function that memoizes the result of `func`. If `resolver` is
  7012. * provided, it determines the cache key for storing the result based on the
  7013. * arguments provided to the memoized function. By default, the first argument
  7014. * provided to the memoized function is used as the map cache key. The `func`
  7015. * is invoked with the `this` binding of the memoized function.
  7016. *
  7017. * **Note:** The cache is exposed as the `cache` property on the memoized
  7018. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  7019. * constructor with one whose instances implement the
  7020. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  7021. * method interface of `delete`, `get`, `has`, and `set`.
  7022. *
  7023. * @static
  7024. * @memberOf _
  7025. * @since 0.1.0
  7026. * @category Function
  7027. * @param {Function} func The function to have its output memoized.
  7028. * @param {Function} [resolver] The function to resolve the cache key.
  7029. * @returns {Function} Returns the new memoized function.
  7030. * @example
  7031. *
  7032. * var object = { 'a': 1, 'b': 2 };
  7033. * var other = { 'c': 3, 'd': 4 };
  7034. *
  7035. * var values = _.memoize(_.values);
  7036. * values(object);
  7037. * // => [1, 2]
  7038. *
  7039. * values(other);
  7040. * // => [3, 4]
  7041. *
  7042. * object.a = 2;
  7043. * values(object);
  7044. * // => [1, 2]
  7045. *
  7046. * // Modify the result cache.
  7047. * values.cache.set(object, ['a', 'b']);
  7048. * values(object);
  7049. * // => ['a', 'b']
  7050. *
  7051. * // Replace `_.memoize.Cache`.
  7052. * _.memoize.Cache = WeakMap;
  7053. */
  7054. function memoize(func, resolver) {
  7055. if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
  7056. throw new TypeError(FUNC_ERROR_TEXT);
  7057. }
  7058. var memoized = function() {
  7059. var args = arguments,
  7060. key = resolver ? resolver.apply(this, args) : args[0],
  7061. cache = memoized.cache;
  7062. if (cache.has(key)) {
  7063. return cache.get(key);
  7064. }
  7065. var result = func.apply(this, args);
  7066. memoized.cache = cache.set(key, result);
  7067. return result;
  7068. };
  7069. memoized.cache = new (memoize.Cache || MapCache);
  7070. return memoized;
  7071. }
  7072. // Assign cache to `_.memoize`.
  7073. memoize.Cache = MapCache;
  7074. /**
  7075. * Performs a
  7076. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  7077. * comparison between two values to determine if they are equivalent.
  7078. *
  7079. * @static
  7080. * @memberOf _
  7081. * @since 4.0.0
  7082. * @category Lang
  7083. * @param {*} value The value to compare.
  7084. * @param {*} other The other value to compare.
  7085. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  7086. * @example
  7087. *
  7088. * var object = { 'a': 1 };
  7089. * var other = { 'a': 1 };
  7090. *
  7091. * _.eq(object, object);
  7092. * // => true
  7093. *
  7094. * _.eq(object, other);
  7095. * // => false
  7096. *
  7097. * _.eq('a', 'a');
  7098. * // => true
  7099. *
  7100. * _.eq('a', Object('a'));
  7101. * // => false
  7102. *
  7103. * _.eq(NaN, NaN);
  7104. * // => true
  7105. */
  7106. function eq(value, other) {
  7107. return value === other || (value !== value && other !== other);
  7108. }
  7109. /**
  7110. * Checks if `value` is classified as an `Array` object.
  7111. *
  7112. * @static
  7113. * @memberOf _
  7114. * @since 0.1.0
  7115. * @category Lang
  7116. * @param {*} value The value to check.
  7117. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  7118. * @example
  7119. *
  7120. * _.isArray([1, 2, 3]);
  7121. * // => true
  7122. *
  7123. * _.isArray(document.body.children);
  7124. * // => false
  7125. *
  7126. * _.isArray('abc');
  7127. * // => false
  7128. *
  7129. * _.isArray(_.noop);
  7130. * // => false
  7131. */
  7132. var isArray = Array.isArray;
  7133. /**
  7134. * Checks if `value` is classified as a `Function` object.
  7135. *
  7136. * @static
  7137. * @memberOf _
  7138. * @since 0.1.0
  7139. * @category Lang
  7140. * @param {*} value The value to check.
  7141. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  7142. * @example
  7143. *
  7144. * _.isFunction(_);
  7145. * // => true
  7146. *
  7147. * _.isFunction(/abc/);
  7148. * // => false
  7149. */
  7150. function isFunction(value) {
  7151. // The use of `Object#toString` avoids issues with the `typeof` operator
  7152. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  7153. var tag = isObject(value) ? objectToString.call(value) : '';
  7154. return tag == funcTag || tag == genTag;
  7155. }
  7156. /**
  7157. * Checks if `value` is the
  7158. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  7159. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  7160. *
  7161. * @static
  7162. * @memberOf _
  7163. * @since 0.1.0
  7164. * @category Lang
  7165. * @param {*} value The value to check.
  7166. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  7167. * @example
  7168. *
  7169. * _.isObject({});
  7170. * // => true
  7171. *
  7172. * _.isObject([1, 2, 3]);
  7173. * // => true
  7174. *
  7175. * _.isObject(_.noop);
  7176. * // => true
  7177. *
  7178. * _.isObject(null);
  7179. * // => false
  7180. */
  7181. function isObject(value) {
  7182. var type = typeof value;
  7183. return !!value && (type == 'object' || type == 'function');
  7184. }
  7185. /**
  7186. * Checks if `value` is object-like. A value is object-like if it's not `null`
  7187. * and has a `typeof` result of "object".
  7188. *
  7189. * @static
  7190. * @memberOf _
  7191. * @since 4.0.0
  7192. * @category Lang
  7193. * @param {*} value The value to check.
  7194. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  7195. * @example
  7196. *
  7197. * _.isObjectLike({});
  7198. * // => true
  7199. *
  7200. * _.isObjectLike([1, 2, 3]);
  7201. * // => true
  7202. *
  7203. * _.isObjectLike(_.noop);
  7204. * // => false
  7205. *
  7206. * _.isObjectLike(null);
  7207. * // => false
  7208. */
  7209. function isObjectLike(value) {
  7210. return !!value && typeof value == 'object';
  7211. }
  7212. /**
  7213. * Checks if `value` is classified as a `Symbol` primitive or object.
  7214. *
  7215. * @static
  7216. * @memberOf _
  7217. * @since 4.0.0
  7218. * @category Lang
  7219. * @param {*} value The value to check.
  7220. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  7221. * @example
  7222. *
  7223. * _.isSymbol(Symbol.iterator);
  7224. * // => true
  7225. *
  7226. * _.isSymbol('abc');
  7227. * // => false
  7228. */
  7229. function isSymbol(value) {
  7230. return typeof value == 'symbol' ||
  7231. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  7232. }
  7233. /**
  7234. * Converts `value` to a string. An empty string is returned for `null`
  7235. * and `undefined` values. The sign of `-0` is preserved.
  7236. *
  7237. * @static
  7238. * @memberOf _
  7239. * @since 4.0.0
  7240. * @category Lang
  7241. * @param {*} value The value to process.
  7242. * @returns {string} Returns the string.
  7243. * @example
  7244. *
  7245. * _.toString(null);
  7246. * // => ''
  7247. *
  7248. * _.toString(-0);
  7249. * // => '-0'
  7250. *
  7251. * _.toString([1, 2, 3]);
  7252. * // => '1,2,3'
  7253. */
  7254. function toString(value) {
  7255. return value == null ? '' : baseToString(value);
  7256. }
  7257. /**
  7258. * Gets the value at `path` of `object`. If the resolved value is
  7259. * `undefined`, the `defaultValue` is returned in its place.
  7260. *
  7261. * @static
  7262. * @memberOf _
  7263. * @since 3.7.0
  7264. * @category Object
  7265. * @param {Object} object The object to query.
  7266. * @param {Array|string} path The path of the property to get.
  7267. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  7268. * @returns {*} Returns the resolved value.
  7269. * @example
  7270. *
  7271. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  7272. *
  7273. * _.get(object, 'a[0].b.c');
  7274. * // => 3
  7275. *
  7276. * _.get(object, ['a', '0', 'b', 'c']);
  7277. * // => 3
  7278. *
  7279. * _.get(object, 'a.b.c', 'default');
  7280. * // => 'default'
  7281. */
  7282. function get(object, path, defaultValue) {
  7283. var result = object == null ? undefined : baseGet(object, path);
  7284. return result === undefined ? defaultValue : result;
  7285. }
  7286. module.exports = get;
  7287. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  7288. /***/ }),
  7289. /* 38 */
  7290. /***/ (function(module, exports) {
  7291. module.exports = function(module) {
  7292. if (!module.webpackPolyfill) {
  7293. module.deprecate = function() {};
  7294. module.paths = [];
  7295. // module.parent = undefined by default
  7296. if (!module.children) module.children = [];
  7297. Object.defineProperty(module, "loaded", {
  7298. enumerable: true,
  7299. get: function() {
  7300. return module.l;
  7301. }
  7302. });
  7303. Object.defineProperty(module, "id", {
  7304. enumerable: true,
  7305. get: function() {
  7306. return module.i;
  7307. }
  7308. });
  7309. module.webpackPolyfill = 1;
  7310. }
  7311. return module;
  7312. };
  7313. /***/ }),
  7314. /* 39 */
  7315. /***/ (function(module, exports, __webpack_require__) {
  7316. "use strict";
  7317. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _SourceModel=_interopRequireDefault(__webpack_require__(67));var _LayerModel=_interopRequireDefault(__webpack_require__(68));var SourceListModel=/*#__PURE__*/function(){function SourceListModel(options){(0,_classCallCheck2.default)(this,SourceListModel);this.map=options.map;this.style=this.map.getStyle();this.layers=this.map.getStyle().layers;this.overlayLayers=this.map.overlayLayersManager;this.detailLayers=null;this.sourceList={};this.sourceNames=[];this._initLayers();this._initSource();this.excludeSourceNames=['tdt-search-','tdt-route-','smmeasure','mapbox-gl-draw'];}(0,_createClass2.default)(SourceListModel,[{key:"getSourceList",value:function getSourceList(){var sourceList={};for(var key in this.sourceList){if(key&&this.excludeSource(key)){sourceList[key]=this.sourceList[key];}}return sourceList;}},{key:"getSourceNames",value:function getSourceNames(){var _this=this;var names=[];this.sourceNames.forEach(function(element){if(element&&_this.excludeSource(element)){names.push(element);}});return names;}},{key:"excludeSource",value:function excludeSource(key){for(var i=0;i<this.excludeSourceNames.length;i++){if(key.indexOf(this.excludeSourceNames[i])>=0){return false;}}return true;}},{key:"getLegendStyle",value:function getLegendStyle(sourceName){if(sourceName){return this.sourceList[sourceName]?this.sourceList[sourceName].style:'';}var sourceList=Object.values(this.sourceList)||[];var styles=sourceList.filter(function(item){return!!item.style;});return styles;}},{key:"getLayers",value:function getLayers(){return this.detailLayers;}},{key:"getLayersBySourceLayer",value:function getLayersBySourceLayer(sourceName,sourceLayer){return this.sourceList[sourceName]['sourceLayerList'][sourceLayer];}},{key:"getSourceLayersBySource",value:function getSourceLayersBySource(sourceName){return this.sourceList[sourceName]['sourceLayerList'];}},{key:"addSourceStyle",value:function addSourceStyle(sourceName,sourceStyle){if(this.sourceList[sourceName]){this.sourceList[sourceName]['style']=sourceStyle;}}},{key:"_initLayers",value:function _initLayers(){var _this2=this;this.layers&&(this.detailLayers=this.layers.map(function(layer){return _this2.map.getLayer(layer.id);}));var overLayerList=Object.values(this.overlayLayers);overLayerList.forEach(function(overlayer){if(overlayer.id){_this2.detailLayers.push({id:overlayer.id,visibility:overlayer.visibility?'visible':'none',source:overlayer.id});}});}},{key:"_initSource",value:function _initSource(){var _this3=this;this.detailLayers&&this.detailLayers.forEach(function(layer){if(!_this3.sourceList[layer['source']]){_this3.sourceList[layer['source']]=new _SourceModel.default({source:layer['source']});_this3.sourceNames.push(layer['source']);}_this3.sourceList[layer['source']].addLayer(new _LayerModel.default(layer),layer['sourceLayer']);});}}]);return SourceListModel;}();var _default=SourceListModel;exports.default=_default;
  7318. /***/ }),
  7319. /* 40 */
  7320. /***/ (function(module, exports, __webpack_require__) {
  7321. "use strict";
  7322. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _events=__webpack_require__(20);var _theme=_interopRequireDefault(__webpack_require__(69));var GlobalEvent=/*#__PURE__*/function(_EventEmitter){(0,_inherits2.default)(GlobalEvent,_EventEmitter);var _super=(0,_createSuper2.default)(GlobalEvent);function GlobalEvent(){var _this;var themValue=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_theme.default[1];(0,_classCallCheck2.default)(this,GlobalEvent);_this=_super.call(this);_this._theme=void 0;_this._theme=themValue;return _this;}(0,_createClass2.default)(GlobalEvent,[{key:"theme",get:function get(){return this._theme;},set:function set(themValue){this._theme=themValue;}}]);return GlobalEvent;}(_events.EventEmitter);var _default=new GlobalEvent();exports.default=_default;
  7323. /***/ }),
  7324. /* 41 */
  7325. /***/ (function(module, exports, __webpack_require__) {
  7326. "use strict";
  7327. /* WEBPACK VAR INJECTION */(function(global) {var _interopRequireDefault=__webpack_require__(42);var _slicedToArray2=_interopRequireDefault(__webpack_require__(72));/*jshint esversion: 6 */function colorcolor(color){var newColor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"rgba";var calculateOpacity=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;color=color.toLowerCase();newColor=newColor.toLowerCase();var returnedColor=color;var namedColor=__webpack_require__(76);var r,g,b,a;var roundTo=4;var colorDefinitions={rgb:{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],toRGBA:function toRGBA(bits){return[parseInt(bits[1],10),parseInt(bits[2],10),parseInt(bits[3],10),1];}},rgba:{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,example:["rgba(123, 234, 45, 1)","rgba(255,234,245, 0.5)"],toRGBA:function toRGBA(bits){return[parseInt(bits[1],10),parseInt(bits[2],10),parseInt(bits[3],10),parseFloat(bits[4])];}},hex:{re:/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["00ff00","336699"],toRGBA:function toRGBA(bits){return[parseInt(bits[1],16),parseInt(bits[2],16),parseInt(bits[3],16),1];}},hex3:{re:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["fb0","f0f"],toRGBA:function toRGBA(bits){return[parseInt(bits[1]+bits[1],16),parseInt(bits[2]+bits[2],16),parseInt(bits[3]+bits[3],16),1];}},hexa:{re:/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["00ff00ff","336699a0"],toRGBA:function toRGBA(bits){return[parseInt(bits[1],16),parseInt(bits[2],16),parseInt(bits[3],16),parseInt(bits[4],16)/255];}},hex4a:{re:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["fb0f","f0f8"],toRGBA:function toRGBA(bits){return[parseInt(bits[1]+bits[1],16),parseInt(bits[2]+bits[2],16),parseInt(bits[3]+bits[3],16),parseInt(bits[4]+bits[4],16)/255];}},hsl:{re:/^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,example:["hsl(120, 100%, 25%)","hsl(0, 100%, 50%)"],toRGBA:function toRGBA(bits){bits[4]=1;var rgba=hslToRgb(bits);return[rgba.r,rgba.g,rgba.b,rgba.a];}},hsla:{re:/^hsla\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%,\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,example:["hsla(120, 100%, 25%, 1)","hsla(0, 100%, 50%, 0.5)"],toRGBA:function toRGBA(bits){var rgba=hslToRgb(bits);return[rgba.r,rgba.g,rgba.b,rgba.a];}},hsv:{re:/^hsv\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,example:["hsv(120, 100%, 25%)","hsv(0, 100%, 50%)"],toRGBA:function toRGBA(bits){var rgb=hsvToRgb(bits);return[rgb.r,rgb.g,rgb.b,1];}},hsb:{re:/^hsb\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,example:["hsb(120, 100%, 25%)","hsb(0, 100%, 50%)"],toRGBA:function toRGBA(bits){var rgb=hsvToRgb(bits);return[rgb.r,rgb.g,rgb.b,1];}}};// If this is a named color, convert it to hex
  7328. if(namedColor.hasOwnProperty(color)){color=namedColor[color];color.forEach(function(piece,index){"use strict";color[index]=("0"+piece.toString(16)).slice(-2);});color="#"+color.join('');}// Search the color definitions for a match
  7329. for(var colorDefinition in colorDefinitions){var re=colorDefinitions[colorDefinition].re;var processor=colorDefinitions[colorDefinition].toRGBA;var bits=re.exec(color);if(bits){var channels=processor(bits);r=channels[0];g=channels[1];b=channels[2];a=+(Math.round(channels[3]+("e+"+roundTo))+("e-"+roundTo));}}r=Math.round(r<0||isNaN(r)?0:r>255?255:r);g=Math.round(g<0||isNaN(g)?0:g>255?255:g);b=Math.round(b<0||isNaN(b)?0:b>255?255:b);a=a<0||isNaN(a)?0:a>1?1:a;switch(newColor){case"hex":returnedColor="#"+("0"+r.toString(16)).slice(-2)+("0"+g.toString(16)).slice(-2)+("0"+b.toString(16)).slice(-2);break;case"hexa":if(calculateOpacity){var _calculateOpacityFrom=calculateOpacityFromWhite(r,g,b,a);var _calculateOpacityFrom2=(0,_slicedToArray2.default)(_calculateOpacityFrom,4);r=_calculateOpacityFrom2[0];g=_calculateOpacityFrom2[1];b=_calculateOpacityFrom2[2];a=_calculateOpacityFrom2[3];}returnedColor="#"+("0"+r.toString(16)).slice(-2)+("0"+g.toString(16)).slice(-2)+("0"+b.toString(16)).slice(-2)+("0"+Math.round(255*a).toString(16)).slice(-2);break;case"hsl":var hsl=rgbToHsl({"r":r,"g":g,"b":b});returnedColor="hsl(".concat(hsl.h,",").concat(hsl.s,"%,").concat(hsl.l,"%)");break;case"hsla":if(calculateOpacity){var _calculateOpacityFrom3=calculateOpacityFromWhite(r,g,b,a);var _calculateOpacityFrom4=(0,_slicedToArray2.default)(_calculateOpacityFrom3,4);r=_calculateOpacityFrom4[0];g=_calculateOpacityFrom4[1];b=_calculateOpacityFrom4[2];a=_calculateOpacityFrom4[3];}var hsla=rgbToHsl({"r":r,"g":g,"b":b,"a":a});returnedColor="hsla(".concat(hsla.h,",").concat(hsla.s,"%,").concat(hsla.l,"%,").concat(hsla.a,")");break;case"hsb":/* Same as `hsv` */var hsb=rgbToHsv({"r":r,"g":g,"b":b});returnedColor="hsb(".concat(hsb.h,",").concat(hsb.s,"%,").concat(hsb.v,"%)");break;case"hsv":var hsv=rgbToHsv({"r":r,"g":g,"b":b});returnedColor="hsv(".concat(hsv.h,",").concat(hsv.s,"%,").concat(hsv.v,"%)");break;case"rgb":returnedColor="rgb(".concat(r,",").concat(g,",").concat(b,")");break;case"rgba":/* falls through */default:if(calculateOpacity){var _calculateOpacityFrom5=calculateOpacityFromWhite(r,g,b,a);var _calculateOpacityFrom6=(0,_slicedToArray2.default)(_calculateOpacityFrom5,4);r=_calculateOpacityFrom6[0];g=_calculateOpacityFrom6[1];b=_calculateOpacityFrom6[2];a=_calculateOpacityFrom6[3];}returnedColor="rgba(".concat(r,",").concat(g,",").concat(b,",").concat(a,")");break;}return returnedColor;}function calculateOpacityFromWhite(r,g,b,a){"use strict";var min=0;a=(255-(min=Math.min(r,g,b)))/255;r=( false||(r-min)/a).toFixed(0);g=( false||(g-min)/a).toFixed(0);b=( false||(b-min)/a).toFixed(0);a=parseFloat(a.toFixed(4));return[r,g,b,a];}function hslToRgb(bits){var rgba={},hsl={h:bits[1]/360,s:bits[2]/100,l:bits[3]/100,a:parseFloat(bits[4])};if(hsl.s===0){var v=255*hsl.l;rgba={r:v,g:v,b:v,a:hsl.a};}else{var q=hsl.l<0.5?hsl.l*(1+hsl.s):hsl.l+hsl.s-hsl.l*hsl.s;var p=2*hsl.l-q;rgba.r=hueToRgb(p,q,hsl.h+1/3)*255;rgba.g=hueToRgb(p,q,hsl.h)*255;rgba.b=hueToRgb(p,q,hsl.h-1/3)*255;rgba.a=hsl.a;}return rgba;}function rgbToHsl(rgba){rgba.r=rgba.r/255;rgba.g=rgba.g/255;rgba.b=rgba.b/255;var max=Math.max(rgba.r,rgba.g,rgba.b),min=Math.min(rgba.r,rgba.g,rgba.b),hsl=[],d;hsl.a=rgba.a;hsl.l=(max+min)/2;if(max===min){hsl.h=0;hsl.s=0;}else{d=max-min;hsl.s=hsl.l>=0.5?d/(2-max-min):d/(max+min);switch(max){case rgba.r:hsl.h=(rgba.g-rgba.b)/d+(rgba.g<rgba.b?6:0);break;case rgba.g:hsl.h=(rgba.b-rgba.r)/d+2;break;case rgba.b:hsl.h=(rgba.r-rgba.g)/d+4;break;}hsl.h/=6;}hsl.h=parseInt((hsl.h*360).toFixed(0),10);hsl.s=parseInt((hsl.s*100).toFixed(0),10);hsl.l=parseInt((hsl.l*100).toFixed(0),10);return hsl;}function hsvToRgb(bits){var rgb={},hsv={h:bits[1]/360,s:bits[2]/100,v:bits[3]/100},i=Math.floor(hsv.h*6),f=hsv.h*6-i,p=hsv.v*(1-hsv.s),q=hsv.v*(1-f*hsv.s),t=hsv.v*(1-(1-f)*hsv.s);switch(i%6){case 0:rgb.r=hsv.v;rgb.g=t;rgb.b=p;break;case 1:rgb.r=q;rgb.g=hsv.v;rgb.b=p;break;case 2:rgb.r=p;rgb.g=hsv.v;rgb.b=t;break;case 3:rgb.r=p;rgb.g=q;rgb.b=hsv.v;break;case 4:rgb.r=t;rgb.g=p;rgb.b=hsv.v;break;case 5:rgb.r=hsv.v;rgb.g=p;rgb.b=q;break;}rgb.r=rgb.r*255;rgb.g=rgb.g*255;rgb.b=rgb.b*255;return rgb;}function rgbToHsv(rgba){rgba.r=toPercent(parseInt(rgba.r,10)%256,256);rgba.g=toPercent(parseInt(rgba.g,10)%256,256);rgba.b=toPercent(parseInt(rgba.b,10)%256,256);var max=Math.max(rgba.r,rgba.g,rgba.b),min=Math.min(rgba.r,rgba.g,rgba.b),d=max-min,hsv={"h":0,"s":max===0?0:d/max,"v":max};if(max!==min){switch(max){case rgba.r:hsv.h=(rgba.g-rgba.b)/d+(rgba.g<rgba.b?6:0);break;case rgba.g:hsv.h=(rgba.b-rgba.r)/d+2;break;case rgba.b:hsv.h=(rgba.r-rgba.g)/d+4;break;}hsv.h/=6;}hsv.h=parseInt((hsv.h*360).toFixed(0),10);hsv.s=parseInt((hsv.s*100).toFixed(0),10);hsv.v=parseInt((hsv.v*100).toFixed(0),10);return hsv;}function hueToRgb(p,q,t){if(t<0){t+=1;}if(t>1){t-=1;}if(t<1/6){return p+(q-p)*6*t;}if(t<1/2){return q;}if(t<2/3){return p+(q-p)*((2/3-t)*6);}return p;}function toPercent(amount,limit){return amount/limit;}module.exports=colorcolor;global.colorcolor=module.exports;/* ew */
  7330. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  7331. /***/ }),
  7332. /* 42 */
  7333. /***/ (function(module, exports) {
  7334. function _interopRequireDefault(obj) {
  7335. return obj && obj.__esModule ? obj : {
  7336. "default": obj
  7337. };
  7338. }
  7339. module.exports = _interopRequireDefault;
  7340. /***/ }),
  7341. /* 43 */
  7342. /***/ (function(module, exports, __webpack_require__) {
  7343. var sax = __webpack_require__(80);
  7344. var expat /*= require('node-expat');*/ = { on: function () { }, parse: function () { } };
  7345. var helper = __webpack_require__(31);
  7346. var isArray = __webpack_require__(32).isArray;
  7347. var options;
  7348. var pureJsParser = true;
  7349. var currentElement;
  7350. function validateOptions(userOptions) {
  7351. options = helper.copyOptions(userOptions);
  7352. helper.ensureFlagExists('ignoreDeclaration', options);
  7353. helper.ensureFlagExists('ignoreInstruction', options);
  7354. helper.ensureFlagExists('ignoreAttributes', options);
  7355. helper.ensureFlagExists('ignoreText', options);
  7356. helper.ensureFlagExists('ignoreComment', options);
  7357. helper.ensureFlagExists('ignoreCdata', options);
  7358. helper.ensureFlagExists('ignoreDoctype', options);
  7359. helper.ensureFlagExists('compact', options);
  7360. helper.ensureFlagExists('alwaysChildren', options);
  7361. helper.ensureFlagExists('addParent', options);
  7362. helper.ensureFlagExists('trim', options);
  7363. helper.ensureFlagExists('nativeType', options);
  7364. helper.ensureFlagExists('nativeTypeAttributes', options);
  7365. helper.ensureFlagExists('sanitize', options);
  7366. helper.ensureFlagExists('instructionHasAttributes', options);
  7367. helper.ensureFlagExists('captureSpacesBetweenElements', options);
  7368. helper.ensureAlwaysArrayExists(options);
  7369. helper.ensureKeyExists('declaration', options);
  7370. helper.ensureKeyExists('instruction', options);
  7371. helper.ensureKeyExists('attributes', options);
  7372. helper.ensureKeyExists('text', options);
  7373. helper.ensureKeyExists('comment', options);
  7374. helper.ensureKeyExists('cdata', options);
  7375. helper.ensureKeyExists('doctype', options);
  7376. helper.ensureKeyExists('type', options);
  7377. helper.ensureKeyExists('name', options);
  7378. helper.ensureKeyExists('elements', options);
  7379. helper.ensureKeyExists('parent', options);
  7380. helper.checkFnExists('doctype', options);
  7381. helper.checkFnExists('instruction', options);
  7382. helper.checkFnExists('cdata', options);
  7383. helper.checkFnExists('comment', options);
  7384. helper.checkFnExists('text', options);
  7385. helper.checkFnExists('instructionName', options);
  7386. helper.checkFnExists('elementName', options);
  7387. helper.checkFnExists('attributeName', options);
  7388. helper.checkFnExists('attributeValue', options);
  7389. helper.checkFnExists('attributes', options);
  7390. return options;
  7391. }
  7392. function nativeType(value) {
  7393. var nValue = Number(value);
  7394. if (!isNaN(nValue)) {
  7395. return nValue;
  7396. }
  7397. var bValue = value.toLowerCase();
  7398. if (bValue === 'true') {
  7399. return true;
  7400. } else if (bValue === 'false') {
  7401. return false;
  7402. }
  7403. return value;
  7404. }
  7405. function addField(type, value) {
  7406. var key;
  7407. if (options.compact) {
  7408. if (
  7409. !currentElement[options[type + 'Key']] &&
  7410. (isArray(options.alwaysArray) ? options.alwaysArray.indexOf(options[type + 'Key']) !== -1 : options.alwaysArray)
  7411. ) {
  7412. currentElement[options[type + 'Key']] = [];
  7413. }
  7414. if (currentElement[options[type + 'Key']] && !isArray(currentElement[options[type + 'Key']])) {
  7415. currentElement[options[type + 'Key']] = [currentElement[options[type + 'Key']]];
  7416. }
  7417. if (type + 'Fn' in options && typeof value === 'string') {
  7418. value = options[type + 'Fn'](value, currentElement);
  7419. }
  7420. if (type === 'instruction' && ('instructionFn' in options || 'instructionNameFn' in options)) {
  7421. for (key in value) {
  7422. if (value.hasOwnProperty(key)) {
  7423. if ('instructionFn' in options) {
  7424. value[key] = options.instructionFn(value[key], key, currentElement);
  7425. } else {
  7426. var temp = value[key];
  7427. delete value[key];
  7428. value[options.instructionNameFn(key, temp, currentElement)] = temp;
  7429. }
  7430. }
  7431. }
  7432. }
  7433. if (isArray(currentElement[options[type + 'Key']])) {
  7434. currentElement[options[type + 'Key']].push(value);
  7435. } else {
  7436. currentElement[options[type + 'Key']] = value;
  7437. }
  7438. } else {
  7439. if (!currentElement[options.elementsKey]) {
  7440. currentElement[options.elementsKey] = [];
  7441. }
  7442. var element = {};
  7443. element[options.typeKey] = type;
  7444. if (type === 'instruction') {
  7445. for (key in value) {
  7446. if (value.hasOwnProperty(key)) {
  7447. break;
  7448. }
  7449. }
  7450. element[options.nameKey] = 'instructionNameFn' in options ? options.instructionNameFn(key, value, currentElement) : key;
  7451. if (options.instructionHasAttributes) {
  7452. element[options.attributesKey] = value[key][options.attributesKey];
  7453. if ('instructionFn' in options) {
  7454. element[options.attributesKey] = options.instructionFn(element[options.attributesKey], key, currentElement);
  7455. }
  7456. } else {
  7457. if ('instructionFn' in options) {
  7458. value[key] = options.instructionFn(value[key], key, currentElement);
  7459. }
  7460. element[options.instructionKey] = value[key];
  7461. }
  7462. } else {
  7463. if (type + 'Fn' in options) {
  7464. value = options[type + 'Fn'](value, currentElement);
  7465. }
  7466. element[options[type + 'Key']] = value;
  7467. }
  7468. if (options.addParent) {
  7469. element[options.parentKey] = currentElement;
  7470. }
  7471. currentElement[options.elementsKey].push(element);
  7472. }
  7473. }
  7474. function manipulateAttributes(attributes) {
  7475. if ('attributesFn' in options && attributes) {
  7476. attributes = options.attributesFn(attributes, currentElement);
  7477. }
  7478. if ((options.trim || 'attributeValueFn' in options || 'attributeNameFn' in options || options.nativeTypeAttributes) && attributes) {
  7479. var key;
  7480. for (key in attributes) {
  7481. if (attributes.hasOwnProperty(key)) {
  7482. if (options.trim) attributes[key] = attributes[key].trim();
  7483. if (options.nativeTypeAttributes) {
  7484. attributes[key] = nativeType(attributes[key]);
  7485. }
  7486. if ('attributeValueFn' in options) attributes[key] = options.attributeValueFn(attributes[key], key, currentElement);
  7487. if ('attributeNameFn' in options) {
  7488. var temp = attributes[key];
  7489. delete attributes[key];
  7490. attributes[options.attributeNameFn(key, attributes[key], currentElement)] = temp;
  7491. }
  7492. }
  7493. }
  7494. }
  7495. return attributes;
  7496. }
  7497. function onInstruction(instruction) {
  7498. var attributes = {};
  7499. if (instruction.body && (instruction.name.toLowerCase() === 'xml' || options.instructionHasAttributes)) {
  7500. var attrsRegExp = /([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;
  7501. var match;
  7502. while ((match = attrsRegExp.exec(instruction.body)) !== null) {
  7503. attributes[match[1]] = match[2] || match[3] || match[4];
  7504. }
  7505. attributes = manipulateAttributes(attributes);
  7506. }
  7507. if (instruction.name.toLowerCase() === 'xml') {
  7508. if (options.ignoreDeclaration) {
  7509. return;
  7510. }
  7511. currentElement[options.declarationKey] = {};
  7512. if (Object.keys(attributes).length) {
  7513. currentElement[options.declarationKey][options.attributesKey] = attributes;
  7514. }
  7515. if (options.addParent) {
  7516. currentElement[options.declarationKey][options.parentKey] = currentElement;
  7517. }
  7518. } else {
  7519. if (options.ignoreInstruction) {
  7520. return;
  7521. }
  7522. if (options.trim) {
  7523. instruction.body = instruction.body.trim();
  7524. }
  7525. var value = {};
  7526. if (options.instructionHasAttributes && Object.keys(attributes).length) {
  7527. value[instruction.name] = {};
  7528. value[instruction.name][options.attributesKey] = attributes;
  7529. } else {
  7530. value[instruction.name] = instruction.body;
  7531. }
  7532. addField('instruction', value);
  7533. }
  7534. }
  7535. function onStartElement(name, attributes) {
  7536. var element;
  7537. if (typeof name === 'object') {
  7538. attributes = name.attributes;
  7539. name = name.name;
  7540. }
  7541. attributes = manipulateAttributes(attributes);
  7542. if ('elementNameFn' in options) {
  7543. name = options.elementNameFn(name, currentElement);
  7544. }
  7545. if (options.compact) {
  7546. element = {};
  7547. if (!options.ignoreAttributes && attributes && Object.keys(attributes).length) {
  7548. element[options.attributesKey] = {};
  7549. var key;
  7550. for (key in attributes) {
  7551. if (attributes.hasOwnProperty(key)) {
  7552. element[options.attributesKey][key] = attributes[key];
  7553. }
  7554. }
  7555. }
  7556. if (
  7557. !(name in currentElement) &&
  7558. (isArray(options.alwaysArray) ? options.alwaysArray.indexOf(name) !== -1 : options.alwaysArray)
  7559. ) {
  7560. currentElement[name] = [];
  7561. }
  7562. if (currentElement[name] && !isArray(currentElement[name])) {
  7563. currentElement[name] = [currentElement[name]];
  7564. }
  7565. if (isArray(currentElement[name])) {
  7566. currentElement[name].push(element);
  7567. } else {
  7568. currentElement[name] = element;
  7569. }
  7570. } else {
  7571. if (!currentElement[options.elementsKey]) {
  7572. currentElement[options.elementsKey] = [];
  7573. }
  7574. element = {};
  7575. element[options.typeKey] = 'element';
  7576. element[options.nameKey] = name;
  7577. if (!options.ignoreAttributes && attributes && Object.keys(attributes).length) {
  7578. element[options.attributesKey] = attributes;
  7579. }
  7580. if (options.alwaysChildren) {
  7581. element[options.elementsKey] = [];
  7582. }
  7583. currentElement[options.elementsKey].push(element);
  7584. }
  7585. element[options.parentKey] = currentElement; // will be deleted in onEndElement() if !options.addParent
  7586. currentElement = element;
  7587. }
  7588. function onText(text) {
  7589. if (options.ignoreText) {
  7590. return;
  7591. }
  7592. if (!text.trim() && !options.captureSpacesBetweenElements) {
  7593. return;
  7594. }
  7595. if (options.trim) {
  7596. text = text.trim();
  7597. }
  7598. if (options.nativeType) {
  7599. text = nativeType(text);
  7600. }
  7601. if (options.sanitize) {
  7602. text = text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  7603. }
  7604. addField('text', text);
  7605. }
  7606. function onComment(comment) {
  7607. if (options.ignoreComment) {
  7608. return;
  7609. }
  7610. if (options.trim) {
  7611. comment = comment.trim();
  7612. }
  7613. addField('comment', comment);
  7614. }
  7615. function onEndElement(name) {
  7616. var parentElement = currentElement[options.parentKey];
  7617. if (!options.addParent) {
  7618. delete currentElement[options.parentKey];
  7619. }
  7620. currentElement = parentElement;
  7621. }
  7622. function onCdata(cdata) {
  7623. if (options.ignoreCdata) {
  7624. return;
  7625. }
  7626. if (options.trim) {
  7627. cdata = cdata.trim();
  7628. }
  7629. addField('cdata', cdata);
  7630. }
  7631. function onDoctype(doctype) {
  7632. if (options.ignoreDoctype) {
  7633. return;
  7634. }
  7635. doctype = doctype.replace(/^ /, '');
  7636. if (options.trim) {
  7637. doctype = doctype.trim();
  7638. }
  7639. addField('doctype', doctype);
  7640. }
  7641. function onError(error) {
  7642. error.note = error; //console.error(error);
  7643. }
  7644. module.exports = function (xml, userOptions) {
  7645. var parser = pureJsParser ? sax.parser(true, {}) : parser = new expat.Parser('UTF-8');
  7646. var result = {};
  7647. currentElement = result;
  7648. options = validateOptions(userOptions);
  7649. if (pureJsParser) {
  7650. parser.opt = {strictEntities: true};
  7651. parser.onopentag = onStartElement;
  7652. parser.ontext = onText;
  7653. parser.oncomment = onComment;
  7654. parser.onclosetag = onEndElement;
  7655. parser.onerror = onError;
  7656. parser.oncdata = onCdata;
  7657. parser.ondoctype = onDoctype;
  7658. parser.onprocessinginstruction = onInstruction;
  7659. } else {
  7660. parser.on('startElement', onStartElement);
  7661. parser.on('text', onText);
  7662. parser.on('comment', onComment);
  7663. parser.on('endElement', onEndElement);
  7664. parser.on('error', onError);
  7665. //parser.on('startCdata', onStartCdata);
  7666. //parser.on('endCdata', onEndCdata);
  7667. //parser.on('entityDecl', onEntityDecl);
  7668. }
  7669. if (pureJsParser) {
  7670. parser.write(xml).close();
  7671. } else {
  7672. if (!parser.parse(xml)) {
  7673. throw new Error('XML parsing error: ' + parser.getError());
  7674. }
  7675. }
  7676. if (result[options.elementsKey]) {
  7677. var temp = result[options.elementsKey];
  7678. delete result[options.elementsKey];
  7679. result[options.elementsKey] = temp;
  7680. delete result.text;
  7681. }
  7682. return result;
  7683. };
  7684. /***/ }),
  7685. /* 44 */
  7686. /***/ (function(module, exports) {
  7687. var toString = {}.toString;
  7688. module.exports = Array.isArray || function (arr) {
  7689. return toString.call(arr) == '[object Array]';
  7690. };
  7691. /***/ }),
  7692. /* 45 */
  7693. /***/ (function(module, exports, __webpack_require__) {
  7694. "use strict";
  7695. /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
  7696. //
  7697. // Permission is hereby granted, free of charge, to any person obtaining a
  7698. // copy of this software and associated documentation files (the
  7699. // "Software"), to deal in the Software without restriction, including
  7700. // without limitation the rights to use, copy, modify, merge, publish,
  7701. // distribute, sublicense, and/or sell copies of the Software, and to permit
  7702. // persons to whom the Software is furnished to do so, subject to the
  7703. // following conditions:
  7704. //
  7705. // The above copyright notice and this permission notice shall be included
  7706. // in all copies or substantial portions of the Software.
  7707. //
  7708. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  7709. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  7710. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  7711. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  7712. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  7713. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  7714. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  7715. /*<replacement>*/
  7716. var pna = __webpack_require__(24);
  7717. /*</replacement>*/
  7718. module.exports = Readable;
  7719. /*<replacement>*/
  7720. var isArray = __webpack_require__(44);
  7721. /*</replacement>*/
  7722. /*<replacement>*/
  7723. var Duplex;
  7724. /*</replacement>*/
  7725. Readable.ReadableState = ReadableState;
  7726. /*<replacement>*/
  7727. var EE = __webpack_require__(20).EventEmitter;
  7728. var EElistenerCount = function (emitter, type) {
  7729. return emitter.listeners(type).length;
  7730. };
  7731. /*</replacement>*/
  7732. /*<replacement>*/
  7733. var Stream = __webpack_require__(46);
  7734. /*</replacement>*/
  7735. /*<replacement>*/
  7736. var Buffer = __webpack_require__(25).Buffer;
  7737. var OurUint8Array = global.Uint8Array || function () {};
  7738. function _uint8ArrayToBuffer(chunk) {
  7739. return Buffer.from(chunk);
  7740. }
  7741. function _isUint8Array(obj) {
  7742. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  7743. }
  7744. /*</replacement>*/
  7745. /*<replacement>*/
  7746. var util = __webpack_require__(21);
  7747. util.inherits = __webpack_require__(16);
  7748. /*</replacement>*/
  7749. /*<replacement>*/
  7750. var debugUtil = __webpack_require__(84);
  7751. var debug = void 0;
  7752. if (debugUtil && debugUtil.debuglog) {
  7753. debug = debugUtil.debuglog('stream');
  7754. } else {
  7755. debug = function () {};
  7756. }
  7757. /*</replacement>*/
  7758. var BufferList = __webpack_require__(85);
  7759. var destroyImpl = __webpack_require__(47);
  7760. var StringDecoder;
  7761. util.inherits(Readable, Stream);
  7762. var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
  7763. function prependListener(emitter, event, fn) {
  7764. // Sadly this is not cacheable as some libraries bundle their own
  7765. // event emitter implementation with them.
  7766. if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
  7767. // This is a hack to make sure that our error handler is attached before any
  7768. // userland ones. NEVER DO THIS. This is here only because this code needs
  7769. // to continue to work with older versions of Node.js that do not include
  7770. // the prependListener() method. The goal is to eventually remove this hack.
  7771. if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
  7772. }
  7773. function ReadableState(options, stream) {
  7774. Duplex = Duplex || __webpack_require__(14);
  7775. options = options || {};
  7776. // Duplex streams are both readable and writable, but share
  7777. // the same options object.
  7778. // However, some cases require setting options to different
  7779. // values for the readable and the writable sides of the duplex stream.
  7780. // These options can be provided separately as readableXXX and writableXXX.
  7781. var isDuplex = stream instanceof Duplex;
  7782. // object stream flag. Used to make read(n) ignore n and to
  7783. // make all the buffer merging and length checks go away
  7784. this.objectMode = !!options.objectMode;
  7785. if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
  7786. // the point at which it stops calling _read() to fill the buffer
  7787. // Note: 0 is a valid value, means "don't call _read preemptively ever"
  7788. var hwm = options.highWaterMark;
  7789. var readableHwm = options.readableHighWaterMark;
  7790. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  7791. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
  7792. // cast to ints.
  7793. this.highWaterMark = Math.floor(this.highWaterMark);
  7794. // A linked list is used to store data chunks instead of an array because the
  7795. // linked list can remove elements from the beginning faster than
  7796. // array.shift()
  7797. this.buffer = new BufferList();
  7798. this.length = 0;
  7799. this.pipes = null;
  7800. this.pipesCount = 0;
  7801. this.flowing = null;
  7802. this.ended = false;
  7803. this.endEmitted = false;
  7804. this.reading = false;
  7805. // a flag to be able to tell if the event 'readable'/'data' is emitted
  7806. // immediately, or on a later tick. We set this to true at first, because
  7807. // any actions that shouldn't happen until "later" should generally also
  7808. // not happen before the first read call.
  7809. this.sync = true;
  7810. // whenever we return null, then we set a flag to say
  7811. // that we're awaiting a 'readable' event emission.
  7812. this.needReadable = false;
  7813. this.emittedReadable = false;
  7814. this.readableListening = false;
  7815. this.resumeScheduled = false;
  7816. // has it been destroyed
  7817. this.destroyed = false;
  7818. // Crypto is kind of old and crusty. Historically, its default string
  7819. // encoding is 'binary' so we have to make this configurable.
  7820. // Everything else in the universe uses 'utf8', though.
  7821. this.defaultEncoding = options.defaultEncoding || 'utf8';
  7822. // the number of writers that are awaiting a drain event in .pipe()s
  7823. this.awaitDrain = 0;
  7824. // if true, a maybeReadMore has been scheduled
  7825. this.readingMore = false;
  7826. this.decoder = null;
  7827. this.encoding = null;
  7828. if (options.encoding) {
  7829. if (!StringDecoder) StringDecoder = __webpack_require__(30).StringDecoder;
  7830. this.decoder = new StringDecoder(options.encoding);
  7831. this.encoding = options.encoding;
  7832. }
  7833. }
  7834. function Readable(options) {
  7835. Duplex = Duplex || __webpack_require__(14);
  7836. if (!(this instanceof Readable)) return new Readable(options);
  7837. this._readableState = new ReadableState(options, this);
  7838. // legacy
  7839. this.readable = true;
  7840. if (options) {
  7841. if (typeof options.read === 'function') this._read = options.read;
  7842. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  7843. }
  7844. Stream.call(this);
  7845. }
  7846. Object.defineProperty(Readable.prototype, 'destroyed', {
  7847. get: function () {
  7848. if (this._readableState === undefined) {
  7849. return false;
  7850. }
  7851. return this._readableState.destroyed;
  7852. },
  7853. set: function (value) {
  7854. // we ignore the value if the stream
  7855. // has not been initialized yet
  7856. if (!this._readableState) {
  7857. return;
  7858. }
  7859. // backward compatibility, the user is explicitly
  7860. // managing destroyed
  7861. this._readableState.destroyed = value;
  7862. }
  7863. });
  7864. Readable.prototype.destroy = destroyImpl.destroy;
  7865. Readable.prototype._undestroy = destroyImpl.undestroy;
  7866. Readable.prototype._destroy = function (err, cb) {
  7867. this.push(null);
  7868. cb(err);
  7869. };
  7870. // Manually shove something into the read() buffer.
  7871. // This returns true if the highWaterMark has not been hit yet,
  7872. // similar to how Writable.write() returns true if you should
  7873. // write() some more.
  7874. Readable.prototype.push = function (chunk, encoding) {
  7875. var state = this._readableState;
  7876. var skipChunkCheck;
  7877. if (!state.objectMode) {
  7878. if (typeof chunk === 'string') {
  7879. encoding = encoding || state.defaultEncoding;
  7880. if (encoding !== state.encoding) {
  7881. chunk = Buffer.from(chunk, encoding);
  7882. encoding = '';
  7883. }
  7884. skipChunkCheck = true;
  7885. }
  7886. } else {
  7887. skipChunkCheck = true;
  7888. }
  7889. return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
  7890. };
  7891. // Unshift should *always* be something directly out of read()
  7892. Readable.prototype.unshift = function (chunk) {
  7893. return readableAddChunk(this, chunk, null, true, false);
  7894. };
  7895. function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  7896. var state = stream._readableState;
  7897. if (chunk === null) {
  7898. state.reading = false;
  7899. onEofChunk(stream, state);
  7900. } else {
  7901. var er;
  7902. if (!skipChunkCheck) er = chunkInvalid(state, chunk);
  7903. if (er) {
  7904. stream.emit('error', er);
  7905. } else if (state.objectMode || chunk && chunk.length > 0) {
  7906. if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
  7907. chunk = _uint8ArrayToBuffer(chunk);
  7908. }
  7909. if (addToFront) {
  7910. if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
  7911. } else if (state.ended) {
  7912. stream.emit('error', new Error('stream.push() after EOF'));
  7913. } else {
  7914. state.reading = false;
  7915. if (state.decoder && !encoding) {
  7916. chunk = state.decoder.write(chunk);
  7917. if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
  7918. } else {
  7919. addChunk(stream, state, chunk, false);
  7920. }
  7921. }
  7922. } else if (!addToFront) {
  7923. state.reading = false;
  7924. }
  7925. }
  7926. return needMoreData(state);
  7927. }
  7928. function addChunk(stream, state, chunk, addToFront) {
  7929. if (state.flowing && state.length === 0 && !state.sync) {
  7930. stream.emit('data', chunk);
  7931. stream.read(0);
  7932. } else {
  7933. // update the buffer info.
  7934. state.length += state.objectMode ? 1 : chunk.length;
  7935. if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
  7936. if (state.needReadable) emitReadable(stream);
  7937. }
  7938. maybeReadMore(stream, state);
  7939. }
  7940. function chunkInvalid(state, chunk) {
  7941. var er;
  7942. if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  7943. er = new TypeError('Invalid non-string/buffer chunk');
  7944. }
  7945. return er;
  7946. }
  7947. // if it's past the high water mark, we can push in some more.
  7948. // Also, if we have no data yet, we can stand some
  7949. // more bytes. This is to work around cases where hwm=0,
  7950. // such as the repl. Also, if the push() triggered a
  7951. // readable event, and the user called read(largeNumber) such that
  7952. // needReadable was set, then we ought to push more, so that another
  7953. // 'readable' event will be triggered.
  7954. function needMoreData(state) {
  7955. return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
  7956. }
  7957. Readable.prototype.isPaused = function () {
  7958. return this._readableState.flowing === false;
  7959. };
  7960. // backwards compatibility.
  7961. Readable.prototype.setEncoding = function (enc) {
  7962. if (!StringDecoder) StringDecoder = __webpack_require__(30).StringDecoder;
  7963. this._readableState.decoder = new StringDecoder(enc);
  7964. this._readableState.encoding = enc;
  7965. return this;
  7966. };
  7967. // Don't raise the hwm > 8MB
  7968. var MAX_HWM = 0x800000;
  7969. function computeNewHighWaterMark(n) {
  7970. if (n >= MAX_HWM) {
  7971. n = MAX_HWM;
  7972. } else {
  7973. // Get the next highest power of 2 to prevent increasing hwm excessively in
  7974. // tiny amounts
  7975. n--;
  7976. n |= n >>> 1;
  7977. n |= n >>> 2;
  7978. n |= n >>> 4;
  7979. n |= n >>> 8;
  7980. n |= n >>> 16;
  7981. n++;
  7982. }
  7983. return n;
  7984. }
  7985. // This function is designed to be inlinable, so please take care when making
  7986. // changes to the function body.
  7987. function howMuchToRead(n, state) {
  7988. if (n <= 0 || state.length === 0 && state.ended) return 0;
  7989. if (state.objectMode) return 1;
  7990. if (n !== n) {
  7991. // Only flow one buffer at a time
  7992. if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  7993. }
  7994. // If we're asking for more than the current hwm, then raise the hwm.
  7995. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  7996. if (n <= state.length) return n;
  7997. // Don't have enough
  7998. if (!state.ended) {
  7999. state.needReadable = true;
  8000. return 0;
  8001. }
  8002. return state.length;
  8003. }
  8004. // you can override either this method, or the async _read(n) below.
  8005. Readable.prototype.read = function (n) {
  8006. debug('read', n);
  8007. n = parseInt(n, 10);
  8008. var state = this._readableState;
  8009. var nOrig = n;
  8010. if (n !== 0) state.emittedReadable = false;
  8011. // if we're doing read(0) to trigger a readable event, but we
  8012. // already have a bunch of data in the buffer, then just trigger
  8013. // the 'readable' event and move on.
  8014. if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
  8015. debug('read: emitReadable', state.length, state.ended);
  8016. if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
  8017. return null;
  8018. }
  8019. n = howMuchToRead(n, state);
  8020. // if we've ended, and we're now clear, then finish it up.
  8021. if (n === 0 && state.ended) {
  8022. if (state.length === 0) endReadable(this);
  8023. return null;
  8024. }
  8025. // All the actual chunk generation logic needs to be
  8026. // *below* the call to _read. The reason is that in certain
  8027. // synthetic stream cases, such as passthrough streams, _read
  8028. // may be a completely synchronous operation which may change
  8029. // the state of the read buffer, providing enough data when
  8030. // before there was *not* enough.
  8031. //
  8032. // So, the steps are:
  8033. // 1. Figure out what the state of things will be after we do
  8034. // a read from the buffer.
  8035. //
  8036. // 2. If that resulting state will trigger a _read, then call _read.
  8037. // Note that this may be asynchronous, or synchronous. Yes, it is
  8038. // deeply ugly to write APIs this way, but that still doesn't mean
  8039. // that the Readable class should behave improperly, as streams are
  8040. // designed to be sync/async agnostic.
  8041. // Take note if the _read call is sync or async (ie, if the read call
  8042. // has returned yet), so that we know whether or not it's safe to emit
  8043. // 'readable' etc.
  8044. //
  8045. // 3. Actually pull the requested chunks out of the buffer and return.
  8046. // if we need a readable event, then we need to do some reading.
  8047. var doRead = state.needReadable;
  8048. debug('need readable', doRead);
  8049. // if we currently have less than the highWaterMark, then also read some
  8050. if (state.length === 0 || state.length - n < state.highWaterMark) {
  8051. doRead = true;
  8052. debug('length less than watermark', doRead);
  8053. }
  8054. // however, if we've ended, then there's no point, and if we're already
  8055. // reading, then it's unnecessary.
  8056. if (state.ended || state.reading) {
  8057. doRead = false;
  8058. debug('reading or ended', doRead);
  8059. } else if (doRead) {
  8060. debug('do read');
  8061. state.reading = true;
  8062. state.sync = true;
  8063. // if the length is currently zero, then we *need* a readable event.
  8064. if (state.length === 0) state.needReadable = true;
  8065. // call internal read method
  8066. this._read(state.highWaterMark);
  8067. state.sync = false;
  8068. // If _read pushed data synchronously, then `reading` will be false,
  8069. // and we need to re-evaluate how much data we can return to the user.
  8070. if (!state.reading) n = howMuchToRead(nOrig, state);
  8071. }
  8072. var ret;
  8073. if (n > 0) ret = fromList(n, state);else ret = null;
  8074. if (ret === null) {
  8075. state.needReadable = true;
  8076. n = 0;
  8077. } else {
  8078. state.length -= n;
  8079. }
  8080. if (state.length === 0) {
  8081. // If we have nothing in the buffer, then we want to know
  8082. // as soon as we *do* get something into the buffer.
  8083. if (!state.ended) state.needReadable = true;
  8084. // If we tried to read() past the EOF, then emit end on the next tick.
  8085. if (nOrig !== n && state.ended) endReadable(this);
  8086. }
  8087. if (ret !== null) this.emit('data', ret);
  8088. return ret;
  8089. };
  8090. function onEofChunk(stream, state) {
  8091. if (state.ended) return;
  8092. if (state.decoder) {
  8093. var chunk = state.decoder.end();
  8094. if (chunk && chunk.length) {
  8095. state.buffer.push(chunk);
  8096. state.length += state.objectMode ? 1 : chunk.length;
  8097. }
  8098. }
  8099. state.ended = true;
  8100. // emit 'readable' now to make sure it gets picked up.
  8101. emitReadable(stream);
  8102. }
  8103. // Don't emit readable right away in sync mode, because this can trigger
  8104. // another read() call => stack overflow. This way, it might trigger
  8105. // a nextTick recursion warning, but that's not so bad.
  8106. function emitReadable(stream) {
  8107. var state = stream._readableState;
  8108. state.needReadable = false;
  8109. if (!state.emittedReadable) {
  8110. debug('emitReadable', state.flowing);
  8111. state.emittedReadable = true;
  8112. if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  8113. }
  8114. }
  8115. function emitReadable_(stream) {
  8116. debug('emit readable');
  8117. stream.emit('readable');
  8118. flow(stream);
  8119. }
  8120. // at this point, the user has presumably seen the 'readable' event,
  8121. // and called read() to consume some data. that may have triggered
  8122. // in turn another _read(n) call, in which case reading = true if
  8123. // it's in progress.
  8124. // However, if we're not ended, or reading, and the length < hwm,
  8125. // then go ahead and try to read some more preemptively.
  8126. function maybeReadMore(stream, state) {
  8127. if (!state.readingMore) {
  8128. state.readingMore = true;
  8129. pna.nextTick(maybeReadMore_, stream, state);
  8130. }
  8131. }
  8132. function maybeReadMore_(stream, state) {
  8133. var len = state.length;
  8134. while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
  8135. debug('maybeReadMore read 0');
  8136. stream.read(0);
  8137. if (len === state.length)
  8138. // didn't get any data, stop spinning.
  8139. break;else len = state.length;
  8140. }
  8141. state.readingMore = false;
  8142. }
  8143. // abstract method. to be overridden in specific implementation classes.
  8144. // call cb(er, data) where data is <= n in length.
  8145. // for virtual (non-string, non-buffer) streams, "length" is somewhat
  8146. // arbitrary, and perhaps not very meaningful.
  8147. Readable.prototype._read = function (n) {
  8148. this.emit('error', new Error('_read() is not implemented'));
  8149. };
  8150. Readable.prototype.pipe = function (dest, pipeOpts) {
  8151. var src = this;
  8152. var state = this._readableState;
  8153. switch (state.pipesCount) {
  8154. case 0:
  8155. state.pipes = dest;
  8156. break;
  8157. case 1:
  8158. state.pipes = [state.pipes, dest];
  8159. break;
  8160. default:
  8161. state.pipes.push(dest);
  8162. break;
  8163. }
  8164. state.pipesCount += 1;
  8165. debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  8166. var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  8167. var endFn = doEnd ? onend : unpipe;
  8168. if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
  8169. dest.on('unpipe', onunpipe);
  8170. function onunpipe(readable, unpipeInfo) {
  8171. debug('onunpipe');
  8172. if (readable === src) {
  8173. if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
  8174. unpipeInfo.hasUnpiped = true;
  8175. cleanup();
  8176. }
  8177. }
  8178. }
  8179. function onend() {
  8180. debug('onend');
  8181. dest.end();
  8182. }
  8183. // when the dest drains, it reduces the awaitDrain counter
  8184. // on the source. This would be more elegant with a .once()
  8185. // handler in flow(), but adding and removing repeatedly is
  8186. // too slow.
  8187. var ondrain = pipeOnDrain(src);
  8188. dest.on('drain', ondrain);
  8189. var cleanedUp = false;
  8190. function cleanup() {
  8191. debug('cleanup');
  8192. // cleanup event handlers once the pipe is broken
  8193. dest.removeListener('close', onclose);
  8194. dest.removeListener('finish', onfinish);
  8195. dest.removeListener('drain', ondrain);
  8196. dest.removeListener('error', onerror);
  8197. dest.removeListener('unpipe', onunpipe);
  8198. src.removeListener('end', onend);
  8199. src.removeListener('end', unpipe);
  8200. src.removeListener('data', ondata);
  8201. cleanedUp = true;
  8202. // if the reader is waiting for a drain event from this
  8203. // specific writer, then it would cause it to never start
  8204. // flowing again.
  8205. // So, if this is awaiting a drain, then we just call it now.
  8206. // If we don't know, then assume that we are waiting for one.
  8207. if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  8208. }
  8209. // If the user pushes more data while we're writing to dest then we'll end up
  8210. // in ondata again. However, we only want to increase awaitDrain once because
  8211. // dest will only emit one 'drain' event for the multiple writes.
  8212. // => Introduce a guard on increasing awaitDrain.
  8213. var increasedAwaitDrain = false;
  8214. src.on('data', ondata);
  8215. function ondata(chunk) {
  8216. debug('ondata');
  8217. increasedAwaitDrain = false;
  8218. var ret = dest.write(chunk);
  8219. if (false === ret && !increasedAwaitDrain) {
  8220. // If the user unpiped during `dest.write()`, it is possible
  8221. // to get stuck in a permanently paused state if that write
  8222. // also returned false.
  8223. // => Check whether `dest` is still a piping destination.
  8224. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
  8225. debug('false write response, pause', src._readableState.awaitDrain);
  8226. src._readableState.awaitDrain++;
  8227. increasedAwaitDrain = true;
  8228. }
  8229. src.pause();
  8230. }
  8231. }
  8232. // if the dest has an error, then stop piping into it.
  8233. // however, don't suppress the throwing behavior for this.
  8234. function onerror(er) {
  8235. debug('onerror', er);
  8236. unpipe();
  8237. dest.removeListener('error', onerror);
  8238. if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  8239. }
  8240. // Make sure our error handler is attached before userland ones.
  8241. prependListener(dest, 'error', onerror);
  8242. // Both close and finish should trigger unpipe, but only once.
  8243. function onclose() {
  8244. dest.removeListener('finish', onfinish);
  8245. unpipe();
  8246. }
  8247. dest.once('close', onclose);
  8248. function onfinish() {
  8249. debug('onfinish');
  8250. dest.removeListener('close', onclose);
  8251. unpipe();
  8252. }
  8253. dest.once('finish', onfinish);
  8254. function unpipe() {
  8255. debug('unpipe');
  8256. src.unpipe(dest);
  8257. }
  8258. // tell the dest that it's being piped to
  8259. dest.emit('pipe', src);
  8260. // start the flow if it hasn't been started already.
  8261. if (!state.flowing) {
  8262. debug('pipe resume');
  8263. src.resume();
  8264. }
  8265. return dest;
  8266. };
  8267. function pipeOnDrain(src) {
  8268. return function () {
  8269. var state = src._readableState;
  8270. debug('pipeOnDrain', state.awaitDrain);
  8271. if (state.awaitDrain) state.awaitDrain--;
  8272. if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
  8273. state.flowing = true;
  8274. flow(src);
  8275. }
  8276. };
  8277. }
  8278. Readable.prototype.unpipe = function (dest) {
  8279. var state = this._readableState;
  8280. var unpipeInfo = { hasUnpiped: false };
  8281. // if we're not piping anywhere, then do nothing.
  8282. if (state.pipesCount === 0) return this;
  8283. // just one destination. most common case.
  8284. if (state.pipesCount === 1) {
  8285. // passed in one, but it's not the right one.
  8286. if (dest && dest !== state.pipes) return this;
  8287. if (!dest) dest = state.pipes;
  8288. // got a match.
  8289. state.pipes = null;
  8290. state.pipesCount = 0;
  8291. state.flowing = false;
  8292. if (dest) dest.emit('unpipe', this, unpipeInfo);
  8293. return this;
  8294. }
  8295. // slow case. multiple pipe destinations.
  8296. if (!dest) {
  8297. // remove all.
  8298. var dests = state.pipes;
  8299. var len = state.pipesCount;
  8300. state.pipes = null;
  8301. state.pipesCount = 0;
  8302. state.flowing = false;
  8303. for (var i = 0; i < len; i++) {
  8304. dests[i].emit('unpipe', this, unpipeInfo);
  8305. }return this;
  8306. }
  8307. // try to find the right one.
  8308. var index = indexOf(state.pipes, dest);
  8309. if (index === -1) return this;
  8310. state.pipes.splice(index, 1);
  8311. state.pipesCount -= 1;
  8312. if (state.pipesCount === 1) state.pipes = state.pipes[0];
  8313. dest.emit('unpipe', this, unpipeInfo);
  8314. return this;
  8315. };
  8316. // set up data events if they are asked for
  8317. // Ensure readable listeners eventually get something
  8318. Readable.prototype.on = function (ev, fn) {
  8319. var res = Stream.prototype.on.call(this, ev, fn);
  8320. if (ev === 'data') {
  8321. // Start flowing on next tick if stream isn't explicitly paused
  8322. if (this._readableState.flowing !== false) this.resume();
  8323. } else if (ev === 'readable') {
  8324. var state = this._readableState;
  8325. if (!state.endEmitted && !state.readableListening) {
  8326. state.readableListening = state.needReadable = true;
  8327. state.emittedReadable = false;
  8328. if (!state.reading) {
  8329. pna.nextTick(nReadingNextTick, this);
  8330. } else if (state.length) {
  8331. emitReadable(this);
  8332. }
  8333. }
  8334. }
  8335. return res;
  8336. };
  8337. Readable.prototype.addListener = Readable.prototype.on;
  8338. function nReadingNextTick(self) {
  8339. debug('readable nexttick read 0');
  8340. self.read(0);
  8341. }
  8342. // pause() and resume() are remnants of the legacy readable stream API
  8343. // If the user uses them, then switch into old mode.
  8344. Readable.prototype.resume = function () {
  8345. var state = this._readableState;
  8346. if (!state.flowing) {
  8347. debug('resume');
  8348. state.flowing = true;
  8349. resume(this, state);
  8350. }
  8351. return this;
  8352. };
  8353. function resume(stream, state) {
  8354. if (!state.resumeScheduled) {
  8355. state.resumeScheduled = true;
  8356. pna.nextTick(resume_, stream, state);
  8357. }
  8358. }
  8359. function resume_(stream, state) {
  8360. if (!state.reading) {
  8361. debug('resume read 0');
  8362. stream.read(0);
  8363. }
  8364. state.resumeScheduled = false;
  8365. state.awaitDrain = 0;
  8366. stream.emit('resume');
  8367. flow(stream);
  8368. if (state.flowing && !state.reading) stream.read(0);
  8369. }
  8370. Readable.prototype.pause = function () {
  8371. debug('call pause flowing=%j', this._readableState.flowing);
  8372. if (false !== this._readableState.flowing) {
  8373. debug('pause');
  8374. this._readableState.flowing = false;
  8375. this.emit('pause');
  8376. }
  8377. return this;
  8378. };
  8379. function flow(stream) {
  8380. var state = stream._readableState;
  8381. debug('flow', state.flowing);
  8382. while (state.flowing && stream.read() !== null) {}
  8383. }
  8384. // wrap an old-style stream as the async data source.
  8385. // This is *not* part of the readable stream interface.
  8386. // It is an ugly unfortunate mess of history.
  8387. Readable.prototype.wrap = function (stream) {
  8388. var _this = this;
  8389. var state = this._readableState;
  8390. var paused = false;
  8391. stream.on('end', function () {
  8392. debug('wrapped end');
  8393. if (state.decoder && !state.ended) {
  8394. var chunk = state.decoder.end();
  8395. if (chunk && chunk.length) _this.push(chunk);
  8396. }
  8397. _this.push(null);
  8398. });
  8399. stream.on('data', function (chunk) {
  8400. debug('wrapped data');
  8401. if (state.decoder) chunk = state.decoder.write(chunk);
  8402. // don't skip over falsy values in objectMode
  8403. if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
  8404. var ret = _this.push(chunk);
  8405. if (!ret) {
  8406. paused = true;
  8407. stream.pause();
  8408. }
  8409. });
  8410. // proxy all the other methods.
  8411. // important when wrapping filters and duplexes.
  8412. for (var i in stream) {
  8413. if (this[i] === undefined && typeof stream[i] === 'function') {
  8414. this[i] = function (method) {
  8415. return function () {
  8416. return stream[method].apply(stream, arguments);
  8417. };
  8418. }(i);
  8419. }
  8420. }
  8421. // proxy certain important events.
  8422. for (var n = 0; n < kProxyEvents.length; n++) {
  8423. stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  8424. }
  8425. // when we try to consume some more bytes, simply unpause the
  8426. // underlying stream.
  8427. this._read = function (n) {
  8428. debug('wrapped _read', n);
  8429. if (paused) {
  8430. paused = false;
  8431. stream.resume();
  8432. }
  8433. };
  8434. return this;
  8435. };
  8436. Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  8437. // making it explicit this property is not enumerable
  8438. // because otherwise some prototype manipulation in
  8439. // userland will fail
  8440. enumerable: false,
  8441. get: function () {
  8442. return this._readableState.highWaterMark;
  8443. }
  8444. });
  8445. // exposed for testing purposes only.
  8446. Readable._fromList = fromList;
  8447. // Pluck off n bytes from an array of buffers.
  8448. // Length is the combined lengths of all the buffers in the list.
  8449. // This function is designed to be inlinable, so please take care when making
  8450. // changes to the function body.
  8451. function fromList(n, state) {
  8452. // nothing buffered
  8453. if (state.length === 0) return null;
  8454. var ret;
  8455. if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
  8456. // read it all, truncate the list
  8457. if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
  8458. state.buffer.clear();
  8459. } else {
  8460. // read part of list
  8461. ret = fromListPartial(n, state.buffer, state.decoder);
  8462. }
  8463. return ret;
  8464. }
  8465. // Extracts only enough buffered data to satisfy the amount requested.
  8466. // This function is designed to be inlinable, so please take care when making
  8467. // changes to the function body.
  8468. function fromListPartial(n, list, hasStrings) {
  8469. var ret;
  8470. if (n < list.head.data.length) {
  8471. // slice is the same for buffers and strings
  8472. ret = list.head.data.slice(0, n);
  8473. list.head.data = list.head.data.slice(n);
  8474. } else if (n === list.head.data.length) {
  8475. // first chunk is a perfect match
  8476. ret = list.shift();
  8477. } else {
  8478. // result spans more than one buffer
  8479. ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  8480. }
  8481. return ret;
  8482. }
  8483. // Copies a specified amount of characters from the list of buffered data
  8484. // chunks.
  8485. // This function is designed to be inlinable, so please take care when making
  8486. // changes to the function body.
  8487. function copyFromBufferString(n, list) {
  8488. var p = list.head;
  8489. var c = 1;
  8490. var ret = p.data;
  8491. n -= ret.length;
  8492. while (p = p.next) {
  8493. var str = p.data;
  8494. var nb = n > str.length ? str.length : n;
  8495. if (nb === str.length) ret += str;else ret += str.slice(0, n);
  8496. n -= nb;
  8497. if (n === 0) {
  8498. if (nb === str.length) {
  8499. ++c;
  8500. if (p.next) list.head = p.next;else list.head = list.tail = null;
  8501. } else {
  8502. list.head = p;
  8503. p.data = str.slice(nb);
  8504. }
  8505. break;
  8506. }
  8507. ++c;
  8508. }
  8509. list.length -= c;
  8510. return ret;
  8511. }
  8512. // Copies a specified amount of bytes from the list of buffered data chunks.
  8513. // This function is designed to be inlinable, so please take care when making
  8514. // changes to the function body.
  8515. function copyFromBuffer(n, list) {
  8516. var ret = Buffer.allocUnsafe(n);
  8517. var p = list.head;
  8518. var c = 1;
  8519. p.data.copy(ret);
  8520. n -= p.data.length;
  8521. while (p = p.next) {
  8522. var buf = p.data;
  8523. var nb = n > buf.length ? buf.length : n;
  8524. buf.copy(ret, ret.length - n, 0, nb);
  8525. n -= nb;
  8526. if (n === 0) {
  8527. if (nb === buf.length) {
  8528. ++c;
  8529. if (p.next) list.head = p.next;else list.head = list.tail = null;
  8530. } else {
  8531. list.head = p;
  8532. p.data = buf.slice(nb);
  8533. }
  8534. break;
  8535. }
  8536. ++c;
  8537. }
  8538. list.length -= c;
  8539. return ret;
  8540. }
  8541. function endReadable(stream) {
  8542. var state = stream._readableState;
  8543. // If we get here before consuming all the bytes, then that is a
  8544. // bug in node. Should never happen.
  8545. if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
  8546. if (!state.endEmitted) {
  8547. state.ended = true;
  8548. pna.nextTick(endReadableNT, state, stream);
  8549. }
  8550. }
  8551. function endReadableNT(state, stream) {
  8552. // Check that we didn't get one last unshift.
  8553. if (!state.endEmitted && state.length === 0) {
  8554. state.endEmitted = true;
  8555. stream.readable = false;
  8556. stream.emit('end');
  8557. }
  8558. }
  8559. function indexOf(xs, x) {
  8560. for (var i = 0, l = xs.length; i < l; i++) {
  8561. if (xs[i] === x) return i;
  8562. }
  8563. return -1;
  8564. }
  8565. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10), __webpack_require__(23)))
  8566. /***/ }),
  8567. /* 46 */
  8568. /***/ (function(module, exports, __webpack_require__) {
  8569. module.exports = __webpack_require__(20).EventEmitter;
  8570. /***/ }),
  8571. /* 47 */
  8572. /***/ (function(module, exports, __webpack_require__) {
  8573. "use strict";
  8574. /*<replacement>*/
  8575. var pna = __webpack_require__(24);
  8576. /*</replacement>*/
  8577. // undocumented cb() API, needed for core, not for public API
  8578. function destroy(err, cb) {
  8579. var _this = this;
  8580. var readableDestroyed = this._readableState && this._readableState.destroyed;
  8581. var writableDestroyed = this._writableState && this._writableState.destroyed;
  8582. if (readableDestroyed || writableDestroyed) {
  8583. if (cb) {
  8584. cb(err);
  8585. } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
  8586. pna.nextTick(emitErrorNT, this, err);
  8587. }
  8588. return this;
  8589. }
  8590. // we set destroyed to true before firing error callbacks in order
  8591. // to make it re-entrance safe in case destroy() is called within callbacks
  8592. if (this._readableState) {
  8593. this._readableState.destroyed = true;
  8594. }
  8595. // if this is a duplex stream mark the writable part as destroyed as well
  8596. if (this._writableState) {
  8597. this._writableState.destroyed = true;
  8598. }
  8599. this._destroy(err || null, function (err) {
  8600. if (!cb && err) {
  8601. pna.nextTick(emitErrorNT, _this, err);
  8602. if (_this._writableState) {
  8603. _this._writableState.errorEmitted = true;
  8604. }
  8605. } else if (cb) {
  8606. cb(err);
  8607. }
  8608. });
  8609. return this;
  8610. }
  8611. function undestroy() {
  8612. if (this._readableState) {
  8613. this._readableState.destroyed = false;
  8614. this._readableState.reading = false;
  8615. this._readableState.ended = false;
  8616. this._readableState.endEmitted = false;
  8617. }
  8618. if (this._writableState) {
  8619. this._writableState.destroyed = false;
  8620. this._writableState.ended = false;
  8621. this._writableState.ending = false;
  8622. this._writableState.finished = false;
  8623. this._writableState.errorEmitted = false;
  8624. }
  8625. }
  8626. function emitErrorNT(self, err) {
  8627. self.emit('error', err);
  8628. }
  8629. module.exports = {
  8630. destroy: destroy,
  8631. undestroy: undestroy
  8632. };
  8633. /***/ }),
  8634. /* 48 */
  8635. /***/ (function(module, exports, __webpack_require__) {
  8636. "use strict";
  8637. // Copyright Joyent, Inc. and other Node contributors.
  8638. //
  8639. // Permission is hereby granted, free of charge, to any person obtaining a
  8640. // copy of this software and associated documentation files (the
  8641. // "Software"), to deal in the Software without restriction, including
  8642. // without limitation the rights to use, copy, modify, merge, publish,
  8643. // distribute, sublicense, and/or sell copies of the Software, and to permit
  8644. // persons to whom the Software is furnished to do so, subject to the
  8645. // following conditions:
  8646. //
  8647. // The above copyright notice and this permission notice shall be included
  8648. // in all copies or substantial portions of the Software.
  8649. //
  8650. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  8651. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  8652. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  8653. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  8654. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  8655. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  8656. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  8657. // a transform stream is a readable/writable stream where you do
  8658. // something with the data. Sometimes it's called a "filter",
  8659. // but that's not a great name for it, since that implies a thing where
  8660. // some bits pass through, and others are simply ignored. (That would
  8661. // be a valid example of a transform, of course.)
  8662. //
  8663. // While the output is causally related to the input, it's not a
  8664. // necessarily symmetric or synchronous transformation. For example,
  8665. // a zlib stream might take multiple plain-text writes(), and then
  8666. // emit a single compressed chunk some time in the future.
  8667. //
  8668. // Here's how this works:
  8669. //
  8670. // The Transform stream has all the aspects of the readable and writable
  8671. // stream classes. When you write(chunk), that calls _write(chunk,cb)
  8672. // internally, and returns false if there's a lot of pending writes
  8673. // buffered up. When you call read(), that calls _read(n) until
  8674. // there's enough pending readable data buffered up.
  8675. //
  8676. // In a transform stream, the written data is placed in a buffer. When
  8677. // _read(n) is called, it transforms the queued up data, calling the
  8678. // buffered _write cb's as it consumes chunks. If consuming a single
  8679. // written chunk would result in multiple output chunks, then the first
  8680. // outputted bit calls the readcb, and subsequent chunks just go into
  8681. // the read buffer, and will cause it to emit 'readable' if necessary.
  8682. //
  8683. // This way, back-pressure is actually determined by the reading side,
  8684. // since _read has to be called to start processing a new chunk. However,
  8685. // a pathological inflate type of transform can cause excessive buffering
  8686. // here. For example, imagine a stream where every byte of input is
  8687. // interpreted as an integer from 0-255, and then results in that many
  8688. // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
  8689. // 1kb of data being output. In this case, you could write a very small
  8690. // amount of input, and end up with a very large amount of output. In
  8691. // such a pathological inflating mechanism, there'd be no way to tell
  8692. // the system to stop doing the transform. A single 4MB write could
  8693. // cause the system to run out of memory.
  8694. //
  8695. // However, even in such a pathological case, only a single written chunk
  8696. // would be consumed, and then the rest would wait (un-transformed) until
  8697. // the results of the previous transformed chunk were consumed.
  8698. module.exports = Transform;
  8699. var Duplex = __webpack_require__(14);
  8700. /*<replacement>*/
  8701. var util = __webpack_require__(21);
  8702. util.inherits = __webpack_require__(16);
  8703. /*</replacement>*/
  8704. util.inherits(Transform, Duplex);
  8705. function afterTransform(er, data) {
  8706. var ts = this._transformState;
  8707. ts.transforming = false;
  8708. var cb = ts.writecb;
  8709. if (!cb) {
  8710. return this.emit('error', new Error('write callback called multiple times'));
  8711. }
  8712. ts.writechunk = null;
  8713. ts.writecb = null;
  8714. if (data != null) // single equals check for both `null` and `undefined`
  8715. this.push(data);
  8716. cb(er);
  8717. var rs = this._readableState;
  8718. rs.reading = false;
  8719. if (rs.needReadable || rs.length < rs.highWaterMark) {
  8720. this._read(rs.highWaterMark);
  8721. }
  8722. }
  8723. function Transform(options) {
  8724. if (!(this instanceof Transform)) return new Transform(options);
  8725. Duplex.call(this, options);
  8726. this._transformState = {
  8727. afterTransform: afterTransform.bind(this),
  8728. needTransform: false,
  8729. transforming: false,
  8730. writecb: null,
  8731. writechunk: null,
  8732. writeencoding: null
  8733. };
  8734. // start out asking for a readable event once data is transformed.
  8735. this._readableState.needReadable = true;
  8736. // we have implemented the _read method, and done the other things
  8737. // that Readable wants before the first _read call, so unset the
  8738. // sync guard flag.
  8739. this._readableState.sync = false;
  8740. if (options) {
  8741. if (typeof options.transform === 'function') this._transform = options.transform;
  8742. if (typeof options.flush === 'function') this._flush = options.flush;
  8743. }
  8744. // When the writable side finishes, then flush out anything remaining.
  8745. this.on('prefinish', prefinish);
  8746. }
  8747. function prefinish() {
  8748. var _this = this;
  8749. if (typeof this._flush === 'function') {
  8750. this._flush(function (er, data) {
  8751. done(_this, er, data);
  8752. });
  8753. } else {
  8754. done(this, null, null);
  8755. }
  8756. }
  8757. Transform.prototype.push = function (chunk, encoding) {
  8758. this._transformState.needTransform = false;
  8759. return Duplex.prototype.push.call(this, chunk, encoding);
  8760. };
  8761. // This is the part where you do stuff!
  8762. // override this function in implementation classes.
  8763. // 'chunk' is an input chunk.
  8764. //
  8765. // Call `push(newChunk)` to pass along transformed output
  8766. // to the readable side. You may call 'push' zero or more times.
  8767. //
  8768. // Call `cb(err)` when you are done with this chunk. If you pass
  8769. // an error, then that'll put the hurt on the whole operation. If you
  8770. // never call cb(), then you'll never get another chunk.
  8771. Transform.prototype._transform = function (chunk, encoding, cb) {
  8772. throw new Error('_transform() is not implemented');
  8773. };
  8774. Transform.prototype._write = function (chunk, encoding, cb) {
  8775. var ts = this._transformState;
  8776. ts.writecb = cb;
  8777. ts.writechunk = chunk;
  8778. ts.writeencoding = encoding;
  8779. if (!ts.transforming) {
  8780. var rs = this._readableState;
  8781. if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  8782. }
  8783. };
  8784. // Doesn't matter what the args are here.
  8785. // _transform does all the work.
  8786. // That we got here means that the readable side wants more data.
  8787. Transform.prototype._read = function (n) {
  8788. var ts = this._transformState;
  8789. if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
  8790. ts.transforming = true;
  8791. this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  8792. } else {
  8793. // mark that we need a transform, so that any data that comes in
  8794. // will get processed, now that we've asked for it.
  8795. ts.needTransform = true;
  8796. }
  8797. };
  8798. Transform.prototype._destroy = function (err, cb) {
  8799. var _this2 = this;
  8800. Duplex.prototype._destroy.call(this, err, function (err2) {
  8801. cb(err2);
  8802. _this2.emit('close');
  8803. });
  8804. };
  8805. function done(stream, er, data) {
  8806. if (er) return stream.emit('error', er);
  8807. if (data != null) // single equals check for both `null` and `undefined`
  8808. stream.push(data);
  8809. // if there's nothing in the write buffer, then that means
  8810. // that nothing more will ever be provided
  8811. if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
  8812. if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
  8813. return stream.push(null);
  8814. }
  8815. /***/ }),
  8816. /* 49 */
  8817. /***/ (function(module, exports, __webpack_require__) {
  8818. var helper = __webpack_require__(31);
  8819. var isArray = __webpack_require__(32).isArray;
  8820. var currentElement, currentElementName;
  8821. function validateOptions(userOptions) {
  8822. var options = helper.copyOptions(userOptions);
  8823. helper.ensureFlagExists('ignoreDeclaration', options);
  8824. helper.ensureFlagExists('ignoreInstruction', options);
  8825. helper.ensureFlagExists('ignoreAttributes', options);
  8826. helper.ensureFlagExists('ignoreText', options);
  8827. helper.ensureFlagExists('ignoreComment', options);
  8828. helper.ensureFlagExists('ignoreCdata', options);
  8829. helper.ensureFlagExists('ignoreDoctype', options);
  8830. helper.ensureFlagExists('compact', options);
  8831. helper.ensureFlagExists('indentText', options);
  8832. helper.ensureFlagExists('indentCdata', options);
  8833. helper.ensureFlagExists('indentAttributes', options);
  8834. helper.ensureFlagExists('indentInstruction', options);
  8835. helper.ensureFlagExists('fullTagEmptyElement', options);
  8836. helper.ensureFlagExists('noQuotesForNativeAttributes', options);
  8837. helper.ensureSpacesExists(options);
  8838. if (typeof options.spaces === 'number') {
  8839. options.spaces = Array(options.spaces + 1).join(' ');
  8840. }
  8841. helper.ensureKeyExists('declaration', options);
  8842. helper.ensureKeyExists('instruction', options);
  8843. helper.ensureKeyExists('attributes', options);
  8844. helper.ensureKeyExists('text', options);
  8845. helper.ensureKeyExists('comment', options);
  8846. helper.ensureKeyExists('cdata', options);
  8847. helper.ensureKeyExists('doctype', options);
  8848. helper.ensureKeyExists('type', options);
  8849. helper.ensureKeyExists('name', options);
  8850. helper.ensureKeyExists('elements', options);
  8851. helper.checkFnExists('doctype', options);
  8852. helper.checkFnExists('instruction', options);
  8853. helper.checkFnExists('cdata', options);
  8854. helper.checkFnExists('comment', options);
  8855. helper.checkFnExists('text', options);
  8856. helper.checkFnExists('instructionName', options);
  8857. helper.checkFnExists('elementName', options);
  8858. helper.checkFnExists('attributeName', options);
  8859. helper.checkFnExists('attributeValue', options);
  8860. helper.checkFnExists('attributes', options);
  8861. helper.checkFnExists('fullTagEmptyElement', options);
  8862. return options;
  8863. }
  8864. function writeIndentation(options, depth, firstLine) {
  8865. return (!firstLine && options.spaces ? '\n' : '') + Array(depth + 1).join(options.spaces);
  8866. }
  8867. function writeAttributes(attributes, options, depth) {
  8868. if (options.ignoreAttributes) {
  8869. return '';
  8870. }
  8871. if ('attributesFn' in options) {
  8872. attributes = options.attributesFn(attributes, currentElementName, currentElement);
  8873. }
  8874. var key, attr, attrName, quote, result = [];
  8875. for (key in attributes) {
  8876. if (attributes.hasOwnProperty(key) && attributes[key] !== null && attributes[key] !== undefined) {
  8877. quote = options.noQuotesForNativeAttributes && typeof attributes[key] !== 'string' ? '' : '"';
  8878. attr = '' + attributes[key]; // ensure number and boolean are converted to String
  8879. attr = attr.replace(/"/g, '&quot;');
  8880. attrName = 'attributeNameFn' in options ? options.attributeNameFn(key, attr, currentElementName, currentElement) : key;
  8881. result.push((options.spaces && options.indentAttributes? writeIndentation(options, depth+1, false) : ' '));
  8882. result.push(attrName + '=' + quote + ('attributeValueFn' in options ? options.attributeValueFn(attr, key, currentElementName, currentElement) : attr) + quote);
  8883. }
  8884. }
  8885. if (attributes && Object.keys(attributes).length && options.spaces && options.indentAttributes) {
  8886. result.push(writeIndentation(options, depth, false));
  8887. }
  8888. return result.join('');
  8889. }
  8890. function writeDeclaration(declaration, options, depth) {
  8891. currentElement = declaration;
  8892. currentElementName = 'xml';
  8893. return options.ignoreDeclaration ? '' : '<?' + 'xml' + writeAttributes(declaration[options.attributesKey], options, depth) + '?>';
  8894. }
  8895. function writeInstruction(instruction, options, depth) {
  8896. if (options.ignoreInstruction) {
  8897. return '';
  8898. }
  8899. var key;
  8900. for (key in instruction) {
  8901. if (instruction.hasOwnProperty(key)) {
  8902. break;
  8903. }
  8904. }
  8905. var instructionName = 'instructionNameFn' in options ? options.instructionNameFn(key, instruction[key], currentElementName, currentElement) : key;
  8906. if (typeof instruction[key] === 'object') {
  8907. currentElement = instruction;
  8908. currentElementName = instructionName;
  8909. return '<?' + instructionName + writeAttributes(instruction[key][options.attributesKey], options, depth) + '?>';
  8910. } else {
  8911. var instructionValue = instruction[key] ? instruction[key] : '';
  8912. if ('instructionFn' in options) instructionValue = options.instructionFn(instructionValue, key, currentElementName, currentElement);
  8913. return '<?' + instructionName + (instructionValue ? ' ' + instructionValue : '') + '?>';
  8914. }
  8915. }
  8916. function writeComment(comment, options) {
  8917. return options.ignoreComment ? '' : '<!--' + ('commentFn' in options ? options.commentFn(comment, currentElementName, currentElement) : comment) + '-->';
  8918. }
  8919. function writeCdata(cdata, options) {
  8920. return options.ignoreCdata ? '' : '<![CDATA[' + ('cdataFn' in options ? options.cdataFn(cdata, currentElementName, currentElement) : cdata.replace(']]>', ']]]]><![CDATA[>')) + ']]>';
  8921. }
  8922. function writeDoctype(doctype, options) {
  8923. return options.ignoreDoctype ? '' : '<!DOCTYPE ' + ('doctypeFn' in options ? options.doctypeFn(doctype, currentElementName, currentElement) : doctype) + '>';
  8924. }
  8925. function writeText(text, options) {
  8926. if (options.ignoreText) return '';
  8927. text = '' + text; // ensure Number and Boolean are converted to String
  8928. text = text.replace(/&amp;/g, '&'); // desanitize to avoid double sanitization
  8929. text = text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  8930. return 'textFn' in options ? options.textFn(text, currentElementName, currentElement) : text;
  8931. }
  8932. function hasContent(element, options) {
  8933. var i;
  8934. if (element.elements && element.elements.length) {
  8935. for (i = 0; i < element.elements.length; ++i) {
  8936. switch (element.elements[i][options.typeKey]) {
  8937. case 'text':
  8938. if (options.indentText) {
  8939. return true;
  8940. }
  8941. break; // skip to next key
  8942. case 'cdata':
  8943. if (options.indentCdata) {
  8944. return true;
  8945. }
  8946. break; // skip to next key
  8947. case 'instruction':
  8948. if (options.indentInstruction) {
  8949. return true;
  8950. }
  8951. break; // skip to next key
  8952. case 'doctype':
  8953. case 'comment':
  8954. case 'element':
  8955. return true;
  8956. default:
  8957. return true;
  8958. }
  8959. }
  8960. }
  8961. return false;
  8962. }
  8963. function writeElement(element, options, depth) {
  8964. currentElement = element;
  8965. currentElementName = element.name;
  8966. var xml = [], elementName = 'elementNameFn' in options ? options.elementNameFn(element.name, element) : element.name;
  8967. xml.push('<' + elementName);
  8968. if (element[options.attributesKey]) {
  8969. xml.push(writeAttributes(element[options.attributesKey], options, depth));
  8970. }
  8971. var withClosingTag = element[options.elementsKey] && element[options.elementsKey].length || element[options.attributesKey] && element[options.attributesKey]['xml:space'] === 'preserve';
  8972. if (!withClosingTag) {
  8973. if ('fullTagEmptyElementFn' in options) {
  8974. withClosingTag = options.fullTagEmptyElementFn(element.name, element);
  8975. } else {
  8976. withClosingTag = options.fullTagEmptyElement;
  8977. }
  8978. }
  8979. if (withClosingTag) {
  8980. xml.push('>');
  8981. if (element[options.elementsKey] && element[options.elementsKey].length) {
  8982. xml.push(writeElements(element[options.elementsKey], options, depth + 1));
  8983. currentElement = element;
  8984. currentElementName = element.name;
  8985. }
  8986. xml.push(options.spaces && hasContent(element, options) ? '\n' + Array(depth + 1).join(options.spaces) : '');
  8987. xml.push('</' + elementName + '>');
  8988. } else {
  8989. xml.push('/>');
  8990. }
  8991. return xml.join('');
  8992. }
  8993. function writeElements(elements, options, depth, firstLine) {
  8994. return elements.reduce(function (xml, element) {
  8995. var indent = writeIndentation(options, depth, firstLine && !xml);
  8996. switch (element.type) {
  8997. case 'element': return xml + indent + writeElement(element, options, depth);
  8998. case 'comment': return xml + indent + writeComment(element[options.commentKey], options);
  8999. case 'doctype': return xml + indent + writeDoctype(element[options.doctypeKey], options);
  9000. case 'cdata': return xml + (options.indentCdata ? indent : '') + writeCdata(element[options.cdataKey], options);
  9001. case 'text': return xml + (options.indentText ? indent : '') + writeText(element[options.textKey], options);
  9002. case 'instruction':
  9003. var instruction = {};
  9004. instruction[element[options.nameKey]] = element[options.attributesKey] ? element : element[options.instructionKey];
  9005. return xml + (options.indentInstruction ? indent : '') + writeInstruction(instruction, options, depth);
  9006. }
  9007. }, '');
  9008. }
  9009. function hasContentCompact(element, options, anyContent) {
  9010. var key;
  9011. for (key in element) {
  9012. if (element.hasOwnProperty(key)) {
  9013. switch (key) {
  9014. case options.parentKey:
  9015. case options.attributesKey:
  9016. break; // skip to next key
  9017. case options.textKey:
  9018. if (options.indentText || anyContent) {
  9019. return true;
  9020. }
  9021. break; // skip to next key
  9022. case options.cdataKey:
  9023. if (options.indentCdata || anyContent) {
  9024. return true;
  9025. }
  9026. break; // skip to next key
  9027. case options.instructionKey:
  9028. if (options.indentInstruction || anyContent) {
  9029. return true;
  9030. }
  9031. break; // skip to next key
  9032. case options.doctypeKey:
  9033. case options.commentKey:
  9034. return true;
  9035. default:
  9036. return true;
  9037. }
  9038. }
  9039. }
  9040. return false;
  9041. }
  9042. function writeElementCompact(element, name, options, depth, indent) {
  9043. currentElement = element;
  9044. currentElementName = name;
  9045. var elementName = 'elementNameFn' in options ? options.elementNameFn(name, element) : name;
  9046. if (typeof element === 'undefined' || element === null || element === '') {
  9047. return 'fullTagEmptyElementFn' in options && options.fullTagEmptyElementFn(name, element) || options.fullTagEmptyElement ? '<' + elementName + '></' + elementName + '>' : '<' + elementName + '/>';
  9048. }
  9049. var xml = [];
  9050. if (name) {
  9051. xml.push('<' + elementName);
  9052. if (typeof element !== 'object') {
  9053. xml.push('>' + writeText(element,options) + '</' + elementName + '>');
  9054. return xml.join('');
  9055. }
  9056. if (element[options.attributesKey]) {
  9057. xml.push(writeAttributes(element[options.attributesKey], options, depth));
  9058. }
  9059. var withClosingTag = hasContentCompact(element, options, true) || element[options.attributesKey] && element[options.attributesKey]['xml:space'] === 'preserve';
  9060. if (!withClosingTag) {
  9061. if ('fullTagEmptyElementFn' in options) {
  9062. withClosingTag = options.fullTagEmptyElementFn(name, element);
  9063. } else {
  9064. withClosingTag = options.fullTagEmptyElement;
  9065. }
  9066. }
  9067. if (withClosingTag) {
  9068. xml.push('>');
  9069. } else {
  9070. xml.push('/>');
  9071. return xml.join('');
  9072. }
  9073. }
  9074. xml.push(writeElementsCompact(element, options, depth + 1, false));
  9075. currentElement = element;
  9076. currentElementName = name;
  9077. if (name) {
  9078. xml.push((indent ? writeIndentation(options, depth, false) : '') + '</' + elementName + '>');
  9079. }
  9080. return xml.join('');
  9081. }
  9082. function writeElementsCompact(element, options, depth, firstLine) {
  9083. var i, key, nodes, xml = [];
  9084. for (key in element) {
  9085. if (element.hasOwnProperty(key)) {
  9086. nodes = isArray(element[key]) ? element[key] : [element[key]];
  9087. for (i = 0; i < nodes.length; ++i) {
  9088. switch (key) {
  9089. case options.declarationKey: xml.push(writeDeclaration(nodes[i], options, depth)); break;
  9090. case options.instructionKey: xml.push((options.indentInstruction ? writeIndentation(options, depth, firstLine) : '') + writeInstruction(nodes[i], options, depth)); break;
  9091. case options.attributesKey: case options.parentKey: break; // skip
  9092. case options.textKey: xml.push((options.indentText ? writeIndentation(options, depth, firstLine) : '') + writeText(nodes[i], options)); break;
  9093. case options.cdataKey: xml.push((options.indentCdata ? writeIndentation(options, depth, firstLine) : '') + writeCdata(nodes[i], options)); break;
  9094. case options.doctypeKey: xml.push(writeIndentation(options, depth, firstLine) + writeDoctype(nodes[i], options)); break;
  9095. case options.commentKey: xml.push(writeIndentation(options, depth, firstLine) + writeComment(nodes[i], options)); break;
  9096. default: xml.push(writeIndentation(options, depth, firstLine) + writeElementCompact(nodes[i], key, options, depth, hasContentCompact(nodes[i], options)));
  9097. }
  9098. firstLine = firstLine && !xml.length;
  9099. }
  9100. }
  9101. }
  9102. return xml.join('');
  9103. }
  9104. module.exports = function (js, options) {
  9105. options = validateOptions(options);
  9106. var xml = [];
  9107. currentElement = js;
  9108. currentElementName = '_root_';
  9109. if (options.compact) {
  9110. xml.push(writeElementsCompact(js, options, 0, true));
  9111. } else {
  9112. if (js[options.declarationKey]) {
  9113. xml.push(writeDeclaration(js[options.declarationKey], options, 0));
  9114. }
  9115. if (js[options.elementsKey] && js[options.elementsKey].length) {
  9116. xml.push(writeElements(js[options.elementsKey], options, 0, !xml.length));
  9117. }
  9118. }
  9119. return xml.join('');
  9120. };
  9121. /***/ }),
  9122. /* 50 */
  9123. /***/ (function(module, exports) {
  9124. module.exports = __WEBPACK_EXTERNAL_MODULE__50__;
  9125. /***/ }),
  9126. /* 51 */
  9127. /***/ (function(module, exports) {
  9128. module.exports = __WEBPACK_EXTERNAL_MODULE__51__;
  9129. /***/ }),
  9130. /* 52 */
  9131. /***/ (function(module, exports, __webpack_require__) {
  9132. /* WEBPACK VAR INJECTION */(function(global) {/**
  9133. * lodash (Custom Build) <https://lodash.com/>
  9134. * Build: `lodash modularize exports="npm" -o ./`
  9135. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  9136. * Released under MIT license <https://lodash.com/license>
  9137. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  9138. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  9139. */
  9140. /** Used as references for various `Number` constants. */
  9141. var INFINITY = 1 / 0;
  9142. /** `Object#toString` result references. */
  9143. var symbolTag = '[object Symbol]';
  9144. /** Detect free variable `global` from Node.js. */
  9145. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  9146. /** Detect free variable `self`. */
  9147. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  9148. /** Used as a reference to the global object. */
  9149. var root = freeGlobal || freeSelf || Function('return this')();
  9150. /** Used for built-in method references. */
  9151. var objectProto = Object.prototype;
  9152. /** Used to generate unique IDs. */
  9153. var idCounter = 0;
  9154. /**
  9155. * Used to resolve the
  9156. * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
  9157. * of values.
  9158. */
  9159. var objectToString = objectProto.toString;
  9160. /** Built-in value references. */
  9161. var Symbol = root.Symbol;
  9162. /** Used to convert symbols to primitives and strings. */
  9163. var symbolProto = Symbol ? Symbol.prototype : undefined,
  9164. symbolToString = symbolProto ? symbolProto.toString : undefined;
  9165. /**
  9166. * The base implementation of `_.toString` which doesn't convert nullish
  9167. * values to empty strings.
  9168. *
  9169. * @private
  9170. * @param {*} value The value to process.
  9171. * @returns {string} Returns the string.
  9172. */
  9173. function baseToString(value) {
  9174. // Exit early for strings to avoid a performance hit in some environments.
  9175. if (typeof value == 'string') {
  9176. return value;
  9177. }
  9178. if (isSymbol(value)) {
  9179. return symbolToString ? symbolToString.call(value) : '';
  9180. }
  9181. var result = (value + '');
  9182. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  9183. }
  9184. /**
  9185. * Checks if `value` is object-like. A value is object-like if it's not `null`
  9186. * and has a `typeof` result of "object".
  9187. *
  9188. * @static
  9189. * @memberOf _
  9190. * @since 4.0.0
  9191. * @category Lang
  9192. * @param {*} value The value to check.
  9193. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  9194. * @example
  9195. *
  9196. * _.isObjectLike({});
  9197. * // => true
  9198. *
  9199. * _.isObjectLike([1, 2, 3]);
  9200. * // => true
  9201. *
  9202. * _.isObjectLike(_.noop);
  9203. * // => false
  9204. *
  9205. * _.isObjectLike(null);
  9206. * // => false
  9207. */
  9208. function isObjectLike(value) {
  9209. return !!value && typeof value == 'object';
  9210. }
  9211. /**
  9212. * Checks if `value` is classified as a `Symbol` primitive or object.
  9213. *
  9214. * @static
  9215. * @memberOf _
  9216. * @since 4.0.0
  9217. * @category Lang
  9218. * @param {*} value The value to check.
  9219. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  9220. * @example
  9221. *
  9222. * _.isSymbol(Symbol.iterator);
  9223. * // => true
  9224. *
  9225. * _.isSymbol('abc');
  9226. * // => false
  9227. */
  9228. function isSymbol(value) {
  9229. return typeof value == 'symbol' ||
  9230. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  9231. }
  9232. /**
  9233. * Converts `value` to a string. An empty string is returned for `null`
  9234. * and `undefined` values. The sign of `-0` is preserved.
  9235. *
  9236. * @static
  9237. * @memberOf _
  9238. * @since 4.0.0
  9239. * @category Lang
  9240. * @param {*} value The value to process.
  9241. * @returns {string} Returns the string.
  9242. * @example
  9243. *
  9244. * _.toString(null);
  9245. * // => ''
  9246. *
  9247. * _.toString(-0);
  9248. * // => '-0'
  9249. *
  9250. * _.toString([1, 2, 3]);
  9251. * // => '1,2,3'
  9252. */
  9253. function toString(value) {
  9254. return value == null ? '' : baseToString(value);
  9255. }
  9256. /**
  9257. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  9258. *
  9259. * @static
  9260. * @since 0.1.0
  9261. * @memberOf _
  9262. * @category Util
  9263. * @param {string} [prefix=''] The value to prefix the ID with.
  9264. * @returns {string} Returns the unique ID.
  9265. * @example
  9266. *
  9267. * _.uniqueId('contact_');
  9268. * // => 'contact_104'
  9269. *
  9270. * _.uniqueId();
  9271. * // => '105'
  9272. */
  9273. function uniqueId(prefix) {
  9274. var id = ++idCounter;
  9275. return toString(prefix) + id;
  9276. }
  9277. module.exports = uniqueId;
  9278. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  9279. /***/ }),
  9280. /* 53 */
  9281. /***/ (function(module, exports, __webpack_require__) {
  9282. /* WEBPACK VAR INJECTION */(function(global, module) {/**
  9283. * lodash (Custom Build) <https://lodash.com/>
  9284. * Build: `lodash modularize exports="npm" -o ./`
  9285. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  9286. * Released under MIT license <https://lodash.com/license>
  9287. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  9288. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  9289. */
  9290. /** Used as the size to enable large array optimizations. */
  9291. var LARGE_ARRAY_SIZE = 200;
  9292. /** Used to stand-in for `undefined` hash values. */
  9293. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  9294. /** Used as references for various `Number` constants. */
  9295. var MAX_SAFE_INTEGER = 9007199254740991;
  9296. /** `Object#toString` result references. */
  9297. var argsTag = '[object Arguments]',
  9298. arrayTag = '[object Array]',
  9299. boolTag = '[object Boolean]',
  9300. dateTag = '[object Date]',
  9301. errorTag = '[object Error]',
  9302. funcTag = '[object Function]',
  9303. genTag = '[object GeneratorFunction]',
  9304. mapTag = '[object Map]',
  9305. numberTag = '[object Number]',
  9306. objectTag = '[object Object]',
  9307. promiseTag = '[object Promise]',
  9308. regexpTag = '[object RegExp]',
  9309. setTag = '[object Set]',
  9310. stringTag = '[object String]',
  9311. symbolTag = '[object Symbol]',
  9312. weakMapTag = '[object WeakMap]';
  9313. var arrayBufferTag = '[object ArrayBuffer]',
  9314. dataViewTag = '[object DataView]',
  9315. float32Tag = '[object Float32Array]',
  9316. float64Tag = '[object Float64Array]',
  9317. int8Tag = '[object Int8Array]',
  9318. int16Tag = '[object Int16Array]',
  9319. int32Tag = '[object Int32Array]',
  9320. uint8Tag = '[object Uint8Array]',
  9321. uint8ClampedTag = '[object Uint8ClampedArray]',
  9322. uint16Tag = '[object Uint16Array]',
  9323. uint32Tag = '[object Uint32Array]';
  9324. /**
  9325. * Used to match `RegExp`
  9326. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  9327. */
  9328. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  9329. /** Used to match `RegExp` flags from their coerced string values. */
  9330. var reFlags = /\w*$/;
  9331. /** Used to detect host constructors (Safari). */
  9332. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  9333. /** Used to detect unsigned integer values. */
  9334. var reIsUint = /^(?:0|[1-9]\d*)$/;
  9335. /** Used to identify `toStringTag` values supported by `_.clone`. */
  9336. var cloneableTags = {};
  9337. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  9338. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  9339. cloneableTags[boolTag] = cloneableTags[dateTag] =
  9340. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  9341. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  9342. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  9343. cloneableTags[numberTag] = cloneableTags[objectTag] =
  9344. cloneableTags[regexpTag] = cloneableTags[setTag] =
  9345. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  9346. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  9347. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  9348. cloneableTags[errorTag] = cloneableTags[funcTag] =
  9349. cloneableTags[weakMapTag] = false;
  9350. /** Detect free variable `global` from Node.js. */
  9351. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  9352. /** Detect free variable `self`. */
  9353. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  9354. /** Used as a reference to the global object. */
  9355. var root = freeGlobal || freeSelf || Function('return this')();
  9356. /** Detect free variable `exports`. */
  9357. var freeExports = true && exports && !exports.nodeType && exports;
  9358. /** Detect free variable `module`. */
  9359. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  9360. /** Detect the popular CommonJS extension `module.exports`. */
  9361. var moduleExports = freeModule && freeModule.exports === freeExports;
  9362. /**
  9363. * Adds the key-value `pair` to `map`.
  9364. *
  9365. * @private
  9366. * @param {Object} map The map to modify.
  9367. * @param {Array} pair The key-value pair to add.
  9368. * @returns {Object} Returns `map`.
  9369. */
  9370. function addMapEntry(map, pair) {
  9371. // Don't return `map.set` because it's not chainable in IE 11.
  9372. map.set(pair[0], pair[1]);
  9373. return map;
  9374. }
  9375. /**
  9376. * Adds `value` to `set`.
  9377. *
  9378. * @private
  9379. * @param {Object} set The set to modify.
  9380. * @param {*} value The value to add.
  9381. * @returns {Object} Returns `set`.
  9382. */
  9383. function addSetEntry(set, value) {
  9384. // Don't return `set.add` because it's not chainable in IE 11.
  9385. set.add(value);
  9386. return set;
  9387. }
  9388. /**
  9389. * A specialized version of `_.forEach` for arrays without support for
  9390. * iteratee shorthands.
  9391. *
  9392. * @private
  9393. * @param {Array} [array] The array to iterate over.
  9394. * @param {Function} iteratee The function invoked per iteration.
  9395. * @returns {Array} Returns `array`.
  9396. */
  9397. function arrayEach(array, iteratee) {
  9398. var index = -1,
  9399. length = array ? array.length : 0;
  9400. while (++index < length) {
  9401. if (iteratee(array[index], index, array) === false) {
  9402. break;
  9403. }
  9404. }
  9405. return array;
  9406. }
  9407. /**
  9408. * Appends the elements of `values` to `array`.
  9409. *
  9410. * @private
  9411. * @param {Array} array The array to modify.
  9412. * @param {Array} values The values to append.
  9413. * @returns {Array} Returns `array`.
  9414. */
  9415. function arrayPush(array, values) {
  9416. var index = -1,
  9417. length = values.length,
  9418. offset = array.length;
  9419. while (++index < length) {
  9420. array[offset + index] = values[index];
  9421. }
  9422. return array;
  9423. }
  9424. /**
  9425. * A specialized version of `_.reduce` for arrays without support for
  9426. * iteratee shorthands.
  9427. *
  9428. * @private
  9429. * @param {Array} [array] The array to iterate over.
  9430. * @param {Function} iteratee The function invoked per iteration.
  9431. * @param {*} [accumulator] The initial value.
  9432. * @param {boolean} [initAccum] Specify using the first element of `array` as
  9433. * the initial value.
  9434. * @returns {*} Returns the accumulated value.
  9435. */
  9436. function arrayReduce(array, iteratee, accumulator, initAccum) {
  9437. var index = -1,
  9438. length = array ? array.length : 0;
  9439. if (initAccum && length) {
  9440. accumulator = array[++index];
  9441. }
  9442. while (++index < length) {
  9443. accumulator = iteratee(accumulator, array[index], index, array);
  9444. }
  9445. return accumulator;
  9446. }
  9447. /**
  9448. * The base implementation of `_.times` without support for iteratee shorthands
  9449. * or max array length checks.
  9450. *
  9451. * @private
  9452. * @param {number} n The number of times to invoke `iteratee`.
  9453. * @param {Function} iteratee The function invoked per iteration.
  9454. * @returns {Array} Returns the array of results.
  9455. */
  9456. function baseTimes(n, iteratee) {
  9457. var index = -1,
  9458. result = Array(n);
  9459. while (++index < n) {
  9460. result[index] = iteratee(index);
  9461. }
  9462. return result;
  9463. }
  9464. /**
  9465. * Gets the value at `key` of `object`.
  9466. *
  9467. * @private
  9468. * @param {Object} [object] The object to query.
  9469. * @param {string} key The key of the property to get.
  9470. * @returns {*} Returns the property value.
  9471. */
  9472. function getValue(object, key) {
  9473. return object == null ? undefined : object[key];
  9474. }
  9475. /**
  9476. * Checks if `value` is a host object in IE < 9.
  9477. *
  9478. * @private
  9479. * @param {*} value The value to check.
  9480. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  9481. */
  9482. function isHostObject(value) {
  9483. // Many host objects are `Object` objects that can coerce to strings
  9484. // despite having improperly defined `toString` methods.
  9485. var result = false;
  9486. if (value != null && typeof value.toString != 'function') {
  9487. try {
  9488. result = !!(value + '');
  9489. } catch (e) {}
  9490. }
  9491. return result;
  9492. }
  9493. /**
  9494. * Converts `map` to its key-value pairs.
  9495. *
  9496. * @private
  9497. * @param {Object} map The map to convert.
  9498. * @returns {Array} Returns the key-value pairs.
  9499. */
  9500. function mapToArray(map) {
  9501. var index = -1,
  9502. result = Array(map.size);
  9503. map.forEach(function(value, key) {
  9504. result[++index] = [key, value];
  9505. });
  9506. return result;
  9507. }
  9508. /**
  9509. * Creates a unary function that invokes `func` with its argument transformed.
  9510. *
  9511. * @private
  9512. * @param {Function} func The function to wrap.
  9513. * @param {Function} transform The argument transform.
  9514. * @returns {Function} Returns the new function.
  9515. */
  9516. function overArg(func, transform) {
  9517. return function(arg) {
  9518. return func(transform(arg));
  9519. };
  9520. }
  9521. /**
  9522. * Converts `set` to an array of its values.
  9523. *
  9524. * @private
  9525. * @param {Object} set The set to convert.
  9526. * @returns {Array} Returns the values.
  9527. */
  9528. function setToArray(set) {
  9529. var index = -1,
  9530. result = Array(set.size);
  9531. set.forEach(function(value) {
  9532. result[++index] = value;
  9533. });
  9534. return result;
  9535. }
  9536. /** Used for built-in method references. */
  9537. var arrayProto = Array.prototype,
  9538. funcProto = Function.prototype,
  9539. objectProto = Object.prototype;
  9540. /** Used to detect overreaching core-js shims. */
  9541. var coreJsData = root['__core-js_shared__'];
  9542. /** Used to detect methods masquerading as native. */
  9543. var maskSrcKey = (function() {
  9544. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  9545. return uid ? ('Symbol(src)_1.' + uid) : '';
  9546. }());
  9547. /** Used to resolve the decompiled source of functions. */
  9548. var funcToString = funcProto.toString;
  9549. /** Used to check objects for own properties. */
  9550. var hasOwnProperty = objectProto.hasOwnProperty;
  9551. /**
  9552. * Used to resolve the
  9553. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  9554. * of values.
  9555. */
  9556. var objectToString = objectProto.toString;
  9557. /** Used to detect if a method is native. */
  9558. var reIsNative = RegExp('^' +
  9559. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  9560. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  9561. );
  9562. /** Built-in value references. */
  9563. var Buffer = moduleExports ? root.Buffer : undefined,
  9564. Symbol = root.Symbol,
  9565. Uint8Array = root.Uint8Array,
  9566. getPrototype = overArg(Object.getPrototypeOf, Object),
  9567. objectCreate = Object.create,
  9568. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  9569. splice = arrayProto.splice;
  9570. /* Built-in method references for those with the same name as other `lodash` methods. */
  9571. var nativeGetSymbols = Object.getOwnPropertySymbols,
  9572. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  9573. nativeKeys = overArg(Object.keys, Object);
  9574. /* Built-in method references that are verified to be native. */
  9575. var DataView = getNative(root, 'DataView'),
  9576. Map = getNative(root, 'Map'),
  9577. Promise = getNative(root, 'Promise'),
  9578. Set = getNative(root, 'Set'),
  9579. WeakMap = getNative(root, 'WeakMap'),
  9580. nativeCreate = getNative(Object, 'create');
  9581. /** Used to detect maps, sets, and weakmaps. */
  9582. var dataViewCtorString = toSource(DataView),
  9583. mapCtorString = toSource(Map),
  9584. promiseCtorString = toSource(Promise),
  9585. setCtorString = toSource(Set),
  9586. weakMapCtorString = toSource(WeakMap);
  9587. /** Used to convert symbols to primitives and strings. */
  9588. var symbolProto = Symbol ? Symbol.prototype : undefined,
  9589. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  9590. /**
  9591. * Creates a hash object.
  9592. *
  9593. * @private
  9594. * @constructor
  9595. * @param {Array} [entries] The key-value pairs to cache.
  9596. */
  9597. function Hash(entries) {
  9598. var index = -1,
  9599. length = entries ? entries.length : 0;
  9600. this.clear();
  9601. while (++index < length) {
  9602. var entry = entries[index];
  9603. this.set(entry[0], entry[1]);
  9604. }
  9605. }
  9606. /**
  9607. * Removes all key-value entries from the hash.
  9608. *
  9609. * @private
  9610. * @name clear
  9611. * @memberOf Hash
  9612. */
  9613. function hashClear() {
  9614. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  9615. }
  9616. /**
  9617. * Removes `key` and its value from the hash.
  9618. *
  9619. * @private
  9620. * @name delete
  9621. * @memberOf Hash
  9622. * @param {Object} hash The hash to modify.
  9623. * @param {string} key The key of the value to remove.
  9624. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  9625. */
  9626. function hashDelete(key) {
  9627. return this.has(key) && delete this.__data__[key];
  9628. }
  9629. /**
  9630. * Gets the hash value for `key`.
  9631. *
  9632. * @private
  9633. * @name get
  9634. * @memberOf Hash
  9635. * @param {string} key The key of the value to get.
  9636. * @returns {*} Returns the entry value.
  9637. */
  9638. function hashGet(key) {
  9639. var data = this.__data__;
  9640. if (nativeCreate) {
  9641. var result = data[key];
  9642. return result === HASH_UNDEFINED ? undefined : result;
  9643. }
  9644. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  9645. }
  9646. /**
  9647. * Checks if a hash value for `key` exists.
  9648. *
  9649. * @private
  9650. * @name has
  9651. * @memberOf Hash
  9652. * @param {string} key The key of the entry to check.
  9653. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  9654. */
  9655. function hashHas(key) {
  9656. var data = this.__data__;
  9657. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  9658. }
  9659. /**
  9660. * Sets the hash `key` to `value`.
  9661. *
  9662. * @private
  9663. * @name set
  9664. * @memberOf Hash
  9665. * @param {string} key The key of the value to set.
  9666. * @param {*} value The value to set.
  9667. * @returns {Object} Returns the hash instance.
  9668. */
  9669. function hashSet(key, value) {
  9670. var data = this.__data__;
  9671. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  9672. return this;
  9673. }
  9674. // Add methods to `Hash`.
  9675. Hash.prototype.clear = hashClear;
  9676. Hash.prototype['delete'] = hashDelete;
  9677. Hash.prototype.get = hashGet;
  9678. Hash.prototype.has = hashHas;
  9679. Hash.prototype.set = hashSet;
  9680. /**
  9681. * Creates an list cache object.
  9682. *
  9683. * @private
  9684. * @constructor
  9685. * @param {Array} [entries] The key-value pairs to cache.
  9686. */
  9687. function ListCache(entries) {
  9688. var index = -1,
  9689. length = entries ? entries.length : 0;
  9690. this.clear();
  9691. while (++index < length) {
  9692. var entry = entries[index];
  9693. this.set(entry[0], entry[1]);
  9694. }
  9695. }
  9696. /**
  9697. * Removes all key-value entries from the list cache.
  9698. *
  9699. * @private
  9700. * @name clear
  9701. * @memberOf ListCache
  9702. */
  9703. function listCacheClear() {
  9704. this.__data__ = [];
  9705. }
  9706. /**
  9707. * Removes `key` and its value from the list cache.
  9708. *
  9709. * @private
  9710. * @name delete
  9711. * @memberOf ListCache
  9712. * @param {string} key The key of the value to remove.
  9713. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  9714. */
  9715. function listCacheDelete(key) {
  9716. var data = this.__data__,
  9717. index = assocIndexOf(data, key);
  9718. if (index < 0) {
  9719. return false;
  9720. }
  9721. var lastIndex = data.length - 1;
  9722. if (index == lastIndex) {
  9723. data.pop();
  9724. } else {
  9725. splice.call(data, index, 1);
  9726. }
  9727. return true;
  9728. }
  9729. /**
  9730. * Gets the list cache value for `key`.
  9731. *
  9732. * @private
  9733. * @name get
  9734. * @memberOf ListCache
  9735. * @param {string} key The key of the value to get.
  9736. * @returns {*} Returns the entry value.
  9737. */
  9738. function listCacheGet(key) {
  9739. var data = this.__data__,
  9740. index = assocIndexOf(data, key);
  9741. return index < 0 ? undefined : data[index][1];
  9742. }
  9743. /**
  9744. * Checks if a list cache value for `key` exists.
  9745. *
  9746. * @private
  9747. * @name has
  9748. * @memberOf ListCache
  9749. * @param {string} key The key of the entry to check.
  9750. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  9751. */
  9752. function listCacheHas(key) {
  9753. return assocIndexOf(this.__data__, key) > -1;
  9754. }
  9755. /**
  9756. * Sets the list cache `key` to `value`.
  9757. *
  9758. * @private
  9759. * @name set
  9760. * @memberOf ListCache
  9761. * @param {string} key The key of the value to set.
  9762. * @param {*} value The value to set.
  9763. * @returns {Object} Returns the list cache instance.
  9764. */
  9765. function listCacheSet(key, value) {
  9766. var data = this.__data__,
  9767. index = assocIndexOf(data, key);
  9768. if (index < 0) {
  9769. data.push([key, value]);
  9770. } else {
  9771. data[index][1] = value;
  9772. }
  9773. return this;
  9774. }
  9775. // Add methods to `ListCache`.
  9776. ListCache.prototype.clear = listCacheClear;
  9777. ListCache.prototype['delete'] = listCacheDelete;
  9778. ListCache.prototype.get = listCacheGet;
  9779. ListCache.prototype.has = listCacheHas;
  9780. ListCache.prototype.set = listCacheSet;
  9781. /**
  9782. * Creates a map cache object to store key-value pairs.
  9783. *
  9784. * @private
  9785. * @constructor
  9786. * @param {Array} [entries] The key-value pairs to cache.
  9787. */
  9788. function MapCache(entries) {
  9789. var index = -1,
  9790. length = entries ? entries.length : 0;
  9791. this.clear();
  9792. while (++index < length) {
  9793. var entry = entries[index];
  9794. this.set(entry[0], entry[1]);
  9795. }
  9796. }
  9797. /**
  9798. * Removes all key-value entries from the map.
  9799. *
  9800. * @private
  9801. * @name clear
  9802. * @memberOf MapCache
  9803. */
  9804. function mapCacheClear() {
  9805. this.__data__ = {
  9806. 'hash': new Hash,
  9807. 'map': new (Map || ListCache),
  9808. 'string': new Hash
  9809. };
  9810. }
  9811. /**
  9812. * Removes `key` and its value from the map.
  9813. *
  9814. * @private
  9815. * @name delete
  9816. * @memberOf MapCache
  9817. * @param {string} key The key of the value to remove.
  9818. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  9819. */
  9820. function mapCacheDelete(key) {
  9821. return getMapData(this, key)['delete'](key);
  9822. }
  9823. /**
  9824. * Gets the map value for `key`.
  9825. *
  9826. * @private
  9827. * @name get
  9828. * @memberOf MapCache
  9829. * @param {string} key The key of the value to get.
  9830. * @returns {*} Returns the entry value.
  9831. */
  9832. function mapCacheGet(key) {
  9833. return getMapData(this, key).get(key);
  9834. }
  9835. /**
  9836. * Checks if a map value for `key` exists.
  9837. *
  9838. * @private
  9839. * @name has
  9840. * @memberOf MapCache
  9841. * @param {string} key The key of the entry to check.
  9842. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  9843. */
  9844. function mapCacheHas(key) {
  9845. return getMapData(this, key).has(key);
  9846. }
  9847. /**
  9848. * Sets the map `key` to `value`.
  9849. *
  9850. * @private
  9851. * @name set
  9852. * @memberOf MapCache
  9853. * @param {string} key The key of the value to set.
  9854. * @param {*} value The value to set.
  9855. * @returns {Object} Returns the map cache instance.
  9856. */
  9857. function mapCacheSet(key, value) {
  9858. getMapData(this, key).set(key, value);
  9859. return this;
  9860. }
  9861. // Add methods to `MapCache`.
  9862. MapCache.prototype.clear = mapCacheClear;
  9863. MapCache.prototype['delete'] = mapCacheDelete;
  9864. MapCache.prototype.get = mapCacheGet;
  9865. MapCache.prototype.has = mapCacheHas;
  9866. MapCache.prototype.set = mapCacheSet;
  9867. /**
  9868. * Creates a stack cache object to store key-value pairs.
  9869. *
  9870. * @private
  9871. * @constructor
  9872. * @param {Array} [entries] The key-value pairs to cache.
  9873. */
  9874. function Stack(entries) {
  9875. this.__data__ = new ListCache(entries);
  9876. }
  9877. /**
  9878. * Removes all key-value entries from the stack.
  9879. *
  9880. * @private
  9881. * @name clear
  9882. * @memberOf Stack
  9883. */
  9884. function stackClear() {
  9885. this.__data__ = new ListCache;
  9886. }
  9887. /**
  9888. * Removes `key` and its value from the stack.
  9889. *
  9890. * @private
  9891. * @name delete
  9892. * @memberOf Stack
  9893. * @param {string} key The key of the value to remove.
  9894. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  9895. */
  9896. function stackDelete(key) {
  9897. return this.__data__['delete'](key);
  9898. }
  9899. /**
  9900. * Gets the stack value for `key`.
  9901. *
  9902. * @private
  9903. * @name get
  9904. * @memberOf Stack
  9905. * @param {string} key The key of the value to get.
  9906. * @returns {*} Returns the entry value.
  9907. */
  9908. function stackGet(key) {
  9909. return this.__data__.get(key);
  9910. }
  9911. /**
  9912. * Checks if a stack value for `key` exists.
  9913. *
  9914. * @private
  9915. * @name has
  9916. * @memberOf Stack
  9917. * @param {string} key The key of the entry to check.
  9918. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  9919. */
  9920. function stackHas(key) {
  9921. return this.__data__.has(key);
  9922. }
  9923. /**
  9924. * Sets the stack `key` to `value`.
  9925. *
  9926. * @private
  9927. * @name set
  9928. * @memberOf Stack
  9929. * @param {string} key The key of the value to set.
  9930. * @param {*} value The value to set.
  9931. * @returns {Object} Returns the stack cache instance.
  9932. */
  9933. function stackSet(key, value) {
  9934. var cache = this.__data__;
  9935. if (cache instanceof ListCache) {
  9936. var pairs = cache.__data__;
  9937. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  9938. pairs.push([key, value]);
  9939. return this;
  9940. }
  9941. cache = this.__data__ = new MapCache(pairs);
  9942. }
  9943. cache.set(key, value);
  9944. return this;
  9945. }
  9946. // Add methods to `Stack`.
  9947. Stack.prototype.clear = stackClear;
  9948. Stack.prototype['delete'] = stackDelete;
  9949. Stack.prototype.get = stackGet;
  9950. Stack.prototype.has = stackHas;
  9951. Stack.prototype.set = stackSet;
  9952. /**
  9953. * Creates an array of the enumerable property names of the array-like `value`.
  9954. *
  9955. * @private
  9956. * @param {*} value The value to query.
  9957. * @param {boolean} inherited Specify returning inherited property names.
  9958. * @returns {Array} Returns the array of property names.
  9959. */
  9960. function arrayLikeKeys(value, inherited) {
  9961. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  9962. // Safari 9 makes `arguments.length` enumerable in strict mode.
  9963. var result = (isArray(value) || isArguments(value))
  9964. ? baseTimes(value.length, String)
  9965. : [];
  9966. var length = result.length,
  9967. skipIndexes = !!length;
  9968. for (var key in value) {
  9969. if ((inherited || hasOwnProperty.call(value, key)) &&
  9970. !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
  9971. result.push(key);
  9972. }
  9973. }
  9974. return result;
  9975. }
  9976. /**
  9977. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  9978. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  9979. * for equality comparisons.
  9980. *
  9981. * @private
  9982. * @param {Object} object The object to modify.
  9983. * @param {string} key The key of the property to assign.
  9984. * @param {*} value The value to assign.
  9985. */
  9986. function assignValue(object, key, value) {
  9987. var objValue = object[key];
  9988. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  9989. (value === undefined && !(key in object))) {
  9990. object[key] = value;
  9991. }
  9992. }
  9993. /**
  9994. * Gets the index at which the `key` is found in `array` of key-value pairs.
  9995. *
  9996. * @private
  9997. * @param {Array} array The array to inspect.
  9998. * @param {*} key The key to search for.
  9999. * @returns {number} Returns the index of the matched value, else `-1`.
  10000. */
  10001. function assocIndexOf(array, key) {
  10002. var length = array.length;
  10003. while (length--) {
  10004. if (eq(array[length][0], key)) {
  10005. return length;
  10006. }
  10007. }
  10008. return -1;
  10009. }
  10010. /**
  10011. * The base implementation of `_.assign` without support for multiple sources
  10012. * or `customizer` functions.
  10013. *
  10014. * @private
  10015. * @param {Object} object The destination object.
  10016. * @param {Object} source The source object.
  10017. * @returns {Object} Returns `object`.
  10018. */
  10019. function baseAssign(object, source) {
  10020. return object && copyObject(source, keys(source), object);
  10021. }
  10022. /**
  10023. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  10024. * traversed objects.
  10025. *
  10026. * @private
  10027. * @param {*} value The value to clone.
  10028. * @param {boolean} [isDeep] Specify a deep clone.
  10029. * @param {boolean} [isFull] Specify a clone including symbols.
  10030. * @param {Function} [customizer] The function to customize cloning.
  10031. * @param {string} [key] The key of `value`.
  10032. * @param {Object} [object] The parent object of `value`.
  10033. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  10034. * @returns {*} Returns the cloned value.
  10035. */
  10036. function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
  10037. var result;
  10038. if (customizer) {
  10039. result = object ? customizer(value, key, object, stack) : customizer(value);
  10040. }
  10041. if (result !== undefined) {
  10042. return result;
  10043. }
  10044. if (!isObject(value)) {
  10045. return value;
  10046. }
  10047. var isArr = isArray(value);
  10048. if (isArr) {
  10049. result = initCloneArray(value);
  10050. if (!isDeep) {
  10051. return copyArray(value, result);
  10052. }
  10053. } else {
  10054. var tag = getTag(value),
  10055. isFunc = tag == funcTag || tag == genTag;
  10056. if (isBuffer(value)) {
  10057. return cloneBuffer(value, isDeep);
  10058. }
  10059. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  10060. if (isHostObject(value)) {
  10061. return object ? value : {};
  10062. }
  10063. result = initCloneObject(isFunc ? {} : value);
  10064. if (!isDeep) {
  10065. return copySymbols(value, baseAssign(result, value));
  10066. }
  10067. } else {
  10068. if (!cloneableTags[tag]) {
  10069. return object ? value : {};
  10070. }
  10071. result = initCloneByTag(value, tag, baseClone, isDeep);
  10072. }
  10073. }
  10074. // Check for circular references and return its corresponding clone.
  10075. stack || (stack = new Stack);
  10076. var stacked = stack.get(value);
  10077. if (stacked) {
  10078. return stacked;
  10079. }
  10080. stack.set(value, result);
  10081. if (!isArr) {
  10082. var props = isFull ? getAllKeys(value) : keys(value);
  10083. }
  10084. arrayEach(props || value, function(subValue, key) {
  10085. if (props) {
  10086. key = subValue;
  10087. subValue = value[key];
  10088. }
  10089. // Recursively populate clone (susceptible to call stack limits).
  10090. assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
  10091. });
  10092. return result;
  10093. }
  10094. /**
  10095. * The base implementation of `_.create` without support for assigning
  10096. * properties to the created object.
  10097. *
  10098. * @private
  10099. * @param {Object} prototype The object to inherit from.
  10100. * @returns {Object} Returns the new object.
  10101. */
  10102. function baseCreate(proto) {
  10103. return isObject(proto) ? objectCreate(proto) : {};
  10104. }
  10105. /**
  10106. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  10107. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  10108. * symbols of `object`.
  10109. *
  10110. * @private
  10111. * @param {Object} object The object to query.
  10112. * @param {Function} keysFunc The function to get the keys of `object`.
  10113. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  10114. * @returns {Array} Returns the array of property names and symbols.
  10115. */
  10116. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  10117. var result = keysFunc(object);
  10118. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  10119. }
  10120. /**
  10121. * The base implementation of `getTag`.
  10122. *
  10123. * @private
  10124. * @param {*} value The value to query.
  10125. * @returns {string} Returns the `toStringTag`.
  10126. */
  10127. function baseGetTag(value) {
  10128. return objectToString.call(value);
  10129. }
  10130. /**
  10131. * The base implementation of `_.isNative` without bad shim checks.
  10132. *
  10133. * @private
  10134. * @param {*} value The value to check.
  10135. * @returns {boolean} Returns `true` if `value` is a native function,
  10136. * else `false`.
  10137. */
  10138. function baseIsNative(value) {
  10139. if (!isObject(value) || isMasked(value)) {
  10140. return false;
  10141. }
  10142. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  10143. return pattern.test(toSource(value));
  10144. }
  10145. /**
  10146. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  10147. *
  10148. * @private
  10149. * @param {Object} object The object to query.
  10150. * @returns {Array} Returns the array of property names.
  10151. */
  10152. function baseKeys(object) {
  10153. if (!isPrototype(object)) {
  10154. return nativeKeys(object);
  10155. }
  10156. var result = [];
  10157. for (var key in Object(object)) {
  10158. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  10159. result.push(key);
  10160. }
  10161. }
  10162. return result;
  10163. }
  10164. /**
  10165. * Creates a clone of `buffer`.
  10166. *
  10167. * @private
  10168. * @param {Buffer} buffer The buffer to clone.
  10169. * @param {boolean} [isDeep] Specify a deep clone.
  10170. * @returns {Buffer} Returns the cloned buffer.
  10171. */
  10172. function cloneBuffer(buffer, isDeep) {
  10173. if (isDeep) {
  10174. return buffer.slice();
  10175. }
  10176. var result = new buffer.constructor(buffer.length);
  10177. buffer.copy(result);
  10178. return result;
  10179. }
  10180. /**
  10181. * Creates a clone of `arrayBuffer`.
  10182. *
  10183. * @private
  10184. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  10185. * @returns {ArrayBuffer} Returns the cloned array buffer.
  10186. */
  10187. function cloneArrayBuffer(arrayBuffer) {
  10188. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  10189. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  10190. return result;
  10191. }
  10192. /**
  10193. * Creates a clone of `dataView`.
  10194. *
  10195. * @private
  10196. * @param {Object} dataView The data view to clone.
  10197. * @param {boolean} [isDeep] Specify a deep clone.
  10198. * @returns {Object} Returns the cloned data view.
  10199. */
  10200. function cloneDataView(dataView, isDeep) {
  10201. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  10202. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  10203. }
  10204. /**
  10205. * Creates a clone of `map`.
  10206. *
  10207. * @private
  10208. * @param {Object} map The map to clone.
  10209. * @param {Function} cloneFunc The function to clone values.
  10210. * @param {boolean} [isDeep] Specify a deep clone.
  10211. * @returns {Object} Returns the cloned map.
  10212. */
  10213. function cloneMap(map, isDeep, cloneFunc) {
  10214. var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
  10215. return arrayReduce(array, addMapEntry, new map.constructor);
  10216. }
  10217. /**
  10218. * Creates a clone of `regexp`.
  10219. *
  10220. * @private
  10221. * @param {Object} regexp The regexp to clone.
  10222. * @returns {Object} Returns the cloned regexp.
  10223. */
  10224. function cloneRegExp(regexp) {
  10225. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  10226. result.lastIndex = regexp.lastIndex;
  10227. return result;
  10228. }
  10229. /**
  10230. * Creates a clone of `set`.
  10231. *
  10232. * @private
  10233. * @param {Object} set The set to clone.
  10234. * @param {Function} cloneFunc The function to clone values.
  10235. * @param {boolean} [isDeep] Specify a deep clone.
  10236. * @returns {Object} Returns the cloned set.
  10237. */
  10238. function cloneSet(set, isDeep, cloneFunc) {
  10239. var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
  10240. return arrayReduce(array, addSetEntry, new set.constructor);
  10241. }
  10242. /**
  10243. * Creates a clone of the `symbol` object.
  10244. *
  10245. * @private
  10246. * @param {Object} symbol The symbol object to clone.
  10247. * @returns {Object} Returns the cloned symbol object.
  10248. */
  10249. function cloneSymbol(symbol) {
  10250. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  10251. }
  10252. /**
  10253. * Creates a clone of `typedArray`.
  10254. *
  10255. * @private
  10256. * @param {Object} typedArray The typed array to clone.
  10257. * @param {boolean} [isDeep] Specify a deep clone.
  10258. * @returns {Object} Returns the cloned typed array.
  10259. */
  10260. function cloneTypedArray(typedArray, isDeep) {
  10261. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  10262. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  10263. }
  10264. /**
  10265. * Copies the values of `source` to `array`.
  10266. *
  10267. * @private
  10268. * @param {Array} source The array to copy values from.
  10269. * @param {Array} [array=[]] The array to copy values to.
  10270. * @returns {Array} Returns `array`.
  10271. */
  10272. function copyArray(source, array) {
  10273. var index = -1,
  10274. length = source.length;
  10275. array || (array = Array(length));
  10276. while (++index < length) {
  10277. array[index] = source[index];
  10278. }
  10279. return array;
  10280. }
  10281. /**
  10282. * Copies properties of `source` to `object`.
  10283. *
  10284. * @private
  10285. * @param {Object} source The object to copy properties from.
  10286. * @param {Array} props The property identifiers to copy.
  10287. * @param {Object} [object={}] The object to copy properties to.
  10288. * @param {Function} [customizer] The function to customize copied values.
  10289. * @returns {Object} Returns `object`.
  10290. */
  10291. function copyObject(source, props, object, customizer) {
  10292. object || (object = {});
  10293. var index = -1,
  10294. length = props.length;
  10295. while (++index < length) {
  10296. var key = props[index];
  10297. var newValue = customizer
  10298. ? customizer(object[key], source[key], key, object, source)
  10299. : undefined;
  10300. assignValue(object, key, newValue === undefined ? source[key] : newValue);
  10301. }
  10302. return object;
  10303. }
  10304. /**
  10305. * Copies own symbol properties of `source` to `object`.
  10306. *
  10307. * @private
  10308. * @param {Object} source The object to copy symbols from.
  10309. * @param {Object} [object={}] The object to copy symbols to.
  10310. * @returns {Object} Returns `object`.
  10311. */
  10312. function copySymbols(source, object) {
  10313. return copyObject(source, getSymbols(source), object);
  10314. }
  10315. /**
  10316. * Creates an array of own enumerable property names and symbols of `object`.
  10317. *
  10318. * @private
  10319. * @param {Object} object The object to query.
  10320. * @returns {Array} Returns the array of property names and symbols.
  10321. */
  10322. function getAllKeys(object) {
  10323. return baseGetAllKeys(object, keys, getSymbols);
  10324. }
  10325. /**
  10326. * Gets the data for `map`.
  10327. *
  10328. * @private
  10329. * @param {Object} map The map to query.
  10330. * @param {string} key The reference key.
  10331. * @returns {*} Returns the map data.
  10332. */
  10333. function getMapData(map, key) {
  10334. var data = map.__data__;
  10335. return isKeyable(key)
  10336. ? data[typeof key == 'string' ? 'string' : 'hash']
  10337. : data.map;
  10338. }
  10339. /**
  10340. * Gets the native function at `key` of `object`.
  10341. *
  10342. * @private
  10343. * @param {Object} object The object to query.
  10344. * @param {string} key The key of the method to get.
  10345. * @returns {*} Returns the function if it's native, else `undefined`.
  10346. */
  10347. function getNative(object, key) {
  10348. var value = getValue(object, key);
  10349. return baseIsNative(value) ? value : undefined;
  10350. }
  10351. /**
  10352. * Creates an array of the own enumerable symbol properties of `object`.
  10353. *
  10354. * @private
  10355. * @param {Object} object The object to query.
  10356. * @returns {Array} Returns the array of symbols.
  10357. */
  10358. var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
  10359. /**
  10360. * Gets the `toStringTag` of `value`.
  10361. *
  10362. * @private
  10363. * @param {*} value The value to query.
  10364. * @returns {string} Returns the `toStringTag`.
  10365. */
  10366. var getTag = baseGetTag;
  10367. // Fallback for data views, maps, sets, and weak maps in IE 11,
  10368. // for data views in Edge < 14, and promises in Node.js.
  10369. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  10370. (Map && getTag(new Map) != mapTag) ||
  10371. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  10372. (Set && getTag(new Set) != setTag) ||
  10373. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  10374. getTag = function(value) {
  10375. var result = objectToString.call(value),
  10376. Ctor = result == objectTag ? value.constructor : undefined,
  10377. ctorString = Ctor ? toSource(Ctor) : undefined;
  10378. if (ctorString) {
  10379. switch (ctorString) {
  10380. case dataViewCtorString: return dataViewTag;
  10381. case mapCtorString: return mapTag;
  10382. case promiseCtorString: return promiseTag;
  10383. case setCtorString: return setTag;
  10384. case weakMapCtorString: return weakMapTag;
  10385. }
  10386. }
  10387. return result;
  10388. };
  10389. }
  10390. /**
  10391. * Initializes an array clone.
  10392. *
  10393. * @private
  10394. * @param {Array} array The array to clone.
  10395. * @returns {Array} Returns the initialized clone.
  10396. */
  10397. function initCloneArray(array) {
  10398. var length = array.length,
  10399. result = array.constructor(length);
  10400. // Add properties assigned by `RegExp#exec`.
  10401. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  10402. result.index = array.index;
  10403. result.input = array.input;
  10404. }
  10405. return result;
  10406. }
  10407. /**
  10408. * Initializes an object clone.
  10409. *
  10410. * @private
  10411. * @param {Object} object The object to clone.
  10412. * @returns {Object} Returns the initialized clone.
  10413. */
  10414. function initCloneObject(object) {
  10415. return (typeof object.constructor == 'function' && !isPrototype(object))
  10416. ? baseCreate(getPrototype(object))
  10417. : {};
  10418. }
  10419. /**
  10420. * Initializes an object clone based on its `toStringTag`.
  10421. *
  10422. * **Note:** This function only supports cloning values with tags of
  10423. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  10424. *
  10425. * @private
  10426. * @param {Object} object The object to clone.
  10427. * @param {string} tag The `toStringTag` of the object to clone.
  10428. * @param {Function} cloneFunc The function to clone values.
  10429. * @param {boolean} [isDeep] Specify a deep clone.
  10430. * @returns {Object} Returns the initialized clone.
  10431. */
  10432. function initCloneByTag(object, tag, cloneFunc, isDeep) {
  10433. var Ctor = object.constructor;
  10434. switch (tag) {
  10435. case arrayBufferTag:
  10436. return cloneArrayBuffer(object);
  10437. case boolTag:
  10438. case dateTag:
  10439. return new Ctor(+object);
  10440. case dataViewTag:
  10441. return cloneDataView(object, isDeep);
  10442. case float32Tag: case float64Tag:
  10443. case int8Tag: case int16Tag: case int32Tag:
  10444. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  10445. return cloneTypedArray(object, isDeep);
  10446. case mapTag:
  10447. return cloneMap(object, isDeep, cloneFunc);
  10448. case numberTag:
  10449. case stringTag:
  10450. return new Ctor(object);
  10451. case regexpTag:
  10452. return cloneRegExp(object);
  10453. case setTag:
  10454. return cloneSet(object, isDeep, cloneFunc);
  10455. case symbolTag:
  10456. return cloneSymbol(object);
  10457. }
  10458. }
  10459. /**
  10460. * Checks if `value` is a valid array-like index.
  10461. *
  10462. * @private
  10463. * @param {*} value The value to check.
  10464. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  10465. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  10466. */
  10467. function isIndex(value, length) {
  10468. length = length == null ? MAX_SAFE_INTEGER : length;
  10469. return !!length &&
  10470. (typeof value == 'number' || reIsUint.test(value)) &&
  10471. (value > -1 && value % 1 == 0 && value < length);
  10472. }
  10473. /**
  10474. * Checks if `value` is suitable for use as unique object key.
  10475. *
  10476. * @private
  10477. * @param {*} value The value to check.
  10478. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  10479. */
  10480. function isKeyable(value) {
  10481. var type = typeof value;
  10482. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  10483. ? (value !== '__proto__')
  10484. : (value === null);
  10485. }
  10486. /**
  10487. * Checks if `func` has its source masked.
  10488. *
  10489. * @private
  10490. * @param {Function} func The function to check.
  10491. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  10492. */
  10493. function isMasked(func) {
  10494. return !!maskSrcKey && (maskSrcKey in func);
  10495. }
  10496. /**
  10497. * Checks if `value` is likely a prototype object.
  10498. *
  10499. * @private
  10500. * @param {*} value The value to check.
  10501. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  10502. */
  10503. function isPrototype(value) {
  10504. var Ctor = value && value.constructor,
  10505. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  10506. return value === proto;
  10507. }
  10508. /**
  10509. * Converts `func` to its source code.
  10510. *
  10511. * @private
  10512. * @param {Function} func The function to process.
  10513. * @returns {string} Returns the source code.
  10514. */
  10515. function toSource(func) {
  10516. if (func != null) {
  10517. try {
  10518. return funcToString.call(func);
  10519. } catch (e) {}
  10520. try {
  10521. return (func + '');
  10522. } catch (e) {}
  10523. }
  10524. return '';
  10525. }
  10526. /**
  10527. * This method is like `_.clone` except that it recursively clones `value`.
  10528. *
  10529. * @static
  10530. * @memberOf _
  10531. * @since 1.0.0
  10532. * @category Lang
  10533. * @param {*} value The value to recursively clone.
  10534. * @returns {*} Returns the deep cloned value.
  10535. * @see _.clone
  10536. * @example
  10537. *
  10538. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  10539. *
  10540. * var deep = _.cloneDeep(objects);
  10541. * console.log(deep[0] === objects[0]);
  10542. * // => false
  10543. */
  10544. function cloneDeep(value) {
  10545. return baseClone(value, true, true);
  10546. }
  10547. /**
  10548. * Performs a
  10549. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  10550. * comparison between two values to determine if they are equivalent.
  10551. *
  10552. * @static
  10553. * @memberOf _
  10554. * @since 4.0.0
  10555. * @category Lang
  10556. * @param {*} value The value to compare.
  10557. * @param {*} other The other value to compare.
  10558. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  10559. * @example
  10560. *
  10561. * var object = { 'a': 1 };
  10562. * var other = { 'a': 1 };
  10563. *
  10564. * _.eq(object, object);
  10565. * // => true
  10566. *
  10567. * _.eq(object, other);
  10568. * // => false
  10569. *
  10570. * _.eq('a', 'a');
  10571. * // => true
  10572. *
  10573. * _.eq('a', Object('a'));
  10574. * // => false
  10575. *
  10576. * _.eq(NaN, NaN);
  10577. * // => true
  10578. */
  10579. function eq(value, other) {
  10580. return value === other || (value !== value && other !== other);
  10581. }
  10582. /**
  10583. * Checks if `value` is likely an `arguments` object.
  10584. *
  10585. * @static
  10586. * @memberOf _
  10587. * @since 0.1.0
  10588. * @category Lang
  10589. * @param {*} value The value to check.
  10590. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  10591. * else `false`.
  10592. * @example
  10593. *
  10594. * _.isArguments(function() { return arguments; }());
  10595. * // => true
  10596. *
  10597. * _.isArguments([1, 2, 3]);
  10598. * // => false
  10599. */
  10600. function isArguments(value) {
  10601. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  10602. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
  10603. (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
  10604. }
  10605. /**
  10606. * Checks if `value` is classified as an `Array` object.
  10607. *
  10608. * @static
  10609. * @memberOf _
  10610. * @since 0.1.0
  10611. * @category Lang
  10612. * @param {*} value The value to check.
  10613. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  10614. * @example
  10615. *
  10616. * _.isArray([1, 2, 3]);
  10617. * // => true
  10618. *
  10619. * _.isArray(document.body.children);
  10620. * // => false
  10621. *
  10622. * _.isArray('abc');
  10623. * // => false
  10624. *
  10625. * _.isArray(_.noop);
  10626. * // => false
  10627. */
  10628. var isArray = Array.isArray;
  10629. /**
  10630. * Checks if `value` is array-like. A value is considered array-like if it's
  10631. * not a function and has a `value.length` that's an integer greater than or
  10632. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  10633. *
  10634. * @static
  10635. * @memberOf _
  10636. * @since 4.0.0
  10637. * @category Lang
  10638. * @param {*} value The value to check.
  10639. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  10640. * @example
  10641. *
  10642. * _.isArrayLike([1, 2, 3]);
  10643. * // => true
  10644. *
  10645. * _.isArrayLike(document.body.children);
  10646. * // => true
  10647. *
  10648. * _.isArrayLike('abc');
  10649. * // => true
  10650. *
  10651. * _.isArrayLike(_.noop);
  10652. * // => false
  10653. */
  10654. function isArrayLike(value) {
  10655. return value != null && isLength(value.length) && !isFunction(value);
  10656. }
  10657. /**
  10658. * This method is like `_.isArrayLike` except that it also checks if `value`
  10659. * is an object.
  10660. *
  10661. * @static
  10662. * @memberOf _
  10663. * @since 4.0.0
  10664. * @category Lang
  10665. * @param {*} value The value to check.
  10666. * @returns {boolean} Returns `true` if `value` is an array-like object,
  10667. * else `false`.
  10668. * @example
  10669. *
  10670. * _.isArrayLikeObject([1, 2, 3]);
  10671. * // => true
  10672. *
  10673. * _.isArrayLikeObject(document.body.children);
  10674. * // => true
  10675. *
  10676. * _.isArrayLikeObject('abc');
  10677. * // => false
  10678. *
  10679. * _.isArrayLikeObject(_.noop);
  10680. * // => false
  10681. */
  10682. function isArrayLikeObject(value) {
  10683. return isObjectLike(value) && isArrayLike(value);
  10684. }
  10685. /**
  10686. * Checks if `value` is a buffer.
  10687. *
  10688. * @static
  10689. * @memberOf _
  10690. * @since 4.3.0
  10691. * @category Lang
  10692. * @param {*} value The value to check.
  10693. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  10694. * @example
  10695. *
  10696. * _.isBuffer(new Buffer(2));
  10697. * // => true
  10698. *
  10699. * _.isBuffer(new Uint8Array(2));
  10700. * // => false
  10701. */
  10702. var isBuffer = nativeIsBuffer || stubFalse;
  10703. /**
  10704. * Checks if `value` is classified as a `Function` object.
  10705. *
  10706. * @static
  10707. * @memberOf _
  10708. * @since 0.1.0
  10709. * @category Lang
  10710. * @param {*} value The value to check.
  10711. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  10712. * @example
  10713. *
  10714. * _.isFunction(_);
  10715. * // => true
  10716. *
  10717. * _.isFunction(/abc/);
  10718. * // => false
  10719. */
  10720. function isFunction(value) {
  10721. // The use of `Object#toString` avoids issues with the `typeof` operator
  10722. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  10723. var tag = isObject(value) ? objectToString.call(value) : '';
  10724. return tag == funcTag || tag == genTag;
  10725. }
  10726. /**
  10727. * Checks if `value` is a valid array-like length.
  10728. *
  10729. * **Note:** This method is loosely based on
  10730. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  10731. *
  10732. * @static
  10733. * @memberOf _
  10734. * @since 4.0.0
  10735. * @category Lang
  10736. * @param {*} value The value to check.
  10737. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  10738. * @example
  10739. *
  10740. * _.isLength(3);
  10741. * // => true
  10742. *
  10743. * _.isLength(Number.MIN_VALUE);
  10744. * // => false
  10745. *
  10746. * _.isLength(Infinity);
  10747. * // => false
  10748. *
  10749. * _.isLength('3');
  10750. * // => false
  10751. */
  10752. function isLength(value) {
  10753. return typeof value == 'number' &&
  10754. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  10755. }
  10756. /**
  10757. * Checks if `value` is the
  10758. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  10759. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  10760. *
  10761. * @static
  10762. * @memberOf _
  10763. * @since 0.1.0
  10764. * @category Lang
  10765. * @param {*} value The value to check.
  10766. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  10767. * @example
  10768. *
  10769. * _.isObject({});
  10770. * // => true
  10771. *
  10772. * _.isObject([1, 2, 3]);
  10773. * // => true
  10774. *
  10775. * _.isObject(_.noop);
  10776. * // => true
  10777. *
  10778. * _.isObject(null);
  10779. * // => false
  10780. */
  10781. function isObject(value) {
  10782. var type = typeof value;
  10783. return !!value && (type == 'object' || type == 'function');
  10784. }
  10785. /**
  10786. * Checks if `value` is object-like. A value is object-like if it's not `null`
  10787. * and has a `typeof` result of "object".
  10788. *
  10789. * @static
  10790. * @memberOf _
  10791. * @since 4.0.0
  10792. * @category Lang
  10793. * @param {*} value The value to check.
  10794. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  10795. * @example
  10796. *
  10797. * _.isObjectLike({});
  10798. * // => true
  10799. *
  10800. * _.isObjectLike([1, 2, 3]);
  10801. * // => true
  10802. *
  10803. * _.isObjectLike(_.noop);
  10804. * // => false
  10805. *
  10806. * _.isObjectLike(null);
  10807. * // => false
  10808. */
  10809. function isObjectLike(value) {
  10810. return !!value && typeof value == 'object';
  10811. }
  10812. /**
  10813. * Creates an array of the own enumerable property names of `object`.
  10814. *
  10815. * **Note:** Non-object values are coerced to objects. See the
  10816. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  10817. * for more details.
  10818. *
  10819. * @static
  10820. * @since 0.1.0
  10821. * @memberOf _
  10822. * @category Object
  10823. * @param {Object} object The object to query.
  10824. * @returns {Array} Returns the array of property names.
  10825. * @example
  10826. *
  10827. * function Foo() {
  10828. * this.a = 1;
  10829. * this.b = 2;
  10830. * }
  10831. *
  10832. * Foo.prototype.c = 3;
  10833. *
  10834. * _.keys(new Foo);
  10835. * // => ['a', 'b'] (iteration order is not guaranteed)
  10836. *
  10837. * _.keys('hi');
  10838. * // => ['0', '1']
  10839. */
  10840. function keys(object) {
  10841. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  10842. }
  10843. /**
  10844. * This method returns a new empty array.
  10845. *
  10846. * @static
  10847. * @memberOf _
  10848. * @since 4.13.0
  10849. * @category Util
  10850. * @returns {Array} Returns the new empty array.
  10851. * @example
  10852. *
  10853. * var arrays = _.times(2, _.stubArray);
  10854. *
  10855. * console.log(arrays);
  10856. * // => [[], []]
  10857. *
  10858. * console.log(arrays[0] === arrays[1]);
  10859. * // => false
  10860. */
  10861. function stubArray() {
  10862. return [];
  10863. }
  10864. /**
  10865. * This method returns `false`.
  10866. *
  10867. * @static
  10868. * @memberOf _
  10869. * @since 4.13.0
  10870. * @category Util
  10871. * @returns {boolean} Returns `false`.
  10872. * @example
  10873. *
  10874. * _.times(2, _.stubFalse);
  10875. * // => [false, false]
  10876. */
  10877. function stubFalse() {
  10878. return false;
  10879. }
  10880. module.exports = cloneDeep;
  10881. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10), __webpack_require__(38)(module)))
  10882. /***/ }),
  10883. /* 54 */
  10884. /***/ (function(module, exports, __webpack_require__) {
  10885. "use strict";
  10886. Object.defineProperty(exports,"__esModule",{value:true});exports.MAP_EVENT_NAMES=void 0;var MAP_EVENT_NAMES=['onResize','onWebglcontextlost','onWebglcontextrestored','onRemove','onMovestart','onContextmenu','onDblclick','onClick','onTouchcancel','onTouchmove','onTouchend','onTouchstart','onDataloading','onMousemove','onMouseup','onMousedown','onSourcedataloading','onError','onData','onStyledata','onSourcedata','onMouseout','onStyledataloading','onMoveend','onMove','onRender','onZoom','onZoomstart','onZoomend','onBoxzoomstart','onBoxzoomcancel','onBoxzoomend','onRotate','onRotatestart','onRotateend','onDragend','onDrag','onDragstart','onPitch','onIdle'];exports.MAP_EVENT_NAMES=MAP_EVENT_NAMES;;
  10887. /***/ }),
  10888. /* 55 */
  10889. /***/ (function(module, exports, __webpack_require__) {
  10890. "use strict";
  10891. var _interopRequireDefault = __webpack_require__(42);
  10892. exports.__esModule = true;
  10893. exports.default = void 0;
  10894. var _getDisplayName = _interopRequireDefault(__webpack_require__(105));
  10895. var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {
  10896. return hocName + "(" + (0, _getDisplayName.default)(BaseComponent) + ")";
  10897. };
  10898. var _default = wrapDisplayName;
  10899. exports.default = _default;
  10900. /***/ }),
  10901. /* 56 */
  10902. /***/ (function(module, exports, __webpack_require__) {
  10903. "use strict";
  10904. var reactIs = __webpack_require__(106);
  10905. /**
  10906. * Copyright 2015, Yahoo! Inc.
  10907. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  10908. */
  10909. var REACT_STATICS = {
  10910. childContextTypes: true,
  10911. contextType: true,
  10912. contextTypes: true,
  10913. defaultProps: true,
  10914. displayName: true,
  10915. getDefaultProps: true,
  10916. getDerivedStateFromError: true,
  10917. getDerivedStateFromProps: true,
  10918. mixins: true,
  10919. propTypes: true,
  10920. type: true
  10921. };
  10922. var KNOWN_STATICS = {
  10923. name: true,
  10924. length: true,
  10925. prototype: true,
  10926. caller: true,
  10927. callee: true,
  10928. arguments: true,
  10929. arity: true
  10930. };
  10931. var FORWARD_REF_STATICS = {
  10932. '$$typeof': true,
  10933. render: true,
  10934. defaultProps: true,
  10935. displayName: true,
  10936. propTypes: true
  10937. };
  10938. var MEMO_STATICS = {
  10939. '$$typeof': true,
  10940. compare: true,
  10941. defaultProps: true,
  10942. displayName: true,
  10943. propTypes: true,
  10944. type: true
  10945. };
  10946. var TYPE_STATICS = {};
  10947. TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
  10948. TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
  10949. function getStatics(component) {
  10950. // React v16.11 and below
  10951. if (reactIs.isMemo(component)) {
  10952. return MEMO_STATICS;
  10953. } // React v16.12 and above
  10954. return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
  10955. }
  10956. var defineProperty = Object.defineProperty;
  10957. var getOwnPropertyNames = Object.getOwnPropertyNames;
  10958. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  10959. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  10960. var getPrototypeOf = Object.getPrototypeOf;
  10961. var objectPrototype = Object.prototype;
  10962. function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
  10963. if (typeof sourceComponent !== 'string') {
  10964. // don't hoist over string (html) components
  10965. if (objectPrototype) {
  10966. var inheritedComponent = getPrototypeOf(sourceComponent);
  10967. if (inheritedComponent && inheritedComponent !== objectPrototype) {
  10968. hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
  10969. }
  10970. }
  10971. var keys = getOwnPropertyNames(sourceComponent);
  10972. if (getOwnPropertySymbols) {
  10973. keys = keys.concat(getOwnPropertySymbols(sourceComponent));
  10974. }
  10975. var targetStatics = getStatics(targetComponent);
  10976. var sourceStatics = getStatics(sourceComponent);
  10977. for (var i = 0; i < keys.length; ++i) {
  10978. var key = keys[i];
  10979. if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
  10980. var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
  10981. try {
  10982. // Avoid failures from read-only properties
  10983. defineProperty(targetComponent, key, descriptor);
  10984. } catch (e) {}
  10985. }
  10986. }
  10987. }
  10988. return targetComponent;
  10989. }
  10990. module.exports = hoistNonReactStatics;
  10991. /***/ }),
  10992. /* 57 */
  10993. /***/ (function(module, exports, __webpack_require__) {
  10994. "use strict";
  10995. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));/**
  10996. * @class CircleStyle
  10997. * @category BaseTypes Style
  10998. * @classdesc 点图层样式类。
  10999. * @param {mapboxgl.LayersCircle} paint - MapboxGL 点图层 Paint 配置。
  11000. * @param {mapboxgl.LayersCircle} layout - MapboxGL 点图层 Layout 配置。
  11001. */var CircleStyle=function CircleStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,CircleStyle);this.layout={visibility:'visible'};this.paint={'circle-radius':6,'circle-color':'#3fb1e3','circle-opacity':1,'circle-blur':0,'circle-translate':[0,0],'circle-translate-anchor':'map','circle-pitch-scale':'map','circle-pitch-alignment':'viewport','circle-stroke-width':0,'circle-stroke-color':'#000','circle-stroke-opacity':1};Object.assign(this.paint,paint);Object.assign(this.layout,layout);};exports.default=CircleStyle;
  11002. /***/ }),
  11003. /* 58 */
  11004. /***/ (function(module, exports, __webpack_require__) {
  11005. "use strict";
  11006. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var HeatMapStyle=function HeatMapStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,HeatMapStyle);this.paint={'heatmap-radius':30,'heatmap-weight':1,'heatmap-intensity':1,'heatmap-color':['interpolate',['linear'],['heatmap-density'],0,'rgba(0, 0, 255, 0)',0.1,'royalblue',0.3,'cyan',0.5,'lime',0.7,'yellow',1,'red'],'heatmap-opacity':1};this.layout={visibility:'visible'};Object.assign(this.paint,paint);Object.assign(this.layout,layout);};exports.default=HeatMapStyle;
  11007. /***/ }),
  11008. /* 59 */
  11009. /***/ (function(module, exports, __webpack_require__) {
  11010. "use strict";
  11011. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"CircleStyle",{enumerable:true,get:function get(){return _CircleStyle.default;}});Object.defineProperty(exports,"FillStyle",{enumerable:true,get:function get(){return _FillStyle.default;}});Object.defineProperty(exports,"LineStyle",{enumerable:true,get:function get(){return _LineStyle.default;}});Object.defineProperty(exports,"HeatMapStyle",{enumerable:true,get:function get(){return _HeatMapStyle.default;}});Object.defineProperty(exports,"SymbolStyle",{enumerable:true,get:function get(){return _SymbolStyle.default;}});var _CircleStyle=_interopRequireDefault(__webpack_require__(57));var _FillStyle=_interopRequireDefault(__webpack_require__(137));var _LineStyle=_interopRequireDefault(__webpack_require__(138));var _HeatMapStyle=_interopRequireDefault(__webpack_require__(58));var _SymbolStyle=_interopRequireDefault(__webpack_require__(139));
  11012. /***/ }),
  11013. /* 60 */
  11014. /***/ (function(module, exports, __webpack_require__) {
  11015. module.exports = __webpack_require__(61);
  11016. /***/ }),
  11017. /* 61 */
  11018. /***/ (function(module, exports, __webpack_require__) {
  11019. "use strict";
  11020. var _interopRequireWildcard=__webpack_require__(19);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports.default=void 0;var _objectSpread2=_interopRequireDefault(__webpack_require__(15));__webpack_require__(63);__webpack_require__(64);var components=_interopRequireWildcard(__webpack_require__(65));Object.keys(components).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return components[key];}});});var commontypes=_interopRequireWildcard(__webpack_require__(59));var _default=(0,_objectSpread2.default)((0,_objectSpread2.default)({},components),{},{commontypes:commontypes});exports.default=_default;
  11021. /***/ }),
  11022. /* 62 */
  11023. /***/ (function(module, exports) {
  11024. function _typeof(obj) {
  11025. "@babel/helpers - typeof";
  11026. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  11027. module.exports = _typeof = function _typeof(obj) {
  11028. return typeof obj;
  11029. };
  11030. } else {
  11031. module.exports = _typeof = function _typeof(obj) {
  11032. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  11033. };
  11034. }
  11035. return _typeof(obj);
  11036. }
  11037. module.exports = _typeof;
  11038. /***/ }),
  11039. /* 63 */
  11040. /***/ (function(module, exports, __webpack_require__) {
  11041. // extracted by mini-css-extract-plugin
  11042. /***/ }),
  11043. /* 64 */
  11044. /***/ (function(module, exports, __webpack_require__) {
  11045. // extracted by mini-css-extract-plugin
  11046. /***/ }),
  11047. /* 65 */
  11048. /***/ (function(module, exports, __webpack_require__) {
  11049. "use strict";
  11050. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"SmWebMap",{enumerable:true,get:function get(){return _WebMap.default;}});Object.defineProperty(exports,"SmMap",{enumerable:true,get:function get(){return _Map.default;}});Object.defineProperty(exports,"SmSource",{enumerable:true,get:function get(){return _Source.default;}});Object.defineProperty(exports,"SmLayer",{enumerable:true,get:function get(){return _Layer.default;}});Object.defineProperty(exports,"SmGeojsonLayer",{enumerable:true,get:function get(){return _GeojsonLayer.default;}});Object.defineProperty(exports,"SmRasterTileLayer",{enumerable:true,get:function get(){return _RasterTileLayer.default;}});Object.defineProperty(exports,"SmVectorTileLayer",{enumerable:true,get:function get(){return _VectorTileLayer.default;}});Object.defineProperty(exports,"SmUniqueThemeLayer",{enumerable:true,get:function get(){return _UniqueThemeLayer.default;}});Object.defineProperty(exports,"SmRanksymbolThemeLayer",{enumerable:true,get:function get(){return _RanksymbolThemeLayer.default;}});Object.defineProperty(exports,"SmRangeThemeLayer",{enumerable:true,get:function get(){return _RangeThemeLayer.default;}});Object.defineProperty(exports,"SmGraphThemeLayer",{enumerable:true,get:function get(){return _GraphThemeLayer.default;}});Object.defineProperty(exports,"SmClusterLayer",{enumerable:true,get:function get(){return _ClusterLayer.default;}});Object.defineProperty(exports,"SmDeckglLayer",{enumerable:true,get:function get(){return _DeckglLayer.default;}});Object.defineProperty(exports,"SmLabelThemeLayer",{enumerable:true,get:function get(){return _LabelThemeLayer.default;}});Object.defineProperty(exports,"SmHeatmapLayer",{enumerable:true,get:function get(){return _HeatmapLayer.default;}});Object.defineProperty(exports,"SmMapvLayer",{enumerable:true,get:function get(){return _MapvLayer.default;}});Object.defineProperty(exports,"SmEchartsLayer",{enumerable:true,get:function get(){return _EchartsLayer.default;}});Object.defineProperty(exports,"SmDataFlowLayer",{enumerable:true,get:function get(){return _DataFlowLayer.default;}});Object.defineProperty(exports,"SmFireLayer",{enumerable:true,get:function get(){return _FireLayer.default;}});Object.defineProperty(exports,"SmAnimateMarkerLayer",{enumerable:true,get:function get(){return _AnimateMarkerLayer.default;}});var _WebMap=_interopRequireDefault(__webpack_require__(66));var _Map=_interopRequireDefault(__webpack_require__(102));var _Source=_interopRequireDefault(__webpack_require__(104));var _Layer=_interopRequireDefault(__webpack_require__(108));var _GeojsonLayer=_interopRequireDefault(__webpack_require__(109));var _RasterTileLayer=_interopRequireDefault(__webpack_require__(111));var _VectorTileLayer=_interopRequireDefault(__webpack_require__(113));var _UniqueThemeLayer=_interopRequireDefault(__webpack_require__(114));var _RanksymbolThemeLayer=_interopRequireDefault(__webpack_require__(116));var _RangeThemeLayer=_interopRequireDefault(__webpack_require__(118));var _GraphThemeLayer=_interopRequireDefault(__webpack_require__(120));var _ClusterLayer=_interopRequireDefault(__webpack_require__(122));var _DeckglLayer=_interopRequireDefault(__webpack_require__(124));var _LabelThemeLayer=_interopRequireDefault(__webpack_require__(127));var _HeatmapLayer=_interopRequireDefault(__webpack_require__(129));var _MapvLayer=_interopRequireDefault(__webpack_require__(131));var _EchartsLayer=_interopRequireDefault(__webpack_require__(133));var _DataFlowLayer=_interopRequireDefault(__webpack_require__(135));var _FireLayer=_interopRequireDefault(__webpack_require__(140));var _AnimateMarkerLayer=_interopRequireDefault(__webpack_require__(144));
  11051. /***/ }),
  11052. /* 66 */
  11053. /***/ (function(module, exports, __webpack_require__) {
  11054. "use strict";
  11055. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectSpread2=_interopRequireDefault(__webpack_require__(15));var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(18));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _react=_interopRequireDefault(__webpack_require__(5));var _resizeDetector=__webpack_require__(33);var _lodash=_interopRequireDefault(__webpack_require__(34));var _lodash2=_interopRequireDefault(__webpack_require__(26));var _lodash3=_interopRequireDefault(__webpack_require__(35));var _antd=__webpack_require__(36);var _lodash4=_interopRequireDefault(__webpack_require__(37));var _lodash5=_interopRequireDefault(__webpack_require__(13));var _mapEvent=_interopRequireDefault(__webpack_require__(27));var _WebMapViewModel=_interopRequireDefault(__webpack_require__(70));var _util=__webpack_require__(11);var _interface=__webpack_require__(54);var WebMap=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(WebMap,_React$Component);var _super=(0,_createSuper2.default)(WebMap);function WebMap(props){var _this;(0,_classCallCheck2.default)(this,WebMap);_this=_super.call(this,props);_this.map=void 0;_this.viewModel=void 0;_this.selfRef=void 0;_this.initializeWebMap=function(){var _this$props=_this.props,target=_this$props.target,serverUrl=_this$props.serverUrl,accessToken=_this$props.accessToken,accessKey=_this$props.accessKey,tiandituKey=_this$props.tiandituKey,withCredentials=_this$props.withCredentials,excludePortalProxyUrl=_this$props.excludePortalProxyUrl,mapOptions=_this$props.mapOptions,autoresize=_this$props.autoresize;_this.viewModel=new _WebMapViewModel.default(_this.props.mapId,{target:target,serverUrl:serverUrl,accessToken:accessToken,accessKey:accessKey,tiandituKey:tiandituKey,withCredentials:withCredentials,excludePortalProxyUrl:excludePortalProxyUrl},mapOptions);if(autoresize){(0,_resizeDetector.addListener)(_this.selfRef.current,_this.__resizeHandler);}};_this.registerEvents=function(){var _this$props2=_this.props,target=_this$props2.target,onLoad=_this$props2.onLoad;_this.viewModel.on('addlayerssucceeded',function(e){_this.setState({spinning:false});_mapEvent.default.setMap(target,e.map);_this.viewModel&&_mapEvent.default.setWebMap(target,_this.viewModel);_mapEvent.default.emit('load-map',e.map,target);e.map.resize();_this.map=e.map;// 绑定map event
  11056. _this.bindMapEvents();/**
  11057. * @event load
  11058. * @desc webmap 加载完成之后触发。
  11059. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  11060. */(0,_util.isFunction)(onLoad)&&onLoad((0,_objectSpread2.default)((0,_objectSpread2.default)({},e),{},{component:(0,_assertThisInitialized2.default)(_this)}));});_this.viewModel.on('getmapinfofailed',function(e){var onGetMapFailed=_this.props.onGetMapFailed;/**
  11061. * @event getMapFailed
  11062. * @desc 获取 WebMap 地图信息失败。
  11063. * @property {Object} error - 失败原因。
  11064. */(0,_util.isFunction)(onGetMapFailed)&&onGetMapFailed({error:e.error});_antd.message.error(e.error.message);_this.setState({spinning:false});});_this.viewModel.on('getlayerdatasourcefailed',function(e){var onGetLayerDatasourceFailed=_this.props.onGetLayerDatasourceFailed;/**
  11065. * @event getLayerDatasourceFailed
  11066. * @desc 获取图层数据失败。
  11067. * @property {Object} error - 失败原因。
  11068. * @property {Object} layer - 图层信息。
  11069. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  11070. */(0,_util.isFunction)(onGetLayerDatasourceFailed)&&onGetLayerDatasourceFailed({error:e.error,layer:e.layer,map:e.map});// TODO
  11071. // message.error(this.$t('webmap.getLayerInfoFailed'));
  11072. _antd.message.error('获取图层信息失败!');});};_this.state={spinning:true,viewModelProps:['mapId','serverUrl','mapOptions.center','mapOptions.zoom','mapOptions.style','mapOptions.crs','mapOptions.minZoom','mapOptions.maxZoom','mapOptions.maxBounds','mapOptions.renderWorldCopies','mapOptions.bearing','mapOptions.pitch','withCredentials']};_this.selfRef=_react.default.createRef();_this.__resizeHandler=(0,_lodash.default)(_this.__resizeHandler.bind((0,_assertThisInitialized2.default)(_this)),100,{leading:true});return _this;}(0,_createClass2.default)(WebMap,[{key:"componentDidMount",value:function componentDidMount(){this.initializeWebMap();this.registerEvents();}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this2=this;this.viewModel&&this.state.viewModelProps.forEach(function(prop){var name=prop.includes('.')?prop.split('.')[1]:prop;var funcName="set".concat((0,_lodash3.default)(name));var propsValue=(0,_lodash4.default)(_this2.props,prop);var prevPropsValue=(0,_lodash4.default)(prevProps,prop);if(propsValue&&!(0,_lodash5.default)(propsValue,prevPropsValue)){_this2.viewModel[funcName](propsValue);}});}},{key:"componentWillUnmount",value:function componentWillUnmount(){var _this$props3=this.props,target=_this$props3.target,autoresize=_this$props3.autoresize;_mapEvent.default.deleteMap(target);_mapEvent.default.deleteWebMap(target);if(autoresize&&this.selfRef.current){(0,_resizeDetector.removeListener)(this.selfRef.current,this.__resizeHandler);}}},{key:"__resizeHandler",value:function __resizeHandler(){this.resize();}},{key:"resize",value:function resize(){if(this.viewModel&&this.viewModel.resize){this.viewModel.resize();}}},{key:"bindMapEvents",value:function bindMapEvents(){var _this3=this;Object.keys(this.props).forEach(function(eventName){if(_interface.MAP_EVENT_NAMES.includes(eventName)){var name=eventName.replace('on','');_this3.bindMapEvent(name.toLowerCase(),_this3.mapEventCallback.bind(_this3));}});}},{key:"bindMapEvent",value:function bindMapEvent(eventName,eventCallback){this.map.on(eventName,eventCallback);}},{key:"mapEventCallback",value:function mapEventCallback(event){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.emitMapEvent(event.type,(0,_objectSpread2.default)({mapboxEvent:event},data));}},{key:"emitMapEvent",value:function emitMapEvent(name){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var originEventName="on".concat((0,_lodash2.default)(name));if((0,_util.isFunction)(this.props[originEventName])){this.props[originEventName]((0,_objectSpread2.default)({map:this.map,component:this},data));}}},{key:"render",value:function render(){var spinning=this.state.spinning;var _this$props4=this.props,target=_this$props4.target,children=_this$props4.children;return/*#__PURE__*/_react.default.createElement("div",{id:target,className:"sm-component-web-map",ref:this.selfRef},children,spinning&&/*#__PURE__*/_react.default.createElement(_antd.Spin,{size:"large",tip:"\u5730\u56FE\u52A0\u8F7D\u4E2D...",spinning:spinning}));}}]);return WebMap;}(_react.default.Component);WebMap.defaultProps={target:'map',autoresize:true};var _default=WebMap;exports.default=_default;
  11073. /***/ }),
  11074. /* 67 */
  11075. /***/ (function(module, exports, __webpack_require__) {
  11076. "use strict";
  11077. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var SourceModel=/*#__PURE__*/function(){function SourceModel(options){(0,_classCallCheck2.default)(this,SourceModel);this.id=options.source;this.sourceLayerList={};this.layers=[];this.type=null;}(0,_createClass2.default)(SourceModel,[{key:"addLayer",value:function addLayer(layer,sourceLayer){if(sourceLayer){if(!this.sourceLayerList[sourceLayer]){this.sourceLayerList[sourceLayer]=[];}this.sourceLayerList[sourceLayer].push(layer);}else{this.sourceLayerList=undefined;}this.layers.push(layer);this.type=layer.type;if([layer.visibility,this.visibility].includes('visible')){this.visibility='visible';}else{this.visibility='none';}}}]);return SourceModel;}();var _default=SourceModel;exports.default=_default;
  11078. /***/ }),
  11079. /* 68 */
  11080. /***/ (function(module, exports, __webpack_require__) {
  11081. "use strict";
  11082. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));/**
  11083. * @class LayerModel
  11084. * @description 图层数据模型。
  11085. * @param {Object} options - 图层参数。
  11086. * @param {String} [options.id] - 图层 ID。
  11087. * @param {Number} [options.maxzoom] - 最大缩放级别。
  11088. * @param {Number} [options.minzoom] - 最小缩放级别。
  11089. * @param {GeoJSONObject} [options.source] - 数据源。
  11090. * @param {String} [options.type] - 图层类型。
  11091. * @param {String} [options.visibility] - 图层是否可见。
  11092. * @category Model
  11093. */var LayerModel=function LayerModel(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};(0,_classCallCheck2.default)(this,LayerModel);this.id=options.id;this.maxzoom=options.maxzoom;this.minzoom=options.minzoom;this.source=options.source;this.type=options.type;this.visibility=options.visibility||'visible';};var _default=LayerModel;exports.default=_default;
  11094. /***/ }),
  11095. /* 69 */
  11096. /***/ (function(module) {
  11097. module.exports = JSON.parse("[{\"title\":\"经典深色\",\"label\":\"dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#dd6b66\",\"#759aa0\",\"#e69d87\",\"#8dc1a9\",\"#ea7e53\"]},{\"title\":\"经典浅色\",\"label\":\"light\",\"textColor\":\"#333\",\"background\":\"rgba(255, 255, 255,0.6)\",\"colorGroup\":[\"#3fb1e3\",\"#6be6c1\",\"#626c91\",\"#a0a7e6\",\"#c4ebad\"]},{\"title\":\"绿色渐变\",\"label\":\"green-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#064049\",\"#165A65\",\"#1F717F\",\"#3097AB\",\"#9AEAF4\"]},{\"title\":\"蓝色渐变\",\"label\":\"blue-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#243BCC\",\"#1C55FF\",\"#0C75FF\",\"#338FFF\",\"#00CDF1\"]},{\"title\":\"橙红渐变\",\"label\":\"red-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#770000\",\"#882241\",\"#BE3144\",\"#F05940\",\"#FF8417\"]},{\"title\":\"紫色渐变\",\"label\":\"purple-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#2F2AA4\",\"#5432D3\",\"#8B3B86\",\"#9740B1\",\"#7B6CF5\"]},{\"title\":\"深蓝黑色\",\"label\":\"bluedark-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#15D1F2\",\"#499BFF\",\"#2C61FF\",\"#243BCC\",\"#67A9FF\"]},{\"title\":\"墨绿黑色\",\"label\":\"green-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#2D808D\",\"#53A8B6\",\"#7AC2D0\",\"#BCE4E9\",\"#F1FDFF\"]},{\"title\":\"浅蓝黑色\",\"label\":\"blue-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#00E9FF\",\"#BBE7FF\",\"#6AE5C1\",\"#46ABFF\",\"#363EFF\"]},{\"title\":\"浅灰黑色\",\"label\":\"grey-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#52606D\",\"#8894A0\",\"#BACBDB\",\"#D3DDE8\",\"#F2F5F8\"]},{\"title\":\"深紫黑色\",\"label\":\"purple-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#7B6CF6\",\"#5432D3\",\"#241F92\",\"#8B3B86\",\"#E6A5FF\"]},{\"title\":\"深蓝白色\",\"label\":\"blue-light\",\"textColor\":\"#000\",\"background\":\"rgba(255,255,255,0.6)\",\"colorGroup\":[\"#243BCC\",\"#2C61FF\",\"#499BFF\",\"#15D1F2\",\"#67A9FF\"]},{\"title\":\"深红白色\",\"label\":\"red-light\",\"textColor\":\"#000\",\"background\":\"rgba(255,255,255,0.6)\",\"colorGroup\":[\"#F05940\",\"#BE3144\",\"#882241\",\"#770000\",\"#FF8418\"]}]");
  11098. /***/ }),
  11099. /* 70 */
  11100. /***/ (function(module, exports, __webpack_require__) {
  11101. "use strict";
  11102. var _interopRequireWildcard=__webpack_require__(19);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));var _SourceListModel=_interopRequireDefault(__webpack_require__(39));var _geometryUtil=__webpack_require__(71);var _util=__webpack_require__(11);__webpack_require__(12);__webpack_require__(77);__webpack_require__(78);var convert=_interopRequireWildcard(__webpack_require__(79));var _canvg=_interopRequireDefault(__webpack_require__(97));var _echarts=_interopRequireDefault(__webpack_require__(50));var _EchartsLayer=_interopRequireDefault(__webpack_require__(51));var _ProvinceCenter=_interopRequireDefault(__webpack_require__(100));var _MunicipalCenter=_interopRequireDefault(__webpack_require__(101));var _lodash=_interopRequireDefault(__webpack_require__(52));var _lodash2=_interopRequireDefault(__webpack_require__(53));/* eslint-disable */ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  11103. * This program are made available under the terms of the Apache License, Version 2.0
  11104. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */ // eslint-disable-line import/extensions
  11105. // eslint-disable-line import/extensions
  11106. var MB_SCALEDENOMINATOR_3857=['559082264.0287178','279541132.0143589','139770566.0071794','69885283.00358972','34942641.50179486','17471320.75089743','8735660.375448715','4367830.1877224357','2183915.093862179','1091957.546931089','545978.7734655447','272989.7734655447','272989.3867327723','136494.6933663862','68247.34668319309','34123.67334159654','17061.83667079827','8530.918335399136','4265.459167699568','2132.729583849784'];var MB_SCALEDENOMINATOR_4326=['5.590822640287176E8','2.795411320143588E8','1.397705660071794E8','6.98852830035897E7','3.494264150179485E7','1.7471320750897426E7','8735660.375448713','4367830.187724357','2183915.0938621783','1091957.5469310891','545978.7734655446','272989.3867327723','136494.69336638614','68247.34668319307','34123.673341596535','17061.836670798268','8530.918335399134'];var DEFAULT_WELLKNOWNSCALESET=['GoogleCRS84Quad','GoogleMapsCompatible','GlobalCRS84Scale'];// 迁徙图最大支持要素数量
  11107. var MAX_MIGRATION_ANIMATION_COUNT=1000;/**
  11108. * @class WebMapViewModel
  11109. * @category ViewModel
  11110. * @classdesc 对接 iPortal/Online 地图类。目前支持地图坐标系包括:'EPSG:3857','EPSG:4326','EPSG:4490','EPSG:4214','EPSG:4610'。
  11111. * @param {number} id - iPortal|Online 地图 ID。
  11112. * @param {Object} options - 参数。
  11113. * @param {string} [options.target='map'] - 地图容器 ID。
  11114. * @param {string} [options.serverUrl="http://www.supermapol.com"] - SuperMap iPortal/Online 服务器地址。当设置 `id` 时有效。
  11115. * @param {string} [options.accessToken] - 用于访问 SuperMap iPortal 、SuperMap Online 中受保护的服务。当设置 `id` 时有效。
  11116. * @param {string} [options.accessKey] - SuperMap iServer 提供的一种基于 Token(令牌)的用户身份验证机制。当设置 `id` 时有效。
  11117. * @param {String} [options.tiandituKey] - 用于访问天地图的服务。当设置 `id` 时有效。
  11118. * @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。当设置 `id` 时有效。
  11119. * @param {boolean} [options.excludePortalProxyUrl] - server 传递过来的 URL 是否带有代理。当设置 `id` 时有效。
  11120. * @fires WebMapViewModel#mapinitialized
  11121. * @fires WebMapViewModel#getmapinfofailed
  11122. * @fires WebMapViewModel#getwmtsinfofailed
  11123. * @fires WebMapViewModel#getlayerdatasourcefailed
  11124. * @fires WebMapViewModel#addlayerssucceeded
  11125. */var WebMapViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(WebMapViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(WebMapViewModel);// on: any;
  11126. // fire: any;
  11127. function WebMapViewModel(id){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var mapOptions=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{style:{version:8,sources:{},layers:[]}};(0,_classCallCheck2.default)(this,WebMapViewModel);_this=_super.call(this);_this.map=void 0;_this.mapId=void 0;_this.mapOptions=void 0;_this.serverUrl=void 0;_this.accessToken=void 0;_this.accessKey=void 0;_this.tiandituKey=void 0;_this.withCredentials=void 0;_this.target=void 0;_this.excludePortalProxyUrl=void 0;_this.center=void 0;_this.zoom=void 0;_this.mapParams={};_this.baseProjection=void 0;_this.echartslayer=[];_this._sourceListModel=void 0;_this._legendList=void 0;_this._layers=[];_this._svgDiv=void 0;_this._fieldMaxValue=void 0;_this._taskID=void 0;_this.layerAdded=void 0;_this._handleDataflowFeaturesCallback=void 0;_this._dataflowService=void 0;_this.mapId=id;_this.mapOptions=Object.assign({style:{version:8,sources:{},layers:[]}},mapOptions);_this.serverUrl=options.serverUrl||'http://www.supermapol.com';_this.accessToken=options.accessToken;_this.accessKey=options.accessKey;_this.tiandituKey=options.tiandituKey||'';_this.withCredentials=options.withCredentials||false;_this.target=options.target||'map';_this.excludePortalProxyUrl=options.excludePortalProxyUrl;_this.center=mapOptions.center||[];_this.zoom=mapOptions.zoom;_this.echartslayer=[];_this._createWebMap();return _this;}/**
  11128. * @function WebMapViewModel.prototype.resize
  11129. * @description Map 更新大小。
  11130. */(0,_createClass2.default)(WebMapViewModel,[{key:"resize",value:function resize(){this.map&&this.map.resize();this.echartsLayerResize();}/**
  11131. * @function WebMapViewModel.prototype.EchartsLayerResize
  11132. * @description echartslayer 更新大小。
  11133. */},{key:"echartsLayerResize",value:function echartsLayerResize(){this.echartslayer.forEach(function(echartslayer){echartslayer.chart.resize();});}/**
  11134. * @function WebMapViewModel.prototype.setMapId
  11135. * @description 设置地图 ID。
  11136. * @param {String} mapId - iPortal|Online 地图 ID。
  11137. */},{key:"setMapId",value:function setMapId(mapId){var _this2=this;this.mapId=mapId;setTimeout(function(){_this2._createWebMap();},0);}/**
  11138. * @function WebMapViewModel.prototype.setServerUrl
  11139. * @description 设置地图的地址。
  11140. * @param {string} options.serverUrl - 地图的地址。
  11141. */},{key:"setServerUrl",value:function setServerUrl(serverUrl){this.serverUrl=serverUrl;}},{key:"setWithCredentials",value:function setWithCredentials(withCredentials){this.withCredentials=withCredentials;}/**
  11142. * @function WebMapViewModel.prototype.setCRS
  11143. * @description 设置地图的投影。
  11144. * @param {Number} crs - 地图投影。
  11145. */},{key:"setCrs",value:function setCrs(crs){if(this.map){this.mapOptions.crs=crs;//@ts-ignore
  11146. crs&&this.map.setCRS(_mapboxGlEnhance.default.CRS.get(crs));}}/**
  11147. * @function WebMapViewModel.prototype.setZoom
  11148. * @description 设置地图的缩放级别。
  11149. * @param {Number} zoom - 地图缩放级别。
  11150. */},{key:"setZoom",value:function setZoom(zoom){if(this.map){this.mapOptions.zoom=zoom;(zoom||zoom===0)&&this.map.setZoom(zoom);}}/**
  11151. * @function WebMapViewModel.prototype.setCenter
  11152. * @description 设置地图的中心点。
  11153. * @param {Array} center - 地图中心点。
  11154. */},{key:"setCenter",value:function setCenter(center){if(this.map){this.mapOptions.center=center;center&&center.length>0&&this.map.setCenter(center);}}/**
  11155. * @function WebMapViewModel.prototype.setMaxBounds
  11156. * @description 设置地图的最大范围。
  11157. * @param {Array} maxBounds - 地图最大范围。
  11158. */},{key:"setMaxBounds",value:function setMaxBounds(maxBounds){if(this.map){this.mapOptions.maxBounds=maxBounds;maxBounds&&maxBounds.length>0&&this.map.setMaxBounds(maxBounds);}}/**
  11159. * @function WebMapViewModel.prototype.setMinZoom
  11160. * @description 设置地图的最小级别。
  11161. * @param {Number} minZoom - 地图最小级别。
  11162. */},{key:"setMinZoom",value:function setMinZoom(minZoom){if(this.map){this.mapOptions.minZoom=minZoom;(minZoom||minZoom===0)&&this.map.setMinZoom(minZoom);}}/**
  11163. * @function WebMapViewModel.prototype.setMaxZoom
  11164. * @description 设置地图的最大级别。
  11165. * @param {Number} maxZoom - 地图最大级别。
  11166. */},{key:"setMaxZoom",value:function setMaxZoom(maxZoom){if(this.map){this.mapOptions.maxZoom=maxZoom;(maxZoom||maxZoom===0)&&this.map.setMinZoom(maxZoom);}}/**
  11167. * @function WebMapViewModel.prototype.setRenderWorldCopies
  11168. * @description 设置地图的平铺。
  11169. * @param {Boolean} renderWorldCopies - 地图是否平铺。
  11170. */},{key:"setRenderWorldCopies",value:function setRenderWorldCopies(renderWorldCopies){if(this.map){this.mapOptions.renderWorldCopies=renderWorldCopies;renderWorldCopies&&this.map.setRenderWorldCopies(renderWorldCopies);}}/**
  11171. * @function WebMapViewModel.prototype.setBearing
  11172. * @description 设置地图的方位。
  11173. * @param {Number} bearing - 地图的初始方位。
  11174. */},{key:"setBearing",value:function setBearing(bearing){if(this.map){this.mapOptions.bearing=bearing;(bearing||bearing===0)&&this.map.setBearing(bearing);}}/**
  11175. * @function WebMapViewModel.prototype.setPitch
  11176. * @description 设置地图的俯仰。
  11177. * @param {Number} pitch - 地图的初始俯仰。
  11178. */},{key:"setPitch",value:function setPitch(pitch){if(this.map){this.mapOptions.pitch=pitch;(pitch||pitch===0)&&this.map.setPitch(pitch);}}/**
  11179. * @function WebMapViewModel.prototype.setStyle
  11180. * @description 设置地图的样式。
  11181. * @param {Object} style - 地图的样式。
  11182. */},{key:"setStyle",value:function setStyle(style){if(this.map){this.mapOptions.style=style;style&&this.map.setStyle(style);}}},{key:"_createWebMap",/**
  11183. * @private
  11184. * @function WebMapViewModel.prototype._createWebMap
  11185. * @description 登陆窗口后添加地图图层。
  11186. */value:function _createWebMap(){var _this3=this;if(this.map){this.map.remove();this.center=[];this.zoom=null;this._dataflowService&&this._dataflowService.off('messageSucceeded',this._handleDataflowFeaturesCallback);}if(!this.mapId||!this.serverUrl){this.mapOptions.container=this.target;setTimeout(function(){_this3.map=new _mapboxGlEnhance.default.Map(_this3.mapOptions);_this3.map.on('load',function(){_this3.fire('addlayerssucceeded',{map:_this3.map,mapparams:{},layers:[]});});},0);return;}this._legendList={};this._taskID=new Date();var urlArr=this.serverUrl.split('');if(urlArr[urlArr.length-1]!=='/'){this.serverUrl+='/';}var mapUrl=this.serverUrl+'web/maps/'+this.mapId+'/map';if(this.accessToken||this.accessKey){mapUrl+= true?'token='+this.accessToken:undefined;}var filter='getUrlResource.json?url=';if(this.excludePortalProxyUrl&&this.serverUrl.indexOf(filter)>-1){// 大屏需求,或者有加上代理的
  11187. var urlArray=this.serverUrl.split(filter);if(urlArray.length>1){mapUrl=urlArray[0]+filter+this.serverUrl+'web/maps/'+this.mapId+'/map.json';}}this._getMapInfo(mapUrl,this._taskID);}/**
  11188. * @private
  11189. * @function WebMapViewModel.prototype._createMap
  11190. * @description 创建地图。
  11191. */},{key:"_createMap",value:function _createMap(mapInfo){// 获取字体样式
  11192. var fonts=[];var layers=mapInfo.layers;// 获取 label 图层字体类型
  11193. if(layers&&layers.length>0){layers.forEach(function(layer){layer.labelStyle&&fonts.push(layer.labelStyle.fontFamily);},this);}fonts.push("'supermapol-icons'");var fontFamilys=fonts.join(',');// zoom
  11194. var center;center=mapInfo.center&&[mapInfo.center.x,mapInfo.center.y];// center
  11195. var zoom=mapInfo.level||0;zoom=zoom===0?0:zoom-1;if(!center){center=[0,0];}if(this.baseProjection==='EPSG:3857'){center=this._unproject(center);}center=new _mapboxGlEnhance.default.LngLat(center[0],center[1]);// 初始化 map
  11196. this.map=new _mapboxGlEnhance.default.Map({container:this.target,center:this.center.length?this.center:center,zoom:this.zoom||zoom,style:{version:8,sources:{},// "glyphs": 'http://iclsvr.supermap.io/iserver/services/map-beijing/rest/maps/beijingMap/tileFeature/sdffonts/{fontstack}/{range}.pbf',
  11197. layers:[]},// @ts-ignore -------- crs 为 enhance 新加属性
  11198. crs:this.baseProjection,localIdeographFontFamily:fontFamilys||'',renderWorldCopies:false,preserveDrawingBuffer:this.mapOptions.preserveDrawingBuffer||false});/**
  11199. * @event WebMapViewModel#mapinitialized
  11200. * @description Map 初始化成功。
  11201. * @property {mapboxglTypes.Map} map - MapBoxGL Map 对象。
  11202. */this.fire('mapinitialized',{map:this.map});}/**
  11203. * @private
  11204. * @function WebMapViewModel.prototype._getMapInfo
  11205. * @description 获取地图的 JSON 信息。
  11206. * @param {string} url - 请求地图的 url。
  11207. */},{key:"_getMapInfo",value:function _getMapInfo(url,_taskID){var _this4=this;var mapUrl=url.indexOf('.json')===-1?"".concat(url,".json"):url;SuperMap.FetchRequest.get(mapUrl,null,{withCredentials:this.withCredentials}).then(function(response){return response.json();}).then(function(mapInfo){_this4.baseProjection=mapInfo.projection;// 存储地图的名称以及描述等信息,返回给用户
  11208. _this4.mapParams={title:mapInfo.title,description:mapInfo.description};// 坐标系异常处理
  11209. if(_mapboxGlEnhance.default.CRS.get(_this4.baseProjection)){_this4._createMap(mapInfo);var layers=mapInfo.layers;_this4.map.on('load',function(){if(mapInfo.baseLayer&&mapInfo.baseLayer.layerType==='MAPBOXSTYLE'){// 添加矢量瓦片服务作为底图
  11210. _this4._addMVTBaseMap(mapInfo);}else{_this4._addBaseMap(mapInfo);}if(!layers||layers.length===0){_this4._sendMapToUser(0,0);}else{_this4._addLayers(layers,_taskID);}});}else{throw Error('不支持当前地图的坐标系');}}).catch(function(error){/**
  11211. * @event WebMapViewModel#getmapinfofailed
  11212. * @description 获取地图信息失败。
  11213. * @property {Object} error - 失败原因。
  11214. */_this4.fire('getmapinfofailed',{error:error});});}},{key:"_addMVTBaseMap",value:function _addMVTBaseMap(mapInfo){var baseLayer=mapInfo.baseLayer,url=baseLayer.dataSource.url;// @ts-ignore
  11215. this.map.addStyle(url);}/**
  11216. * @private
  11217. * @function WebMapViewModel.prototype._addBaseMap
  11218. * @description 添加底图。
  11219. * @param {Object} mapInfo - map 信息。
  11220. */},{key:"_addBaseMap",value:function _addBaseMap(mapInfo){this._createBaseLayer(mapInfo);}/**
  11221. * @private
  11222. * @function WebMapViewModel.prototype._createBaseLayer
  11223. * @description 创建底图。
  11224. * @param {Object} mapInfo - map 信息。
  11225. */},{key:"_createBaseLayer",value:function _createBaseLayer(mapInfo){var layerInfo=mapInfo.baseLayer||mapInfo;var layerType=layerInfo.layerType;// 底图和rest地图兼容
  11226. if(layerType.indexOf('TIANDITU_VEC')>-1||layerType.indexOf('TIANDITU_IMG')>-1||layerType.indexOf('TIANDITU_TER')>-1){layerType=layerType.substr(0,12);}var mapUrls={CLOUD:'http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}',CLOUD_BLACK:'http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}',OSM:'http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png',GOOGLE:'http://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i380072576!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0',GOOGLE_CN:'https://mt{0-3}.google.cn/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}',JAPAN_STD:'http://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',JAPAN_PALE:'http://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png',JAPAN_RELIEF:'http://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png',JAPAN_ORT:'http://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg'};var url;switch(layerType){case'TIANDITU_VEC':case'TIANDITU_IMG':case'TIANDITU_TER':this._createTiandituLayer(mapInfo);break;case'BING':this._createBingLayer(layerInfo.name);break;case'WMS':this._createWMSLayer(layerInfo);break;case'WMTS':this._createWMTSLayer(layerInfo);break;case'TILE':case'SUPERMAP_REST':this._createDynamicTiledLayer(layerInfo);break;case'CLOUD':case'CLOUD_BLACK':case'OSM':case'JAPAN_ORT':case'JAPAN_RELIEF':case'JAPAN_PALE':case'JAPAN_STD':case'GOOGLE_CN':case'GOOGLE':url=mapUrls[layerType];this._createXYZLayer(layerInfo,url);break;default:break;}}/**
  11227. * @private
  11228. * @function WebMapViewModel.prototype._createTiandituLayer
  11229. * @description 创建天地图底图。
  11230. * @param {Object} mapInfo - map 信息。
  11231. */},{key:"_createTiandituLayer",value:function _createTiandituLayer(mapInfo){var tiandituUrls=this._getTiandituUrl(mapInfo);var layerType=mapInfo.baseLayer.layerType;var isLabel=Boolean(mapInfo.baseLayer.labelLayerVisible);var labelUrl=tiandituUrls['labelUrl'];var tiandituUrl=tiandituUrls['tiandituUrl'];this._addBaselayer(tiandituUrl,'tianditu-layers-'+layerType);isLabel&&this._addBaselayer(labelUrl,'tianditu-label-layers-'+layerType);}/**
  11232. * @private
  11233. * @function WebMapViewModel.prototype._createWMTSLayer
  11234. * @description 创建 WMTS 底图。
  11235. * @param {Object} layerInfo - 地图信息。
  11236. */},{key:"_createWMTSLayer",value:function _createWMTSLayer(layerInfo){var _this5=this;var wmtsUrl=this._getWMTSUrl(layerInfo);this._filterWMTSIsMatched(layerInfo,function(isMatched,matchMaxZoom){isMatched&&_this5._addBaselayer([wmtsUrl],'wmts-layers'+layerInfo.name,0,matchMaxZoom);});}/**
  11237. * @private
  11238. * @function WebMapViewModel.prototype._filterWMTSIsMatched
  11239. * @description 过滤能够跟mapboxgl匹配的wmts服务。
  11240. * @param {Object} mapInfo - map 信息。
  11241. * @callback matchedCallback
  11242. */},{key:"_filterWMTSIsMatched",value:function _filterWMTSIsMatched(mapInfo,matchedCallback){var _this6=this;var isMatched=false;var matchMaxZoom=22;var url=mapInfo.url;var options={withCredentials:false,withoutFormatSuffix:true};SuperMap.FetchRequest.get(url,null,options).then(function(response){return response.text();}).then(function(capabilitiesText){var converts=convert||window.convert;var tileMatrixSet=JSON.parse(converts.xml2json(capabilitiesText,{compact:true,spaces:4})).Capabilities.Contents.TileMatrixSet;for(var i=0;i<tileMatrixSet.length;i++){if(tileMatrixSet[i]['ows:Identifier']&&tileMatrixSet[i]['ows:Identifier']['_text']===mapInfo.tileMatrixSet){if(DEFAULT_WELLKNOWNSCALESET.includes(tileMatrixSet[i]['WellKnownScaleSet']['_text'])){isMatched=true;}else if(tileMatrixSet[i]['WellKnownScaleSet']&&tileMatrixSet[i]['WellKnownScaleSet']['_text']==='Custom'){var matchedScaleDenominator=[];// 坐标系判断
  11243. var defaultCRSScaleDenominators=// @ts-ignore -------- crs 为 enhance 新加属性
  11244. _this6.map.crs==='EPSG:3857'?MB_SCALEDENOMINATOR_3857:MB_SCALEDENOMINATOR_4326;for(var j=0,len=defaultCRSScaleDenominators.length;j<len;j++){if(!tileMatrixSet[i].TileMatrix[j]){break;}if(defaultCRSScaleDenominators[j]!==tileMatrixSet[i].TileMatrix[j]['ScaleDenominator']['_text']){break;}matchedScaleDenominator.push(defaultCRSScaleDenominators[j]);}matchMaxZoom=matchedScaleDenominator.length-1;if(matchedScaleDenominator.length!==0){isMatched=true;}else{throw Error('不支持传入的 TileMatrixSet');}}else{throw Error('不支持传入的 TileMatrixSet');}}}matchedCallback(isMatched,matchMaxZoom);}).catch(function(error){/**
  11245. * @event WebMapViewModel#getwmtsinfofailed
  11246. * @description 获取 WMTS 图层信息失败。
  11247. * @property {Object} error - 失败原因。
  11248. * @property {mapboxglTypes.Map} map - MapBoxGL Map 对象。
  11249. */_this6.fire('getwmtsinfofailed',{error:error,map:_this6.map});});}/**
  11250. * @private
  11251. * @function WebMapViewModel.prototype._createBingLayer
  11252. * @description 创建 Bing 图层。
  11253. */},{key:"_createBingLayer",value:function _createBingLayer(layerName){var bingUrl='http://dynamic.t0.tiles.ditu.live.com/comp/ch/{quadkey}?it=G,TW,L,LA&mkt=zh-cn&og=109&cstl=w4c&ur=CN&n=z';// @ts-ignore
  11254. this._addBaselayer([bingUrl],'bing-layers-'+layerName);}/**
  11255. * @private
  11256. * @function WebMapViewModel.prototype._createXYZLayer
  11257. * @description 创建 XYZ 底图。
  11258. * @param {String} url - url 地址。
  11259. */},{key:"_createXYZLayer",value:function _createXYZLayer(layerInfo,url){var urlArr=[];if(layerInfo.layerType==='OSM'){var res=url.match(/\w\-\w/g)[0];var start=res[0];var end=res[2];var alphabet='';for(var i=97;i<123;i++){alphabet+=String.fromCharCode(i);}var alphabetArr=alphabet.split('');var startIndex=alphabetArr.indexOf(start);var endIndex=alphabetArr.indexOf(end);var res3=alphabetArr.slice(startIndex,endIndex+1);for(var _i=0;_i<res3.length;_i++){var replaceRes=url.replace(/{\w\-\w}/g,res3[_i]);urlArr.push(replaceRes);}}else if(layerInfo.layerType==='GOOGLE_CN'){var _res=url.match(/\d\-\d/g)[0];var _start=parseInt(_res[0]);var _end=parseInt(_res[2]);for(var _i2=_start;_i2<=_end;_i2++){var _replaceRes=url.replace(/{\d\-\d}/g,_i2.toString());urlArr.push(_replaceRes);}}else{urlArr=[url];}this._addBaselayer(urlArr,'XYZ-layers-'+layerInfo.name);}/**
  11260. * @private
  11261. * @function WebMapViewModel.prototype._createDynamicTiledLayer
  11262. * @description 创建 iserver 底图。
  11263. * @param {Object} layerInfo - 图层信息。
  11264. */},{key:"_createDynamicTiledLayer",value:function _createDynamicTiledLayer(layerInfo){var url=layerInfo.url+'/zxyTileImage.png?z={z}&x={x}&y={y}';// @ts-ignore -------- setCRS 为 enhance 新加属性
  11265. if(this.map.setCRS&&this.baseProjection!=='EPSG:3857'){url=layerInfo.url+'/image.png?viewBounds={viewBounds}&width={width}&height={height}';}this._addBaselayer([url],'tile-layers-'+layerInfo.name);}/**
  11266. * @private
  11267. * @function WebMapViewModel.prototype._createWMSLayer
  11268. * @description 创建 WMS 图层。
  11269. * @param {Object} layerInfo - 图层信息。
  11270. */},{key:"_createWMSLayer",value:function _createWMSLayer(layerInfo){var WMSUrl=this._getWMSUrl(layerInfo);this._addBaselayer([WMSUrl],'WMS-layers-'+layerInfo.name);}/**
  11271. * @private
  11272. * @function WebMapViewModel.prototype._createVectorLayer
  11273. * @description 创建 Vector 图层。
  11274. * @param {Object} layerInfo - map 信息。
  11275. * @param {Array} features - 属性 信息。
  11276. */},{key:"_createVectorLayer",value:function _createVectorLayer(layerInfo,features){var style=layerInfo.style;var type=layerInfo.featureType;var layerID=layerInfo.layerID;var visible=layerInfo.visible;var layerStyle={style:this._transformStyleToMapBoxGl(style,type),layout:{visibility:visible}};var source={type:'geojson',data:{type:'FeatureCollection',features:features}};this._addOverlayToMap(type,source,layerID,layerStyle);// 如果面有边框
  11277. type==='POLYGON'&&style.strokeColor&&this._addStrokeLineForPoly(style,source,layerID+'-strokeLine',visible);}/**
  11278. * @function WebMapViewModel.prototype._getTiandituUrl
  11279. * @private
  11280. * @description 创建天地图url;
  11281. * @param {Object} mapInfo - map 信息。
  11282. */},{key:"_getTiandituUrl",value:function _getTiandituUrl(mapInfo){var re=/t0/gi;var tiandituUrls={tiandituUrl:[],labelUrl:[]};var layerType=mapInfo.baseLayer.layerType.split('_')[1].toLowerCase();var isLabel=Boolean(mapInfo.baseLayer.labelLayerVisible);var url="http://t0.tianditu.com/{layer}_{proj}/wmts?tk=".concat(this.tiandituKey);var labelUrl=url;var layerLabelMap={vec:'cva',ter:'cta',img:'cia'};var tilematrixSet=this.baseProjection==='EPSG:4326'?'c':'w';var options={service:'WMTS',request:'GetTile',style:'default',version:'1.0.0',layer:layerType,tilematrixSet:tilematrixSet,format:'tiles',width:256,height:256};url+=this._getParamString(options,url)+'&tilematrix={z}&tilerow={y}&tilecol={x}';var tiandituUrl=url.replace('{layer}',layerType).replace('{proj}',tilematrixSet);var tiandituUrlArr=[];for(var i=0;i<8;i++){tiandituUrlArr.push(tiandituUrl.replace(re,"t".concat(i)));}tiandituUrls['tiandituUrl']=tiandituUrlArr;// 如果有 label 图层
  11283. if(isLabel){var labelLayer=layerLabelMap[layerType];options.layer=labelLayer;labelUrl+=this._getParamString(options,labelUrl)+'&tilematrix={z}&tilerow={y}&tilecol={x}';labelUrl=labelUrl.replace('{layer}',labelLayer).replace('{proj}',tilematrixSet);var labelUrlArr=[];for(var _i3=0;_i3<8;_i3++){labelUrlArr.push(labelUrl.replace(re,"t".concat(_i3)));}tiandituUrls['labelUrl']=labelUrlArr;}return tiandituUrls;}/**
  11284. * @function WebMapViewModel.prototype._getWMSUrl
  11285. * @private
  11286. * @description 创建 WMS url;
  11287. * @param {Object} mapInfo - map 信息。
  11288. */},{key:"_getWMSUrl",value:function _getWMSUrl(mapInfo){var url=mapInfo.url;url=url.split('?')[0];var strArr=url.split('/');var options={service:'WMS',request:'GetMap',layers:strArr[strArr.length-1],styles:'',format:'image/png',transparent:'true',version:'1.1.1',width:256,height:256,srs:this.baseProjection};var bbox=this.baseProjection==='EPSG:4326'?'{bbox-epsg-4326}':'{bbox-epsg-3857}';url+=this._getParamString(options,url)+"&bbox=".concat(bbox);return url;}/**
  11289. * @private
  11290. * @function WebMapViewModel.prototype._checkUploadToRelationship
  11291. * @description 检查是否上传到关系型
  11292. * @param {String} fileId - 文件的id
  11293. * @returns {Promise<T | never>} 关系型文件一些参数
  11294. */},{key:"_checkUploadToRelationship",value:function _checkUploadToRelationship(fileId){return SuperMap.FetchRequest.get("".concat(this.serverUrl,"web/datas/").concat(fileId,"/datasets.json"),null,{withCredentials:this.withCredentials}).then(function(response){return response.json();}).then(function(result){return result;});}/**
  11295. * @private
  11296. * @function ol.supermap.WebMap.prototype._getDataService
  11297. * @description 获取上传的数据信息
  11298. * @param {String} fileId - 文件id
  11299. * @param {String} datasetName 数据服务的数据集名称
  11300. * @returns {Promise<T | never>} 数据的信息
  11301. */},{key:"_getDataService",value:function _getDataService(fileId,datasetName){return SuperMap.FetchRequest.get("".concat(this.serverUrl,"web/datas/").concat(fileId,".json"),null,{withCredentials:this.withCredentials}).then(function(response){return response.json();}).then(function(result){result.fileId=fileId;result.datasetName=datasetName;return result;});}/**
  11302. * @private
  11303. * @function WebMapViewModel.prototype._getService
  11304. * @description 获取当前数据发布的服务中的某种类型服务
  11305. * @param {Array} services 服务集合
  11306. * @param {String} type 服务类型,RESTDATA, RESTMAP
  11307. * @returns {Object} 服务
  11308. */},{key:"_getService",value:function _getService(services,type){var service=services.filter(function(info){return info&&info.serviceType===type;});return service[0];}},{key:"_getServiceInfoFromLayer",value:function _getServiceInfoFromLayer(layerIndex,len,layer,dataItemServices,datasetName,featureType,info){var _this7=this;var isMapService=info?!info.isMvt:layer.layerType==='HOSTED_TILE',isAdded=false;dataItemServices.forEach(function(service,index){if(isAdded){return;}//有服务了,就不需要循环
  11309. if(service&&isMapService&&service.serviceType==='RESTMAP'){isAdded=true;//地图服务,判断使用mvt还是tile
  11310. _this7._getTileLayerInfo(service.address).then(function(restMaps){restMaps.forEach(function(restMapInfo){var bounds=restMapInfo.bounds;layer.layerType='TILE';layer.orginEpsgCode=_this7.baseProjection;layer.units=restMapInfo.coordUnit&&restMapInfo.coordUnit.toLowerCase();layer.extent=[bounds.left,bounds.bottom,bounds.right,bounds.top];layer.visibleScales=restMapInfo.visibleScales;layer.url=restMapInfo.url;layer.sourceType='TILE';_this7._createBaseLayer(layer);_this7.layerAdded++;_this7._sendMapToUser(_this7.layerAdded,len);});});}// TODO 对接 MVT
  11311. else if(service&&!isMapService&&service.serviceType==='RESTDATA'){if(info&&info.isMvt){_this7._addVectorLayer(info,layer,featureType);_this7.layerAdded++;_this7._sendMapToUser(_this7.layerAdded,len);}else{//数据服务
  11312. isAdded=true;//关系型文件发布的数据服务
  11313. _this7._getDatasources(service.address).then(function(datasourceName){layer.dataSource.dataSourceName=datasourceName+':'+datasetName;layer.dataSource.url="".concat(service.address,"/data");_this7._getFeatureBySQL(layer.dataSource.url,[layer.dataSource.dataSourceName||layer.name],function(result){var features=_this7._parseGeoJsonData2Feature({allDatas:{features:result.result.features.features},fileCode:layer.projection,featureProjection:_this7.baseProjection});_this7._addLayer(layer,features,layerIndex);_this7.layerAdded++;_this7._sendMapToUser(_this7.layerAdded,len);},function(err){_this7.layerAdded++;_this7._sendMapToUser(_this7.layerAdded,len);_this7.fire('getlayerdatasourcefailed',{error:err,layer:layer,map:_this7.map});});});}}},this);if(!isAdded){//循环完成了,也没有找到合适的服务。有可能服务被删除
  11314. this.layerAdded++;this._sendMapToUser(this.layerAdded,len);this.fire('getlayerdatasourcefailed',{error:null,layer:layer,map:this.map});}}/**
  11315. * @private
  11316. * @function WebMapViewModel.prototype._getDatasources
  11317. * @description 获取关系型文件发布的数据服务中数据源的名称
  11318. * @param {String} url - 获取数据源信息的url
  11319. * @returns {Promise<T | never>} 数据源名称
  11320. */},{key:"_getDatasources",value:function _getDatasources(url){return SuperMap.FetchRequest.get("".concat(url,"/data/datasources.json")).then(function(response){return response.json();}).then(function(datasource){var datasourceNames=datasource.datasourceNames;return datasourceNames[0];});}/**
  11321. * @private
  11322. * @function WebMapViewModel.prototype._getTileLayerInfo
  11323. * @description 获取地图服务的信息
  11324. * @param {String} url 地图服务的url(没有地图名字)
  11325. * @returns {Promise<T | never>} 地图服务信息
  11326. */},{key:"_getTileLayerInfo",value:function _getTileLayerInfo(url){var _this8=this;var proxyUrl=this.serverUrl+'apps/viewer/getUrlResource.json?url=';var requestUrl=proxyUrl+encodeURIComponent(url);var epsgCode=this.baseProjection.split('EPSG:')[1];return SuperMap.FetchRequest.get("".concat(requestUrl,"/maps.json"),null,{withCredentials:this.withCredentials}).then(function(response){return response.json();}).then(function(mapInfo){var promises=[];if(mapInfo){mapInfo.forEach(function(info){var promise=SuperMap.FetchRequest.get("".concat(proxyUrl).concat(info.path,".json?prjCoordSys=").concat(JSON.stringify({epsgCode:epsgCode})),null,{withCredentials:_this8.withCredentials}).then(function(response){return response.json();}).then(function(restMapInfo){restMapInfo.url=info.path;return restMapInfo;});promises.push(promise);});}return Promise.all(promises).then(function(allRestMaps){return allRestMaps;});});}/**
  11327. * @private
  11328. * @function WebMapViewModel.prototype._addLayers
  11329. * @description 添加叠加图层。
  11330. * @param {Object} mapInfo - 图层信息。
  11331. */},{key:"_addLayers",value:function _addLayers(layers,_taskID){var _this9=this;// 存储地图上所有的图层对象
  11332. this._layers=layers;var features;this.layerAdded=0;var len=layers.length;if(len>0){layers.forEach(function(layer,index){if(layer.dataSource&&layer.dataSource.serverId||layer.layerType==='MARKER'||layer.layerType==='HOSTED_TILE'){//数据存储到iportal上了
  11333. var dataSource=layer.dataSource,serverId=dataSource?dataSource.serverId:layer.serverId;if(!serverId){_this9._addLayer(layer,null,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);return;}if(layer.layerType==='MARKER'||dataSource&&(!dataSource.accessType||dataSource.accessType==='DIRECT')){//原来二进制文件
  11334. var url="".concat(_this9.serverUrl,"web/datas/").concat(serverId,"/content.json?pageSize=9999999&currentPage=1");if(_this9.accessToken){url="".concat(url,"&").concat(_this9.accessKey,"=").concat(_this9.accessToken);}SuperMap.FetchRequest.get(url,null,{withCredentials:_this9.withCredentials}).then(function(response){return response.json();}).then(function(data){if(_taskID!==_this9._taskID){return;}if(data.succeed===false){//请求失败
  11335. _this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);// -----------------------todo-----------------
  11336. _this9.fire('getlayerdatasourcefailed',{error:data.error,layer:layer,map:_this9.map});return;}if(data&&data.type){if(data.type==='JSON'||data.type==='GEOJSON'){data.content=JSON.parse(data.content.trim());features=_this9._formatGeoJSON(data.content);}else if(data.type==='EXCEL'||data.type==='CSV'){features=_this9._excelData2Feature(data.content);}_this9._addLayer(layer,features,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);}}).catch(function(error){_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:error,layer:layer,map:_this9.map});});}else{//关系型文件
  11337. var isMapService=layer.layerType==='HOSTED_TILE',_serverId=dataSource?dataSource.serverId:layer.serverId;_this9._checkUploadToRelationship(_serverId).then(function(result){if(result&&result.length>0){var datasetName=result[0].name,featureType=result[0].type.toUpperCase();_this9._getDataService(_serverId,datasetName).then(function(data){var dataItemServices=data.dataItemServices;if(dataItemServices.length===0){_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:null,layer:layer,map:_this9.map});return;}if(isMapService){var dataService=dataItemServices.filter(function(info){return info&&info.serviceType==='RESTDATA';})[0];_this9._isMvt(dataService.address,datasetName).then(function(info){_this9._getServiceInfoFromLayer(index,len,layer,dataItemServices,datasetName,featureType,info);}).catch(function(){//判断失败就走之前逻辑,>数据量用tile
  11338. _this9._getServiceInfoFromLayer(index,len,layer,dataItemServices,datasetName,featureType);});}else{_this9._getServiceInfoFromLayer(index,len,layer,dataItemServices,datasetName,featureType);}});}else{_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:null,layer:layer,map:_this9.map});}}).catch(function(error){_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:error,layer:layer,map:_this9.map});});}}else if(layer.layerType==='SUPERMAP_REST'||layer.layerType==='TILE'||layer.layerType==='WMS'||layer.layerType==='WMTS'){_this9._createBaseLayer(layer);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);}else if(layer.dataSource&&layer.dataSource.type==='REST_DATA'){//从restData获取数据
  11339. var _dataSource=layer.dataSource;_this9._getFeatureBySQL(_dataSource.url,[_dataSource.dataSourseName||layer.name],function(result){features=_this9._parseGeoJsonData2Feature({allDatas:{features:result.result.features.features},fileCode:layer.projection,featureProjection:_this9.baseProjection});_this9._addLayer(layer,features,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);},function(err){_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:err,layer:layer,map:_this9.map});});}else if(layer.dataSource&&layer.dataSource.type==='REST_MAP'&&layer.dataSource.url){_this9._queryFeatureBySQL(layer.dataSource.url,layer.dataSource.layerName,function(result){var recordsets=result&&result.result.recordsets;var recordset=recordsets&&recordsets[0];var attributes=recordset.fields;if(recordset&&attributes){var fileterAttrs=[];for(var i in attributes){var value=attributes[i];if(value.indexOf('Sm')!==0||value==='SmID'){fileterAttrs.push(value);}}_this9._getFeatures(fileterAttrs,layer,function(features){_this9._addLayer(layer,features,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);},function(err){_this9.layerAdded++;_this9.fire('getlayerdatasourcefailed',{error:err,layer:layer,map:_this9.map});});}},function(err){_this9.fire('getlayerdatasourcefailed',{error:err,layer:layer,map:_this9.map});},'smid=1');}else if(layer.layerType==='DATAFLOW_POINT_TRACK'||layer.layerType==='DATAFLOW_HEAT'){_this9._getDataflowInfo(layer,function(){_this9._addLayer(layer,null,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);},function(e){_this9.layerAdded++;// TODO fire faild
  11340. });}},this);}}/**
  11341. * @private
  11342. * @function WebMapViewModel.prototype._getFeatures
  11343. */},{key:"_getFeatures",value:function _getFeatures(fields,layerInfo,resolve,reject){var _this10=this;var source=layerInfo.dataSource;// 示例数据
  11344. var fileCode=layerInfo.projection;this._queryFeatureBySQL(source.url,source.layerName,function(result){var recordsets=result.result.recordsets[0];var features=recordsets.features.features;var featuresObj=_this10._parseGeoJsonData2Feature({allDatas:{features:features},fileCode:fileCode,featureProjection:_this10.baseProjection});resolve(featuresObj);},function(err){reject(err);},null,fields);}/**
  11345. * @private
  11346. * @function WebMapViewModel.prototype._addLayer
  11347. * @description 将单个图层添加到地图上。
  11348. * @param layerInfo 某个图层的图层信息
  11349. * @param {Array.<GeoJSON>} features - feature。
  11350. */},{key:"_addLayer",value:function _addLayer(layerInfo,features,index){var layerType=layerInfo.layerType;layerInfo.layerID=layerType+'-'+layerInfo.name+'-'+index;layerInfo.visible=layerInfo.visible?'visible':'none';// mbgl 目前不能处理 geojson 复杂面情况
  11351. // mbgl isssue https://github.com/mapbox/mapbox-gl-js/issues/7023
  11352. if(features&&features[0]&&features[0].geometry.type==='Polygon'){features=(0,_geometryUtil.handleMultyPolygon)(features);}if(layerInfo.style&&layerInfo.filterCondition){// 将 feature 根据过滤条件进行过滤, 分段专题图和单值专题图因为要计算 styleGroup 所以暂时不过滤
  11353. if(layerType!=='RANGE'&&layerType!=='UNIQUE'&&layerType!=='RANK_SYMBOL'){features=this._getFiterFeatures(layerInfo.filterCondition,features);}}if(features&&layerInfo.projection!=='EPSG:4326'){this._transformFeatures(features);}if(layerType==='VECTOR'){if(layerInfo.featureType==='POINT'){if(layerInfo.style.type==='SYMBOL_POINT'){this._createSymbolLayer(layerInfo,features);}else{this._createGraphicLayer(layerInfo,features);}}else{// 线和面
  11354. this._createVectorLayer(layerInfo,features);}}else if(layerType==='UNIQUE'){this._createUniqueLayer(layerInfo,features);}else if(layerType==='RANGE'){this._createRangeLayer(layerInfo,features);}else if(layerType==='HEAT'){this._createHeatLayer(layerInfo,features);}else if(layerType==='MARKER'){this._createMarkerLayer(layerInfo,features);}else if(layerInfo.layerType==='MIGRATION'){this._createMigrationLayer(layerInfo,features);}else if(layerInfo.layerType==='RANK_SYMBOL'){this._createRankSymbolLayer(layerInfo,features);}else if(layerInfo.layerType==='DATAFLOW_POINT_TRACK'||layerInfo.layerType==='DATAFLOW_HEAT'){this._createDataflowLayer(layerInfo);}if(layerInfo.labelStyle&&layerInfo.labelStyle.labelField&&layerInfo.layerType!=='DATAFLOW_POINT_TRACK'){// 存在标签专题图
  11355. this._addLabelLayer(layerInfo,features);}}},{key:"_createDataflowLayer",value:function _createDataflowLayer(layerInfo){var dataflowService=new _mapboxGlEnhance.default.supermap.DataFlowService(layerInfo.wsUrl).initSubscribe();this._handleDataflowFeaturesCallback=this._handleDataflowFeatures.bind(this,layerInfo);dataflowService.on('messageSucceeded',this._handleDataflowFeaturesCallback);this._dataflowService=dataflowService;}},{key:"_handleDataflowFeatures",value:function _handleDataflowFeatures(layerInfo,e){var features=JSON.parse(e.data);// this._transformFeatures([features]); // TODO 坐标系
  11356. this.fire('dataflowfeatureupdated',{features:features,identifyField:layerInfo.identifyField,layerID:layerInfo.layerID});if(layerInfo.filterCondition){//过滤条件
  11357. var condition=this._replaceFilterCharacter(layerInfo.filterCondition);var sql='select * from json where ('+condition+')';var filterResult=window['jsonsql'].query(sql,{attributes:features.properties});if(filterResult&&filterResult.length>0){this._addDataflowLayer(layerInfo,features);}}else{this._addDataflowLayer(layerInfo,features);}}},{key:"_getDataFlowRotateStyle",value:function _getDataFlowRotateStyle(features,directionField,identifyField){var iconRotateExpression=['match',['get',identifyField]];features.forEach(function(feature){var value;if(directionField!==undefined&&directionField!=='未设置'&&directionField!=='None'){value=feature.properties[directionField];}else{value=0;}if(value>360||value<0){return null;}// @ts-ignore
  11358. iconRotateExpression.push(feature.properties[identifyField],parseInt(value));});// @ts-ignore
  11359. iconRotateExpression.push(0);return iconRotateExpression;}},{key:"_addDataflowLayer",value:function _addDataflowLayer(layerInfo,feature){var layerID=layerInfo.layerID;if(layerInfo.layerType==='DATAFLOW_HEAT'){if(!this.map.getSource(layerID)){this._createHeatLayer(layerInfo,[feature]);}else{this._updateDataFlowFeature(layerID,feature,layerInfo);}}else{var layerStyle=layerInfo.pointStyle;layerInfo.style=layerStyle;if(!this.map.getSource(layerID)){var iconRotateExpression=this._getDataFlowRotateStyle([feature],layerInfo.directionField,layerInfo.identifyField);if(['BASIC_POINT','SVG_POINT','IMAGE_POINT'].includes(layerStyle.type)){this._createGraphicLayer(layerInfo,[feature],null,iconRotateExpression);}else{this._createSymbolLayer(layerInfo,[feature],null,iconRotateExpression);}}else{this._updateDataFlowFeature(layerID,feature,layerInfo,'point');}if(layerInfo.labelStyle&&layerInfo.visible){if(!this.map.getSource(layerID+'label')){this._addLabelLayer(layerInfo,[feature]);}else{this._updateDataFlowFeature(layerID+'label',feature,layerInfo);}}if(layerInfo.lineStyle&&layerInfo.visible){if(!this.map.getSource(layerID+'-line')){var geometry=feature.geometry.coordinates;var lineFeature={type:'Feature',properties:feature.properties,geometry:{type:'LineString',coordinates:[geometry]}};this._createVectorLayer({style:layerInfo.lineStyle,featureType:'LINE',visible:'visible',layerID:layerID+'-line'},[lineFeature]);}else{this._updateDataFlowFeature(layerID+'-line',feature,layerInfo,'line');}}}}},{key:"_updateDataFlowFeature",value:function _updateDataFlowFeature(sourceID,newFeature,layerInfo,type){var identifyField=layerInfo.identifyField,maxPointCount=layerInfo.maxPointCount,directionField=layerInfo.directionField;// @ts-ignore
  11360. var features=(0,_lodash2.default)(this.map.getSource(sourceID)._data.features);var has=false;features.map(function(item,index){if(item.properties[identifyField]===newFeature.properties[identifyField]){has=true;if(type==='line'){var coordinates=item.geometry.coordinates;coordinates.push(newFeature.geometry.coordinates);if(maxPointCount&&coordinates.length>maxPointCount){coordinates.splice(0,coordinates.length-maxPointCount);}features[index].geometry.coordinates=coordinates;}else{features[index]=newFeature;}}});if(!has){if(type==='line'){features.push({type:'Feature',properties:newFeature.properties,geometry:{type:'LineString',coordinates:[newFeature.geometry.coordinates]}});}else{features.push(newFeature);}}// @ts-ignore
  11361. this.map.getSource(sourceID).setData({type:'FeatureCollection',features:features});if(type==='point'){var _type=layerInfo.pointStyle.type;var iconRotateExpression=this._getDataFlowRotateStyle(features,directionField,identifyField);if(['SVG_POINT','IMAGE_POINT'].includes(_type)){this.map.setLayoutProperty(sourceID,'icon-rotate',iconRotateExpression);}else if(_type==='SYMBOL_POINT'){this.map.setLayoutProperty(sourceID,'text-rotate',iconRotateExpression);}}}},{key:"_getDataflowInfo",value:function _getDataflowInfo(layerInfo,success,faild){var url=layerInfo.url,token;var requestUrl="".concat(url,".json");if(layerInfo.credential&&layerInfo.credential.token){token=layerInfo.credential.token;requestUrl+="?token=".concat(token);}SuperMap.FetchRequest.get(requestUrl).then(function(response){return response.json();}).then(function(result){if(result&&result.featureMetaData){layerInfo.featureType=result.featureMetaData.featureType.toUpperCase();layerInfo.dataSource={dataTypes:{}};if(result.featureMetaData.fieldInfos&&result.featureMetaData.fieldInfos.length>0){result.featureMetaData.fieldInfos.forEach(function(data){var name=data.name.trim();if(data.type==='TEXT'){layerInfo.dataSource.dataTypes[name]='STRING';}else if(['DOUBLE','INT','FLOAT','LONG','SHORT'].includes(data.type)){layerInfo.dataSource.dataTypes[name]='NUMBER';}else{layerInfo.dataSource.dataTypes[name]='UNKNOWN';}});}layerInfo.wsUrl=result.urls[0].url;layerInfo.name=result.urls[0].url.split('iserver/services/')[1].split('/dataflow')[0];success();}else{//失败也要到成功会调函数中,否则不会继续执行
  11362. faild();}}).catch(function(){faild();});}},{key:"_createMigrationLayer",value:function _createMigrationLayer(layerInfo,features){window['echarts']=_echarts.default;var properties=this._getFeatureProperties(features);var lineData=this._createLinesData(layerInfo,properties);var pointData=this._createPointsData(lineData,layerInfo,properties);var options=this._createOptions(layerInfo,lineData,pointData);var echartslayer=new _EchartsLayer.default(this.map);echartslayer.chart.setOption(options);this.echartslayer.push(echartslayer);}},{key:"_createOptions",value:function _createOptions(layerInfo,lineData,pointData){var series;var lineSeries=this._createLineSeries(layerInfo,lineData);if(pointData&&pointData.length){var pointSeries=this._createPointSeries(layerInfo,pointData);series=lineSeries.concat(pointSeries);}else{series=lineSeries.slice();}var options={GLMap:{roam:true},// geo: {
  11363. // map: 'GLMap',
  11364. // label: {
  11365. // emphasis: {
  11366. // show: false
  11367. // }
  11368. // },
  11369. // roam: true,
  11370. // itemStyle: {
  11371. // normal: {
  11372. // areaColor: '#323c48',
  11373. // borderColor: '#404a59'
  11374. // },
  11375. // emphasis: {
  11376. // areaColor: '#2a333d'
  11377. // }
  11378. // }
  11379. // },
  11380. series:series};return options;}},{key:"_createPointSeries",value:function _createPointSeries(layerInfo,pointData){var lineSetting=layerInfo.lineSetting;var animationSetting=layerInfo.animationSetting;var labelSetting=layerInfo.labelSetting;var pointSeries=[{name:'point-series',coordinateSystem:'GLMap',zlevel:2,label:{normal:{show:labelSetting.show,position:'right',formatter:'{b}',color:labelSetting.color,fontFamily:labelSetting.fontFamily}},itemStyle:{normal:{color:lineSetting.color||labelSetting.color}},data:pointData}];if(animationSetting.show){// 开启动画
  11381. // @ts-ignore
  11382. pointSeries[0].type='effectScatter';// @ts-ignore
  11383. pointSeries[0].rippleEffect={brushType:'stroke'};}else{// 关闭动画
  11384. // @ts-ignore
  11385. pointSeries[0].type='scatter';}return pointSeries;}},{key:"_createLineSeries",value:function _createLineSeries(layerInfo,lineData){var lineSetting=layerInfo.lineSetting;var animationSetting=layerInfo.animationSetting;var linesSeries=[// 轨迹线样式
  11386. {name:'line-series',coordinateSystem:'GLMap',type:'lines',zlevel:1,effect:{show:animationSetting.show,constantSpeed:animationSetting.constantSpeed,trailLength:0,symbol:animationSetting.symbol,symbolSize:animationSetting.symbolSize},lineStyle:{normal:{color:lineSetting.color,type:lineSetting.type,width:lineSetting.width,opacity:lineSetting.opacity,curveness:lineSetting.curveness}},data:lineData}];if(lineData.length>=MAX_MIGRATION_ANIMATION_COUNT){// @ts-ignore
  11387. linesSeries[0].large=true;// @ts-ignore
  11388. linesSeries[0].largeThreshold=100;// @ts-ignore
  11389. linesSeries[0].blendMode='lighter';}return linesSeries;}},{key:"_createLinesData",value:function _createLinesData(layerInfo,properties){var data=[];if(properties&&properties.length){// 重新获取数据
  11390. var from=layerInfo.from,to=layerInfo.to,fromCoord,toCoord;if(from.type==='XY_FIELD'&&from['xField']&&from['yField']&&to['xField']&&to['yField']){properties.forEach(function(property){var fromX=property[from['xField']],fromY=property[from['yField']],toX=property[to['xField']],toY=property[to['yField']];if(!fromX||!fromY||!toX||!toY){return;}fromCoord=[property[from['xField']],property[from['yField']]];toCoord=[property[to['xField']],property[to['yField']]];data.push({coords:[fromCoord,toCoord]});});}else if(from.type==='PLACE_FIELD'&&from['field']&&to['field']){var centerDatas=_ProvinceCenter.default.concat(_MunicipalCenter.default);properties.forEach(function(property){var fromField=property[from['field']],toField=property[to['field']];fromCoord=centerDatas.find(function(item){return _mapboxGlEnhance.default.supermap.Util.isMatchAdministrativeName(item.name,fromField);});toCoord=centerDatas.find(function(item){return _mapboxGlEnhance.default.supermap.Util.isMatchAdministrativeName(item.name,toField);});if(!fromCoord||!toCoord){return;}data.push({coords:[fromCoord.coord,toCoord.coord]});});}}return data;}},{key:"_createPointsData",value:function _createPointsData(lineData,layerInfo,properties){var data=[],labelSetting=layerInfo.labelSetting;// 标签隐藏则直接返回
  11391. if(!labelSetting.show||!lineData.length){return data;}var fromData=[],toData=[];lineData.forEach(function(item,idx){var coords=item.coords,fromCoord=coords[0],toCoord=coords[1],fromProperty=properties[idx][labelSetting.from],toProperty=properties[idx][labelSetting.to];// 起始字段去重
  11392. var f=fromData.find(function(d){return d.value[0]===fromCoord[0]&&d.value[1]===fromCoord[1];});!f&&fromData.push({name:fromProperty,value:fromCoord});// 终点字段去重
  11393. var t=toData.find(function(d){return d.value[0]===toCoord[0]&&d.value[1]===toCoord[1];});!t&&toData.push({name:toProperty,value:toCoord});});data=fromData.concat(toData);return data;}},{key:"_createRankSymbolLayer",value:function _createRankSymbolLayer(layerInfo,features){var fieldName=layerInfo.themeSetting.themeField;var style=layerInfo.style;var featureType=layerInfo.featureType;var styleSource=this._createRankStyleSource(layerInfo,features,layerInfo.featureType);var styleGroups=styleSource.styleGroups;features=this._getFiterFeatures(layerInfo.filterCondition,features);// 获取 expression
  11394. var expression=['match',['get','index']];features.forEach(function(row){var tartget=parseFloat(row.properties[fieldName]);if(styleGroups){for(var i=0;i<styleGroups.length;i++){if(styleGroups[i].start<=tartget&&tartget<styleGroups[i].end){var radius=style.type==='SYMBOL_POINT'||style.type==='IMAGE_POINT'?style.type==='SYMBOL_POINT'?styleGroups[i].radius*2:Number.parseFloat((styleGroups[i].radius/style.imageInfo.size.h).toFixed(2))*2:styleGroups[i].radius;expression.push(row.properties['index'],radius);}}}// @ts-ignore
  11395. !tartget&&expression.push(row.properties['index'],1);},this);// @ts-ignore
  11396. expression.push(1);if(style.type==='SYMBOL_POINT'){this._createSymbolLayer(layerInfo,features,expression);}else if(style.type==='IMAGE_POINT'){this._createGraphicLayer(layerInfo,features,expression);}else{var source={type:'geojson',data:{type:'FeatureCollection',features:features}};// 获取样式
  11397. var layerStyle={layout:{visibility:layerInfo.visible}};layerStyle.style=this._transformStyleToMapBoxGl(style,featureType,expression,'circle-radius');var layerID=layerInfo.layerID;this._addOverlayToMap(featureType,source,layerID,layerStyle);}}},{key:"_createRankStyleSource",value:function _createRankStyleSource(parameters,features,featureType){var themeSetting=parameters.themeSetting,themeField=themeSetting.themeField;var styleGroups=this._getRankStyleGroup(themeField,features,parameters,featureType);// @ts-ignore
  11398. return styleGroups?{parameters:parameters,styleGroups:styleGroups}:false;}},{key:"_getRankStyleGroup",value:function _getRankStyleGroup(themeField,features,parameters,featureType){// 找出所有的单值
  11399. var values=[],segements=[],style=parameters.style,themeSetting=parameters.themeSetting,segmentMethod=themeSetting.segmentMethod,segmentCount=themeSetting.segmentCount,customSettings=themeSetting.customSettings,minR=parameters.themeSetting.minRadius,maxR=parameters.themeSetting.maxRadius;features.forEach(function(feature){var properties=feature.properties,value=properties[themeField];// 过滤掉空值和非数值
  11400. if(value==null||!_mapboxGlEnhance.default.supermap.Util.isNumber(value)){return;}values.push(Number(value));});try{segements=SuperMap.ArrayStatistic.getArraySegments(values,segmentMethod,segmentCount);}catch(error){console.error(error);}// 处理自定义 分段
  11401. for(var i=0;i<segmentCount;i++){if(i in customSettings){var startValue=customSettings[i]['segment']['start'],endValue=customSettings[i]['segment']['end'];startValue!=null&&(segements[i]=startValue);endValue!=null&&(segements[i+1]=endValue);}}//生成styleGroup
  11402. var styleGroup=[];if(segements&&segements.length){var len=segements.length,incrementR=(maxR-minR)/(len-1),// 半径增量
  11403. start,end,radius=Number(((maxR+minR)/2).toFixed(2));for(var _i4=0;_i4<len-1;_i4++){start=Number(segements[_i4].toFixed(2));end=Number(segements[_i4+1].toFixed(2));// 这里特殊处理以下分段值相同的情况(即所有字段值相同)
  11404. radius=start===end?radius:minR+Math.round(incrementR*_i4);// 最后一个分段时将end+0.01,避免取不到最大值
  11405. end=_i4===len-2?end+0.01:end;// 处理自定义 半径
  11406. radius=customSettings[_i4]&&customSettings[_i4].radius?customSettings[_i4].radius:radius;style.radius=radius;styleGroup.push({radius:radius,start:start,end:end});}return styleGroup;}else{return false;}}/**
  11407. * @private
  11408. * @function WebMapViewModel.prototype._addLabelLayer
  11409. * @description 添加标签图层。
  11410. * @param layerInfo 某个图层的图层信息。
  11411. * @param {Array.<GeoJSON>} features - feature。
  11412. */},{key:"_addLabelLayer",value:function _addLabelLayer(layerInfo,features){var labelStyle=layerInfo.labelStyle;this.map.addLayer({id:layerInfo.layerID+'label',type:'symbol',source:{type:'geojson',data:{type:'FeatureCollection',features:features}},paint:{'text-color':labelStyle.fill,'text-halo-color':'rgba(255,255,255,0.8)','text-halo-width':parseFloat(labelStyle.fontSize)||12},layout:{'text-field':"{".concat(labelStyle.labelField,"}"),'text-size':parseFloat(labelStyle.fontSize)||12,'text-offset':labelStyle.offsetX?[labelStyle.offsetX/10||0,labelStyle.offsetY/10||0]:[0,-2.5],'text-font':['DIN Offc Pro Italic','Arial Unicode MS Regular'],visibility:layerInfo.visible}});}/**
  11413. * @private
  11414. * @function WebMapViewModel.prototype._createSymbolLayer
  11415. * @description 添加 symbol 图层。
  11416. * @param layerInfo 某个图层的图层信息。
  11417. * @param {Array.<GeoJSON>} features - feature。
  11418. */},{key:"_createSymbolLayer",value:function _createSymbolLayer(layerInfo,features,textSize,textRotateExpresion){// 用来请求symbol_point字体文件
  11419. var target=document.getElementById("".concat(this.target));target.classList.add('supermapol-icons-map');var style=layerInfo.style;var unicode=layerInfo.style.unicode;var text=String.fromCharCode(parseInt(unicode.replace(/^&#x/,''),16));var layerID=layerInfo.layerID;this.map.addSource(layerID,{type:'geojson',data:{type:'FeatureCollection',features:[]}});this.map.addLayer({id:layerID,type:'symbol',source:layerID,paint:{'text-color':style.fillColor},layout:{'text-field':text,'text-size':textSize||style.fontSize&&parseFloat(style.fontSize)||12,'text-font':['DIN Offc Pro Italic','Arial Unicode MS Regular'],'text-rotate':textRotateExpresion||0,visibility:layerInfo.visible}});// @ts-ignore
  11420. this.map.getSource(layerID).setData({type:'FeatureCollection',features:features});}/**
  11421. * @private
  11422. * @function WebMapViewModel.prototype._createGraphicLayer
  11423. * @description 创建 Graphic 图层。
  11424. * @param {Object} layerInfo - map 信息。
  11425. * @param {Array} features - 属性 信息。
  11426. */},{key:"_createGraphicLayer",value:function _createGraphicLayer(layerInfo,features,iconSizeExpression,iconRotateExpression){var _this11=this;var style=layerInfo.style;var layerID=layerInfo.layerID;var source={type:'geojson',data:{type:'FeatureCollection',features:features}};if(style.type==='IMAGE_POINT'){var imageInfo=style.imageInfo;this.map.loadImage(imageInfo.url,function(error,image){if(error){console.log(error);}var iconSize=Number.parseFloat((style.radius/image.height).toFixed(2))*2;_this11.map.addImage('imageIcon',image);_this11.map.addLayer({id:layerID,type:'symbol',source:source,layout:{'icon-image':'imageIcon','icon-size':iconSizeExpression||iconSize,visibility:layerInfo.visible,'icon-rotate':iconRotateExpression||0}});});}else if(style.type==='SVG_POINT'){var svgUrl=style.url;if(!this._svgDiv){this._svgDiv=document.createElement('div');document.body.appendChild(this._svgDiv);}this._getCanvasFromSVG(svgUrl,this._svgDiv,function(canvas){var imgUrl=canvas.toDataURL('img/png');imgUrl&&_this11.map.loadImage(imgUrl,function(error,image){if(error){console.log(error);}var iconSize=Number.parseFloat((style.radius/canvas.width).toFixed(2));_this11.map.addImage('imageIcon',image);_this11.map.addLayer({id:layerID,type:'symbol',source:source,layout:{'icon-image':'imageIcon','icon-size':iconSizeExpression||iconSize,visibility:layerInfo.visible,'icon-rotate':iconRotateExpression||0}});});});}else{var layerStyle={style:this._transformStyleToMapBoxGl(style,layerInfo.featureType),layout:{visibility:layerInfo.visible}};this._addOverlayToMap('POINT',source,layerID,layerStyle);}}/**
  11427. * @private
  11428. * @function WebMapViewModel.prototype._createUniqueLayer
  11429. * @description 创建单值图层。
  11430. * @param layerInfo 某个图层的图层信息
  11431. * @param features 图层上的 feature
  11432. */},{key:"_createUniqueLayer",value:function _createUniqueLayer(layerInfo,features){var styleGroup=this._getUniqueStyleGroup(layerInfo,features);features=this._getFiterFeatures(layerInfo.filterCondition,features);var style=layerInfo.style;var themeField=layerInfo.themeSetting.themeField;Object.keys(features[0].properties).forEach(function(key){key.toLocaleUpperCase()===themeField.toLocaleUpperCase()&&(themeField=key);});var type=layerInfo.featureType;var expression=['match',['get','index']];var layerID=layerInfo.layerID;features.forEach(function(row){styleGroup.forEach(function(item){if(item.value===row.properties[themeField]){expression.push(row.properties['index'],item.color);}});});expression.push('#ffffff');// 图例相关
  11433. this._initLegendConfigInfo(layerInfo,styleGroup);var visible=layerInfo.visible;var layerStyle={style:this._transformStyleToMapBoxGl(style,type,expression),layout:{visibility:visible}};var source={type:'geojson',data:{type:'FeatureCollection',features:features}};this._addOverlayToMap(type,source,layerID,layerStyle);type==='POLYGON'&&style.strokeColor&&this._addStrokeLineForPoly(style,source,layerID+'-strokeLine',visible);}/**
  11434. * @private
  11435. * @function WebMapViewModel.prototype._getUniqueStyleGroup
  11436. * @description 获取单值的目标字段与颜色的对应数组。
  11437. * @param layerInfo 某个图层的图层信息
  11438. * @param features 图层上的 feature
  11439. */},{key:"_getUniqueStyleGroup",value:function _getUniqueStyleGroup(parameters,features){// 找出所有的单值
  11440. var featureType=parameters.featureType;var style=parameters.style;var themeSetting=parameters.themeSetting;var fieldName=themeSetting.themeField;var colors=themeSetting.colors;Object.keys(features[0].properties).forEach(function(key){key.toLocaleUpperCase()===fieldName.toLocaleUpperCase()&&(fieldName=key);});var names=[];var customSettings=themeSetting.customSettings;for(var i in features){var properties=features[i].properties;var name=properties[fieldName];var isSaved=false;for(var j in names){if(names[j]===name){isSaved=true;break;}}if(!isSaved){names.push(name);}}// 获取一定量的颜色
  11441. var curentColors=colors;curentColors=SuperMap.ColorsPickerUtil.getGradientColors(curentColors,names.length);// 生成styleGroup
  11442. var styleGroup=[];names.forEach(function(name,index){var color=curentColors[index];if(name in customSettings){color=customSettings[name];}if(featureType==='LINE'){style.strokeColor=color;}else{style.fillColor=color;}styleGroup.push({color:color,value:name});},this);return styleGroup;}/**
  11443. * @private
  11444. * @function WebMapViewModel.prototype._getWMTSUrl
  11445. * @description 根据传入的配置信息拼接wmts url。
  11446. * @param options 配置对象
  11447. */},{key:"_getWMTSUrl",value:function _getWMTSUrl(options){var obj={service:'WMTS',request:'GetTile',version:'1.0.0',style:'default',layer:options.layer,tilematrixSet:options.tileMatrixSet,format:'image/png'};var url=options.url;url+=this._getParamString(obj,url)+'&tilematrix={z}&tilerow={y}&tilecol={x}';return url;}/**
  11448. * @private
  11449. * @function WebMapViewModel.prototype._createMarkerLayer
  11450. * @description 添加标记图层。
  11451. * @param {Array.<GeoJSON>} features - feature。
  11452. */},{key:"_createMarkerLayer",value:function _createMarkerLayer(layerInfo,features){var _this12=this;features&&features.forEach(function(feature){var geomType=feature.geometry.type.toUpperCase();var defaultStyle=feature.dv_v5_markerStyle;if(geomType==='POINT'&&defaultStyle.text){// 说明是文字的feature类型
  11453. geomType='TEXT';}var featureInfo=_this12._setFeatureInfo(feature);feature.properties['useStyle']=defaultStyle;feature.properties['featureInfo']=featureInfo;if(geomType==='POINT'&&defaultStyle.src&&defaultStyle.src.indexOf('http://')===-1&&defaultStyle.src.indexOf('https://')===-1){// 说明地址不完整
  11454. defaultStyle.src=_this12.serverUrl+defaultStyle.src;}var source={type:'geojson',data:feature};var index=feature.properties.index;var layerID=geomType+'-'+index;// image-marker
  11455. geomType==='POINT'&&defaultStyle.src&&defaultStyle.src.indexOf('svg')<=-1&&_this12.map.loadImage(defaultStyle.src,function(error,image){if(error){console.log(error);}_this12.map.addImage(index+'',image);_this12.map.addLayer({id:layerID,type:'symbol',source:source,layout:{'icon-image':index+'','icon-size':defaultStyle.scale,visibility:layerInfo.visible}});});// svg-marker
  11456. if(geomType==='POINT'&&defaultStyle.src&&defaultStyle.src.indexOf('svg')>-1){if(!_this12._svgDiv){_this12._svgDiv=document.createElement('div');document.body.appendChild(_this12._svgDiv);}_this12._getCanvasFromSVG(defaultStyle.src,_this12._svgDiv,function(canvas){var imgUrl=canvas.toDataURL('img/png');imgUrl&&_this12.map.loadImage(imgUrl,function(error,image){if(error){console.log(error);}_this12.map.addImage(index+'',image);_this12.map.addLayer({id:layerID,type:'symbol',source:source,layout:{'icon-image':index+'','icon-size':defaultStyle.scale,visibility:layerInfo.visible}});});});}// point-line-polygon-marker
  11457. if(!defaultStyle.src){var layeStyle={layout:{}};if(geomType==='LINESTRING'&&defaultStyle.lineCap){geomType='LINE';layeStyle.layout={'line-cap':defaultStyle.lineCap};}var visible=layerInfo.visible;layeStyle.layout.visibility=visible;// get style
  11458. layeStyle.style=_this12._transformStyleToMapBoxGl(defaultStyle,geomType);_this12._addOverlayToMap(geomType,source,layerID,layeStyle);// 若面有边框
  11459. geomType==='POLYGON'&&defaultStyle.strokeColor&&_this12._addStrokeLineForPoly(defaultStyle,source,layerID+'-strokeLine',visible);}},this);}/**
  11460. * @private
  11461. * @function WebMapViewModel.prototype._setFeatureInfo
  11462. * @description 设置 feature 信息。
  11463. * @param {Array.<GeoJSON>} features - feature。
  11464. */},{key:"_setFeatureInfo",value:function _setFeatureInfo(feature){var featureInfo;var info=feature.dv_v5_markerInfo;if(info&&info.dataViz_title){// 有featureInfo信息就不需要再添加
  11465. featureInfo=info;}else{// featureInfo = this.getDefaultAttribute();
  11466. return info;}var properties=feature.properties;for(var key in featureInfo){if(properties[key]){featureInfo[key]=properties[key];delete properties[key];}}return featureInfo;}/**
  11467. * @private
  11468. * @function WebMapViewModel.prototype._createHeatLayer
  11469. * @description 添加热力图。
  11470. * @param {Array.<GeoJSON>} features - feature。
  11471. */},{key:"_createHeatLayer",value:function _createHeatLayer(layerInfo,features){var style=layerInfo.themeSetting;var layerOption={gradient:style.colors.slice(),radius:parseInt(style.radius)};// 自定义颜色
  11472. var customSettings=style.customSettings;for(var i in customSettings){layerOption.gradient[i]=customSettings[i];}// 权重字段恢复
  11473. if(style.weight){this._changeWeight(features,style.weight);}var color=['interpolate',['linear'],['heatmap-density']];var length=layerOption.gradient.length;var step=parseFloat((1/length).toFixed(2));layerOption.gradient.forEach(function(item,index){color.push(index*step);if(index===0){item=_mapboxGlEnhance.default.supermap.Util.hexToRgba(item,0);}color.push(item);});// 图例相关
  11474. this._initLegendConfigInfo(layerInfo,layerOption.gradient);var paint={'heatmap-color':color,'heatmap-radius':style.radius+15,'heatmap-intensity':{base:1,stops:[[0,0.8],[22,1]]}};if(features[0].weight&&features.length>=4){var weight=[];features.forEach(function(item){weight.push(item.weight);});var max=SuperMap.ArrayStatistic.getMax(weight);var min=SuperMap.ArrayStatistic.getMin(weight);paint['heatmap-weight']=['interpolate',['linear'],['get','weight'],min,0,max,1];}this.map.addLayer({id:layerInfo.layerID,type:'heatmap',source:{type:'geojson',data:{type:'FeatureCollection',features:features}},paint:paint});}/**
  11475. * @private
  11476. * @function WebMapViewModel.prototype._changeWeight
  11477. * @description 改变当前权重字段
  11478. * @param {Array.<GeoJSON>} features - feature。
  11479. * @param {String} weightFeild - 权重字段
  11480. */},{key:"_changeWeight",value:function _changeWeight(features,weightFeild){this._fieldMaxValue={};this._getMaxValue(features,weightFeild);var maxValue=this._fieldMaxValue[weightFeild];features.forEach(function(feature){var attributes=feature.properties;var value=attributes[weightFeild];feature['weight']=value/maxValue;});}/**
  11481. * @private
  11482. * @function WebMapViewModel.prototype._getMaxValue
  11483. * @description 获取当前字段对应的最大值,用于计算权重。
  11484. * @param {Array.<GeoJSON>} features - feature。
  11485. * @param {String} weightFeild - 权重字段
  11486. */},{key:"_getMaxValue",value:function _getMaxValue(features,weightField){var values=[];var attributes;var field=weightField;if(this._fieldMaxValue[field]){return;}features.forEach(function(feature){// 收集当前权重字段对应的所有值
  11487. attributes=feature.properties;attributes&&parseFloat(attributes[field])&&values.push(parseFloat(attributes[field]));});this._fieldMaxValue[field]=SuperMap.ArrayStatistic.getArrayStatistic(values,'Maximum');}/**
  11488. * @private
  11489. * @function WebMapViewModel.prototype._createRangeLayer
  11490. * @description 添加分段专题图。
  11491. * @param {Array.<GeoJSON>} features - feature。
  11492. */},{key:"_createRangeLayer",value:function _createRangeLayer(layerInfo,features){var fieldName=layerInfo.themeSetting.themeField;var style=layerInfo.style;var featureType=layerInfo.featureType;var styleGroups=this._getRangeStyleGroup(layerInfo,features);features=this._getFiterFeatures(layerInfo.filterCondition,features);var source={type:'geojson',data:{type:'FeatureCollection',features:features}};// 获取 expression
  11493. var expression=['match',['get','index']];features.forEach(function(row){var tartget=parseFloat(row.properties[fieldName]);if(styleGroups){for(var i=0;i<styleGroups.length;i++){if(styleGroups[i].start<=tartget&&tartget<styleGroups[i].end){expression.push(row.properties['index'],styleGroups[i].color);}}}!tartget&&expression.push(row.properties['index'],'rgba(0, 0, 0, 0)');},this);expression.push('rgba(0, 0, 0, 0)');// 图例处理
  11494. this._initLegendConfigInfo(layerInfo,styleGroups);// 获取样式
  11495. var layerStyle={layout:{}};if(featureType==='LINE'&&style.lineCap){layerStyle.layout={'line-cap':style.lineCap};}var visible=layerInfo.visible;layerStyle.layout.visibility=visible;layerStyle.style=this._transformStyleToMapBoxGl(style,featureType,expression);// 添加图层
  11496. var layerID=layerInfo.layerID;this._addOverlayToMap(featureType,source,layerID,layerStyle);// 如果面有边框
  11497. featureType==='POLYGON'&&style.strokeColor&&this._addStrokeLineForPoly(style,source,layerID+'-strokeline',visible);}/**
  11498. * @private
  11499. * @function WebMapViewModel.prototype._getFiterFeatures
  11500. * @description 通过过滤条件查询满足的 feature。
  11501. * @param {String} filterCondition - 过滤条件。
  11502. * @param {array} allFeatures - 图层上的 feature 集合
  11503. */},{key:"_getFiterFeatures",value:function _getFiterFeatures(filterCondition,allFeatures){if(!filterCondition){return allFeatures;}var condition=this._replaceFilterCharacter(filterCondition);var sql='select * from json where ('+condition+')';var filterFeatures=[];for(var i=0;i<allFeatures.length;i++){var feature=allFeatures[i];var filterResult=void 0;try{filterResult=window['jsonsql'].query(sql,{properties:feature.properties});}catch(err){// 必须把要过滤得内容封装成一个对象,主要是处理jsonsql(line : 62)中由于with语句遍历对象造成的问题
  11504. continue;}if(filterResult&&filterResult.length>0){// afterFilterFeatureIdx.push(i);
  11505. filterFeatures.push(feature);}}return filterFeatures;}/**
  11506. * @private
  11507. * @function WebMapViewModel.prototype._replaceFilterCharacter
  11508. * @description 获取过滤字符串。
  11509. * @param {String} filterString - 过滤条件。
  11510. */},{key:"_replaceFilterCharacter",value:function _replaceFilterCharacter(filterString){filterString=filterString.replace(/=/g,'==').replace(/AND|and/g,'&&').replace(/or|OR/g,'||').replace(/<==/g,'<=').replace(/>==/g,'>=');return filterString;}/**
  11511. * @private
  11512. * @function WebMapViewModel.prototype._getRangeStyleGroup
  11513. * @description 获取分段样式。
  11514. * @param {Array.<GeoJSON>} features - feature。
  11515. */},{key:"_getRangeStyleGroup",value:function _getRangeStyleGroup(layerInfo,features){// 找出分段值
  11516. var featureType=layerInfo.featureType;var style=layerInfo.style;var values=[];var attributes;var themeSetting=layerInfo.themeSetting;var customSettings=themeSetting.customSettings;var fieldName=themeSetting.themeField;var segmentCount=themeSetting.segmentCount;features.forEach(function(feature){attributes=feature.properties||feature.get('Properties');if(attributes){// 过滤掉非数值的数据
  11517. attributes[fieldName]&&_mapboxGlEnhance.default.supermap.Util.isNumber(attributes[fieldName])&&values.push(parseFloat(attributes[fieldName]));}else if(feature.get(fieldName)&&_mapboxGlEnhance.default.supermap.Util.isNumber(feature.get(fieldName))){feature.get(fieldName)&&values.push(parseFloat(feature.get(fieldName)));}},this);var segements=SuperMap.ArrayStatistic.getArraySegments(values,themeSetting.segmentMethod,segmentCount);if(segements){var itemNum=segmentCount;if(attributes&&segements[0]===segements[attributes.length-1]){itemNum=1;segements.length=2;}// 保留两位有效数
  11518. for(var i=0;i<segements.length;i++){var value=segements[i];value=i===0?Math.floor(value*100)/100:Math.ceil(value*100)/100+0.1;// 加0.1 解决最大值没有样式问题
  11519. segements[i]=Number(value.toFixed(2));}// 获取一定量的颜色
  11520. var curentColors=themeSetting.colors;// curentColors = SuperMap.ColorsPickerUtil.getGradientColors(curentColors, itemNum, 'RANGE');
  11521. for(var index=0;index<itemNum;index++){if(index in customSettings){if(customSettings[index]['segment']['start']){segements[index]=customSettings[index]['segment']['start'];}if(customSettings[index]['segment']['end']){segements[index+1]=customSettings[index]['segment']['end'];}}}// 生成styleGroup
  11522. var styleGroups=[];for(var _i5=0;_i5<itemNum;_i5++){var color=curentColors[_i5];if(_i5 in customSettings){if(customSettings[_i5].color){color=customSettings[_i5].color;}}if(featureType==='LINE'){style.strokeColor=color;}else{style.fillColor=color;}var start=segements[_i5];var end=segements[_i5+1];var styleObj=JSON.parse(JSON.stringify(style));styleGroups.push({style:styleObj,color:color,start:start,end:end});}return styleGroups;}}/**
  11523. * @private
  11524. * @function WebMapViewModel.prototype._formatGeoJSON
  11525. * @description 格式 GeoJSON。
  11526. * @param {GeoJSON} data - GeoJSON 数据。
  11527. */},{key:"_formatGeoJSON",value:function _formatGeoJSON(data){var features=data.features;features.forEach(function(row,index){row.properties['index']=index;});return features;}/**
  11528. * @private
  11529. * @function WebMapViewModel.prototype._excelData2Feature将
  11530. * @description csv 和 xls 文件内容转换成 geojson
  11531. * @param content 文件内容
  11532. * @param layerInfo 图层信息
  11533. * @returns {Array} feature的数组集合
  11534. */},{key:"_excelData2Feature",value:function _excelData2Feature(dataContent){var fieldCaptions=dataContent.colTitles;// 位置属性处理
  11535. var xfieldIndex=-1;var yfieldIndex=-1;for(var i=0,len=fieldCaptions.length;i<len;i++){if((0,_util.isXField)(fieldCaptions[i])){xfieldIndex=i;}if((0,_util.isYField)(fieldCaptions[i])){yfieldIndex=i;}}// feature 构建后期支持坐标系 4326/3857
  11536. var features=[];for(var _i6=0,_len=dataContent.rows.length;_i6<_len;_i6++){var row=dataContent.rows[_i6];var x=Number(row[xfieldIndex]);var y=Number(row[yfieldIndex]);// 属性信息
  11537. var attributes={};for(var index in dataContent.colTitles){var key=dataContent.colTitles[index];attributes[key]=dataContent.rows[_i6][index];}attributes['index']=_i6+'';// 目前csv 只支持处理点,所以先生成点类型的 geojson
  11538. var feature={type:'Feature',geometry:{type:'Point',coordinates:[x,y]},properties:attributes};features.push(feature);}return features;}/**
  11539. * @private
  11540. * @function WebMapViewModel.prototype._sendMapToUser
  11541. * @description 返回最终的 map 对象给用户,供他们操作使用。
  11542. * @param count
  11543. * @param layersLen
  11544. */},{key:"_sendMapToUser",value:function _sendMapToUser(count,layersLen){if(count===layersLen){/**
  11545. * @event WebMapViewModel#addlayerssucceeded
  11546. * @description 添加图层成功。
  11547. * @property {mapboxglTypes.Map} map - MapBoxGL Map 对象。
  11548. * @property {Object} mapparams - 地图信息。
  11549. * @property {string} mapParams.title - 地图标题。
  11550. * @property {string} mapParams.description - 地图描述。
  11551. * @property {Array.<Object>} layers - 地图上所有的图层对象。
  11552. */this._sourceListModel=new _SourceListModel.default({map:this.map});for(var layerID in this._legendList){this._sourceListModel.addSourceStyle(layerID,this._legendList[layerID]);}for(var index=this._layers.length-2;index>-1;index--){var targetlayerId=this._layers[index].layerID;var beforLayerId=this._layers[index+1].layerID;this.map.moveLayer(targetlayerId,beforLayerId);}this.fire('addlayerssucceeded',{map:this.map,mapparams:this.mapParams,layers:this._layers});}}/**
  11553. * @function WebMapViewModel.prototype._unproject
  11554. * @private
  11555. * @description 墨卡托转经纬度。
  11556. * @param {} point - 待转换的点。
  11557. */},{key:"_unproject",value:function _unproject(point){var d=180/Math.PI;var r=6378137;var ts=Math.exp(-point[1]/r);var phi=Math.PI/2-2*Math.atan(ts);for(var i=0,dphi=0.1,con;i<15&&Math.abs(dphi)>1e-7;i++){con=1;dphi=Math.PI/2-2*Math.atan(ts*con)-phi;phi+=dphi;}return[point[0]*d/r,phi*d];}/**
  11558. * @function WebMapViewModel.prototype._getParamString
  11559. * @private
  11560. * @param {Object} obj - 待添加的参数。
  11561. * @param {string} existingUrl - 待添加参数的 url。
  11562. * @param {Boolean} [uppercase] - 参数是否转换为大写。
  11563. */},{key:"_getParamString",value:function _getParamString(obj,existingUrl){var uppercase=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var params=[];for(var i in obj){params.push((uppercase?i.toUpperCase():i)+'='+obj[i]);}return(!existingUrl||existingUrl.indexOf('?')===-1?'?':'&')+params.join('&');}/**
  11564. * @private
  11565. * @function WebMapViewModel.prototype._transformStyleToMapBoxGl
  11566. * @description 根据图层类型将 layerInfo 中的 style 属性格式转换为 mapboxglTypes 中的 style 格式。
  11567. * @param {Object} style - layerInfo中的style属性
  11568. * @param {String} type - 图层类型
  11569. * @param {Array} [expression] - 存储颜色值得表达式
  11570. */},{key:"_transformStyleToMapBoxGl",value:function _transformStyleToMapBoxGl(style,type,expression,expressionType){var transTable={};if((style.type==='POINT'||style.type==='BASIC_POINT'||type==='POINT')&&type!=='LINE'){transTable={fillColor:'circle-color',strokeWidth:'circle-stroke-width',fillOpacity:'circle-opacity',radius:'circle-radius',strokeColor:'circle-stroke-color',strokeOpacity:'circle-stroke-opacity'};}else if(['LINE','LINESTRING','MULTILINESTRING'].includes(type)){transTable={strokeWidth:'line-width',strokeColor:'line-color',strokeOpacity:'line-opacity'};}else if(['REGION','POLYGON','MULTIPOLYGON'].includes(type)){transTable={fillColor:'fill-color',fillOpacity:'fill-opacity',strokeColor:'fill-outline-color'};}var newObj={};for(var item in style){if(transTable[item]){newObj[transTable[item]]=style[item];}}if(expression){if(expressionType){newObj[expressionType]=expression;}else if(newObj['circle-color']){newObj['circle-color']=expression;}else if(newObj['line-color']){newObj['line-color']=expression;}else{newObj['fill-color']=expression;}}if(style.lineDash&&style.lineDash!=='solid'&&type==='LINE'){newObj['line-dasharray']=this._dashStyle(style);}return newObj;}/**
  11571. * @private
  11572. * @function WebMapViewModel.prototype.._dashStyle
  11573. * @description 符号样式。
  11574. * @param {Object} style - 样式参数。
  11575. * @param {number} widthFactor - 宽度系数。
  11576. */},{key:"_dashStyle",value:function _dashStyle(style){if(!style){return[];}// var w = style.strokeWidth * widthFactor;
  11577. var w=1;var str=style.strokeDashstyle||style.lineDash;switch(str){case'solid':return[];case'dot':return[1,4*w];case'dash':return[4*w,4*w];case'dashdot':return[4*w,4*w,1*w,4*w];case'longdash':return[8*w,4*w];case'longdashdot':return[8*w,4*w,1,4*w];default:if(!str){return[];}if(SuperMap.Util.isArray(str)){return str;}str=SuperMap.String.trim(str).replace(/\s+/g,',');return str.replace(/\[|\]/gi,'').split(',');}}/**
  11578. * @private
  11579. * @description 将SVG转换成Canvas
  11580. * @param svgUrl
  11581. * @param divDom
  11582. * @param callBack
  11583. */},{key:"_getCanvasFromSVG",value:function _getCanvasFromSVG(svgUrl,divDom,callBack){// 一个图层对应一个canvas
  11584. var canvas=document.createElement('canvas');canvas.id='dataviz-canvas-'+_mapboxGlEnhance.default.supermap.Util.newGuid(8);canvas.style.display='none';divDom.appendChild(canvas);var canvgs=window.canvg?window.canvg:_canvg.default;canvgs(canvas.id,svgUrl,{ignoreMouse:true,ignoreAnimation:true,renderCallback:function renderCallback(){if(canvas.width>300||canvas.height>300){return;}callBack(canvas);},forceRedraw:function forceRedraw(){return false;}});}/**
  11585. * @private
  11586. * @function WebMapViewModel.prototype._addOverlayToMap
  11587. * @description 添加基础矢量图层到 MAP
  11588. * @param {Object} style - mabgl style
  11589. * @param {String} type - 图层类型
  11590. */},{key:"_addOverlayToMap",value:function _addOverlayToMap(type,source,layerID,layerStyle){var mbglTypeMap={POINT:'circle',LINE:'line',POLYGON:'fill'};var mbglType=mbglTypeMap[type];if(mbglType==='circle'||mbglType==='line'||mbglType==='fill'){this.map.addLayer({id:layerID,type:mbglType,source:source,paint:layerStyle.style,layout:layerStyle.layout||{}});}}},{key:"_addBaselayer",value:function _addBaselayer(url,layerID){var minzoom=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var maxzoom=arguments.length>3&&arguments[3]!==undefined?arguments[3]:22;var source={type:'raster',tiles:url,tileSize:256};this.map.addLayer({id:layerID,type:'raster',source:source,minzoom:minzoom,maxzoom:maxzoom});}/**
  11591. * @private
  11592. * @function WebMapViewModel.prototype._addStrokeLineForPoly
  11593. * @description 添加面的边框。
  11594. * @param {Object} style - mabgl style
  11595. */},{key:"_addStrokeLineForPoly",value:function _addStrokeLineForPoly(style,source,layerID,visible){var lineStyle={style:this._transformStyleToMapBoxGl(style,'LINE'),layout:{visibility:visible}};this._addOverlayToMap('LINE',source,layerID,lineStyle);}/**
  11596. * @private
  11597. * @function WebMapViewModel.prototype._parseGeoJsonData2Feature
  11598. * @description 将从restData地址上获取的json转换成feature(从iserver中获取的json转换成feature)
  11599. * @param {object} metaData - json内容
  11600. */},{key:"_parseGeoJsonData2Feature",value:function _parseGeoJsonData2Feature(metaData){var allFeatures=metaData.allDatas.features;var features=[];for(var i=0,len=allFeatures.length;i<len;i++){var feature=allFeatures[i];var coordinate=feature.geometry.coordinates;if(allFeatures[i].geometry.type==='Point'){// 标注图层 还没有属性值时候不加
  11601. if(allFeatures[i].properties){allFeatures[i].properties.lon=coordinate[0];allFeatures[i].properties.lat=coordinate[1];}}feature.properties['index']=i+'';features.push(feature);}return features;}/**
  11602. * @private
  11603. * @function WebMapViewModel.prototype._getFeatureBySQL
  11604. * @description 通过 sql 方式查询数据。
  11605. */},{key:"_getFeatureBySQL",value:function _getFeatureBySQL(url,datasetNames,_processCompleted,processFaild){var getFeatureParam,getFeatureBySQLService,getFeatureBySQLParams;getFeatureParam=new SuperMap.FilterParameter({name:datasetNames.join().replace(':','@'),attributeFilter:'SMID > 0'});getFeatureBySQLParams=new SuperMap.GetFeaturesBySQLParameters({queryParameter:getFeatureParam,datasetNames:datasetNames,fromIndex:0,toIndex:-1,maxFeatures:-1,returnContent:true});var options={eventListeners:{processCompleted:function processCompleted(getFeaturesEventArgs){_processCompleted&&_processCompleted(getFeaturesEventArgs);},processFailed:function processFailed(e){processFaild&&processFaild(e);}}};getFeatureBySQLService=new SuperMap.GetFeaturesBySQLService(url,options);getFeatureBySQLService.processAsync(getFeatureBySQLParams);}/**
  11606. * @private
  11607. * @function WebMapViewModel.prototype._queryFeatureBySQL
  11608. * @description 通过 sql 方式查询数据。
  11609. */},{key:"_queryFeatureBySQL",value:function _queryFeatureBySQL(url,layerName,processCompleted,processFaild,attributeFilter,fields,epsgCode,startRecord,recordLength,onlyAttribute){var queryParam=new SuperMap.FilterParameter({name:layerName,attributeFilter:attributeFilter});if(fields){queryParam.fields=fields;}var params={queryParams:[queryParam]};if(onlyAttribute){params.queryOption=SuperMap.QueryOption.ATTRIBUTE;}startRecord&&(params.startRecord=startRecord);recordLength&&(params.expectCount=recordLength);if(epsgCode){params.prjCoordSys={epsgCode:epsgCode};}var queryBySQLParams=new SuperMap.QueryBySQLParameters(params);var queryBySQLService=new _mapboxGlEnhance.default.supermap.QueryService(url);queryBySQLService.queryBySQL(queryBySQLParams,function(data){data.type==='processCompleted'?processCompleted(data):processFaild(data);});}},{key:"_initLegendConfigInfo",value:function _initLegendConfigInfo(layerInfo,style){if(!this._legendList[layerInfo.layerID]){this._legendList[layerInfo.layerID]={layerType:layerInfo.layerType,featureType:layerInfo.featureType,layerId:layerInfo.layerID,themeField:layerInfo.layerType==='HEAT'?layerInfo.themeSetting.weight:layerInfo.themeSetting.themeField,styleGroup:style};}}},{key:"_getFeatureProperties",value:function _getFeatureProperties(features){var properties=[];if(features&&features.length){features.forEach(function(feature){var property=feature.properties;property&&properties.push(property);});}return properties;}},{key:"_addVectorLayer",value:function _addVectorLayer(info,layerInfo,featureType){var style=this._getDataVectorTileStyle(featureType);var paint=this._transformStyleToMapBoxGl(style,featureType);var url=info.url+'/tileFeature.mvt';var origin=_mapboxGlEnhance.default.CRS.get(this.baseProjection).getOrigin();url+="?&returnAttributes=true&width=512&height=512&x={x}&y={y}&scale={scale}&origin={x:".concat(origin[0],",y:").concat(origin[1],"}");this.map.addLayer({id:(0,_lodash.default)(layerInfo.name+'-'),// @ts-ignore
  11610. type:style.mbglType,source:{type:'vector',tiles:[url]},'source-layer':"".concat(info.datasetName,"@").concat(info.datasourceName),paint:paint,layout:{visibility:layerInfo.visible?'visible':'none'}});}},{key:"_isMvt",value:function _isMvt(serviceUrl,datasetName){var _this13=this;return this._getDatasetsInfo(serviceUrl,datasetName).then(function(info){//判断是否和底图坐标系一直
  11611. if(info.epsgCode==_this13.baseProjection.split('EPSG:')[1]){return SuperMap.FetchRequest.get("".concat(info.url,"/tilefeature.mvt")).then(function(response){return response.json();}).then(function(result){info.isMvt=result.error&&result.error.code===400;return info;}).catch(function(){return info;});}return info;});}},{key:"_getDatasetsInfo",value:function _getDatasetsInfo(serviceUrl,datasetName){return this._getDatasources(serviceUrl).then(function(datasourceName){//判断mvt服务是否可用
  11612. var url="".concat(serviceUrl,"/data/datasources/").concat(datasourceName,"/datasets/").concat(datasetName);return SuperMap.FetchRequest.get(url).then(function(response){return response.json();}).then(function(datasetsInfo){return{epsgCode:datasetsInfo.datasetInfo.prjCoordSys.epsgCode,bounds:datasetsInfo.datasetInfo.bounds,datasourceName:datasourceName,datasetName:datasetName,url:url//返回的是原始url,没有代理。因为用于请求mvt
  11613. };});});}},{key:"_getDataVectorTileStyle",value:function _getDataVectorTileStyle(featureType){var styleParameters={radius:8,//圆点半径
  11614. fillColor:'#EE4D5A',//填充色
  11615. fillOpacity:0.9,strokeColor:'#ffffff',//边框颜色
  11616. strokeWidth:1,strokeOpacity:1,lineDash:'solid',type:'BASIC_POINT',mbglType:'circle'};if(['LINE','LINESTRING','MULTILINESTRING'].includes(featureType)){styleParameters.strokeColor='#4CC8A3';styleParameters.strokeWidth=2;styleParameters.mbglType='line';}else if(['REGION','POLYGON','MULTIPOLYGON'].includes(featureType)){styleParameters.fillColor='#826DBA';styleParameters.mbglType='fill';}return styleParameters;}},{key:"_transformFeatures",value:function _transformFeatures(features){var _this14=this;features&&features.forEach(function(feature,index){var geometryType=feature.geometry.type;var coordinates=feature.geometry.coordinates;if(geometryType==='LineString'){coordinates.forEach(function(coordinate,index){coordinate=_this14._unproject(coordinate);coordinates[index]=coordinate;},_this14);}else if(geometryType==='Point'){coordinates=_this14._unproject(coordinates);feature.geometry.coordinates=coordinates;}else if(geometryType==='MultiPolygon'||geometryType==='Polygon'){coordinates.forEach(function(coordinate,index){var coords=geometryType==='MultiPolygon'?coordinate[0]:coordinate;coords.forEach(function(latlng,index){latlng=_this14._unproject(latlng);coords[index]=latlng;});coordinates[index]=coordinate;});}features[index]=feature;},this);}},{key:"getSourceListModel",get:function get(){return this._sourceListModel;}}]);return WebMapViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=WebMapViewModel;
  11617. /***/ }),
  11618. /* 71 */
  11619. /***/ (function(module, exports, __webpack_require__) {
  11620. "use strict";
  11621. Object.defineProperty(exports,"__esModule",{value:true});exports.handleMultyPolygon=void 0;var handleMultyPolygon=function handleMultyPolygon(features){features.forEach(function(feature){if(feature.geometry.type!=='Polygon'){return;}var coords=feature.geometry.coordinates;if(coords.length>1){var coordinates=[];coords.forEach(function(coord){coordinates.push([coord]);});feature.geometry.coordinates=coordinates;feature.geometry.type='MultiPolygon';}});return features;};exports.handleMultyPolygon=handleMultyPolygon;
  11622. /***/ }),
  11623. /* 72 */
  11624. /***/ (function(module, exports, __webpack_require__) {
  11625. var arrayWithHoles = __webpack_require__(73);
  11626. var iterableToArrayLimit = __webpack_require__(74);
  11627. var nonIterableRest = __webpack_require__(75);
  11628. function _slicedToArray(arr, i) {
  11629. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
  11630. }
  11631. module.exports = _slicedToArray;
  11632. /***/ }),
  11633. /* 73 */
  11634. /***/ (function(module, exports) {
  11635. function _arrayWithHoles(arr) {
  11636. if (Array.isArray(arr)) return arr;
  11637. }
  11638. module.exports = _arrayWithHoles;
  11639. /***/ }),
  11640. /* 74 */
  11641. /***/ (function(module, exports) {
  11642. function _iterableToArrayLimit(arr, i) {
  11643. if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
  11644. return;
  11645. }
  11646. var _arr = [];
  11647. var _n = true;
  11648. var _d = false;
  11649. var _e = undefined;
  11650. try {
  11651. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  11652. _arr.push(_s.value);
  11653. if (i && _arr.length === i) break;
  11654. }
  11655. } catch (err) {
  11656. _d = true;
  11657. _e = err;
  11658. } finally {
  11659. try {
  11660. if (!_n && _i["return"] != null) _i["return"]();
  11661. } finally {
  11662. if (_d) throw _e;
  11663. }
  11664. }
  11665. return _arr;
  11666. }
  11667. module.exports = _iterableToArrayLimit;
  11668. /***/ }),
  11669. /* 75 */
  11670. /***/ (function(module, exports) {
  11671. function _nonIterableRest() {
  11672. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  11673. }
  11674. module.exports = _nonIterableRest;
  11675. /***/ }),
  11676. /* 76 */
  11677. /***/ (function(module, exports, __webpack_require__) {
  11678. "use strict";
  11679. module.exports = {
  11680. "aliceblue": [240, 248, 255],
  11681. "antiquewhite": [250, 235, 215],
  11682. "aqua": [0, 255, 255],
  11683. "aquamarine": [127, 255, 212],
  11684. "azure": [240, 255, 255],
  11685. "beige": [245, 245, 220],
  11686. "bisque": [255, 228, 196],
  11687. "black": [0, 0, 0],
  11688. "blanchedalmond": [255, 235, 205],
  11689. "blue": [0, 0, 255],
  11690. "blueviolet": [138, 43, 226],
  11691. "brown": [165, 42, 42],
  11692. "burlywood": [222, 184, 135],
  11693. "cadetblue": [95, 158, 160],
  11694. "chartreuse": [127, 255, 0],
  11695. "chocolate": [210, 105, 30],
  11696. "coral": [255, 127, 80],
  11697. "cornflowerblue": [100, 149, 237],
  11698. "cornsilk": [255, 248, 220],
  11699. "crimson": [220, 20, 60],
  11700. "cyan": [0, 255, 255],
  11701. "darkblue": [0, 0, 139],
  11702. "darkcyan": [0, 139, 139],
  11703. "darkgoldenrod": [184, 134, 11],
  11704. "darkgray": [169, 169, 169],
  11705. "darkgreen": [0, 100, 0],
  11706. "darkgrey": [169, 169, 169],
  11707. "darkkhaki": [189, 183, 107],
  11708. "darkmagenta": [139, 0, 139],
  11709. "darkolivegreen": [85, 107, 47],
  11710. "darkorange": [255, 140, 0],
  11711. "darkorchid": [153, 50, 204],
  11712. "darkred": [139, 0, 0],
  11713. "darksalmon": [233, 150, 122],
  11714. "darkseagreen": [143, 188, 143],
  11715. "darkslateblue": [72, 61, 139],
  11716. "darkslategray": [47, 79, 79],
  11717. "darkslategrey": [47, 79, 79],
  11718. "darkturquoise": [0, 206, 209],
  11719. "darkviolet": [148, 0, 211],
  11720. "deeppink": [255, 20, 147],
  11721. "deepskyblue": [0, 191, 255],
  11722. "dimgray": [105, 105, 105],
  11723. "dimgrey": [105, 105, 105],
  11724. "dodgerblue": [30, 144, 255],
  11725. "firebrick": [178, 34, 34],
  11726. "floralwhite": [255, 250, 240],
  11727. "forestgreen": [34, 139, 34],
  11728. "fuchsia": [255, 0, 255],
  11729. "gainsboro": [220, 220, 220],
  11730. "ghostwhite": [248, 248, 255],
  11731. "gold": [255, 215, 0],
  11732. "goldenrod": [218, 165, 32],
  11733. "gray": [128, 128, 128],
  11734. "green": [0, 128, 0],
  11735. "greenyellow": [173, 255, 47],
  11736. "grey": [128, 128, 128],
  11737. "honeydew": [240, 255, 240],
  11738. "hotpink": [255, 105, 180],
  11739. "indianred": [205, 92, 92],
  11740. "indigo": [75, 0, 130],
  11741. "ivory": [255, 255, 240],
  11742. "khaki": [240, 230, 140],
  11743. "lavender": [230, 230, 250],
  11744. "lavenderblush": [255, 240, 245],
  11745. "lawngreen": [124, 252, 0],
  11746. "lemonchiffon": [255, 250, 205],
  11747. "lightblue": [173, 216, 230],
  11748. "lightcoral": [240, 128, 128],
  11749. "lightcyan": [224, 255, 255],
  11750. "lightgoldenrodyellow": [250, 250, 210],
  11751. "lightgray": [211, 211, 211],
  11752. "lightgreen": [144, 238, 144],
  11753. "lightgrey": [211, 211, 211],
  11754. "lightpink": [255, 182, 193],
  11755. "lightsalmon": [255, 160, 122],
  11756. "lightseagreen": [32, 178, 170],
  11757. "lightskyblue": [135, 206, 250],
  11758. "lightslategray": [119, 136, 153],
  11759. "lightslategrey": [119, 136, 153],
  11760. "lightsteelblue": [176, 196, 222],
  11761. "lightyellow": [255, 255, 224],
  11762. "lime": [0, 255, 0],
  11763. "limegreen": [50, 205, 50],
  11764. "linen": [250, 240, 230],
  11765. "magenta": [255, 0, 255],
  11766. "maroon": [128, 0, 0],
  11767. "mediumaquamarine": [102, 205, 170],
  11768. "mediumblue": [0, 0, 205],
  11769. "mediumorchid": [186, 85, 211],
  11770. "mediumpurple": [147, 112, 219],
  11771. "mediumseagreen": [60, 179, 113],
  11772. "mediumslateblue": [123, 104, 238],
  11773. "mediumspringgreen": [0, 250, 154],
  11774. "mediumturquoise": [72, 209, 204],
  11775. "mediumvioletred": [199, 21, 133],
  11776. "midnightblue": [25, 25, 112],
  11777. "mintcream": [245, 255, 250],
  11778. "mistyrose": [255, 228, 225],
  11779. "moccasin": [255, 228, 181],
  11780. "navajowhite": [255, 222, 173],
  11781. "navy": [0, 0, 128],
  11782. "oldlace": [253, 245, 230],
  11783. "olive": [128, 128, 0],
  11784. "olivedrab": [107, 142, 35],
  11785. "orange": [255, 165, 0],
  11786. "orangered": [255, 69, 0],
  11787. "orchid": [218, 112, 214],
  11788. "palegoldenrod": [238, 232, 170],
  11789. "palegreen": [152, 251, 152],
  11790. "paleturquoise": [175, 238, 238],
  11791. "palevioletred": [219, 112, 147],
  11792. "papayawhip": [255, 239, 213],
  11793. "peachpuff": [255, 218, 185],
  11794. "peru": [205, 133, 63],
  11795. "pink": [255, 192, 203],
  11796. "plum": [221, 160, 221],
  11797. "powderblue": [176, 224, 230],
  11798. "purple": [128, 0, 128],
  11799. "rebeccapurple": [102, 51, 153],
  11800. "red": [255, 0, 0],
  11801. "rosybrown": [188, 143, 143],
  11802. "royalblue": [65, 105, 225],
  11803. "saddlebrown": [139, 69, 19],
  11804. "salmon": [250, 128, 114],
  11805. "sandybrown": [244, 164, 96],
  11806. "seagreen": [46, 139, 87],
  11807. "seashell": [255, 245, 238],
  11808. "sienna": [160, 82, 45],
  11809. "silver": [192, 192, 192],
  11810. "skyblue": [135, 206, 235],
  11811. "slateblue": [106, 90, 205],
  11812. "slategray": [112, 128, 144],
  11813. "slategrey": [112, 128, 144],
  11814. "snow": [255, 250, 250],
  11815. "springgreen": [0, 255, 127],
  11816. "steelblue": [70, 130, 180],
  11817. "tan": [210, 180, 140],
  11818. "teal": [0, 128, 128],
  11819. "thistle": [216, 191, 216],
  11820. "tomato": [255, 99, 71],
  11821. "turquoise": [64, 224, 208],
  11822. "violet": [238, 130, 238],
  11823. "wheat": [245, 222, 179],
  11824. "white": [255, 255, 255],
  11825. "whitesmoke": [245, 245, 245],
  11826. "yellow": [255, 255, 0],
  11827. "yellowgreen": [154, 205, 50]
  11828. };
  11829. /***/ }),
  11830. /* 77 */
  11831. /***/ (function(module, exports, __webpack_require__) {
  11832. /**
  11833. * geostats() is a tiny and standalone javascript library for classification
  11834. * Project page - https://github.com/simogeo/geostats
  11835. * Copyright (c) 2011 Simon Georget, http://www.empreinte-urbaine.eu
  11836. * Licensed under the MIT license
  11837. */
  11838. (function (definition) {
  11839. // This file will function properly as a <script> tag, or a module
  11840. // using CommonJS and NodeJS or RequireJS module formats.
  11841. // CommonJS
  11842. if (true) {
  11843. module.exports = definition();
  11844. // RequireJS
  11845. } else {}
  11846. })(function () {
  11847. var isInt = function(n) {
  11848. return typeof n === 'number' && parseFloat(n) == parseInt(n, 10) && !isNaN(n);
  11849. } // 6 characters
  11850. var _t = function(str) {
  11851. return str;
  11852. };
  11853. //taking from http://stackoverflow.com/questions/18082/validate-decimal-numbers-in-javascript-isnumeric
  11854. var isNumber = function(n) {
  11855. return !isNaN(parseFloat(n)) && isFinite(n);
  11856. }
  11857. //indexOf polyfill
  11858. // from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
  11859. if (!Array.prototype.indexOf) {
  11860. Array.prototype.indexOf = function (searchElement, fromIndex) {
  11861. if ( this === undefined || this === null ) {
  11862. throw new TypeError( '"this" is null or not defined' );
  11863. }
  11864. var length = this.length >>> 0; // Hack to convert object.length to a UInt32
  11865. fromIndex = +fromIndex || 0;
  11866. if (Math.abs(fromIndex) === Infinity) {
  11867. fromIndex = 0;
  11868. }
  11869. if (fromIndex < 0) {
  11870. fromIndex += length;
  11871. if (fromIndex < 0) {
  11872. fromIndex = 0;
  11873. }
  11874. }
  11875. for (;fromIndex < length; fromIndex++) {
  11876. if (this[fromIndex] === searchElement) {
  11877. return fromIndex;
  11878. }
  11879. }
  11880. return -1;
  11881. };
  11882. }
  11883. var geostats = function(a) {
  11884. this.objectID = '';
  11885. this.separator = ' - ';
  11886. this.legendSeparator = this.separator;
  11887. this.method = '';
  11888. this.precision = 0;
  11889. this.precisionflag = 'auto';
  11890. this.roundlength = 2; // Number of decimals, round values
  11891. this.is_uniqueValues = false;
  11892. this.debug = false;
  11893. this.silent = false;
  11894. this.bounds = Array();
  11895. this.ranges = Array();
  11896. this.inner_ranges = null;
  11897. this.colors = Array();
  11898. this.counter = Array();
  11899. // statistics information
  11900. this.stat_sorted = null;
  11901. this.stat_mean = null;
  11902. this.stat_median = null;
  11903. this.stat_sum = null;
  11904. this.stat_max = null;
  11905. this.stat_min = null;
  11906. this.stat_pop = null;
  11907. this.stat_variance = null;
  11908. this.stat_stddev = null;
  11909. this.stat_cov = null;
  11910. /**
  11911. * logging method
  11912. */
  11913. this.log = function(msg, force) {
  11914. if(this.debug == true || force != null)
  11915. console.log(this.objectID + "(object id) :: " + msg);
  11916. };
  11917. /**
  11918. * Set bounds
  11919. */
  11920. this.setBounds = function(a) {
  11921. this.log('Setting bounds (' + a.length + ') : ' + a.join());
  11922. this.bounds = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  11923. this.bounds = a;
  11924. //this.bounds = this.decimalFormat(a);
  11925. };
  11926. /**
  11927. * Set a new serie
  11928. */
  11929. this.setSerie = function(a) {
  11930. this.log('Setting serie (' + a.length + ') : ' + a.join());
  11931. this.serie = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  11932. this.serie = a;
  11933. //reset statistics after changing serie
  11934. this.resetStatistics();
  11935. this.setPrecision();
  11936. };
  11937. /**
  11938. * Set colors
  11939. */
  11940. this.setColors = function(colors) {
  11941. this.log('Setting color ramp (' + colors.length + ') : ' + colors.join());
  11942. this.colors = colors;
  11943. };
  11944. /**
  11945. * Get feature count
  11946. * With bounds array(0, 0.75, 1.5, 2.25, 3);
  11947. * should populate this.counter with 5 keys
  11948. * and increment counters for each key
  11949. */
  11950. this.doCount = function() {
  11951. if (this._nodata())
  11952. return;
  11953. var tmp = this.sorted();
  11954. this.counter = new Array();
  11955. // we init counter with 0 value
  11956. for(i = 0; i < this.bounds.length -1; i++) {
  11957. this.counter[i]= 0;
  11958. }
  11959. for(j=0; j < tmp.length; j++) {
  11960. // get current class for value to increment the counter
  11961. var cclass = this.getClass(tmp[j]);
  11962. this.counter[cclass]++;
  11963. }
  11964. };
  11965. /**
  11966. * Set decimal precision according to user input
  11967. * or automatcally determined according
  11968. * to the given serie.
  11969. */
  11970. this.setPrecision = function(decimals) {
  11971. // only when called from user
  11972. if(typeof decimals !== "undefined") {
  11973. this.precisionflag = 'manual';
  11974. this.precision = decimals;
  11975. }
  11976. // we calculate the maximal decimal length on given serie
  11977. if(this.precisionflag == 'auto') {
  11978. for (var i = 0; i < this.serie.length; i++) {
  11979. // check if the given value is a number and a float
  11980. if (!isNaN((this.serie[i]+"")) && (this.serie[i]+"").toString().indexOf('.') != -1) {
  11981. var precision = (this.serie[i] + "").split(".")[1].length;
  11982. } else {
  11983. var precision = 0;
  11984. }
  11985. if(precision > this.precision) {
  11986. this.precision = precision;
  11987. }
  11988. }
  11989. }
  11990. if(this.precision > 20) {
  11991. // prevent "Uncaught RangeError: toFixed() digits argument must be between 0 and 20" bug. See https://github.com/simogeo/geostats/issues/34
  11992. this.log('this.precision value (' + this.precision + ') is greater than max value. Automatic set-up to 20 to prevent "Uncaught RangeError: toFixed()" when calling decimalFormat() method.');
  11993. this.precision = 20;
  11994. }
  11995. this.log('Calling setPrecision(). Mode : ' + this.precisionflag + ' - Decimals : '+ this.precision);
  11996. this.serie = this.decimalFormat(this.serie);
  11997. };
  11998. /**
  11999. * Format array numbers regarding to precision
  12000. */
  12001. this.decimalFormat = function(a) {
  12002. var b = new Array();
  12003. for (var i = 0; i < a.length; i++) {
  12004. // check if the given value is a number
  12005. if (isNumber(a[i])) {
  12006. b[i] = parseFloat(parseFloat(a[i]).toFixed(this.precision));
  12007. } else {
  12008. b[i] = a[i];
  12009. }
  12010. }
  12011. return b;
  12012. }
  12013. /**
  12014. * Transform a bounds array to a range array the following array : array(0,
  12015. * 0.75, 1.5, 2.25, 3); becomes : array('0-0.75', '0.75-1.5', '1.5-2.25',
  12016. * '2.25-3');
  12017. */
  12018. this.setRanges = function() {
  12019. this.ranges = Array(); // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  12020. for (i = 0; i < (this.bounds.length - 1); i++) {
  12021. this.ranges[i] = this.bounds[i] + this.separator + this.bounds[i + 1];
  12022. }
  12023. };
  12024. /** return min value */
  12025. this.min = function() {
  12026. if (this._nodata())
  12027. return;
  12028. this.stat_min = this.serie[0];
  12029. for (i = 0; i < this.pop(); i++) {
  12030. if (this.serie[i] < this.stat_min) {
  12031. this.stat_min = this.serie[i];
  12032. }
  12033. }
  12034. return this.stat_min;
  12035. };
  12036. /** return max value */
  12037. this.max = function() {
  12038. if (this._nodata())
  12039. return;
  12040. this.stat_max = this.serie[0];
  12041. for (i = 0; i < this.pop(); i++) {
  12042. if (this.serie[i] > this.stat_max) {
  12043. this.stat_max = this.serie[i];
  12044. }
  12045. }
  12046. return this.stat_max;
  12047. };
  12048. /** return sum value */
  12049. this.sum = function() {
  12050. if (this._nodata())
  12051. return;
  12052. if (this.stat_sum == null) {
  12053. this.stat_sum = 0;
  12054. for (i = 0; i < this.pop(); i++) {
  12055. this.stat_sum += parseFloat(this.serie[i]);
  12056. }
  12057. }
  12058. return this.stat_sum;
  12059. };
  12060. /** return population number */
  12061. this.pop = function() {
  12062. if (this._nodata())
  12063. return;
  12064. if (this.stat_pop == null) {
  12065. this.stat_pop = this.serie.length;
  12066. }
  12067. return this.stat_pop;
  12068. };
  12069. /** return mean value */
  12070. this.mean = function() {
  12071. if (this._nodata())
  12072. return;
  12073. if (this.stat_mean == null) {
  12074. this.stat_mean = parseFloat(this.sum() / this.pop());
  12075. }
  12076. return this.stat_mean;
  12077. };
  12078. /** return median value */
  12079. this.median = function() {
  12080. if (this._nodata())
  12081. return;
  12082. if (this.stat_median == null) {
  12083. this.stat_median = 0;
  12084. var tmp = this.sorted();
  12085. // serie pop is odd
  12086. if (tmp.length % 2) {
  12087. this.stat_median = parseFloat(tmp[(Math.ceil(tmp.length / 2) - 1)]);
  12088. // serie pop is even
  12089. } else {
  12090. this.stat_median = ( parseFloat(tmp[((tmp.length / 2) - 1)]) + parseFloat(tmp[(tmp.length / 2)]) ) / 2;
  12091. }
  12092. }
  12093. return this.stat_median;
  12094. };
  12095. /** return variance value */
  12096. this.variance = function() {
  12097. round = (typeof round === "undefined") ? true : false;
  12098. if (this._nodata())
  12099. return;
  12100. if (this.stat_variance == null) {
  12101. var tmp = 0, serie_mean = this.mean();
  12102. for (var i = 0; i < this.pop(); i++) {
  12103. tmp += Math.pow( (this.serie[i] - serie_mean), 2 );
  12104. }
  12105. this.stat_variance = tmp / this.pop();
  12106. if(round == true) {
  12107. this.stat_variance = Math.round(this.stat_variance * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
  12108. }
  12109. }
  12110. return this.stat_variance;
  12111. };
  12112. /** return standard deviation value */
  12113. this.stddev = function(round) {
  12114. round = (typeof round === "undefined") ? true : false;
  12115. if (this._nodata())
  12116. return;
  12117. if (this.stat_stddev == null) {
  12118. this.stat_stddev = Math.sqrt(this.variance());
  12119. if(round == true) {
  12120. this.stat_stddev = Math.round(this.stat_stddev * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
  12121. }
  12122. }
  12123. return this.stat_stddev;
  12124. };
  12125. /** coefficient of variation - measure of dispersion */
  12126. this.cov = function(round) {
  12127. round = (typeof round === "undefined") ? true : false;
  12128. if (this._nodata())
  12129. return;
  12130. if (this.stat_cov == null) {
  12131. this.stat_cov = this.stddev() / this.mean();
  12132. if(round == true) {
  12133. this.stat_cov = Math.round(this.stat_cov * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
  12134. }
  12135. }
  12136. return this.stat_cov;
  12137. };
  12138. /** reset all attributes after setting a new serie */
  12139. this.resetStatistics = function() {
  12140. this.stat_sorted = null;
  12141. this.stat_mean = null;
  12142. this.stat_median = null;
  12143. this.stat_sum = null;
  12144. this.stat_max = null;
  12145. this.stat_min = null;
  12146. this.stat_pop = null;
  12147. this.stat_variance = null;
  12148. this.stat_stddev = null;
  12149. this.stat_cov = null;
  12150. }
  12151. /** data test */
  12152. this._nodata = function() {
  12153. if (this.serie.length == 0) {
  12154. if(this.silent) this.log("[silent mode] Error. You should first enter a serie!", true);
  12155. else throw new TypeError("Error. You should first enter a serie!");
  12156. return 1;
  12157. } else
  12158. return 0;
  12159. };
  12160. /** check if the serie contains negative value */
  12161. this._hasNegativeValue = function() {
  12162. for (i = 0; i < this.serie.length; i++) {
  12163. if(this.serie[i] < 0)
  12164. return true;
  12165. }
  12166. return false;
  12167. };
  12168. /** check if the serie contains zero value */
  12169. this._hasZeroValue = function() {
  12170. for (i = 0; i < this.serie.length; i++) {
  12171. if(parseFloat(this.serie[i]) === 0)
  12172. return true;
  12173. }
  12174. return false;
  12175. };
  12176. /** return sorted values (as array) */
  12177. this.sorted = function() {
  12178. if (this.stat_sorted == null) {
  12179. if(this.is_uniqueValues == false) {
  12180. this.stat_sorted = this.serie.sort(function(a, b) {
  12181. return a - b;
  12182. });
  12183. } else {
  12184. this.stat_sorted = this.serie.sort(function(a,b){
  12185. var nameA=a.toString().toLowerCase(), nameB=b.toString().toLowerCase();
  12186. if(nameA < nameB) return -1;
  12187. if(nameA > nameB) return 1;
  12188. return 0;
  12189. })
  12190. }
  12191. }
  12192. return this.stat_sorted;
  12193. };
  12194. /** return all info */
  12195. this.info = function() {
  12196. if (this._nodata())
  12197. return;
  12198. var content = '';
  12199. content += _t('Population') + ' : ' + this.pop() + ' - [' + _t('Min')
  12200. + ' : ' + this.min() + ' | ' + _t('Max') + ' : ' + this.max()
  12201. + ']' + "\n";
  12202. content += _t('Mean') + ' : ' + this.mean() + ' - ' + _t('Median') + ' : ' + this.median() + "\n";
  12203. content += _t('Variance') + ' : ' + this.variance() + ' - ' + _t('Standard deviation') + ' : ' + this.stddev()
  12204. + ' - ' + _t('Coefficient of variation') + ' : ' + this.cov() + "\n";
  12205. return content;
  12206. };
  12207. /**
  12208. * Set Manual classification Return an array with bounds : ie array(0,
  12209. * 0.75, 1.5, 2.25, 3);
  12210. * Set ranges and prepare data for displaying legend
  12211. *
  12212. */
  12213. this.setClassManually = function(array) {
  12214. if (this._nodata())
  12215. return;
  12216. if(array[0] !== this.min() || array[array.length-1] !== this.max()) {
  12217. if(this.silent) this.log("[silent mode] " + t('Given bounds may not be correct! please check your input.\nMin value : ' + this.min() + ' / Max value : ' + this.max()), true);
  12218. else throw new TypeError(_t('Given bounds may not be correct! please check your input.\nMin value : ' + this.min() + ' / Max value : ' + this.max()));
  12219. return;
  12220. }
  12221. this.setBounds(array);
  12222. this.setRanges();
  12223. // we specify the classification method
  12224. this.method = _t('manual classification') + ' (' + (array.length -1) + ' ' + _t('classes') + ')';
  12225. return this.bounds;
  12226. };
  12227. /**
  12228. * Equal intervals classification Return an array with bounds : ie array(0,
  12229. * 0.75, 1.5, 2.25, 3);
  12230. */
  12231. this.getClassEqInterval = function(nbClass, forceMin, forceMax) {
  12232. if (this._nodata())
  12233. return;
  12234. var tmpMin = (typeof forceMin === "undefined") ? this.min() : forceMin;
  12235. var tmpMax = (typeof forceMax === "undefined") ? this.max() : forceMax;
  12236. var a = Array();
  12237. var val = tmpMin;
  12238. var interval = (tmpMax - tmpMin) / nbClass;
  12239. for (i = 0; i <= nbClass; i++) {
  12240. a[i] = val;
  12241. val += interval;
  12242. }
  12243. //-> Fix last bound to Max of values
  12244. a[nbClass] = tmpMax;
  12245. this.setBounds(a);
  12246. this.setRanges();
  12247. // we specify the classification method
  12248. this.method = _t('eq. intervals') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12249. return this.bounds;
  12250. };
  12251. this.getQuantiles = function(nbClass) {
  12252. var tmp = this.sorted();
  12253. var quantiles = [];
  12254. var step = this.pop() / nbClass;
  12255. for (var i = 1; i < nbClass; i++) {
  12256. var qidx = Math.round(i*step+0.49);
  12257. quantiles.push(tmp[qidx-1]); // zero-based
  12258. }
  12259. return quantiles;
  12260. };
  12261. /**
  12262. * Quantile classification Return an array with bounds : ie array(0, 0.75,
  12263. * 1.5, 2.25, 3);
  12264. */
  12265. this.getClassQuantile = function(nbClass) {
  12266. if (this._nodata())
  12267. return;
  12268. var tmp = this.sorted();
  12269. var bounds = this.getQuantiles(nbClass);
  12270. bounds.unshift(tmp[0]);
  12271. if (bounds[tmp.length - 1] !== tmp[tmp.length - 1])
  12272. bounds.push(tmp[tmp.length - 1]);
  12273. this.setBounds(bounds);
  12274. this.setRanges();
  12275. // we specify the classification method
  12276. this.method = _t('quantile') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12277. return this.bounds;
  12278. };
  12279. /**
  12280. * Standard Deviation classification
  12281. * Return an array with bounds : ie array(0,
  12282. * 0.75, 1.5, 2.25, 3);
  12283. */
  12284. this.getClassStdDeviation = function(nbClass, matchBounds) {
  12285. if (this._nodata())
  12286. return;
  12287. var tmpMax = this.max();
  12288. var tmpMin = this.min();
  12289. var a = Array();
  12290. // number of classes is odd
  12291. if(nbClass % 2 == 1) {
  12292. // Euclidean division to get the inferior bound
  12293. var infBound = Math.floor(nbClass / 2);
  12294. var supBound = infBound + 1;
  12295. // we set the central bounds
  12296. a[infBound] = this.mean() - ( this.stddev() / 2);
  12297. a[supBound] = this.mean() + ( this.stddev() / 2);
  12298. // Values < to infBound, except first one
  12299. for (i = infBound - 1; i > 0; i--) {
  12300. var val = a[i+1] - this.stddev();
  12301. a[i] = val;
  12302. }
  12303. // Values > to supBound, except last one
  12304. for (i = supBound + 1; i < nbClass; i++) {
  12305. var val = a[i-1] + this.stddev();
  12306. a[i] = val;
  12307. }
  12308. // number of classes is even
  12309. } else {
  12310. var meanBound = nbClass / 2;
  12311. // we get the mean value
  12312. a[meanBound] = this.mean();
  12313. // Values < to the mean, except first one
  12314. for (i = meanBound - 1; i > 0; i--) {
  12315. var val = a[i+1] - this.stddev();
  12316. a[i] = val;
  12317. }
  12318. // Values > to the mean, except last one
  12319. for (i = meanBound + 1; i < nbClass; i++) {
  12320. var val = a[i-1] + this.stddev();
  12321. a[i] = val;
  12322. }
  12323. }
  12324. // we finally set the first value
  12325. // do we excatly match min value or not ?
  12326. a[0] = (typeof matchBounds === "undefined") ? a[1]-this.stddev() : this.min();
  12327. // we finally set the last value
  12328. // do we excatly match max value or not ?
  12329. a[nbClass] = (typeof matchBounds === "undefined") ? a[nbClass-1]+this.stddev() : this.max();
  12330. this.setBounds(a);
  12331. this.setRanges();
  12332. // we specify the classification method
  12333. this.method = _t('std deviation') + ' (' + nbClass + ' ' + _t('classes')+ ')';
  12334. return this.bounds;
  12335. };
  12336. /**
  12337. * Geometric Progression classification
  12338. * http://en.wikipedia.org/wiki/Geometric_progression
  12339. * Return an array with bounds : ie array(0,
  12340. * 0.75, 1.5, 2.25, 3);
  12341. */
  12342. this.getClassGeometricProgression = function(nbClass) {
  12343. if (this._nodata())
  12344. return;
  12345. if(this._hasNegativeValue() || this._hasZeroValue()) {
  12346. if(this.silent) this.log("[silent mode] " + _t('geometric progression can\'t be applied with a serie containing negative or zero values.'), true);
  12347. else throw new TypeError(_t('geometric progression can\'t be applied with a serie containing negative or zero values.'));
  12348. return;
  12349. }
  12350. var a = Array();
  12351. var tmpMin = this.min();
  12352. var tmpMax = this.max();
  12353. var logMax = Math.log(tmpMax) / Math.LN10; // max decimal logarithm (or base 10)
  12354. var logMin = Math.log(tmpMin) / Math.LN10;; // min decimal logarithm (or base 10)
  12355. var interval = (logMax - logMin) / nbClass;
  12356. // we compute log bounds
  12357. for (i = 0; i < nbClass; i++) {
  12358. if(i == 0) {
  12359. a[i] = logMin;
  12360. } else {
  12361. a[i] = a[i-1] + interval;
  12362. }
  12363. }
  12364. // we compute antilog
  12365. a = a.map(function(x) { return Math.pow(10, x); });
  12366. // and we finally add max value
  12367. a.push(this.max());
  12368. this.setBounds(a);
  12369. this.setRanges();
  12370. // we specify the classification method
  12371. this.method = _t('geometric progression') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12372. return this.bounds;
  12373. };
  12374. /**
  12375. * Arithmetic Progression classification
  12376. * http://en.wikipedia.org/wiki/Arithmetic_progression
  12377. * Return an array with bounds : ie array(0,
  12378. * 0.75, 1.5, 2.25, 3);
  12379. */
  12380. this.getClassArithmeticProgression = function(nbClass) {
  12381. if (this._nodata())
  12382. return;
  12383. var denominator = 0;
  12384. // we compute the (french) "Raison"
  12385. for (i = 1; i <= nbClass; i++) {
  12386. denominator += i;
  12387. }
  12388. var a = Array();
  12389. var tmpMin = this.min();
  12390. var tmpMax = this.max();
  12391. var interval = (tmpMax - tmpMin) / denominator;
  12392. for (i = 0; i <= nbClass; i++) {
  12393. if(i == 0) {
  12394. a[i] = tmpMin;
  12395. } else {
  12396. a[i] = a[i-1] + (i * interval);
  12397. }
  12398. }
  12399. this.setBounds(a);
  12400. this.setRanges();
  12401. // we specify the classification method
  12402. this.method = _t('arithmetic progression') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12403. return this.bounds;
  12404. };
  12405. /**
  12406. * Credits : Doug Curl (javascript) and Daniel J Lewis (python implementation)
  12407. * http://www.arcgis.com/home/item.html?id=0b633ff2f40d412995b8be377211c47b
  12408. * http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/
  12409. */
  12410. this.getClassJenks = function(nbClass) {
  12411. if (this._nodata())
  12412. return;
  12413. dataList = this.sorted();
  12414. // now iterate through the datalist:
  12415. // determine mat1 and mat2
  12416. // really not sure how these 2 different arrays are set - the code for
  12417. // each seems the same!
  12418. // but the effect are 2 different arrays: mat1 and mat2
  12419. var mat1 = []
  12420. for ( var x = 0, xl = dataList.length + 1; x < xl; x++) {
  12421. var temp = []
  12422. for ( var j = 0, jl = nbClass + 1; j < jl; j++) {
  12423. temp.push(0)
  12424. }
  12425. mat1.push(temp)
  12426. }
  12427. var mat2 = []
  12428. for ( var i = 0, il = dataList.length + 1; i < il; i++) {
  12429. var temp2 = []
  12430. for ( var c = 0, cl = nbClass + 1; c < cl; c++) {
  12431. temp2.push(0)
  12432. }
  12433. mat2.push(temp2)
  12434. }
  12435. // absolutely no idea what this does - best I can tell, it sets the 1st
  12436. // group in the
  12437. // mat1 and mat2 arrays to 1 and 0 respectively
  12438. for ( var y = 1, yl = nbClass + 1; y < yl; y++) {
  12439. mat1[0][y] = 1
  12440. mat2[0][y] = 0
  12441. for ( var t = 1, tl = dataList.length + 1; t < tl; t++) {
  12442. mat2[t][y] = Infinity
  12443. }
  12444. var v = 0.0
  12445. }
  12446. // and this part - I'm a little clueless on - but it works
  12447. // pretty sure it iterates across the entire dataset and compares each
  12448. // value to
  12449. // one another to and adjust the indices until you meet the rules:
  12450. // minimum deviation
  12451. // within a class and maximum separation between classes
  12452. for ( var l = 2, ll = dataList.length + 1; l < ll; l++) {
  12453. var s1 = 0.0
  12454. var s2 = 0.0
  12455. var w = 0.0
  12456. for ( var m = 1, ml = l + 1; m < ml; m++) {
  12457. var i3 = l - m + 1
  12458. var val = parseFloat(dataList[i3 - 1])
  12459. s2 += val * val
  12460. s1 += val
  12461. w += 1
  12462. v = s2 - (s1 * s1) / w
  12463. var i4 = i3 - 1
  12464. if (i4 != 0) {
  12465. for ( var p = 2, pl = nbClass + 1; p < pl; p++) {
  12466. if (mat2[l][p] >= (v + mat2[i4][p - 1])) {
  12467. mat1[l][p] = i3
  12468. mat2[l][p] = v + mat2[i4][p - 1]
  12469. }
  12470. }
  12471. }
  12472. }
  12473. mat1[l][1] = 1
  12474. mat2[l][1] = v
  12475. }
  12476. var k = dataList.length
  12477. var kclass = []
  12478. // fill the kclass (classification) array with zeros:
  12479. for (i = 0; i <= nbClass; i++) {
  12480. kclass.push(0);
  12481. }
  12482. // this is the last number in the array:
  12483. kclass[nbClass] = parseFloat(dataList[dataList.length - 1])
  12484. // this is the first number - can set to zero, but want to set to lowest
  12485. // to use for legend:
  12486. kclass[0] = parseFloat(dataList[0])
  12487. var countNum = nbClass
  12488. while (countNum >= 2) {
  12489. var id = parseInt((mat1[k][countNum]) - 2)
  12490. kclass[countNum - 1] = dataList[id]
  12491. k = parseInt((mat1[k][countNum] - 1))
  12492. // spits out the rank and value of the break values:
  12493. // console.log("id="+id,"rank = " + String(mat1[k][countNum]),"val =
  12494. // " + String(dataList[id]))
  12495. // count down:
  12496. countNum -= 1
  12497. }
  12498. // check to see if the 0 and 1 in the array are the same - if so, set 0
  12499. // to 0:
  12500. if (kclass[0] == kclass[1]) {
  12501. kclass[0] = 0
  12502. }
  12503. this.setBounds(kclass);
  12504. this.setRanges();
  12505. this.method = _t('Jenks') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12506. return this.bounds; //array of breaks
  12507. }
  12508. /**
  12509. * Quantile classification Return an array with bounds : ie array(0, 0.75,
  12510. * 1.5, 2.25, 3);
  12511. */
  12512. this.getClassUniqueValues = function() {
  12513. if (this._nodata())
  12514. return;
  12515. this.is_uniqueValues = true;
  12516. var tmp = this.sorted(); // display in alphabetical order
  12517. var a = Array();
  12518. for (i = 0; i < this.pop(); i++) {
  12519. if(a.indexOf(tmp[i]) === -1)
  12520. a.push(tmp[i]);
  12521. }
  12522. this.bounds = a;
  12523. // we specify the classification method
  12524. this.method = _t('unique values');
  12525. return a;
  12526. };
  12527. /**
  12528. * Return the class of a given value.
  12529. * For example value : 6
  12530. * and bounds array = (0, 4, 8, 12);
  12531. * Return 2
  12532. */
  12533. this.getClass = function(value) {
  12534. for(i = 0; i < this.bounds.length; i++) {
  12535. if(this.is_uniqueValues == true) {
  12536. if(value == this.bounds[i])
  12537. return i;
  12538. } else {
  12539. // parseFloat() is necessary
  12540. if(parseFloat(value) <= this.bounds[i + 1]) {
  12541. return i;
  12542. }
  12543. }
  12544. }
  12545. return _t("Unable to get value's class.");
  12546. };
  12547. /**
  12548. * Return the ranges array : array('0-0.75', '0.75-1.5', '1.5-2.25',
  12549. * '2.25-3');
  12550. */
  12551. this.getRanges = function() {
  12552. return this.ranges;
  12553. };
  12554. /**
  12555. * Returns the number/index of this.ranges that value falls into
  12556. */
  12557. this.getRangeNum = function(value) {
  12558. var bounds, i;
  12559. for (i = 0; i < this.ranges.length; i++) {
  12560. bounds = this.ranges[i].split(/ - /);
  12561. if (value <= parseFloat(bounds[1])) {
  12562. return i;
  12563. }
  12564. }
  12565. }
  12566. /*
  12567. * Compute inner ranges based on serie.
  12568. * Produce discontinous ranges used for legend - return an array similar to :
  12569. * array('0.00-0.74', '0.98-1.52', '1.78-2.25', '2.99-3.14');
  12570. * If inner ranges already computed, return array values.
  12571. */
  12572. this.getInnerRanges = function() {
  12573. // if already computed, we return the result
  12574. if(this.inner_ranges != null)
  12575. return this.inner_ranges;
  12576. var a = new Array();
  12577. var tmp = this.sorted();
  12578. var cnt = 1; // bounds array counter
  12579. for (i = 0; i < tmp.length; i++) {
  12580. if(i == 0) var range_firstvalue = tmp[i]; // we init first range value
  12581. if(parseFloat(tmp[i]) > parseFloat(this.bounds[cnt])) {
  12582. a[cnt - 1] = '' + range_firstvalue + this.separator + tmp[i-1];
  12583. var range_firstvalue = tmp[i];
  12584. cnt++;
  12585. }
  12586. // we reach the last range, we finally complete manually
  12587. // and return the array
  12588. if(cnt == (this.bounds.length - 1)) {
  12589. // we set the last value
  12590. a[cnt - 1] = '' + range_firstvalue + this.separator + tmp[tmp.length-1];
  12591. this.inner_ranges = a;
  12592. return this.inner_ranges;
  12593. }
  12594. }
  12595. };
  12596. this.getSortedlist = function() {
  12597. return this.sorted().join(', ');
  12598. };
  12599. /**
  12600. * Return an html legend
  12601. * colors : specify an array of color (hexadecimal values)
  12602. * legend : specify a text input for the legend. By default, just displays 'legend'
  12603. * counter : if not null, display counter value
  12604. * callback : if not null, callback function applied on legend boundaries
  12605. * mode : null, 'default', 'distinct', 'discontinuous' :
  12606. * - if mode is null, will display legend as 'default mode'
  12607. * - 'default' : displays ranges like in ranges array (continuous values), sample : 29.26 - 378.80 / 378.80 - 2762.25 / 2762.25 - 6884.84
  12608. * - 'distinct' : Add + 1 according to decimal precision to distinguish classes (discrete values), sample : 29.26 - 378.80 / 378.81 - 2762.25 / 2762.26 - 6884.84
  12609. * - 'discontinuous' : indicates the range of data actually falling in each class , sample : 29.26 - 225.43 / 852.12 - 2762.20 / 3001.25 - 6884.84 / not implemented yet
  12610. * order : null, 'ASC', 'DESC'
  12611. */
  12612. this.getHtmlLegend = function(colors, legend, counter, callback, mode, order) {
  12613. var cnt= '';
  12614. var elements = new Array();
  12615. this.doCount(); // we do count, even if not displayed
  12616. if(colors != null) {
  12617. ccolors = colors;
  12618. }
  12619. else {
  12620. ccolors = this.colors;
  12621. }
  12622. if(legend != null) {
  12623. lg = legend;
  12624. }
  12625. else {
  12626. lg = 'Legend';
  12627. }
  12628. if(counter != null) {
  12629. getcounter = true;
  12630. }
  12631. else {
  12632. getcounter = false;
  12633. }
  12634. if(callback != null) {
  12635. fn = callback;
  12636. }
  12637. else {
  12638. fn = function(o) {return o;};
  12639. }
  12640. if(mode == null) {
  12641. mode = 'default';
  12642. }
  12643. if(mode == 'discontinuous') {
  12644. this.getInnerRanges();
  12645. // check if some classes are not populated / equivalent of in_array function
  12646. if(this.counter.indexOf(0) !== -1) {
  12647. if(this.silent) this.log("[silent mode] " + _t("Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\nPlease switch to 'default' or 'distinct' modes. Exit!"), true);
  12648. else throw new TypeError(_t("Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\nPlease switch to 'default' or 'distinct' modes. Exit!"));
  12649. return;
  12650. }
  12651. }
  12652. if(order !== 'DESC') order = 'ASC';
  12653. if(ccolors.length < this.ranges.length) {
  12654. if(this.silent) this.log("[silent mode] " + _t('The number of colors should fit the number of ranges. Exit!'), true);
  12655. else throw new TypeError(_t('The number of colors should fit the number of ranges. Exit!'));
  12656. return;
  12657. }
  12658. if(this.is_uniqueValues == false) {
  12659. for (i = 0; i < (this.ranges.length); i++) {
  12660. if(getcounter===true) {
  12661. cnt = ' <span class="geostats-legend-counter">(' + this.counter[i] + ')</span>';
  12662. }
  12663. //console.log("Ranges : " + this.ranges[i]);
  12664. // default mode
  12665. var tmp = this.ranges[i].split(this.separator);
  12666. var start_value = parseFloat(tmp[0]).toFixed(this.precision);
  12667. var end_value = parseFloat(tmp[1]).toFixed(this.precision);
  12668. // if mode == 'distinct' and we are not working on the first value
  12669. if(mode == 'distinct' && i != 0) {
  12670. if(isInt(start_value)) {
  12671. start_value = parseInt(start_value) + 1;
  12672. // format to float if necessary
  12673. if(this.precisionflag == 'manual' && this.precision != 0) start_value = parseFloat(start_value).toFixed(this.precision);
  12674. } else {
  12675. start_value = parseFloat(start_value) + (1 / Math.pow(10,this.precision));
  12676. // strangely the formula above return sometimes long decimal values,
  12677. // the following instruction fix it
  12678. start_value = parseFloat(start_value).toFixed(this.precision);
  12679. }
  12680. }
  12681. // if mode == 'discontinuous'
  12682. if(mode == 'discontinuous') {
  12683. var tmp = this.inner_ranges[i].split(this.separator);
  12684. // console.log("Ranges : " + this.inner_ranges[i]);
  12685. var start_value = parseFloat(tmp[0]).toFixed(this.precision);
  12686. var end_value = parseFloat(tmp[1]).toFixed(this.precision);
  12687. }
  12688. // we apply callback function
  12689. var el = fn(start_value) + this.legendSeparator + fn(end_value);
  12690. var block = '<div><div class="geostats-legend-block" style="background-color:' + ccolors[i] + '"></div> ' + el + cnt + '</div>';
  12691. elements.push(block);
  12692. }
  12693. } else {
  12694. // only if classification is done on unique values
  12695. for (i = 0; i < (this.bounds.length); i++) {
  12696. if(getcounter===true) {
  12697. cnt = ' <span class="geostats-legend-counter">(' + this.counter[i] + ')</span>';
  12698. }
  12699. var el = fn(this.bounds[i]);
  12700. var block = '<div><div class="geostats-legend-block" style="background-color:' + ccolors[i] + '"></div> ' + el + cnt + '</div>';
  12701. elements.push(block);
  12702. }
  12703. }
  12704. // do we reverse the return legend ?
  12705. if(order === 'DESC') elements.reverse();
  12706. // finally we create HTML and return it
  12707. var content = '<div class="geostats-legend"><div class="geostats-legend-title">' + _t(lg) + '</div>';
  12708. for (i = 0; i < (elements.length); i++) {
  12709. content += elements[i];
  12710. }
  12711. content += '</div>';
  12712. return content;
  12713. };
  12714. // object constructor
  12715. // At the end of script. If not setPrecision() method is not known
  12716. // we create an object identifier for debugging
  12717. this.objectID = new Date().getUTCMilliseconds();
  12718. this.log('Creating new geostats object');
  12719. if(typeof a !== 'undefined' && a.length > 0) {
  12720. this.serie = a;
  12721. this.setPrecision();
  12722. this.log('Setting serie (' + a.length + ') : ' + a.join());
  12723. } else {
  12724. this.serie = Array();
  12725. };
  12726. // creating aliases on classification function for backward compatibility
  12727. this.getJenks = this.getClassJenks;
  12728. this.getGeometricProgression = this.getClassGeometricProgression;
  12729. this.getEqInterval = this.getClassEqInterval;
  12730. this.getQuantile = this.getClassQuantile;
  12731. this.getStdDeviation = this.getClassStdDeviation;
  12732. this.getUniqueValues = this.getClassUniqueValues;
  12733. this.getArithmeticProgression = this.getClassArithmeticProgression;
  12734. };
  12735. window.geostats = geostats;
  12736. return geostats;
  12737. });
  12738. /***/ }),
  12739. /* 78 */
  12740. /***/ (function(module, exports) {
  12741. /*
  12742. * JsonSQL
  12743. * By: Trent Richardson [http://trentrichardson.com]
  12744. * Version 0.1
  12745. * Last Modified: 1/1/2008
  12746. *
  12747. * Copyright 2008 Trent Richardson
  12748. *
  12749. * Licensed under the Apache License, Version 2.0 (the "License");
  12750. * you may not use this file except in compliance with the License.
  12751. * You may obtain a copy of the License at
  12752. *
  12753. * http://www.apache.org/licenses/LICENSE-2.0
  12754. *
  12755. * Unless required by applicable law or agreed to in writing, software
  12756. * distributed under the License is distributed on an "AS IS" BASIS,
  12757. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12758. * See the License for the specific language governing permissions and
  12759. * limitations under the License.
  12760. */
  12761. window.jsonsql = {
  12762. query: function(sql,json){
  12763. var returnfields = sql.match(/^(select)\s+([a-z0-9_\,\.\s\*]+)\s+from\s+([a-z0-9_\.]+)(?: where\s+\((.+)\))?\s*(?:order\sby\s+([a-z0-9_\,]+))?\s*(asc|desc|ascnum|descnum)?\s*(?:limit\s+([0-9_\,]+))?/i);
  12764. var ops = {
  12765. fields: returnfields[2].replace(' ','').split(','),
  12766. from: returnfields[3].replace(' ',''),
  12767. where: (returnfields[4] == undefined)? "true":returnfields[4],
  12768. orderby: (returnfields[5] == undefined)? []:returnfields[5].replace(' ','').split(','),
  12769. order: (returnfields[6] == undefined)? "asc":returnfields[6],
  12770. limit: (returnfields[7] == undefined)? []:returnfields[7].replace(' ','').split(',')
  12771. };
  12772. return this.parse(json, ops);
  12773. },
  12774. parse: function(json,ops){
  12775. var o = { fields:["*"], from:"json", where:"", orderby:[], order: "asc", limit:[] };
  12776. for(i in ops) o[i] = ops[i];
  12777. var result = [];
  12778. result = this.returnFilter(json,o);
  12779. result = this.returnOrderBy(result,o.orderby,o.order);
  12780. result = this.returnLimit(result,o.limit);
  12781. return result;
  12782. },
  12783. returnFilter: function(json,jsonsql_o){
  12784. var jsonsql_scope = eval(jsonsql_o.from);
  12785. var jsonsql_result = [];
  12786. var jsonsql_rc = 0;
  12787. if(jsonsql_o.where == "")
  12788. jsonsql_o.where = "true";
  12789. for(var jsonsql_i in jsonsql_scope){
  12790. with(jsonsql_scope[jsonsql_i]){
  12791. if(eval(jsonsql_o.where)){
  12792. jsonsql_result[jsonsql_rc++] = this.returnFields(jsonsql_scope[jsonsql_i],jsonsql_o.fields);
  12793. }
  12794. }
  12795. }
  12796. return jsonsql_result;
  12797. },
  12798. returnFields: function(scope,fields){
  12799. if(fields.length == 0)
  12800. fields = ["*"];
  12801. if(fields[0] == "*")
  12802. return scope;
  12803. var returnobj = {};
  12804. for(var i in fields)
  12805. returnobj[fields[i]] = scope[fields[i]];
  12806. return returnobj;
  12807. },
  12808. returnOrderBy: function(result,orderby,order){
  12809. if(orderby.length == 0)
  12810. return result;
  12811. result.sort(function(a,b){
  12812. switch(order.toLowerCase()){
  12813. case "desc": return (eval('a.'+ orderby[0] +' < b.'+ orderby[0]))? 1:-1;
  12814. case "asc": return (eval('a.'+ orderby[0] +' > b.'+ orderby[0]))? 1:-1;
  12815. case "descnum": return (eval('a.'+ orderby[0] +' - b.'+ orderby[0]));
  12816. case "ascnum": return (eval('b.'+ orderby[0] +' - a.'+ orderby[0]));
  12817. }
  12818. });
  12819. return result;
  12820. },
  12821. returnLimit: function(result,limit){
  12822. switch(limit.length){
  12823. case 0: return result;
  12824. case 1: return result.splice(0,limit[0]);
  12825. case 2: return result.splice(limit[0]-1,limit[1]);
  12826. }
  12827. }
  12828. };
  12829. /***/ }),
  12830. /* 79 */
  12831. /***/ (function(module, exports, __webpack_require__) {
  12832. /*jslint node:true */
  12833. var xml2js = __webpack_require__(43);
  12834. var xml2json = __webpack_require__(95);
  12835. var js2xml = __webpack_require__(49);
  12836. var json2xml = __webpack_require__(96);
  12837. module.exports = {
  12838. xml2js: xml2js,
  12839. xml2json: xml2json,
  12840. js2xml: js2xml,
  12841. json2xml: json2xml
  12842. };
  12843. /***/ }),
  12844. /* 80 */
  12845. /***/ (function(module, exports, __webpack_require__) {
  12846. /* WEBPACK VAR INJECTION */(function(Buffer) {;(function (sax) { // wrapper for non-node envs
  12847. sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
  12848. sax.SAXParser = SAXParser
  12849. sax.SAXStream = SAXStream
  12850. sax.createStream = createStream
  12851. // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
  12852. // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
  12853. // since that's the earliest that a buffer overrun could occur. This way, checks are
  12854. // as rare as required, but as often as necessary to ensure never crossing this bound.
  12855. // Furthermore, buffers are only tested at most once per write(), so passing a very
  12856. // large string into write() might have undesirable effects, but this is manageable by
  12857. // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
  12858. // edge case, result in creating at most one complete copy of the string passed in.
  12859. // Set to Infinity to have unlimited buffers.
  12860. sax.MAX_BUFFER_LENGTH = 64 * 1024
  12861. var buffers = [
  12862. 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',
  12863. 'procInstName', 'procInstBody', 'entity', 'attribName',
  12864. 'attribValue', 'cdata', 'script'
  12865. ]
  12866. sax.EVENTS = [
  12867. 'text',
  12868. 'processinginstruction',
  12869. 'sgmldeclaration',
  12870. 'doctype',
  12871. 'comment',
  12872. 'opentagstart',
  12873. 'attribute',
  12874. 'opentag',
  12875. 'closetag',
  12876. 'opencdata',
  12877. 'cdata',
  12878. 'closecdata',
  12879. 'error',
  12880. 'end',
  12881. 'ready',
  12882. 'script',
  12883. 'opennamespace',
  12884. 'closenamespace'
  12885. ]
  12886. function SAXParser (strict, opt) {
  12887. if (!(this instanceof SAXParser)) {
  12888. return new SAXParser(strict, opt)
  12889. }
  12890. var parser = this
  12891. clearBuffers(parser)
  12892. parser.q = parser.c = ''
  12893. parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
  12894. parser.opt = opt || {}
  12895. parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags
  12896. parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'
  12897. parser.tags = []
  12898. parser.closed = parser.closedRoot = parser.sawRoot = false
  12899. parser.tag = parser.error = null
  12900. parser.strict = !!strict
  12901. parser.noscript = !!(strict || parser.opt.noscript)
  12902. parser.state = S.BEGIN
  12903. parser.strictEntities = parser.opt.strictEntities
  12904. parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)
  12905. parser.attribList = []
  12906. // namespaces form a prototype chain.
  12907. // it always points at the current tag,
  12908. // which protos to its parent tag.
  12909. if (parser.opt.xmlns) {
  12910. parser.ns = Object.create(rootNS)
  12911. }
  12912. // mostly just for error reporting
  12913. parser.trackPosition = parser.opt.position !== false
  12914. if (parser.trackPosition) {
  12915. parser.position = parser.line = parser.column = 0
  12916. }
  12917. emit(parser, 'onready')
  12918. }
  12919. if (!Object.create) {
  12920. Object.create = function (o) {
  12921. function F () {}
  12922. F.prototype = o
  12923. var newf = new F()
  12924. return newf
  12925. }
  12926. }
  12927. if (!Object.keys) {
  12928. Object.keys = function (o) {
  12929. var a = []
  12930. for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
  12931. return a
  12932. }
  12933. }
  12934. function checkBufferLength (parser) {
  12935. var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
  12936. var maxActual = 0
  12937. for (var i = 0, l = buffers.length; i < l; i++) {
  12938. var len = parser[buffers[i]].length
  12939. if (len > maxAllowed) {
  12940. // Text/cdata nodes can get big, and since they're buffered,
  12941. // we can get here under normal conditions.
  12942. // Avoid issues by emitting the text node now,
  12943. // so at least it won't get any bigger.
  12944. switch (buffers[i]) {
  12945. case 'textNode':
  12946. closeText(parser)
  12947. break
  12948. case 'cdata':
  12949. emitNode(parser, 'oncdata', parser.cdata)
  12950. parser.cdata = ''
  12951. break
  12952. case 'script':
  12953. emitNode(parser, 'onscript', parser.script)
  12954. parser.script = ''
  12955. break
  12956. default:
  12957. error(parser, 'Max buffer length exceeded: ' + buffers[i])
  12958. }
  12959. }
  12960. maxActual = Math.max(maxActual, len)
  12961. }
  12962. // schedule the next check for the earliest possible buffer overrun.
  12963. var m = sax.MAX_BUFFER_LENGTH - maxActual
  12964. parser.bufferCheckPosition = m + parser.position
  12965. }
  12966. function clearBuffers (parser) {
  12967. for (var i = 0, l = buffers.length; i < l; i++) {
  12968. parser[buffers[i]] = ''
  12969. }
  12970. }
  12971. function flushBuffers (parser) {
  12972. closeText(parser)
  12973. if (parser.cdata !== '') {
  12974. emitNode(parser, 'oncdata', parser.cdata)
  12975. parser.cdata = ''
  12976. }
  12977. if (parser.script !== '') {
  12978. emitNode(parser, 'onscript', parser.script)
  12979. parser.script = ''
  12980. }
  12981. }
  12982. SAXParser.prototype = {
  12983. end: function () { end(this) },
  12984. write: write,
  12985. resume: function () { this.error = null; return this },
  12986. close: function () { return this.write(null) },
  12987. flush: function () { flushBuffers(this) }
  12988. }
  12989. var Stream
  12990. try {
  12991. Stream = __webpack_require__(83).Stream
  12992. } catch (ex) {
  12993. Stream = function () {}
  12994. }
  12995. var streamWraps = sax.EVENTS.filter(function (ev) {
  12996. return ev !== 'error' && ev !== 'end'
  12997. })
  12998. function createStream (strict, opt) {
  12999. return new SAXStream(strict, opt)
  13000. }
  13001. function SAXStream (strict, opt) {
  13002. if (!(this instanceof SAXStream)) {
  13003. return new SAXStream(strict, opt)
  13004. }
  13005. Stream.apply(this)
  13006. this._parser = new SAXParser(strict, opt)
  13007. this.writable = true
  13008. this.readable = true
  13009. var me = this
  13010. this._parser.onend = function () {
  13011. me.emit('end')
  13012. }
  13013. this._parser.onerror = function (er) {
  13014. me.emit('error', er)
  13015. // if didn't throw, then means error was handled.
  13016. // go ahead and clear error, so we can write again.
  13017. me._parser.error = null
  13018. }
  13019. this._decoder = null
  13020. streamWraps.forEach(function (ev) {
  13021. Object.defineProperty(me, 'on' + ev, {
  13022. get: function () {
  13023. return me._parser['on' + ev]
  13024. },
  13025. set: function (h) {
  13026. if (!h) {
  13027. me.removeAllListeners(ev)
  13028. me._parser['on' + ev] = h
  13029. return h
  13030. }
  13031. me.on(ev, h)
  13032. },
  13033. enumerable: true,
  13034. configurable: false
  13035. })
  13036. })
  13037. }
  13038. SAXStream.prototype = Object.create(Stream.prototype, {
  13039. constructor: {
  13040. value: SAXStream
  13041. }
  13042. })
  13043. SAXStream.prototype.write = function (data) {
  13044. if (typeof Buffer === 'function' &&
  13045. typeof Buffer.isBuffer === 'function' &&
  13046. Buffer.isBuffer(data)) {
  13047. if (!this._decoder) {
  13048. var SD = __webpack_require__(30).StringDecoder
  13049. this._decoder = new SD('utf8')
  13050. }
  13051. data = this._decoder.write(data)
  13052. }
  13053. this._parser.write(data.toString())
  13054. this.emit('data', data)
  13055. return true
  13056. }
  13057. SAXStream.prototype.end = function (chunk) {
  13058. if (chunk && chunk.length) {
  13059. this.write(chunk)
  13060. }
  13061. this._parser.end()
  13062. return true
  13063. }
  13064. SAXStream.prototype.on = function (ev, handler) {
  13065. var me = this
  13066. if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
  13067. me._parser['on' + ev] = function () {
  13068. var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)
  13069. args.splice(0, 0, ev)
  13070. me.emit.apply(me, args)
  13071. }
  13072. }
  13073. return Stream.prototype.on.call(me, ev, handler)
  13074. }
  13075. // this really needs to be replaced with character classes.
  13076. // XML allows all manner of ridiculous numbers and digits.
  13077. var CDATA = '[CDATA['
  13078. var DOCTYPE = 'DOCTYPE'
  13079. var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'
  13080. var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
  13081. var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
  13082. // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
  13083. // This implementation works on strings, a single character at a time
  13084. // as such, it cannot ever support astral-plane characters (10000-EFFFF)
  13085. // without a significant breaking change to either this parser, or the
  13086. // JavaScript language. Implementation of an emoji-capable xml parser
  13087. // is left as an exercise for the reader.
  13088. var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
  13089. var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
  13090. var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
  13091. var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
  13092. function isWhitespace (c) {
  13093. return c === ' ' || c === '\n' || c === '\r' || c === '\t'
  13094. }
  13095. function isQuote (c) {
  13096. return c === '"' || c === '\''
  13097. }
  13098. function isAttribEnd (c) {
  13099. return c === '>' || isWhitespace(c)
  13100. }
  13101. function isMatch (regex, c) {
  13102. return regex.test(c)
  13103. }
  13104. function notMatch (regex, c) {
  13105. return !isMatch(regex, c)
  13106. }
  13107. var S = 0
  13108. sax.STATE = {
  13109. BEGIN: S++, // leading byte order mark or whitespace
  13110. BEGIN_WHITESPACE: S++, // leading whitespace
  13111. TEXT: S++, // general stuff
  13112. TEXT_ENTITY: S++, // &amp and such.
  13113. OPEN_WAKA: S++, // <
  13114. SGML_DECL: S++, // <!BLARG
  13115. SGML_DECL_QUOTED: S++, // <!BLARG foo "bar
  13116. DOCTYPE: S++, // <!DOCTYPE
  13117. DOCTYPE_QUOTED: S++, // <!DOCTYPE "//blah
  13118. DOCTYPE_DTD: S++, // <!DOCTYPE "//blah" [ ...
  13119. DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE "//blah" [ "foo
  13120. COMMENT_STARTING: S++, // <!-
  13121. COMMENT: S++, // <!--
  13122. COMMENT_ENDING: S++, // <!-- blah -
  13123. COMMENT_ENDED: S++, // <!-- blah --
  13124. CDATA: S++, // <![CDATA[ something
  13125. CDATA_ENDING: S++, // ]
  13126. CDATA_ENDING_2: S++, // ]]
  13127. PROC_INST: S++, // <?hi
  13128. PROC_INST_BODY: S++, // <?hi there
  13129. PROC_INST_ENDING: S++, // <?hi "there" ?
  13130. OPEN_TAG: S++, // <strong
  13131. OPEN_TAG_SLASH: S++, // <strong /
  13132. ATTRIB: S++, // <a
  13133. ATTRIB_NAME: S++, // <a foo
  13134. ATTRIB_NAME_SAW_WHITE: S++, // <a foo _
  13135. ATTRIB_VALUE: S++, // <a foo=
  13136. ATTRIB_VALUE_QUOTED: S++, // <a foo="bar
  13137. ATTRIB_VALUE_CLOSED: S++, // <a foo="bar"
  13138. ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar
  13139. ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar="&quot;"
  13140. ATTRIB_VALUE_ENTITY_U: S++, // <foo bar=&quot
  13141. CLOSE_TAG: S++, // </a
  13142. CLOSE_TAG_SAW_WHITE: S++, // </a >
  13143. SCRIPT: S++, // <script> ...
  13144. SCRIPT_ENDING: S++ // <script> ... <
  13145. }
  13146. sax.XML_ENTITIES = {
  13147. 'amp': '&',
  13148. 'gt': '>',
  13149. 'lt': '<',
  13150. 'quot': '"',
  13151. 'apos': "'"
  13152. }
  13153. sax.ENTITIES = {
  13154. 'amp': '&',
  13155. 'gt': '>',
  13156. 'lt': '<',
  13157. 'quot': '"',
  13158. 'apos': "'",
  13159. 'AElig': 198,
  13160. 'Aacute': 193,
  13161. 'Acirc': 194,
  13162. 'Agrave': 192,
  13163. 'Aring': 197,
  13164. 'Atilde': 195,
  13165. 'Auml': 196,
  13166. 'Ccedil': 199,
  13167. 'ETH': 208,
  13168. 'Eacute': 201,
  13169. 'Ecirc': 202,
  13170. 'Egrave': 200,
  13171. 'Euml': 203,
  13172. 'Iacute': 205,
  13173. 'Icirc': 206,
  13174. 'Igrave': 204,
  13175. 'Iuml': 207,
  13176. 'Ntilde': 209,
  13177. 'Oacute': 211,
  13178. 'Ocirc': 212,
  13179. 'Ograve': 210,
  13180. 'Oslash': 216,
  13181. 'Otilde': 213,
  13182. 'Ouml': 214,
  13183. 'THORN': 222,
  13184. 'Uacute': 218,
  13185. 'Ucirc': 219,
  13186. 'Ugrave': 217,
  13187. 'Uuml': 220,
  13188. 'Yacute': 221,
  13189. 'aacute': 225,
  13190. 'acirc': 226,
  13191. 'aelig': 230,
  13192. 'agrave': 224,
  13193. 'aring': 229,
  13194. 'atilde': 227,
  13195. 'auml': 228,
  13196. 'ccedil': 231,
  13197. 'eacute': 233,
  13198. 'ecirc': 234,
  13199. 'egrave': 232,
  13200. 'eth': 240,
  13201. 'euml': 235,
  13202. 'iacute': 237,
  13203. 'icirc': 238,
  13204. 'igrave': 236,
  13205. 'iuml': 239,
  13206. 'ntilde': 241,
  13207. 'oacute': 243,
  13208. 'ocirc': 244,
  13209. 'ograve': 242,
  13210. 'oslash': 248,
  13211. 'otilde': 245,
  13212. 'ouml': 246,
  13213. 'szlig': 223,
  13214. 'thorn': 254,
  13215. 'uacute': 250,
  13216. 'ucirc': 251,
  13217. 'ugrave': 249,
  13218. 'uuml': 252,
  13219. 'yacute': 253,
  13220. 'yuml': 255,
  13221. 'copy': 169,
  13222. 'reg': 174,
  13223. 'nbsp': 160,
  13224. 'iexcl': 161,
  13225. 'cent': 162,
  13226. 'pound': 163,
  13227. 'curren': 164,
  13228. 'yen': 165,
  13229. 'brvbar': 166,
  13230. 'sect': 167,
  13231. 'uml': 168,
  13232. 'ordf': 170,
  13233. 'laquo': 171,
  13234. 'not': 172,
  13235. 'shy': 173,
  13236. 'macr': 175,
  13237. 'deg': 176,
  13238. 'plusmn': 177,
  13239. 'sup1': 185,
  13240. 'sup2': 178,
  13241. 'sup3': 179,
  13242. 'acute': 180,
  13243. 'micro': 181,
  13244. 'para': 182,
  13245. 'middot': 183,
  13246. 'cedil': 184,
  13247. 'ordm': 186,
  13248. 'raquo': 187,
  13249. 'frac14': 188,
  13250. 'frac12': 189,
  13251. 'frac34': 190,
  13252. 'iquest': 191,
  13253. 'times': 215,
  13254. 'divide': 247,
  13255. 'OElig': 338,
  13256. 'oelig': 339,
  13257. 'Scaron': 352,
  13258. 'scaron': 353,
  13259. 'Yuml': 376,
  13260. 'fnof': 402,
  13261. 'circ': 710,
  13262. 'tilde': 732,
  13263. 'Alpha': 913,
  13264. 'Beta': 914,
  13265. 'Gamma': 915,
  13266. 'Delta': 916,
  13267. 'Epsilon': 917,
  13268. 'Zeta': 918,
  13269. 'Eta': 919,
  13270. 'Theta': 920,
  13271. 'Iota': 921,
  13272. 'Kappa': 922,
  13273. 'Lambda': 923,
  13274. 'Mu': 924,
  13275. 'Nu': 925,
  13276. 'Xi': 926,
  13277. 'Omicron': 927,
  13278. 'Pi': 928,
  13279. 'Rho': 929,
  13280. 'Sigma': 931,
  13281. 'Tau': 932,
  13282. 'Upsilon': 933,
  13283. 'Phi': 934,
  13284. 'Chi': 935,
  13285. 'Psi': 936,
  13286. 'Omega': 937,
  13287. 'alpha': 945,
  13288. 'beta': 946,
  13289. 'gamma': 947,
  13290. 'delta': 948,
  13291. 'epsilon': 949,
  13292. 'zeta': 950,
  13293. 'eta': 951,
  13294. 'theta': 952,
  13295. 'iota': 953,
  13296. 'kappa': 954,
  13297. 'lambda': 955,
  13298. 'mu': 956,
  13299. 'nu': 957,
  13300. 'xi': 958,
  13301. 'omicron': 959,
  13302. 'pi': 960,
  13303. 'rho': 961,
  13304. 'sigmaf': 962,
  13305. 'sigma': 963,
  13306. 'tau': 964,
  13307. 'upsilon': 965,
  13308. 'phi': 966,
  13309. 'chi': 967,
  13310. 'psi': 968,
  13311. 'omega': 969,
  13312. 'thetasym': 977,
  13313. 'upsih': 978,
  13314. 'piv': 982,
  13315. 'ensp': 8194,
  13316. 'emsp': 8195,
  13317. 'thinsp': 8201,
  13318. 'zwnj': 8204,
  13319. 'zwj': 8205,
  13320. 'lrm': 8206,
  13321. 'rlm': 8207,
  13322. 'ndash': 8211,
  13323. 'mdash': 8212,
  13324. 'lsquo': 8216,
  13325. 'rsquo': 8217,
  13326. 'sbquo': 8218,
  13327. 'ldquo': 8220,
  13328. 'rdquo': 8221,
  13329. 'bdquo': 8222,
  13330. 'dagger': 8224,
  13331. 'Dagger': 8225,
  13332. 'bull': 8226,
  13333. 'hellip': 8230,
  13334. 'permil': 8240,
  13335. 'prime': 8242,
  13336. 'Prime': 8243,
  13337. 'lsaquo': 8249,
  13338. 'rsaquo': 8250,
  13339. 'oline': 8254,
  13340. 'frasl': 8260,
  13341. 'euro': 8364,
  13342. 'image': 8465,
  13343. 'weierp': 8472,
  13344. 'real': 8476,
  13345. 'trade': 8482,
  13346. 'alefsym': 8501,
  13347. 'larr': 8592,
  13348. 'uarr': 8593,
  13349. 'rarr': 8594,
  13350. 'darr': 8595,
  13351. 'harr': 8596,
  13352. 'crarr': 8629,
  13353. 'lArr': 8656,
  13354. 'uArr': 8657,
  13355. 'rArr': 8658,
  13356. 'dArr': 8659,
  13357. 'hArr': 8660,
  13358. 'forall': 8704,
  13359. 'part': 8706,
  13360. 'exist': 8707,
  13361. 'empty': 8709,
  13362. 'nabla': 8711,
  13363. 'isin': 8712,
  13364. 'notin': 8713,
  13365. 'ni': 8715,
  13366. 'prod': 8719,
  13367. 'sum': 8721,
  13368. 'minus': 8722,
  13369. 'lowast': 8727,
  13370. 'radic': 8730,
  13371. 'prop': 8733,
  13372. 'infin': 8734,
  13373. 'ang': 8736,
  13374. 'and': 8743,
  13375. 'or': 8744,
  13376. 'cap': 8745,
  13377. 'cup': 8746,
  13378. 'int': 8747,
  13379. 'there4': 8756,
  13380. 'sim': 8764,
  13381. 'cong': 8773,
  13382. 'asymp': 8776,
  13383. 'ne': 8800,
  13384. 'equiv': 8801,
  13385. 'le': 8804,
  13386. 'ge': 8805,
  13387. 'sub': 8834,
  13388. 'sup': 8835,
  13389. 'nsub': 8836,
  13390. 'sube': 8838,
  13391. 'supe': 8839,
  13392. 'oplus': 8853,
  13393. 'otimes': 8855,
  13394. 'perp': 8869,
  13395. 'sdot': 8901,
  13396. 'lceil': 8968,
  13397. 'rceil': 8969,
  13398. 'lfloor': 8970,
  13399. 'rfloor': 8971,
  13400. 'lang': 9001,
  13401. 'rang': 9002,
  13402. 'loz': 9674,
  13403. 'spades': 9824,
  13404. 'clubs': 9827,
  13405. 'hearts': 9829,
  13406. 'diams': 9830
  13407. }
  13408. Object.keys(sax.ENTITIES).forEach(function (key) {
  13409. var e = sax.ENTITIES[key]
  13410. var s = typeof e === 'number' ? String.fromCharCode(e) : e
  13411. sax.ENTITIES[key] = s
  13412. })
  13413. for (var s in sax.STATE) {
  13414. sax.STATE[sax.STATE[s]] = s
  13415. }
  13416. // shorthand
  13417. S = sax.STATE
  13418. function emit (parser, event, data) {
  13419. parser[event] && parser[event](data)
  13420. }
  13421. function emitNode (parser, nodeType, data) {
  13422. if (parser.textNode) closeText(parser)
  13423. emit(parser, nodeType, data)
  13424. }
  13425. function closeText (parser) {
  13426. parser.textNode = textopts(parser.opt, parser.textNode)
  13427. if (parser.textNode) emit(parser, 'ontext', parser.textNode)
  13428. parser.textNode = ''
  13429. }
  13430. function textopts (opt, text) {
  13431. if (opt.trim) text = text.trim()
  13432. if (opt.normalize) text = text.replace(/\s+/g, ' ')
  13433. return text
  13434. }
  13435. function error (parser, er) {
  13436. closeText(parser)
  13437. if (parser.trackPosition) {
  13438. er += '\nLine: ' + parser.line +
  13439. '\nColumn: ' + parser.column +
  13440. '\nChar: ' + parser.c
  13441. }
  13442. er = new Error(er)
  13443. parser.error = er
  13444. emit(parser, 'onerror', er)
  13445. return parser
  13446. }
  13447. function end (parser) {
  13448. if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')
  13449. if ((parser.state !== S.BEGIN) &&
  13450. (parser.state !== S.BEGIN_WHITESPACE) &&
  13451. (parser.state !== S.TEXT)) {
  13452. error(parser, 'Unexpected end')
  13453. }
  13454. closeText(parser)
  13455. parser.c = ''
  13456. parser.closed = true
  13457. emit(parser, 'onend')
  13458. SAXParser.call(parser, parser.strict, parser.opt)
  13459. return parser
  13460. }
  13461. function strictFail (parser, message) {
  13462. if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {
  13463. throw new Error('bad call to strictFail')
  13464. }
  13465. if (parser.strict) {
  13466. error(parser, message)
  13467. }
  13468. }
  13469. function newTag (parser) {
  13470. if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()
  13471. var parent = parser.tags[parser.tags.length - 1] || parser
  13472. var tag = parser.tag = { name: parser.tagName, attributes: {} }
  13473. // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
  13474. if (parser.opt.xmlns) {
  13475. tag.ns = parent.ns
  13476. }
  13477. parser.attribList.length = 0
  13478. emitNode(parser, 'onopentagstart', tag)
  13479. }
  13480. function qname (name, attribute) {
  13481. var i = name.indexOf(':')
  13482. var qualName = i < 0 ? [ '', name ] : name.split(':')
  13483. var prefix = qualName[0]
  13484. var local = qualName[1]
  13485. // <x "xmlns"="http://foo">
  13486. if (attribute && name === 'xmlns') {
  13487. prefix = 'xmlns'
  13488. local = ''
  13489. }
  13490. return { prefix: prefix, local: local }
  13491. }
  13492. function attrib (parser) {
  13493. if (!parser.strict) {
  13494. parser.attribName = parser.attribName[parser.looseCase]()
  13495. }
  13496. if (parser.attribList.indexOf(parser.attribName) !== -1 ||
  13497. parser.tag.attributes.hasOwnProperty(parser.attribName)) {
  13498. parser.attribName = parser.attribValue = ''
  13499. return
  13500. }
  13501. if (parser.opt.xmlns) {
  13502. var qn = qname(parser.attribName, true)
  13503. var prefix = qn.prefix
  13504. var local = qn.local
  13505. if (prefix === 'xmlns') {
  13506. // namespace binding attribute. push the binding into scope
  13507. if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {
  13508. strictFail(parser,
  13509. 'xml: prefix must be bound to ' + XML_NAMESPACE + '\n' +
  13510. 'Actual: ' + parser.attribValue)
  13511. } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {
  13512. strictFail(parser,
  13513. 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\n' +
  13514. 'Actual: ' + parser.attribValue)
  13515. } else {
  13516. var tag = parser.tag
  13517. var parent = parser.tags[parser.tags.length - 1] || parser
  13518. if (tag.ns === parent.ns) {
  13519. tag.ns = Object.create(parent.ns)
  13520. }
  13521. tag.ns[local] = parser.attribValue
  13522. }
  13523. }
  13524. // defer onattribute events until all attributes have been seen
  13525. // so any new bindings can take effect. preserve attribute order
  13526. // so deferred events can be emitted in document order
  13527. parser.attribList.push([parser.attribName, parser.attribValue])
  13528. } else {
  13529. // in non-xmlns mode, we can emit the event right away
  13530. parser.tag.attributes[parser.attribName] = parser.attribValue
  13531. emitNode(parser, 'onattribute', {
  13532. name: parser.attribName,
  13533. value: parser.attribValue
  13534. })
  13535. }
  13536. parser.attribName = parser.attribValue = ''
  13537. }
  13538. function openTag (parser, selfClosing) {
  13539. if (parser.opt.xmlns) {
  13540. // emit namespace binding events
  13541. var tag = parser.tag
  13542. // add namespace info to tag
  13543. var qn = qname(parser.tagName)
  13544. tag.prefix = qn.prefix
  13545. tag.local = qn.local
  13546. tag.uri = tag.ns[qn.prefix] || ''
  13547. if (tag.prefix && !tag.uri) {
  13548. strictFail(parser, 'Unbound namespace prefix: ' +
  13549. JSON.stringify(parser.tagName))
  13550. tag.uri = qn.prefix
  13551. }
  13552. var parent = parser.tags[parser.tags.length - 1] || parser
  13553. if (tag.ns && parent.ns !== tag.ns) {
  13554. Object.keys(tag.ns).forEach(function (p) {
  13555. emitNode(parser, 'onopennamespace', {
  13556. prefix: p,
  13557. uri: tag.ns[p]
  13558. })
  13559. })
  13560. }
  13561. // handle deferred onattribute events
  13562. // Note: do not apply default ns to attributes:
  13563. // http://www.w3.org/TR/REC-xml-names/#defaulting
  13564. for (var i = 0, l = parser.attribList.length; i < l; i++) {
  13565. var nv = parser.attribList[i]
  13566. var name = nv[0]
  13567. var value = nv[1]
  13568. var qualName = qname(name, true)
  13569. var prefix = qualName.prefix
  13570. var local = qualName.local
  13571. var uri = prefix === '' ? '' : (tag.ns[prefix] || '')
  13572. var a = {
  13573. name: name,
  13574. value: value,
  13575. prefix: prefix,
  13576. local: local,
  13577. uri: uri
  13578. }
  13579. // if there's any attributes with an undefined namespace,
  13580. // then fail on them now.
  13581. if (prefix && prefix !== 'xmlns' && !uri) {
  13582. strictFail(parser, 'Unbound namespace prefix: ' +
  13583. JSON.stringify(prefix))
  13584. a.uri = prefix
  13585. }
  13586. parser.tag.attributes[name] = a
  13587. emitNode(parser, 'onattribute', a)
  13588. }
  13589. parser.attribList.length = 0
  13590. }
  13591. parser.tag.isSelfClosing = !!selfClosing
  13592. // process the tag
  13593. parser.sawRoot = true
  13594. parser.tags.push(parser.tag)
  13595. emitNode(parser, 'onopentag', parser.tag)
  13596. if (!selfClosing) {
  13597. // special case for <script> in non-strict mode.
  13598. if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {
  13599. parser.state = S.SCRIPT
  13600. } else {
  13601. parser.state = S.TEXT
  13602. }
  13603. parser.tag = null
  13604. parser.tagName = ''
  13605. }
  13606. parser.attribName = parser.attribValue = ''
  13607. parser.attribList.length = 0
  13608. }
  13609. function closeTag (parser) {
  13610. if (!parser.tagName) {
  13611. strictFail(parser, 'Weird empty close tag.')
  13612. parser.textNode += '</>'
  13613. parser.state = S.TEXT
  13614. return
  13615. }
  13616. if (parser.script) {
  13617. if (parser.tagName !== 'script') {
  13618. parser.script += '</' + parser.tagName + '>'
  13619. parser.tagName = ''
  13620. parser.state = S.SCRIPT
  13621. return
  13622. }
  13623. emitNode(parser, 'onscript', parser.script)
  13624. parser.script = ''
  13625. }
  13626. // first make sure that the closing tag actually exists.
  13627. // <a><b></c></b></a> will close everything, otherwise.
  13628. var t = parser.tags.length
  13629. var tagName = parser.tagName
  13630. if (!parser.strict) {
  13631. tagName = tagName[parser.looseCase]()
  13632. }
  13633. var closeTo = tagName
  13634. while (t--) {
  13635. var close = parser.tags[t]
  13636. if (close.name !== closeTo) {
  13637. // fail the first time in strict mode
  13638. strictFail(parser, 'Unexpected close tag')
  13639. } else {
  13640. break
  13641. }
  13642. }
  13643. // didn't find it. we already failed for strict, so just abort.
  13644. if (t < 0) {
  13645. strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)
  13646. parser.textNode += '</' + parser.tagName + '>'
  13647. parser.state = S.TEXT
  13648. return
  13649. }
  13650. parser.tagName = tagName
  13651. var s = parser.tags.length
  13652. while (s-- > t) {
  13653. var tag = parser.tag = parser.tags.pop()
  13654. parser.tagName = parser.tag.name
  13655. emitNode(parser, 'onclosetag', parser.tagName)
  13656. var x = {}
  13657. for (var i in tag.ns) {
  13658. x[i] = tag.ns[i]
  13659. }
  13660. var parent = parser.tags[parser.tags.length - 1] || parser
  13661. if (parser.opt.xmlns && tag.ns !== parent.ns) {
  13662. // remove namespace bindings introduced by tag
  13663. Object.keys(tag.ns).forEach(function (p) {
  13664. var n = tag.ns[p]
  13665. emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })
  13666. })
  13667. }
  13668. }
  13669. if (t === 0) parser.closedRoot = true
  13670. parser.tagName = parser.attribValue = parser.attribName = ''
  13671. parser.attribList.length = 0
  13672. parser.state = S.TEXT
  13673. }
  13674. function parseEntity (parser) {
  13675. var entity = parser.entity
  13676. var entityLC = entity.toLowerCase()
  13677. var num
  13678. var numStr = ''
  13679. if (parser.ENTITIES[entity]) {
  13680. return parser.ENTITIES[entity]
  13681. }
  13682. if (parser.ENTITIES[entityLC]) {
  13683. return parser.ENTITIES[entityLC]
  13684. }
  13685. entity = entityLC
  13686. if (entity.charAt(0) === '#') {
  13687. if (entity.charAt(1) === 'x') {
  13688. entity = entity.slice(2)
  13689. num = parseInt(entity, 16)
  13690. numStr = num.toString(16)
  13691. } else {
  13692. entity = entity.slice(1)
  13693. num = parseInt(entity, 10)
  13694. numStr = num.toString(10)
  13695. }
  13696. }
  13697. entity = entity.replace(/^0+/, '')
  13698. if (isNaN(num) || numStr.toLowerCase() !== entity) {
  13699. strictFail(parser, 'Invalid character entity')
  13700. return '&' + parser.entity + ';'
  13701. }
  13702. return String.fromCodePoint(num)
  13703. }
  13704. function beginWhiteSpace (parser, c) {
  13705. if (c === '<') {
  13706. parser.state = S.OPEN_WAKA
  13707. parser.startTagPosition = parser.position
  13708. } else if (!isWhitespace(c)) {
  13709. // have to process this as a text node.
  13710. // weird, but happens.
  13711. strictFail(parser, 'Non-whitespace before first tag.')
  13712. parser.textNode = c
  13713. parser.state = S.TEXT
  13714. }
  13715. }
  13716. function charAt (chunk, i) {
  13717. var result = ''
  13718. if (i < chunk.length) {
  13719. result = chunk.charAt(i)
  13720. }
  13721. return result
  13722. }
  13723. function write (chunk) {
  13724. var parser = this
  13725. if (this.error) {
  13726. throw this.error
  13727. }
  13728. if (parser.closed) {
  13729. return error(parser,
  13730. 'Cannot write after close. Assign an onready handler.')
  13731. }
  13732. if (chunk === null) {
  13733. return end(parser)
  13734. }
  13735. if (typeof chunk === 'object') {
  13736. chunk = chunk.toString()
  13737. }
  13738. var i = 0
  13739. var c = ''
  13740. while (true) {
  13741. c = charAt(chunk, i++)
  13742. parser.c = c
  13743. if (!c) {
  13744. break
  13745. }
  13746. if (parser.trackPosition) {
  13747. parser.position++
  13748. if (c === '\n') {
  13749. parser.line++
  13750. parser.column = 0
  13751. } else {
  13752. parser.column++
  13753. }
  13754. }
  13755. switch (parser.state) {
  13756. case S.BEGIN:
  13757. parser.state = S.BEGIN_WHITESPACE
  13758. if (c === '\uFEFF') {
  13759. continue
  13760. }
  13761. beginWhiteSpace(parser, c)
  13762. continue
  13763. case S.BEGIN_WHITESPACE:
  13764. beginWhiteSpace(parser, c)
  13765. continue
  13766. case S.TEXT:
  13767. if (parser.sawRoot && !parser.closedRoot) {
  13768. var starti = i - 1
  13769. while (c && c !== '<' && c !== '&') {
  13770. c = charAt(chunk, i++)
  13771. if (c && parser.trackPosition) {
  13772. parser.position++
  13773. if (c === '\n') {
  13774. parser.line++
  13775. parser.column = 0
  13776. } else {
  13777. parser.column++
  13778. }
  13779. }
  13780. }
  13781. parser.textNode += chunk.substring(starti, i - 1)
  13782. }
  13783. if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {
  13784. parser.state = S.OPEN_WAKA
  13785. parser.startTagPosition = parser.position
  13786. } else {
  13787. if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {
  13788. strictFail(parser, 'Text data outside of root node.')
  13789. }
  13790. if (c === '&') {
  13791. parser.state = S.TEXT_ENTITY
  13792. } else {
  13793. parser.textNode += c
  13794. }
  13795. }
  13796. continue
  13797. case S.SCRIPT:
  13798. // only non-strict
  13799. if (c === '<') {
  13800. parser.state = S.SCRIPT_ENDING
  13801. } else {
  13802. parser.script += c
  13803. }
  13804. continue
  13805. case S.SCRIPT_ENDING:
  13806. if (c === '/') {
  13807. parser.state = S.CLOSE_TAG
  13808. } else {
  13809. parser.script += '<' + c
  13810. parser.state = S.SCRIPT
  13811. }
  13812. continue
  13813. case S.OPEN_WAKA:
  13814. // either a /, ?, !, or text is coming next.
  13815. if (c === '!') {
  13816. parser.state = S.SGML_DECL
  13817. parser.sgmlDecl = ''
  13818. } else if (isWhitespace(c)) {
  13819. // wait for it...
  13820. } else if (isMatch(nameStart, c)) {
  13821. parser.state = S.OPEN_TAG
  13822. parser.tagName = c
  13823. } else if (c === '/') {
  13824. parser.state = S.CLOSE_TAG
  13825. parser.tagName = ''
  13826. } else if (c === '?') {
  13827. parser.state = S.PROC_INST
  13828. parser.procInstName = parser.procInstBody = ''
  13829. } else {
  13830. strictFail(parser, 'Unencoded <')
  13831. // if there was some whitespace, then add that in.
  13832. if (parser.startTagPosition + 1 < parser.position) {
  13833. var pad = parser.position - parser.startTagPosition
  13834. c = new Array(pad).join(' ') + c
  13835. }
  13836. parser.textNode += '<' + c
  13837. parser.state = S.TEXT
  13838. }
  13839. continue
  13840. case S.SGML_DECL:
  13841. if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
  13842. emitNode(parser, 'onopencdata')
  13843. parser.state = S.CDATA
  13844. parser.sgmlDecl = ''
  13845. parser.cdata = ''
  13846. } else if (parser.sgmlDecl + c === '--') {
  13847. parser.state = S.COMMENT
  13848. parser.comment = ''
  13849. parser.sgmlDecl = ''
  13850. } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
  13851. parser.state = S.DOCTYPE
  13852. if (parser.doctype || parser.sawRoot) {
  13853. strictFail(parser,
  13854. 'Inappropriately located doctype declaration')
  13855. }
  13856. parser.doctype = ''
  13857. parser.sgmlDecl = ''
  13858. } else if (c === '>') {
  13859. emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)
  13860. parser.sgmlDecl = ''
  13861. parser.state = S.TEXT
  13862. } else if (isQuote(c)) {
  13863. parser.state = S.SGML_DECL_QUOTED
  13864. parser.sgmlDecl += c
  13865. } else {
  13866. parser.sgmlDecl += c
  13867. }
  13868. continue
  13869. case S.SGML_DECL_QUOTED:
  13870. if (c === parser.q) {
  13871. parser.state = S.SGML_DECL
  13872. parser.q = ''
  13873. }
  13874. parser.sgmlDecl += c
  13875. continue
  13876. case S.DOCTYPE:
  13877. if (c === '>') {
  13878. parser.state = S.TEXT
  13879. emitNode(parser, 'ondoctype', parser.doctype)
  13880. parser.doctype = true // just remember that we saw it.
  13881. } else {
  13882. parser.doctype += c
  13883. if (c === '[') {
  13884. parser.state = S.DOCTYPE_DTD
  13885. } else if (isQuote(c)) {
  13886. parser.state = S.DOCTYPE_QUOTED
  13887. parser.q = c
  13888. }
  13889. }
  13890. continue
  13891. case S.DOCTYPE_QUOTED:
  13892. parser.doctype += c
  13893. if (c === parser.q) {
  13894. parser.q = ''
  13895. parser.state = S.DOCTYPE
  13896. }
  13897. continue
  13898. case S.DOCTYPE_DTD:
  13899. parser.doctype += c
  13900. if (c === ']') {
  13901. parser.state = S.DOCTYPE
  13902. } else if (isQuote(c)) {
  13903. parser.state = S.DOCTYPE_DTD_QUOTED
  13904. parser.q = c
  13905. }
  13906. continue
  13907. case S.DOCTYPE_DTD_QUOTED:
  13908. parser.doctype += c
  13909. if (c === parser.q) {
  13910. parser.state = S.DOCTYPE_DTD
  13911. parser.q = ''
  13912. }
  13913. continue
  13914. case S.COMMENT:
  13915. if (c === '-') {
  13916. parser.state = S.COMMENT_ENDING
  13917. } else {
  13918. parser.comment += c
  13919. }
  13920. continue
  13921. case S.COMMENT_ENDING:
  13922. if (c === '-') {
  13923. parser.state = S.COMMENT_ENDED
  13924. parser.comment = textopts(parser.opt, parser.comment)
  13925. if (parser.comment) {
  13926. emitNode(parser, 'oncomment', parser.comment)
  13927. }
  13928. parser.comment = ''
  13929. } else {
  13930. parser.comment += '-' + c
  13931. parser.state = S.COMMENT
  13932. }
  13933. continue
  13934. case S.COMMENT_ENDED:
  13935. if (c !== '>') {
  13936. strictFail(parser, 'Malformed comment')
  13937. // allow <!-- blah -- bloo --> in non-strict mode,
  13938. // which is a comment of " blah -- bloo "
  13939. parser.comment += '--' + c
  13940. parser.state = S.COMMENT
  13941. } else {
  13942. parser.state = S.TEXT
  13943. }
  13944. continue
  13945. case S.CDATA:
  13946. if (c === ']') {
  13947. parser.state = S.CDATA_ENDING
  13948. } else {
  13949. parser.cdata += c
  13950. }
  13951. continue
  13952. case S.CDATA_ENDING:
  13953. if (c === ']') {
  13954. parser.state = S.CDATA_ENDING_2
  13955. } else {
  13956. parser.cdata += ']' + c
  13957. parser.state = S.CDATA
  13958. }
  13959. continue
  13960. case S.CDATA_ENDING_2:
  13961. if (c === '>') {
  13962. if (parser.cdata) {
  13963. emitNode(parser, 'oncdata', parser.cdata)
  13964. }
  13965. emitNode(parser, 'onclosecdata')
  13966. parser.cdata = ''
  13967. parser.state = S.TEXT
  13968. } else if (c === ']') {
  13969. parser.cdata += ']'
  13970. } else {
  13971. parser.cdata += ']]' + c
  13972. parser.state = S.CDATA
  13973. }
  13974. continue
  13975. case S.PROC_INST:
  13976. if (c === '?') {
  13977. parser.state = S.PROC_INST_ENDING
  13978. } else if (isWhitespace(c)) {
  13979. parser.state = S.PROC_INST_BODY
  13980. } else {
  13981. parser.procInstName += c
  13982. }
  13983. continue
  13984. case S.PROC_INST_BODY:
  13985. if (!parser.procInstBody && isWhitespace(c)) {
  13986. continue
  13987. } else if (c === '?') {
  13988. parser.state = S.PROC_INST_ENDING
  13989. } else {
  13990. parser.procInstBody += c
  13991. }
  13992. continue
  13993. case S.PROC_INST_ENDING:
  13994. if (c === '>') {
  13995. emitNode(parser, 'onprocessinginstruction', {
  13996. name: parser.procInstName,
  13997. body: parser.procInstBody
  13998. })
  13999. parser.procInstName = parser.procInstBody = ''
  14000. parser.state = S.TEXT
  14001. } else {
  14002. parser.procInstBody += '?' + c
  14003. parser.state = S.PROC_INST_BODY
  14004. }
  14005. continue
  14006. case S.OPEN_TAG:
  14007. if (isMatch(nameBody, c)) {
  14008. parser.tagName += c
  14009. } else {
  14010. newTag(parser)
  14011. if (c === '>') {
  14012. openTag(parser)
  14013. } else if (c === '/') {
  14014. parser.state = S.OPEN_TAG_SLASH
  14015. } else {
  14016. if (!isWhitespace(c)) {
  14017. strictFail(parser, 'Invalid character in tag name')
  14018. }
  14019. parser.state = S.ATTRIB
  14020. }
  14021. }
  14022. continue
  14023. case S.OPEN_TAG_SLASH:
  14024. if (c === '>') {
  14025. openTag(parser, true)
  14026. closeTag(parser)
  14027. } else {
  14028. strictFail(parser, 'Forward-slash in opening tag not followed by >')
  14029. parser.state = S.ATTRIB
  14030. }
  14031. continue
  14032. case S.ATTRIB:
  14033. // haven't read the attribute name yet.
  14034. if (isWhitespace(c)) {
  14035. continue
  14036. } else if (c === '>') {
  14037. openTag(parser)
  14038. } else if (c === '/') {
  14039. parser.state = S.OPEN_TAG_SLASH
  14040. } else if (isMatch(nameStart, c)) {
  14041. parser.attribName = c
  14042. parser.attribValue = ''
  14043. parser.state = S.ATTRIB_NAME
  14044. } else {
  14045. strictFail(parser, 'Invalid attribute name')
  14046. }
  14047. continue
  14048. case S.ATTRIB_NAME:
  14049. if (c === '=') {
  14050. parser.state = S.ATTRIB_VALUE
  14051. } else if (c === '>') {
  14052. strictFail(parser, 'Attribute without value')
  14053. parser.attribValue = parser.attribName
  14054. attrib(parser)
  14055. openTag(parser)
  14056. } else if (isWhitespace(c)) {
  14057. parser.state = S.ATTRIB_NAME_SAW_WHITE
  14058. } else if (isMatch(nameBody, c)) {
  14059. parser.attribName += c
  14060. } else {
  14061. strictFail(parser, 'Invalid attribute name')
  14062. }
  14063. continue
  14064. case S.ATTRIB_NAME_SAW_WHITE:
  14065. if (c === '=') {
  14066. parser.state = S.ATTRIB_VALUE
  14067. } else if (isWhitespace(c)) {
  14068. continue
  14069. } else {
  14070. strictFail(parser, 'Attribute without value')
  14071. parser.tag.attributes[parser.attribName] = ''
  14072. parser.attribValue = ''
  14073. emitNode(parser, 'onattribute', {
  14074. name: parser.attribName,
  14075. value: ''
  14076. })
  14077. parser.attribName = ''
  14078. if (c === '>') {
  14079. openTag(parser)
  14080. } else if (isMatch(nameStart, c)) {
  14081. parser.attribName = c
  14082. parser.state = S.ATTRIB_NAME
  14083. } else {
  14084. strictFail(parser, 'Invalid attribute name')
  14085. parser.state = S.ATTRIB
  14086. }
  14087. }
  14088. continue
  14089. case S.ATTRIB_VALUE:
  14090. if (isWhitespace(c)) {
  14091. continue
  14092. } else if (isQuote(c)) {
  14093. parser.q = c
  14094. parser.state = S.ATTRIB_VALUE_QUOTED
  14095. } else {
  14096. strictFail(parser, 'Unquoted attribute value')
  14097. parser.state = S.ATTRIB_VALUE_UNQUOTED
  14098. parser.attribValue = c
  14099. }
  14100. continue
  14101. case S.ATTRIB_VALUE_QUOTED:
  14102. if (c !== parser.q) {
  14103. if (c === '&') {
  14104. parser.state = S.ATTRIB_VALUE_ENTITY_Q
  14105. } else {
  14106. parser.attribValue += c
  14107. }
  14108. continue
  14109. }
  14110. attrib(parser)
  14111. parser.q = ''
  14112. parser.state = S.ATTRIB_VALUE_CLOSED
  14113. continue
  14114. case S.ATTRIB_VALUE_CLOSED:
  14115. if (isWhitespace(c)) {
  14116. parser.state = S.ATTRIB
  14117. } else if (c === '>') {
  14118. openTag(parser)
  14119. } else if (c === '/') {
  14120. parser.state = S.OPEN_TAG_SLASH
  14121. } else if (isMatch(nameStart, c)) {
  14122. strictFail(parser, 'No whitespace between attributes')
  14123. parser.attribName = c
  14124. parser.attribValue = ''
  14125. parser.state = S.ATTRIB_NAME
  14126. } else {
  14127. strictFail(parser, 'Invalid attribute name')
  14128. }
  14129. continue
  14130. case S.ATTRIB_VALUE_UNQUOTED:
  14131. if (!isAttribEnd(c)) {
  14132. if (c === '&') {
  14133. parser.state = S.ATTRIB_VALUE_ENTITY_U
  14134. } else {
  14135. parser.attribValue += c
  14136. }
  14137. continue
  14138. }
  14139. attrib(parser)
  14140. if (c === '>') {
  14141. openTag(parser)
  14142. } else {
  14143. parser.state = S.ATTRIB
  14144. }
  14145. continue
  14146. case S.CLOSE_TAG:
  14147. if (!parser.tagName) {
  14148. if (isWhitespace(c)) {
  14149. continue
  14150. } else if (notMatch(nameStart, c)) {
  14151. if (parser.script) {
  14152. parser.script += '</' + c
  14153. parser.state = S.SCRIPT
  14154. } else {
  14155. strictFail(parser, 'Invalid tagname in closing tag.')
  14156. }
  14157. } else {
  14158. parser.tagName = c
  14159. }
  14160. } else if (c === '>') {
  14161. closeTag(parser)
  14162. } else if (isMatch(nameBody, c)) {
  14163. parser.tagName += c
  14164. } else if (parser.script) {
  14165. parser.script += '</' + parser.tagName
  14166. parser.tagName = ''
  14167. parser.state = S.SCRIPT
  14168. } else {
  14169. if (!isWhitespace(c)) {
  14170. strictFail(parser, 'Invalid tagname in closing tag')
  14171. }
  14172. parser.state = S.CLOSE_TAG_SAW_WHITE
  14173. }
  14174. continue
  14175. case S.CLOSE_TAG_SAW_WHITE:
  14176. if (isWhitespace(c)) {
  14177. continue
  14178. }
  14179. if (c === '>') {
  14180. closeTag(parser)
  14181. } else {
  14182. strictFail(parser, 'Invalid characters in closing tag')
  14183. }
  14184. continue
  14185. case S.TEXT_ENTITY:
  14186. case S.ATTRIB_VALUE_ENTITY_Q:
  14187. case S.ATTRIB_VALUE_ENTITY_U:
  14188. var returnState
  14189. var buffer
  14190. switch (parser.state) {
  14191. case S.TEXT_ENTITY:
  14192. returnState = S.TEXT
  14193. buffer = 'textNode'
  14194. break
  14195. case S.ATTRIB_VALUE_ENTITY_Q:
  14196. returnState = S.ATTRIB_VALUE_QUOTED
  14197. buffer = 'attribValue'
  14198. break
  14199. case S.ATTRIB_VALUE_ENTITY_U:
  14200. returnState = S.ATTRIB_VALUE_UNQUOTED
  14201. buffer = 'attribValue'
  14202. break
  14203. }
  14204. if (c === ';') {
  14205. parser[buffer] += parseEntity(parser)
  14206. parser.entity = ''
  14207. parser.state = returnState
  14208. } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
  14209. parser.entity += c
  14210. } else {
  14211. strictFail(parser, 'Invalid character in entity name')
  14212. parser[buffer] += '&' + parser.entity + c
  14213. parser.entity = ''
  14214. parser.state = returnState
  14215. }
  14216. continue
  14217. default:
  14218. throw new Error(parser, 'Unknown state: ' + parser.state)
  14219. }
  14220. } // while
  14221. if (parser.position >= parser.bufferCheckPosition) {
  14222. checkBufferLength(parser)
  14223. }
  14224. return parser
  14225. }
  14226. /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
  14227. /* istanbul ignore next */
  14228. if (!String.fromCodePoint) {
  14229. (function () {
  14230. var stringFromCharCode = String.fromCharCode
  14231. var floor = Math.floor
  14232. var fromCodePoint = function () {
  14233. var MAX_SIZE = 0x4000
  14234. var codeUnits = []
  14235. var highSurrogate
  14236. var lowSurrogate
  14237. var index = -1
  14238. var length = arguments.length
  14239. if (!length) {
  14240. return ''
  14241. }
  14242. var result = ''
  14243. while (++index < length) {
  14244. var codePoint = Number(arguments[index])
  14245. if (
  14246. !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
  14247. codePoint < 0 || // not a valid Unicode code point
  14248. codePoint > 0x10FFFF || // not a valid Unicode code point
  14249. floor(codePoint) !== codePoint // not an integer
  14250. ) {
  14251. throw RangeError('Invalid code point: ' + codePoint)
  14252. }
  14253. if (codePoint <= 0xFFFF) { // BMP code point
  14254. codeUnits.push(codePoint)
  14255. } else { // Astral code point; split in surrogate halves
  14256. // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  14257. codePoint -= 0x10000
  14258. highSurrogate = (codePoint >> 10) + 0xD800
  14259. lowSurrogate = (codePoint % 0x400) + 0xDC00
  14260. codeUnits.push(highSurrogate, lowSurrogate)
  14261. }
  14262. if (index + 1 === length || codeUnits.length > MAX_SIZE) {
  14263. result += stringFromCharCode.apply(null, codeUnits)
  14264. codeUnits.length = 0
  14265. }
  14266. }
  14267. return result
  14268. }
  14269. /* istanbul ignore next */
  14270. if (Object.defineProperty) {
  14271. Object.defineProperty(String, 'fromCodePoint', {
  14272. value: fromCodePoint,
  14273. configurable: true,
  14274. writable: true
  14275. })
  14276. } else {
  14277. String.fromCodePoint = fromCodePoint
  14278. }
  14279. }())
  14280. }
  14281. })( false ? undefined : exports)
  14282. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(22).Buffer))
  14283. /***/ }),
  14284. /* 81 */
  14285. /***/ (function(module, exports, __webpack_require__) {
  14286. "use strict";
  14287. exports.byteLength = byteLength
  14288. exports.toByteArray = toByteArray
  14289. exports.fromByteArray = fromByteArray
  14290. var lookup = []
  14291. var revLookup = []
  14292. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  14293. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  14294. for (var i = 0, len = code.length; i < len; ++i) {
  14295. lookup[i] = code[i]
  14296. revLookup[code.charCodeAt(i)] = i
  14297. }
  14298. // Support decoding URL-safe base64 strings, as Node.js does.
  14299. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  14300. revLookup['-'.charCodeAt(0)] = 62
  14301. revLookup['_'.charCodeAt(0)] = 63
  14302. function getLens (b64) {
  14303. var len = b64.length
  14304. if (len % 4 > 0) {
  14305. throw new Error('Invalid string. Length must be a multiple of 4')
  14306. }
  14307. // Trim off extra bytes after placeholder bytes are found
  14308. // See: https://github.com/beatgammit/base64-js/issues/42
  14309. var validLen = b64.indexOf('=')
  14310. if (validLen === -1) validLen = len
  14311. var placeHoldersLen = validLen === len
  14312. ? 0
  14313. : 4 - (validLen % 4)
  14314. return [validLen, placeHoldersLen]
  14315. }
  14316. // base64 is 4/3 + up to two characters of the original data
  14317. function byteLength (b64) {
  14318. var lens = getLens(b64)
  14319. var validLen = lens[0]
  14320. var placeHoldersLen = lens[1]
  14321. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  14322. }
  14323. function _byteLength (b64, validLen, placeHoldersLen) {
  14324. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  14325. }
  14326. function toByteArray (b64) {
  14327. var tmp
  14328. var lens = getLens(b64)
  14329. var validLen = lens[0]
  14330. var placeHoldersLen = lens[1]
  14331. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  14332. var curByte = 0
  14333. // if there are placeholders, only get up to the last complete 4 chars
  14334. var len = placeHoldersLen > 0
  14335. ? validLen - 4
  14336. : validLen
  14337. var i
  14338. for (i = 0; i < len; i += 4) {
  14339. tmp =
  14340. (revLookup[b64.charCodeAt(i)] << 18) |
  14341. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  14342. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  14343. revLookup[b64.charCodeAt(i + 3)]
  14344. arr[curByte++] = (tmp >> 16) & 0xFF
  14345. arr[curByte++] = (tmp >> 8) & 0xFF
  14346. arr[curByte++] = tmp & 0xFF
  14347. }
  14348. if (placeHoldersLen === 2) {
  14349. tmp =
  14350. (revLookup[b64.charCodeAt(i)] << 2) |
  14351. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  14352. arr[curByte++] = tmp & 0xFF
  14353. }
  14354. if (placeHoldersLen === 1) {
  14355. tmp =
  14356. (revLookup[b64.charCodeAt(i)] << 10) |
  14357. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  14358. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  14359. arr[curByte++] = (tmp >> 8) & 0xFF
  14360. arr[curByte++] = tmp & 0xFF
  14361. }
  14362. return arr
  14363. }
  14364. function tripletToBase64 (num) {
  14365. return lookup[num >> 18 & 0x3F] +
  14366. lookup[num >> 12 & 0x3F] +
  14367. lookup[num >> 6 & 0x3F] +
  14368. lookup[num & 0x3F]
  14369. }
  14370. function encodeChunk (uint8, start, end) {
  14371. var tmp
  14372. var output = []
  14373. for (var i = start; i < end; i += 3) {
  14374. tmp =
  14375. ((uint8[i] << 16) & 0xFF0000) +
  14376. ((uint8[i + 1] << 8) & 0xFF00) +
  14377. (uint8[i + 2] & 0xFF)
  14378. output.push(tripletToBase64(tmp))
  14379. }
  14380. return output.join('')
  14381. }
  14382. function fromByteArray (uint8) {
  14383. var tmp
  14384. var len = uint8.length
  14385. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  14386. var parts = []
  14387. var maxChunkLength = 16383 // must be multiple of 3
  14388. // go through the array every three bytes, we'll deal with trailing stuff later
  14389. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  14390. parts.push(encodeChunk(
  14391. uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
  14392. ))
  14393. }
  14394. // pad the end with zeros, but make sure to not forget the extra bytes
  14395. if (extraBytes === 1) {
  14396. tmp = uint8[len - 1]
  14397. parts.push(
  14398. lookup[tmp >> 2] +
  14399. lookup[(tmp << 4) & 0x3F] +
  14400. '=='
  14401. )
  14402. } else if (extraBytes === 2) {
  14403. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  14404. parts.push(
  14405. lookup[tmp >> 10] +
  14406. lookup[(tmp >> 4) & 0x3F] +
  14407. lookup[(tmp << 2) & 0x3F] +
  14408. '='
  14409. )
  14410. }
  14411. return parts.join('')
  14412. }
  14413. /***/ }),
  14414. /* 82 */
  14415. /***/ (function(module, exports) {
  14416. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  14417. var e, m
  14418. var eLen = (nBytes * 8) - mLen - 1
  14419. var eMax = (1 << eLen) - 1
  14420. var eBias = eMax >> 1
  14421. var nBits = -7
  14422. var i = isLE ? (nBytes - 1) : 0
  14423. var d = isLE ? -1 : 1
  14424. var s = buffer[offset + i]
  14425. i += d
  14426. e = s & ((1 << (-nBits)) - 1)
  14427. s >>= (-nBits)
  14428. nBits += eLen
  14429. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  14430. m = e & ((1 << (-nBits)) - 1)
  14431. e >>= (-nBits)
  14432. nBits += mLen
  14433. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  14434. if (e === 0) {
  14435. e = 1 - eBias
  14436. } else if (e === eMax) {
  14437. return m ? NaN : ((s ? -1 : 1) * Infinity)
  14438. } else {
  14439. m = m + Math.pow(2, mLen)
  14440. e = e - eBias
  14441. }
  14442. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  14443. }
  14444. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  14445. var e, m, c
  14446. var eLen = (nBytes * 8) - mLen - 1
  14447. var eMax = (1 << eLen) - 1
  14448. var eBias = eMax >> 1
  14449. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  14450. var i = isLE ? 0 : (nBytes - 1)
  14451. var d = isLE ? 1 : -1
  14452. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  14453. value = Math.abs(value)
  14454. if (isNaN(value) || value === Infinity) {
  14455. m = isNaN(value) ? 1 : 0
  14456. e = eMax
  14457. } else {
  14458. e = Math.floor(Math.log(value) / Math.LN2)
  14459. if (value * (c = Math.pow(2, -e)) < 1) {
  14460. e--
  14461. c *= 2
  14462. }
  14463. if (e + eBias >= 1) {
  14464. value += rt / c
  14465. } else {
  14466. value += rt * Math.pow(2, 1 - eBias)
  14467. }
  14468. if (value * c >= 2) {
  14469. e++
  14470. c /= 2
  14471. }
  14472. if (e + eBias >= eMax) {
  14473. m = 0
  14474. e = eMax
  14475. } else if (e + eBias >= 1) {
  14476. m = ((value * c) - 1) * Math.pow(2, mLen)
  14477. e = e + eBias
  14478. } else {
  14479. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  14480. e = 0
  14481. }
  14482. }
  14483. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  14484. e = (e << mLen) | m
  14485. eLen += mLen
  14486. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  14487. buffer[offset + i - d] |= s * 128
  14488. }
  14489. /***/ }),
  14490. /* 83 */
  14491. /***/ (function(module, exports, __webpack_require__) {
  14492. // Copyright Joyent, Inc. and other Node contributors.
  14493. //
  14494. // Permission is hereby granted, free of charge, to any person obtaining a
  14495. // copy of this software and associated documentation files (the
  14496. // "Software"), to deal in the Software without restriction, including
  14497. // without limitation the rights to use, copy, modify, merge, publish,
  14498. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14499. // persons to whom the Software is furnished to do so, subject to the
  14500. // following conditions:
  14501. //
  14502. // The above copyright notice and this permission notice shall be included
  14503. // in all copies or substantial portions of the Software.
  14504. //
  14505. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14506. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14507. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14508. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14509. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14510. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14511. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14512. module.exports = Stream;
  14513. var EE = __webpack_require__(20).EventEmitter;
  14514. var inherits = __webpack_require__(16);
  14515. inherits(Stream, EE);
  14516. Stream.Readable = __webpack_require__(28);
  14517. Stream.Writable = __webpack_require__(91);
  14518. Stream.Duplex = __webpack_require__(92);
  14519. Stream.Transform = __webpack_require__(93);
  14520. Stream.PassThrough = __webpack_require__(94);
  14521. // Backwards-compat with node 0.4.x
  14522. Stream.Stream = Stream;
  14523. // old-style streams. Note that the pipe method (the only relevant
  14524. // part of this class) is overridden in the Readable class.
  14525. function Stream() {
  14526. EE.call(this);
  14527. }
  14528. Stream.prototype.pipe = function(dest, options) {
  14529. var source = this;
  14530. function ondata(chunk) {
  14531. if (dest.writable) {
  14532. if (false === dest.write(chunk) && source.pause) {
  14533. source.pause();
  14534. }
  14535. }
  14536. }
  14537. source.on('data', ondata);
  14538. function ondrain() {
  14539. if (source.readable && source.resume) {
  14540. source.resume();
  14541. }
  14542. }
  14543. dest.on('drain', ondrain);
  14544. // If the 'end' option is not supplied, dest.end() will be called when
  14545. // source gets the 'end' or 'close' events. Only dest.end() once.
  14546. if (!dest._isStdio && (!options || options.end !== false)) {
  14547. source.on('end', onend);
  14548. source.on('close', onclose);
  14549. }
  14550. var didOnEnd = false;
  14551. function onend() {
  14552. if (didOnEnd) return;
  14553. didOnEnd = true;
  14554. dest.end();
  14555. }
  14556. function onclose() {
  14557. if (didOnEnd) return;
  14558. didOnEnd = true;
  14559. if (typeof dest.destroy === 'function') dest.destroy();
  14560. }
  14561. // don't leave dangling pipes when there are errors.
  14562. function onerror(er) {
  14563. cleanup();
  14564. if (EE.listenerCount(this, 'error') === 0) {
  14565. throw er; // Unhandled stream error in pipe.
  14566. }
  14567. }
  14568. source.on('error', onerror);
  14569. dest.on('error', onerror);
  14570. // remove all the event listeners that were added.
  14571. function cleanup() {
  14572. source.removeListener('data', ondata);
  14573. dest.removeListener('drain', ondrain);
  14574. source.removeListener('end', onend);
  14575. source.removeListener('close', onclose);
  14576. source.removeListener('error', onerror);
  14577. dest.removeListener('error', onerror);
  14578. source.removeListener('end', cleanup);
  14579. source.removeListener('close', cleanup);
  14580. dest.removeListener('close', cleanup);
  14581. }
  14582. source.on('end', cleanup);
  14583. source.on('close', cleanup);
  14584. dest.on('close', cleanup);
  14585. dest.emit('pipe', source);
  14586. // Allow for unix-like usage: A.pipe(B).pipe(C)
  14587. return dest;
  14588. };
  14589. /***/ }),
  14590. /* 84 */
  14591. /***/ (function(module, exports) {
  14592. /* (ignored) */
  14593. /***/ }),
  14594. /* 85 */
  14595. /***/ (function(module, exports, __webpack_require__) {
  14596. "use strict";
  14597. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  14598. var Buffer = __webpack_require__(25).Buffer;
  14599. var util = __webpack_require__(86);
  14600. function copyBuffer(src, target, offset) {
  14601. src.copy(target, offset);
  14602. }
  14603. module.exports = function () {
  14604. function BufferList() {
  14605. _classCallCheck(this, BufferList);
  14606. this.head = null;
  14607. this.tail = null;
  14608. this.length = 0;
  14609. }
  14610. BufferList.prototype.push = function push(v) {
  14611. var entry = { data: v, next: null };
  14612. if (this.length > 0) this.tail.next = entry;else this.head = entry;
  14613. this.tail = entry;
  14614. ++this.length;
  14615. };
  14616. BufferList.prototype.unshift = function unshift(v) {
  14617. var entry = { data: v, next: this.head };
  14618. if (this.length === 0) this.tail = entry;
  14619. this.head = entry;
  14620. ++this.length;
  14621. };
  14622. BufferList.prototype.shift = function shift() {
  14623. if (this.length === 0) return;
  14624. var ret = this.head.data;
  14625. if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
  14626. --this.length;
  14627. return ret;
  14628. };
  14629. BufferList.prototype.clear = function clear() {
  14630. this.head = this.tail = null;
  14631. this.length = 0;
  14632. };
  14633. BufferList.prototype.join = function join(s) {
  14634. if (this.length === 0) return '';
  14635. var p = this.head;
  14636. var ret = '' + p.data;
  14637. while (p = p.next) {
  14638. ret += s + p.data;
  14639. }return ret;
  14640. };
  14641. BufferList.prototype.concat = function concat(n) {
  14642. if (this.length === 0) return Buffer.alloc(0);
  14643. if (this.length === 1) return this.head.data;
  14644. var ret = Buffer.allocUnsafe(n >>> 0);
  14645. var p = this.head;
  14646. var i = 0;
  14647. while (p) {
  14648. copyBuffer(p.data, ret, i);
  14649. i += p.data.length;
  14650. p = p.next;
  14651. }
  14652. return ret;
  14653. };
  14654. return BufferList;
  14655. }();
  14656. if (util && util.inspect && util.inspect.custom) {
  14657. module.exports.prototype[util.inspect.custom] = function () {
  14658. var obj = util.inspect({ length: this.length });
  14659. return this.constructor.name + ' ' + obj;
  14660. };
  14661. }
  14662. /***/ }),
  14663. /* 86 */
  14664. /***/ (function(module, exports) {
  14665. /* (ignored) */
  14666. /***/ }),
  14667. /* 87 */
  14668. /***/ (function(module, exports, __webpack_require__) {
  14669. /* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
  14670. (typeof self !== "undefined" && self) ||
  14671. window;
  14672. var apply = Function.prototype.apply;
  14673. // DOM APIs, for completeness
  14674. exports.setTimeout = function() {
  14675. return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
  14676. };
  14677. exports.setInterval = function() {
  14678. return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
  14679. };
  14680. exports.clearTimeout =
  14681. exports.clearInterval = function(timeout) {
  14682. if (timeout) {
  14683. timeout.close();
  14684. }
  14685. };
  14686. function Timeout(id, clearFn) {
  14687. this._id = id;
  14688. this._clearFn = clearFn;
  14689. }
  14690. Timeout.prototype.unref = Timeout.prototype.ref = function() {};
  14691. Timeout.prototype.close = function() {
  14692. this._clearFn.call(scope, this._id);
  14693. };
  14694. // Does not start the time, just sets up the members needed.
  14695. exports.enroll = function(item, msecs) {
  14696. clearTimeout(item._idleTimeoutId);
  14697. item._idleTimeout = msecs;
  14698. };
  14699. exports.unenroll = function(item) {
  14700. clearTimeout(item._idleTimeoutId);
  14701. item._idleTimeout = -1;
  14702. };
  14703. exports._unrefActive = exports.active = function(item) {
  14704. clearTimeout(item._idleTimeoutId);
  14705. var msecs = item._idleTimeout;
  14706. if (msecs >= 0) {
  14707. item._idleTimeoutId = setTimeout(function onTimeout() {
  14708. if (item._onTimeout)
  14709. item._onTimeout();
  14710. }, msecs);
  14711. }
  14712. };
  14713. // setimmediate attaches itself to the global object
  14714. __webpack_require__(88);
  14715. // On some exotic environments, it's not clear which object `setimmediate` was
  14716. // able to install onto. Search each possibility in the same order as the
  14717. // `setimmediate` library.
  14718. exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
  14719. (typeof global !== "undefined" && global.setImmediate) ||
  14720. (this && this.setImmediate);
  14721. exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
  14722. (typeof global !== "undefined" && global.clearImmediate) ||
  14723. (this && this.clearImmediate);
  14724. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  14725. /***/ }),
  14726. /* 88 */
  14727. /***/ (function(module, exports, __webpack_require__) {
  14728. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  14729. "use strict";
  14730. if (global.setImmediate) {
  14731. return;
  14732. }
  14733. var nextHandle = 1; // Spec says greater than zero
  14734. var tasksByHandle = {};
  14735. var currentlyRunningATask = false;
  14736. var doc = global.document;
  14737. var registerImmediate;
  14738. function setImmediate(callback) {
  14739. // Callback can either be a function or a string
  14740. if (typeof callback !== "function") {
  14741. callback = new Function("" + callback);
  14742. }
  14743. // Copy function arguments
  14744. var args = new Array(arguments.length - 1);
  14745. for (var i = 0; i < args.length; i++) {
  14746. args[i] = arguments[i + 1];
  14747. }
  14748. // Store and register the task
  14749. var task = { callback: callback, args: args };
  14750. tasksByHandle[nextHandle] = task;
  14751. registerImmediate(nextHandle);
  14752. return nextHandle++;
  14753. }
  14754. function clearImmediate(handle) {
  14755. delete tasksByHandle[handle];
  14756. }
  14757. function run(task) {
  14758. var callback = task.callback;
  14759. var args = task.args;
  14760. switch (args.length) {
  14761. case 0:
  14762. callback();
  14763. break;
  14764. case 1:
  14765. callback(args[0]);
  14766. break;
  14767. case 2:
  14768. callback(args[0], args[1]);
  14769. break;
  14770. case 3:
  14771. callback(args[0], args[1], args[2]);
  14772. break;
  14773. default:
  14774. callback.apply(undefined, args);
  14775. break;
  14776. }
  14777. }
  14778. function runIfPresent(handle) {
  14779. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  14780. // So if we're currently running a task, we'll need to delay this invocation.
  14781. if (currentlyRunningATask) {
  14782. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  14783. // "too much recursion" error.
  14784. setTimeout(runIfPresent, 0, handle);
  14785. } else {
  14786. var task = tasksByHandle[handle];
  14787. if (task) {
  14788. currentlyRunningATask = true;
  14789. try {
  14790. run(task);
  14791. } finally {
  14792. clearImmediate(handle);
  14793. currentlyRunningATask = false;
  14794. }
  14795. }
  14796. }
  14797. }
  14798. function installNextTickImplementation() {
  14799. registerImmediate = function(handle) {
  14800. process.nextTick(function () { runIfPresent(handle); });
  14801. };
  14802. }
  14803. function canUsePostMessage() {
  14804. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  14805. // where `global.postMessage` means something completely different and can't be used for this purpose.
  14806. if (global.postMessage && !global.importScripts) {
  14807. var postMessageIsAsynchronous = true;
  14808. var oldOnMessage = global.onmessage;
  14809. global.onmessage = function() {
  14810. postMessageIsAsynchronous = false;
  14811. };
  14812. global.postMessage("", "*");
  14813. global.onmessage = oldOnMessage;
  14814. return postMessageIsAsynchronous;
  14815. }
  14816. }
  14817. function installPostMessageImplementation() {
  14818. // Installs an event handler on `global` for the `message` event: see
  14819. // * https://developer.mozilla.org/en/DOM/window.postMessage
  14820. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  14821. var messagePrefix = "setImmediate$" + Math.random() + "$";
  14822. var onGlobalMessage = function(event) {
  14823. if (event.source === global &&
  14824. typeof event.data === "string" &&
  14825. event.data.indexOf(messagePrefix) === 0) {
  14826. runIfPresent(+event.data.slice(messagePrefix.length));
  14827. }
  14828. };
  14829. if (global.addEventListener) {
  14830. global.addEventListener("message", onGlobalMessage, false);
  14831. } else {
  14832. global.attachEvent("onmessage", onGlobalMessage);
  14833. }
  14834. registerImmediate = function(handle) {
  14835. global.postMessage(messagePrefix + handle, "*");
  14836. };
  14837. }
  14838. function installMessageChannelImplementation() {
  14839. var channel = new MessageChannel();
  14840. channel.port1.onmessage = function(event) {
  14841. var handle = event.data;
  14842. runIfPresent(handle);
  14843. };
  14844. registerImmediate = function(handle) {
  14845. channel.port2.postMessage(handle);
  14846. };
  14847. }
  14848. function installReadyStateChangeImplementation() {
  14849. var html = doc.documentElement;
  14850. registerImmediate = function(handle) {
  14851. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  14852. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  14853. var script = doc.createElement("script");
  14854. script.onreadystatechange = function () {
  14855. runIfPresent(handle);
  14856. script.onreadystatechange = null;
  14857. html.removeChild(script);
  14858. script = null;
  14859. };
  14860. html.appendChild(script);
  14861. };
  14862. }
  14863. function installSetTimeoutImplementation() {
  14864. registerImmediate = function(handle) {
  14865. setTimeout(runIfPresent, 0, handle);
  14866. };
  14867. }
  14868. // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  14869. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  14870. attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
  14871. // Don't get fooled by e.g. browserify environments.
  14872. if ({}.toString.call(global.process) === "[object process]") {
  14873. // For Node.js before 0.9
  14874. installNextTickImplementation();
  14875. } else if (canUsePostMessage()) {
  14876. // For non-IE10 modern browsers
  14877. installPostMessageImplementation();
  14878. } else if (global.MessageChannel) {
  14879. // For web workers, where supported
  14880. installMessageChannelImplementation();
  14881. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  14882. // For IE 6–8
  14883. installReadyStateChangeImplementation();
  14884. } else {
  14885. // For older browsers
  14886. installSetTimeoutImplementation();
  14887. }
  14888. attachTo.setImmediate = setImmediate;
  14889. attachTo.clearImmediate = clearImmediate;
  14890. }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
  14891. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10), __webpack_require__(23)))
  14892. /***/ }),
  14893. /* 89 */
  14894. /***/ (function(module, exports, __webpack_require__) {
  14895. /* WEBPACK VAR INJECTION */(function(global) {
  14896. /**
  14897. * Module exports.
  14898. */
  14899. module.exports = deprecate;
  14900. /**
  14901. * Mark that a method should not be used.
  14902. * Returns a modified function which warns once by default.
  14903. *
  14904. * If `localStorage.noDeprecation = true` is set, then it is a no-op.
  14905. *
  14906. * If `localStorage.throwDeprecation = true` is set, then deprecated functions
  14907. * will throw an Error when invoked.
  14908. *
  14909. * If `localStorage.traceDeprecation = true` is set, then deprecated functions
  14910. * will invoke `console.trace()` instead of `console.error()`.
  14911. *
  14912. * @param {Function} fn - the function to deprecate
  14913. * @param {String} msg - the string to print to the console when `fn` is invoked
  14914. * @returns {Function} a new "deprecated" version of `fn`
  14915. * @api public
  14916. */
  14917. function deprecate (fn, msg) {
  14918. if (config('noDeprecation')) {
  14919. return fn;
  14920. }
  14921. var warned = false;
  14922. function deprecated() {
  14923. if (!warned) {
  14924. if (config('throwDeprecation')) {
  14925. throw new Error(msg);
  14926. } else if (config('traceDeprecation')) {
  14927. console.trace(msg);
  14928. } else {
  14929. console.warn(msg);
  14930. }
  14931. warned = true;
  14932. }
  14933. return fn.apply(this, arguments);
  14934. }
  14935. return deprecated;
  14936. }
  14937. /**
  14938. * Checks `localStorage` for boolean values for the given `name`.
  14939. *
  14940. * @param {String} name
  14941. * @returns {Boolean}
  14942. * @api private
  14943. */
  14944. function config (name) {
  14945. // accessing global.localStorage can trigger a DOMException in sandboxed iframes
  14946. try {
  14947. if (!global.localStorage) return false;
  14948. } catch (_) {
  14949. return false;
  14950. }
  14951. var val = global.localStorage[name];
  14952. if (null == val) return false;
  14953. return String(val).toLowerCase() === 'true';
  14954. }
  14955. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(10)))
  14956. /***/ }),
  14957. /* 90 */
  14958. /***/ (function(module, exports, __webpack_require__) {
  14959. "use strict";
  14960. // Copyright Joyent, Inc. and other Node contributors.
  14961. //
  14962. // Permission is hereby granted, free of charge, to any person obtaining a
  14963. // copy of this software and associated documentation files (the
  14964. // "Software"), to deal in the Software without restriction, including
  14965. // without limitation the rights to use, copy, modify, merge, publish,
  14966. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14967. // persons to whom the Software is furnished to do so, subject to the
  14968. // following conditions:
  14969. //
  14970. // The above copyright notice and this permission notice shall be included
  14971. // in all copies or substantial portions of the Software.
  14972. //
  14973. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14974. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14975. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14976. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14977. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14978. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14979. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14980. // a passthrough stream.
  14981. // basically just the most minimal sort of Transform stream.
  14982. // Every written chunk gets output as-is.
  14983. module.exports = PassThrough;
  14984. var Transform = __webpack_require__(48);
  14985. /*<replacement>*/
  14986. var util = __webpack_require__(21);
  14987. util.inherits = __webpack_require__(16);
  14988. /*</replacement>*/
  14989. util.inherits(PassThrough, Transform);
  14990. function PassThrough(options) {
  14991. if (!(this instanceof PassThrough)) return new PassThrough(options);
  14992. Transform.call(this, options);
  14993. }
  14994. PassThrough.prototype._transform = function (chunk, encoding, cb) {
  14995. cb(null, chunk);
  14996. };
  14997. /***/ }),
  14998. /* 91 */
  14999. /***/ (function(module, exports, __webpack_require__) {
  15000. module.exports = __webpack_require__(29);
  15001. /***/ }),
  15002. /* 92 */
  15003. /***/ (function(module, exports, __webpack_require__) {
  15004. module.exports = __webpack_require__(14);
  15005. /***/ }),
  15006. /* 93 */
  15007. /***/ (function(module, exports, __webpack_require__) {
  15008. module.exports = __webpack_require__(28).Transform
  15009. /***/ }),
  15010. /* 94 */
  15011. /***/ (function(module, exports, __webpack_require__) {
  15012. module.exports = __webpack_require__(28).PassThrough
  15013. /***/ }),
  15014. /* 95 */
  15015. /***/ (function(module, exports, __webpack_require__) {
  15016. var helper = __webpack_require__(31);
  15017. var xml2js = __webpack_require__(43);
  15018. function validateOptions (userOptions) {
  15019. var options = helper.copyOptions(userOptions);
  15020. helper.ensureSpacesExists(options);
  15021. return options;
  15022. }
  15023. module.exports = function(xml, userOptions) {
  15024. var options, js, json, parentKey;
  15025. options = validateOptions(userOptions);
  15026. js = xml2js(xml, options);
  15027. parentKey = 'compact' in options && options.compact ? '_parent' : 'parent';
  15028. // parentKey = ptions.compact ? '_parent' : 'parent'; // consider this
  15029. if ('addParent' in options && options.addParent) {
  15030. json = JSON.stringify(js, function (k, v) { return k === parentKey? '_' : v; }, options.spaces);
  15031. } else {
  15032. json = JSON.stringify(js, null, options.spaces);
  15033. }
  15034. return json.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
  15035. };
  15036. /***/ }),
  15037. /* 96 */
  15038. /***/ (function(module, exports, __webpack_require__) {
  15039. /* WEBPACK VAR INJECTION */(function(Buffer) {var js2xml = __webpack_require__(49);
  15040. module.exports = function (json, options) {
  15041. if (json instanceof Buffer) {
  15042. json = json.toString();
  15043. }
  15044. var js = null;
  15045. if (typeof (json) === 'string') {
  15046. try {
  15047. js = JSON.parse(json);
  15048. } catch (e) {
  15049. throw new Error('The JSON structure is invalid');
  15050. }
  15051. } else {
  15052. js = json;
  15053. }
  15054. return js2xml(js, options);
  15055. };
  15056. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(22).Buffer))
  15057. /***/ }),
  15058. /* 97 */
  15059. /***/ (function(module, exports, __webpack_require__) {
  15060. !function(t,e){ true?module.exports=e(__webpack_require__(98),__webpack_require__(99)):undefined}(this,function(m,d){"use strict";var t;return m=m&&m.hasOwnProperty("default")?m.default:m,d=d&&d.hasOwnProperty("default")?d.default:d,function(t){var u;t.exports;(u=window).DOMParser=window.DOMParser;function p(){return document.createElement("canvas")}var f,c=function(t,e,i){if(null!=t||null!=e||null!=i){var n=function(s){var A={opts:s,FRAMERATE:30,MAX_VIRTUAL_PIXELS:3e4,rootEmSize:12,emSize:12,log:function(t){}};1==A.opts.log&&"undefined"!=typeof console&&(A.log=function(t){console.log(t)});A.init=function(t){var e=0;A.UniqueId=function(){return"canvg"+ ++e},A.Definitions={},A.Styles={},A.StylesSpecificity={},A.Animations=[],A.Images=[],A.ctx=t,A.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(t,e){this.viewPorts.push({width:t,height:e})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(t){return null!=t&&"number"==typeof t?t:"x"==t?this.width():"y"==t?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},A.init(),A.ImagesLoaded=function(){for(var t=0;t<A.Images.length;t++)if(!A.Images[t].loaded)return!1;return!0},A.trim=function(t){return t.replace(/^\s+|\s+$/g,"")},A.compressSpaces=function(t){return t.replace(/(?!\u3000)\s+/gm," ")},A.ajax=function(t){var e;return(e=u.XMLHttpRequest?new u.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?(e.open("GET",t,!1),e.send(null),e.responseText):null},A.parseXml=function(e){if("undefined"!=typeof Windows&&void 0!==Windows.Data&&void 0!==Windows.Data.Xml){var t=new Windows.Data.Xml.Dom.XmlDocument,i=new Windows.Data.Xml.Dom.XmlLoadSettings;return i.prohibitDtd=!1,t.loadXml(e,i),t}if(!u.DOMParser){e=e.replace(/<!DOCTYPE svg[^>]*>/,"");var t=new ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t}try{var n=s.xmldom?new u.DOMParser(s.xmldom):new u.DOMParser;return n.parseFromString(e,"image/svg+xml")}catch(t){return(n=s.xmldom?new u.DOMParser(s.xmldom):new u.DOMParser).parseFromString(e,"text/xml")}},A.Property=function(t,e){this.name=t,this.value=e},A.Property.prototype.getValue=function(){return this.value},A.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},A.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},A.Property.prototype.valueOrDefault=function(t){return this.hasValue()?this.value:t},A.Property.prototype.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t},A.Property.prototype.addOpacity=function(t){var e=this.value;if(null!=t.value&&""!=t.value&&"string"==typeof this.value){var i=new m(this.value);i.ok&&(e="rgba("+i.r+", "+i.g+", "+i.b+", "+t.numValue()+")")}return new A.Property(this.name,e)},A.Property.prototype.getDefinition=function(){var t=this.value.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=this.value),A.Definitions[t]},A.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},A.Property.prototype.getFillStyleDefinition=function(t,e){var i=this.getDefinition();if(null!=i&&i.createGradient)return i.createGradient(A.ctx,t,e);if(null!=i&&i.createPattern){if(i.getHrefAttribute().hasValue()){var n=i.attribute("patternTransform");i=i.getHrefAttribute().getDefinition(),n.hasValue()&&(i.attribute("patternTransform",!0).value=n.value)}return i.createPattern(A.ctx,t)}return null},A.Property.prototype.getDPI=function(t){return 96},A.Property.prototype.getREM=function(t){return A.rootEmSize},A.Property.prototype.getEM=function(t){return A.emSize},A.Property.prototype.getUnits=function(){var t=this.value+"";return t.replace(/[0-9\.\-]/g,"")},A.Property.prototype.isPixels=function(){if(!this.hasValue())return!1;var t=this.value+"";return!!t.match(/px$/)||!!t.match(/^[0-9]+$/)},A.Property.prototype.toPixels=function(t,e){if(!this.hasValue())return 0;var i=this.value+"";if(i.match(/rem$/))return this.numValue()*this.getREM(t);if(i.match(/em$/))return this.numValue()*this.getEM(t);if(i.match(/ex$/))return this.numValue()*this.getEM(t)/2;if(i.match(/px$/))return this.numValue();if(i.match(/pt$/))return this.numValue()*this.getDPI(t)*(1/72);if(i.match(/pc$/))return 15*this.numValue();if(i.match(/cm$/))return this.numValue()*this.getDPI(t)/2.54;if(i.match(/mm$/))return this.numValue()*this.getDPI(t)/25.4;if(i.match(/in$/))return this.numValue()*this.getDPI(t);if(i.match(/%$/))return this.numValue()*A.ViewPort.ComputeSize(t);var n=this.numValue();return e&&n<1?n*A.ViewPort.ComputeSize(t):n},A.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/s$/)?1e3*this.numValue():(t.match(/ms$/),this.numValue())},A.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/deg$/)?this.numValue()*(Math.PI/180):t.match(/grad$/)?this.numValue()*(Math.PI/200):t.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var t={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return A.Property.prototype.toTextBaseline=function(){return this.hasValue()?t[this.value]:null},A.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(t,e,i,n,s,a){var r=null!=a?this.Parse(a):this.CreateFont("","","","","",A.ctx.font);return{fontFamily:s=s||r.fontFamily,fontSize:n||r.fontSize,fontStyle:t||r.fontStyle,fontWeight:i||r.fontWeight,fontVariant:e||r.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var r=this;this.Parse=function(t){for(var e={},i=A.trim(A.compressSpaces(t||"")).split(" "),n={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},s="",a=0;a<i.length;a++)n.fontStyle||-1==r.Styles.indexOf(i[a])?n.fontVariant||-1==r.Variants.indexOf(i[a])?n.fontWeight||-1==r.Weights.indexOf(i[a])?n.fontSize?"inherit"!=i[a]&&(s+=i[a]):("inherit"!=i[a]&&(e.fontSize=i[a].split("/")[0]),n.fontStyle=n.fontVariant=n.fontWeight=n.fontSize=!0):("inherit"!=i[a]&&(e.fontWeight=i[a]),n.fontStyle=n.fontVariant=n.fontWeight=!0):("inherit"!=i[a]&&(e.fontVariant=i[a]),n.fontStyle=n.fontVariant=!0):("inherit"!=i[a]&&(e.fontStyle=i[a]),n.fontStyle=!0);return""!=s&&(e.fontFamily=s),e}},A.ToNumberArray=function(t){for(var e=A.trim(A.compressSpaces((t||"").replace(/,/g," "))).split(" "),i=0;i<e.length;i++)e[i]=parseFloat(e[i]);return e},A.Point=function(t,e){this.x=t,this.y=e},A.Point.prototype.angleTo=function(t){return Math.atan2(t.y-this.y,t.x-this.x)},A.Point.prototype.applyTransform=function(t){var e=this.x*t[0]+this.y*t[2]+t[4],i=this.x*t[1]+this.y*t[3]+t[5];this.x=e,this.y=i},A.CreatePoint=function(t){var e=A.ToNumberArray(t);return new A.Point(e[0],e[1])},A.CreatePath=function(t){for(var e=A.ToNumberArray(t),i=[],n=0;n<e.length;n+=2)i.push(new A.Point(e[n],e[n+1]));return i},A.BoundingBox=function(t,e,i,n){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(t,e){null!=t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,i,n,s,a){var r=t+2/3*(i-t),o=e+2/3*(n-e),l=r+1/3*(s-t),h=o+1/3*(a-e);this.addBezierCurve(t,e,r,l,o,h,s,a)},this.addBezierCurve=function(t,e,i,n,s,a,r,o){var l=[t,e],h=[i,n],u=[s,a],c=[r,o];this.addPoint(l[0],l[1]),this.addPoint(c[0],c[1]);for(var f=0;f<=1;f++){var m=function(t){return Math.pow(1-t,3)*l[f]+3*Math.pow(1-t,2)*t*h[f]+3*(1-t)*Math.pow(t,2)*u[f]+Math.pow(t,3)*c[f]},p=6*l[f]-12*h[f]+6*u[f],d=-3*l[f]+9*h[f]-9*u[f]+3*c[f],y=3*h[f]-3*l[f];if(0!=d){var v=Math.pow(p,2)-4*y*d;if(!(v<0)){var g=(-p+Math.sqrt(v))/(2*d);0<g&&g<1&&(0==f&&this.addX(m(g)),1==f&&this.addY(m(g)));var x=(-p-Math.sqrt(v))/(2*d);0<x&&x<1&&(0==f&&this.addX(m(x)),1==f&&this.addY(m(x)))}}else{if(0==p)continue;var b=-y/p;0<b&&b<1&&(0==f&&this.addX(m(b)),1==f&&this.addY(m(b)))}}},this.isPointInBox=function(t,e){return this.x1<=t&&t<=this.x2&&this.y1<=e&&e<=this.y2},this.addPoint(t,e),this.addPoint(i,n)},A.Transform=function(t){var e=this;this.Type={},this.Type.translate=function(t){this.p=A.CreatePoint(t),this.apply=function(t){t.translate(this.p.x||0,this.p.y||0)},this.unapply=function(t){t.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(t){t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(t){var e=A.ToNumberArray(t);this.angle=new A.Property("angle",e[0]),this.cx=e[1]||0,this.cy=e[2]||0,this.apply=function(t){t.translate(this.cx,this.cy),t.rotate(this.angle.toRadians()),t.translate(-this.cx,-this.cy)},this.unapply=function(t){t.translate(this.cx,this.cy),t.rotate(-1*this.angle.toRadians()),t.translate(-this.cx,-this.cy)},this.applyToPoint=function(t){var e=this.angle.toRadians();t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),t.applyTransform([Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]),t.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(t){this.p=A.CreatePoint(t),this.apply=function(t){t.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(t){t.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(t){t.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(t){this.m=A.ToNumberArray(t),this.apply=function(t){t.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(t){var e=this.m[0],i=this.m[2],n=this.m[4],s=this.m[1],a=this.m[3],r=this.m[5],o=1/(e*(1*a-0*r)-i*(1*s-0*r)+n*(0*s-0*a));t.transform(o*(1*a-0*r),o*(0*r-1*s),o*(0*n-1*i),o*(1*e-0*n),o*(i*r-n*a),o*(n*s-e*r))},this.applyToPoint=function(t){t.applyTransform(this.m)}},this.Type.SkewBase=function(t){this.base=e.Type.matrix,this.base(t),this.angle=new A.Property("angle",t)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(t){this.base=e.Type.SkewBase,this.base(t),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(t){this.base=e.Type.SkewBase,this.base(t),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].apply(t)},this.unapply=function(t){for(var e=this.transforms.length-1;0<=e;e--)this.transforms[e].unapply(t)},this.applyToPoint=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].applyToPoint(t)};for(var i=A.trim(A.compressSpaces(t)).replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/),n=0;n<i.length;n++)if("none"!==i[n]){var s=A.trim(i[n].split("(")[0]),a=i[n].split("(")[1].replace(")",""),r=this.Type[s];if(void 0!==r){var o=new r(a);o.type=s,this.transforms.push(o)}}},A.AspectRatio=function(t,e,i,n,s,a,r,o,l,h){var u=(e=(e=A.compressSpaces(e)).replace(/^defer\s/,"")).split(" ")[0]||"xMidYMid",c=e.split(" ")[1]||"meet",f=i/n,m=s/a,p=Math.min(f,m),d=Math.max(f,m);"meet"==c&&(n*=p,a*=p),"slice"==c&&(n*=d,a*=d),l=new A.Property("refX",l),h=new A.Property("refY",h),l.hasValue()&&h.hasValue()?t.translate(-p*l.toPixels("x"),-p*h.toPixels("y")):(u.match(/^xMid/)&&("meet"==c&&p==m||"slice"==c&&d==m)&&t.translate(i/2-n/2,0),u.match(/YMid$/)&&("meet"==c&&p==f||"slice"==c&&d==f)&&t.translate(0,s/2-a/2),u.match(/^xMax/)&&("meet"==c&&p==m||"slice"==c&&d==m)&&t.translate(i-n,0),u.match(/YMax$/)&&("meet"==c&&p==f||"slice"==c&&d==f)&&t.translate(0,s-a)),"none"==u?t.scale(f,m):"meet"==c?t.scale(p,p):"slice"==c&&t.scale(d,d),t.translate(null==r?0:-r,null==o?0:-o)},A.Element={},A.EmptyProperty=new A.Property("EMPTY",""),A.Element.ElementBase=function(a){this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(t,e){var i=this.attributes[t];return null!=i?i:(1==e&&(i=new A.Property(t,""),this.attributes[t]=i),i||A.EmptyProperty)},this.getHrefAttribute=function(){for(var t in this.attributes)if("href"==t||t.match(/:href$/))return this.attributes[t];return A.EmptyProperty},this.style=function(t,e,i){var n=this.styles[t];if(null!=n)return n;var s=this.attribute(t);if(null!=s&&s.hasValue())return this.styles[t]=s;if(1!=i){var a=this.parent;if(null!=a){var r=a.style(t);if(null!=r&&r.hasValue())return r}}return 1==e&&(n=new A.Property(t,""),this.styles[t]=n),n||A.EmptyProperty},this.render=function(t){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(t.save(),this.style("mask").hasValue()){var e=this.style("mask").getDefinition();null!=e&&e.apply(t,this)}else if(this.style("filter").hasValue()){var i=this.style("filter").getDefinition();null!=i&&i.apply(t,this)}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}},this.setContext=function(t){},this.clearContext=function(t){},this.renderChildren=function(t){for(var e=0;e<this.children.length;e++)this.children[e].render(t)},this.addChild=function(t,e){var i=t;e&&(i=A.CreateElement(t)),i.parent=this,"title"!=i.type&&this.children.push(i)},this.addStylesFromStyleDefinition=function(){for(var t in A.Styles)if("@"!=t[0]&&f(a,t)){var e=A.Styles[t],i=A.StylesSpecificity[t];if(null!=e)for(var n in e){var s=this.stylesSpecificity[n];void 0===s&&(s="000"),s<i&&(this.styles[n]=e[n],this.stylesSpecificity[n]=i)}}};var t,e=new RegExp("^[A-Z-]+$");if(null!=a&&1==a.nodeType){for(var i=0;i<a.attributes.length;i++){var n=a.attributes[i],s=(t=n.nodeName,e.test(t)?t.toLowerCase():t);this.attributes[s]=new A.Property(s,n.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue()){var r=this.attribute("style").value.split(";");for(i=0;i<r.length;i++)if(""!=A.trim(r[i])){var o=r[i].split(":"),l=A.trim(o[0]),h=A.trim(o[1]);this.styles[l]=new A.Property(l,h)}}for(this.attribute("id").hasValue()&&null==A.Definitions[this.attribute("id").value]&&(A.Definitions[this.attribute("id").value]=this),i=0;i<a.childNodes.length;i++){var u=a.childNodes[i];if(1==u.nodeType&&this.addChild(u,!0),this.captureTextNodes&&(3==u.nodeType||4==u.nodeType)){var c=u.value||u.text||u.textContent||"";""!=A.compressSpaces(c)&&this.addChild(new A.Element.tspan(u),!1)}}}},A.Element.RenderedElementBase=function(t){this.base=A.Element.ElementBase,this.base(t),this.calculateOpacity=function(){for(var t=1,e=this;null!=e;){var i=e.style("opacity",!1,!0);i.hasValue()&&(t*=i.numValue()),e=e.parent}return t},this.setContext=function(t,e){if(!e){var i;if(this.style("fill").isUrlDefinition())null!=(i=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity")))&&(t.fillStyle=i);else if(this.style("fill").hasValue()){var n;"currentColor"==(n=this.style("fill")).value&&(n.value=this.style("color").value),"inherit"!=n.value&&(t.fillStyle="none"==n.value?"rgba(0,0,0,0)":n.value)}if(this.style("fill-opacity").hasValue()&&(n=(n=new A.Property("fill",t.fillStyle)).addOpacity(this.style("fill-opacity")),t.fillStyle=n.value),this.style("stroke").isUrlDefinition())null!=(i=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity")))&&(t.strokeStyle=i);else if(this.style("stroke").hasValue()){var s;"currentColor"==(s=this.style("stroke")).value&&(s.value=this.style("color").value),"inherit"!=s.value&&(t.strokeStyle="none"==s.value?"rgba(0,0,0,0)":s.value)}if(this.style("stroke-opacity").hasValue()&&(s=(s=new A.Property("stroke",t.strokeStyle)).addOpacity(this.style("stroke-opacity")),t.strokeStyle=s.value),this.style("stroke-width").hasValue()){var a=this.style("stroke-width").toPixels();t.lineWidth=0==a?.001:a}if(this.style("stroke-linecap").hasValue()&&(t.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(t.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(t.miterLimit=this.style("stroke-miterlimit").value),this.style("paint-order").hasValue()&&(t.paintOrder=this.style("paint-order").value),this.style("stroke-dasharray").hasValue()&&"none"!=this.style("stroke-dasharray").value){var r=A.ToNumberArray(this.style("stroke-dasharray").value);void 0!==t.setLineDash?t.setLineDash(r):void 0!==t.webkitLineDash?t.webkitLineDash=r:void 0===t.mozDash||1==r.length&&0==r[0]||(t.mozDash=r);var o=this.style("stroke-dashoffset").toPixels();void 0!==t.lineDashOffset?t.lineDashOffset=o:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=o:void 0!==t.mozDashOffset&&(t.mozDashOffset=o)}}if(void 0!==t.font){t.font=A.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").toPixels()+"px":"",this.style("font-family").value).toString();var l=this.style("font-size",!1,!1);l.isPixels()&&(A.emSize=l.toPixels())}if(this.style("transform",!1,!0).hasValue()&&new A.Transform(this.style("transform",!1,!0).value).apply(t),this.style("clip-path",!1,!0).hasValue()){var h=this.style("clip-path",!1,!0).getDefinition();null!=h&&h.apply(t)}t.globalAlpha=this.calculateOpacity()}},A.Element.RenderedElementBase.prototype=new A.Element.ElementBase,A.Element.PathElementBase=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.path=function(t){return null!=t&&t.beginPath(),new A.BoundingBox},this.renderChildren=function(t){this.path(t),A.Mouse.checkPath(this,t),""!=t.fillStyle&&("inherit"!=this.style("fill-rule").valueOrDefault("inherit")?t.fill(this.style("fill-rule").value):t.fill()),""!=t.strokeStyle&&t.stroke();var e=this.getMarkers();if(null!=e){if(this.style("marker-start").isUrlDefinition()&&(i=this.style("marker-start").getDefinition()).render(t,e[0][0],e[0][1]),this.style("marker-mid").isUrlDefinition())for(var i=this.style("marker-mid").getDefinition(),n=1;n<e.length-1;n++)i.render(t,e[n][0],e[n][1]);this.style("marker-end").isUrlDefinition()&&(i=this.style("marker-end").getDefinition()).render(t,e[e.length-1][0],e[e.length-1][1])}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},A.Element.PathElementBase.prototype=new A.Element.RenderedElementBase,A.Element.svg=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.baseClearContext=this.clearContext,this.clearContext=function(t){this.baseClearContext(t),A.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(t){if(t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4,t.canvas.style&&void 0!==t.font&&void 0!==u.getComputedStyle){t.font=u.getComputedStyle(t.canvas).getPropertyValue("font");var e=new A.Property("fontSize",A.Font.Parse(t.font).fontSize);e.hasValue()&&(A.rootEmSize=A.emSize=e.toPixels("y"))}this.baseSetContext(t),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),t.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y"));var i=A.ViewPort.width(),n=A.ViewPort.height();if(this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),void 0===this.root){i=this.attribute("width").toPixels("x"),n=this.attribute("height").toPixels("y");var s=0,a=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(s=-this.attribute("refX").toPixels("x"),a=-this.attribute("refY").toPixels("y")),"visible"!=this.attribute("overflow").valueOrDefault("hidden")&&(t.beginPath(),t.moveTo(s,a),t.lineTo(i,a),t.lineTo(i,n),t.lineTo(s,n),t.closePath(),t.clip())}if(A.ViewPort.SetCurrent(i,n),this.attribute("viewBox").hasValue()){var r=A.ToNumberArray(this.attribute("viewBox").value),o=r[0],l=r[1];i=r[2],n=r[3],A.AspectRatio(t,this.attribute("preserveAspectRatio").value,A.ViewPort.width(),i,A.ViewPort.height(),n,o,l,this.attribute("refX").value,this.attribute("refY").value),A.ViewPort.RemoveCurrent(),A.ViewPort.SetCurrent(r[2],r[3])}}},A.Element.svg.prototype=new A.Element.RenderedElementBase,A.Element.rect=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=this.attribute("x").toPixels("x"),i=this.attribute("y").toPixels("y"),n=this.attribute("width").toPixels("x"),s=this.attribute("height").toPixels("y"),a=this.attribute("rx").toPixels("x"),r=this.attribute("ry").toPixels("y");if(this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(r=a),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(a=r),a=Math.min(a,n/2),r=Math.min(r,s/2),null!=t){var o=(Math.sqrt(2)-1)/3*4;t.beginPath(),t.moveTo(e+a,i),t.lineTo(e+n-a,i),t.bezierCurveTo(e+n-a+o*a,i,e+n,i+r-o*r,e+n,i+r),t.lineTo(e+n,i+s-r),t.bezierCurveTo(e+n,i+s-r+o*r,e+n-a+o*a,i+s,e+n-a,i+s),t.lineTo(e+a,i+s),t.bezierCurveTo(e+a-o*a,i+s,e,i+s-r+o*r,e,i+s-r),t.lineTo(e,i+r),t.bezierCurveTo(e,i+r-o*r,e+a-o*a,i,e+a,i),t.closePath()}return new A.BoundingBox(e,i,e+n,i+s)}},A.Element.rect.prototype=new A.Element.PathElementBase,A.Element.circle=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=this.attribute("cx").toPixels("x"),i=this.attribute("cy").toPixels("y"),n=this.attribute("r").toPixels();return null!=t&&(t.beginPath(),t.arc(e,i,n,0,2*Math.PI,!1),t.closePath()),new A.BoundingBox(e-n,i-n,e+n,i+n)}},A.Element.circle.prototype=new A.Element.PathElementBase,A.Element.ellipse=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=(Math.sqrt(2)-1)/3*4,i=this.attribute("rx").toPixels("x"),n=this.attribute("ry").toPixels("y"),s=this.attribute("cx").toPixels("x"),a=this.attribute("cy").toPixels("y");return null!=t&&(t.beginPath(),t.moveTo(s+i,a),t.bezierCurveTo(s+i,a+e*n,s+e*i,a+n,s,a+n),t.bezierCurveTo(s-e*i,a+n,s-i,a+e*n,s-i,a),t.bezierCurveTo(s-i,a-e*n,s-e*i,a-n,s,a-n),t.bezierCurveTo(s+e*i,a-n,s+i,a-e*n,s+i,a),t.closePath()),new A.BoundingBox(s-i,a-n,s+i,a+n)}},A.Element.ellipse.prototype=new A.Element.PathElementBase,A.Element.line=function(t){this.base=A.Element.PathElementBase,this.base(t),this.getPoints=function(){return[new A.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new A.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]},this.path=function(t){var e=this.getPoints();return null!=t&&(t.beginPath(),t.moveTo(e[0].x,e[0].y),t.lineTo(e[1].x,e[1].y)),new A.BoundingBox(e[0].x,e[0].y,e[1].x,e[1].y)},this.getMarkers=function(){var t=this.getPoints(),e=t[0].angleTo(t[1]);return[[t[0],e],[t[1],e]]}},A.Element.line.prototype=new A.Element.PathElementBase,A.Element.polyline=function(t){this.base=A.Element.PathElementBase,this.base(t),this.points=A.CreatePath(this.attribute("points").value),this.path=function(t){var e=new A.BoundingBox(this.points[0].x,this.points[0].y);null!=t&&(t.beginPath(),t.moveTo(this.points[0].x,this.points[0].y));for(var i=1;i<this.points.length;i++)e.addPoint(this.points[i].x,this.points[i].y),null!=t&&t.lineTo(this.points[i].x,this.points[i].y);return e},this.getMarkers=function(){for(var t=[],e=0;e<this.points.length-1;e++)t.push([this.points[e],this.points[e].angleTo(this.points[e+1])]);return 0<t.length&&t.push([this.points[this.points.length-1],t[t.length-1][1]]),t}},A.Element.polyline.prototype=new A.Element.PathElementBase,A.Element.polygon=function(t){this.base=A.Element.polyline,this.base(t),this.basePath=this.path,this.path=function(t){var e=this.basePath(t);return null!=t&&(t.lineTo(this.points[0].x,this.points[0].y),t.closePath()),e}},A.Element.polygon.prototype=new A.Element.polyline,A.Element.path=function(t){this.base=A.Element.PathElementBase,this.base(t);var e=this.attribute("d").value;e=e.replace(/,/gm," ");for(var i=0;i<2;i++)e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");for(e=(e=e.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([0-9])([+\-])/gm,"$1 $2"),i=0;i<2;i++)e=e.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");e=e.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 "),e=A.compressSpaces(e),e=A.trim(e),this.PathParser=new function(t){this.tokens=t.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new A.Point(0,0),this.control=new A.Point(0,0),this.current=new A.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new A.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t},this.getReflectedControlPoint=function(){return"c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase()?this.current:new A.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x+=this.current.x,t.y+=this.current.y),t},this.addMarker=function(t,e,i){null!=i&&0<this.angles.length&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(i)),this.addMarkerAngle(t,null==e?null:e.angleTo(t))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t<this.angles.length;t++)if(null==this.angles[t])for(var e=t+1;e<this.angles.length;e++)if(null!=this.angles[e]){this.angles[t]=this.angles[e];break}return this.angles}}(e),this.path=function(t){var e=this.PathParser;e.reset();var i=new A.BoundingBox;for(null!=t&&t.beginPath();!e.isEnd();)switch(e.nextCommand(),e.command){case"M":case"m":var n=e.getAsCurrentPoint();for(e.addMarker(n),i.addPoint(n.x,n.y),null!=t&&t.moveTo(n.x,n.y),e.start=e.current;!e.isCommandOrEnd();)n=e.getAsCurrentPoint(),e.addMarker(n,e.start),i.addPoint(n.x,n.y),null!=t&&t.lineTo(n.x,n.y);break;case"L":case"l":for(;!e.isCommandOrEnd();){var s=e.current;n=e.getAsCurrentPoint(),e.addMarker(n,s),i.addPoint(n.x,n.y),null!=t&&t.lineTo(n.x,n.y)}break;case"H":case"h":for(;!e.isCommandOrEnd();){var a=new A.Point((e.isRelativeCommand()?e.current.x:0)+e.getScalar(),e.current.y);e.addMarker(a,e.current),e.current=a,i.addPoint(e.current.x,e.current.y),null!=t&&t.lineTo(e.current.x,e.current.y)}break;case"V":case"v":for(;!e.isCommandOrEnd();)a=new A.Point(e.current.x,(e.isRelativeCommand()?e.current.y:0)+e.getScalar()),e.addMarker(a,e.current),e.current=a,i.addPoint(e.current.x,e.current.y),null!=t&&t.lineTo(e.current.x,e.current.y);break;case"C":case"c":for(;!e.isCommandOrEnd();){var r=e.current,o=e.getPoint(),l=e.getAsControlPoint(),h=e.getAsCurrentPoint();e.addMarker(h,l,o),i.addBezierCurve(r.x,r.y,o.x,o.y,l.x,l.y,h.x,h.y),null!=t&&t.bezierCurveTo(o.x,o.y,l.x,l.y,h.x,h.y)}break;case"S":case"s":for(;!e.isCommandOrEnd();)r=e.current,o=e.getReflectedControlPoint(),l=e.getAsControlPoint(),h=e.getAsCurrentPoint(),e.addMarker(h,l,o),i.addBezierCurve(r.x,r.y,o.x,o.y,l.x,l.y,h.x,h.y),null!=t&&t.bezierCurveTo(o.x,o.y,l.x,l.y,h.x,h.y);break;case"Q":case"q":for(;!e.isCommandOrEnd();)r=e.current,l=e.getAsControlPoint(),h=e.getAsCurrentPoint(),e.addMarker(h,l,l),i.addQuadraticCurve(r.x,r.y,l.x,l.y,h.x,h.y),null!=t&&t.quadraticCurveTo(l.x,l.y,h.x,h.y);break;case"T":case"t":for(;!e.isCommandOrEnd();)r=e.current,l=e.getReflectedControlPoint(),e.control=l,h=e.getAsCurrentPoint(),e.addMarker(h,l,l),i.addQuadraticCurve(r.x,r.y,l.x,l.y,h.x,h.y),null!=t&&t.quadraticCurveTo(l.x,l.y,h.x,h.y);break;case"A":case"a":for(;!e.isCommandOrEnd();){r=e.current;var u=e.getScalar(),c=e.getScalar(),f=e.getScalar()*(Math.PI/180),m=e.getScalar(),p=e.getScalar(),d=(h=e.getAsCurrentPoint(),new A.Point(Math.cos(f)*(r.x-h.x)/2+Math.sin(f)*(r.y-h.y)/2,-Math.sin(f)*(r.x-h.x)/2+Math.cos(f)*(r.y-h.y)/2)),y=Math.pow(d.x,2)/Math.pow(u,2)+Math.pow(d.y,2)/Math.pow(c,2);1<y&&(u*=Math.sqrt(y),c*=Math.sqrt(y));var v=(m==p?-1:1)*Math.sqrt((Math.pow(u,2)*Math.pow(c,2)-Math.pow(u,2)*Math.pow(d.y,2)-Math.pow(c,2)*Math.pow(d.x,2))/(Math.pow(u,2)*Math.pow(d.y,2)+Math.pow(c,2)*Math.pow(d.x,2)));isNaN(v)&&(v=0);var g=new A.Point(v*u*d.y/c,v*-c*d.x/u),x=new A.Point((r.x+h.x)/2+Math.cos(f)*g.x-Math.sin(f)*g.y,(r.y+h.y)/2+Math.sin(f)*g.x+Math.cos(f)*g.y),b=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},P=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(b(t)*b(e))},E=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(P(t,e))},w=E([1,0],[(d.x-g.x)/u,(d.y-g.y)/c]),B=[(d.x-g.x)/u,(d.y-g.y)/c],C=[(-d.x-g.x)/u,(-d.y-g.y)/c],T=E(B,C);P(B,C)<=-1&&(T=Math.PI),1<=P(B,C)&&(T=0);var V=1-p?1:-1,M=w+V*(T/2),S=new A.Point(x.x+u*Math.cos(M),x.y+c*Math.sin(M));if(e.addMarkerAngle(S,M-V*Math.PI/2),e.addMarkerAngle(h,M-V*Math.PI),i.addPoint(h.x,h.y),null!=t){P=c<u?u:c;var k=c<u?1:u/c,D=c<u?c/u:1;t.translate(x.x,x.y),t.rotate(f),t.scale(k,D),t.arc(0,0,P,w,w+T,1-p),t.scale(1/k,1/D),t.rotate(-f),t.translate(-x.x,-x.y)}}break;case"Z":case"z":null!=t&&i.x1!==i.x2&&i.y1!==i.y2&&t.closePath(),e.current=e.start}return i},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),i=[],n=0;n<t.length;n++)i.push([t[n],e[n]]);return i}},A.Element.path.prototype=new A.Element.PathElementBase,A.Element.pattern=function(t){this.base=A.Element.ElementBase,this.base(t),this.createPattern=function(t,e){var i=this.attribute("width").toPixels("x",!0),n=this.attribute("height").toPixels("y",!0),s=new A.Element.svg;s.attributes.viewBox=new A.Property("viewBox",this.attribute("viewBox").value),s.attributes.width=new A.Property("width",i+"px"),s.attributes.height=new A.Property("height",n+"px"),s.attributes.transform=new A.Property("transform",this.attribute("patternTransform").value),s.children=this.children;var a=p();a.width=i,a.height=n;var r=a.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&r.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var o=-1;o<=1;o++)for(var l=-1;l<=1;l++)r.save(),s.attributes.x=new A.Property("x",o*a.width),s.attributes.y=new A.Property("y",l*a.height),s.render(r),r.restore();return t.createPattern(a,"repeat")}},A.Element.pattern.prototype=new A.Element.ElementBase,A.Element.marker=function(t){this.base=A.Element.ElementBase,this.base(t),this.baseRender=this.render,this.render=function(t,e,i){if(e){t.translate(e.x,e.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&t.rotate(i),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&t.scale(t.lineWidth,t.lineWidth),t.save();var n=new A.Element.svg;n.attributes.viewBox=new A.Property("viewBox",this.attribute("viewBox").value),n.attributes.refX=new A.Property("refX",this.attribute("refX").value),n.attributes.refY=new A.Property("refY",this.attribute("refY").value),n.attributes.width=new A.Property("width",this.attribute("markerWidth").value),n.attributes.height=new A.Property("height",this.attribute("markerHeight").value),n.attributes.fill=new A.Property("fill",this.attribute("fill").valueOrDefault("black")),n.attributes.stroke=new A.Property("stroke",this.attribute("stroke").valueOrDefault("none")),n.children=this.children,n.render(t),t.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&t.rotate(-i),t.translate(-e.x,-e.y)}}},A.Element.marker.prototype=new A.Element.ElementBase,A.Element.defs=function(t){this.base=A.Element.ElementBase,this.base(t),this.render=function(t){}},A.Element.defs.prototype=new A.Element.ElementBase,A.Element.GradientBase=function(t){this.base=A.Element.ElementBase,this.base(t),this.stops=[];for(var e=0;e<this.children.length;e++){var i=this.children[e];"stop"==i.type&&this.stops.push(i)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(t){for(var e=0;e<this.attributesToInherit.length;e++){var i=this.attributesToInherit[e];!this.attribute(i).hasValue()&&t.attribute(i).hasValue()&&(this.attribute(i,!0).value=t.attribute(i).value)}},this.createGradient=function(t,e,i){var n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(n));var s=function(t){return i.hasValue()?new A.Property("color",t).addOpacity(i).value:t},a=this.getGradient(t,e);if(null==a)return s(n.stops[n.stops.length-1].color);for(var r=0;r<n.stops.length;r++)a.addColorStop(n.stops[r].offset,s(n.stops[r].color));if(this.attribute("gradientTransform").hasValue()){var o=A.ViewPort.viewPorts[0],l=new A.Element.rect;l.attributes.x=new A.Property("x",-A.MAX_VIRTUAL_PIXELS/3),l.attributes.y=new A.Property("y",-A.MAX_VIRTUAL_PIXELS/3),l.attributes.width=new A.Property("width",A.MAX_VIRTUAL_PIXELS),l.attributes.height=new A.Property("height",A.MAX_VIRTUAL_PIXELS);var h=new A.Element.g;h.attributes.transform=new A.Property("transform",this.attribute("gradientTransform").value),h.children=[l];var u=new A.Element.svg;u.attributes.x=new A.Property("x",0),u.attributes.y=new A.Property("y",0),u.attributes.width=new A.Property("width",o.width),u.attributes.height=new A.Property("height",o.height),u.children=[h];var c=p();c.width=o.width,c.height=o.height;var f=c.getContext("2d");return f.fillStyle=a,u.render(f),f.createPattern(c,"no-repeat")}return a}},A.Element.GradientBase.prototype=new A.Element.ElementBase,A.Element.linearGradient=function(t){this.base=A.Element.GradientBase,this.base(t),this.attributesToInherit.push("x1"),this.attributesToInherit.push("y1"),this.attributesToInherit.push("x2"),this.attributesToInherit.push("y2"),this.getGradient=function(t,e){var i="objectBoundingBox"==this.gradientUnits()?e.getBoundingBox(t):null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var n="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),s="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),a="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),r="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return n==a&&s==r?null:t.createLinearGradient(n,s,a,r)}},A.Element.linearGradient.prototype=new A.Element.GradientBase,A.Element.radialGradient=function(t){this.base=A.Element.GradientBase,this.base(t),this.attributesToInherit.push("cx"),this.attributesToInherit.push("cy"),this.attributesToInherit.push("r"),this.attributesToInherit.push("fx"),this.attributesToInherit.push("fy"),this.getGradient=function(t,e){var i=e.getBoundingBox(t);this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%"),this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%"),this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var n="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),s="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),a=n,r=s;this.attribute("fx").hasValue()&&(a="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(r="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y"));var o="objectBoundingBox"==this.gradientUnits()?(i.width()+i.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return t.createRadialGradient(a,r,0,n,s,o)}},A.Element.radialGradient.prototype=new A.Element.GradientBase,A.Element.stop=function(t){this.base=A.Element.ElementBase,this.base(t),this.offset=this.attribute("offset").numValue(),this.offset<0&&(this.offset=0),1<this.offset&&(this.offset=1);var e=this.style("stop-color",!0);""===e.value&&(e.value="#000"),this.style("stop-opacity").hasValue()&&(e=e.addOpacity(this.style("stop-opacity"))),this.color=e.value},A.Element.stop.prototype=new A.Element.ElementBase,A.Element.AnimateBase=function(t){this.base=A.Element.ElementBase,this.base(t),A.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var t=this.attribute("attributeType").value,e=this.attribute("attributeName").value;return"CSS"==t?this.parent.style(e,!0):this.parent.attribute(e,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(t){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+t;var e=!1;if(this.begin<this.duration){var i=this.calcValue();this.attribute("type").hasValue()&&(i=this.attribute("type").value+"("+i+")"),this.getProperty().value=i,e=!0}return e},this.from=this.attribute("from"),this.to=this.attribute("to"),this.values=this.attribute("values"),this.values.hasValue()&&(this.values.value=this.values.value.split(";")),this.progress=function(){var t={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var e=t.progress*(this.values.value.length-1),i=Math.floor(e),n=Math.ceil(e);t.from=new A.Property("from",parseFloat(this.values.value[i])),t.to=new A.Property("to",parseFloat(this.values.value[n])),t.progress=(e-i)/(n-i)}else t.from=this.from,t.to=this.to;return t}},A.Element.AnimateBase.prototype=new A.Element.ElementBase,A.Element.animate=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){var t=this.progress();return t.from.numValue()+(t.to.numValue()-t.from.numValue())*t.progress+this.initialUnits}},A.Element.animate.prototype=new A.Element.AnimateBase,A.Element.animateColor=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){var t=this.progress(),e=new m(t.from.value),i=new m(t.to.value);if(e.ok&&i.ok){var n=e.r+(i.r-e.r)*t.progress,s=e.g+(i.g-e.g)*t.progress,a=e.b+(i.b-e.b)*t.progress;return"rgb("+parseInt(n,10)+","+parseInt(s,10)+","+parseInt(a,10)+")"}return this.attribute("from").value}},A.Element.animateColor.prototype=new A.Element.AnimateBase,A.Element.animateTransform=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){for(var t=this.progress(),e=A.ToNumberArray(t.from.value),i=A.ToNumberArray(t.to.value),n="",s=0;s<e.length;s++)n+=e[s]+(i[s]-e[s])*t.progress+" ";return n}},A.Element.animateTransform.prototype=new A.Element.animate,A.Element.font=function(t){this.base=A.Element.ElementBase,this.base(t),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var e=0;e<this.children.length;e++){var i=this.children[e];"font-face"==i.type?(this.fontFace=i).style("font-family").hasValue()&&(A.Definitions[i.style("font-family").value]=this):"missing-glyph"==i.type?this.missingGlyph=i:"glyph"==i.type&&(""!=i.arabicForm?(this.isRTL=!0,this.isArabic=!0,void 0===this.glyphs[i.unicode]&&(this.glyphs[i.unicode]=[]),this.glyphs[i.unicode][i.arabicForm]=i):this.glyphs[i.unicode]=i)}},A.Element.font.prototype=new A.Element.ElementBase,A.Element.fontface=function(t){this.base=A.Element.ElementBase,this.base(t),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},A.Element.fontface.prototype=new A.Element.ElementBase,A.Element.missingglyph=function(t){this.base=A.Element.path,this.base(t),this.horizAdvX=0},A.Element.missingglyph.prototype=new A.Element.path,A.Element.glyph=function(t){this.base=A.Element.path,this.base(t),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},A.Element.glyph.prototype=new A.Element.path,A.Element.text=function(t){this.captureTextNodes=!0,this.base=A.Element.RenderedElementBase,this.base(t),this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t);var e=this.style("dominant-baseline").toTextBaseline();null==e&&(e=this.style("alignment-baseline").toTextBaseline()),null!=e&&(t.textBaseline=e)},this.initializeCoordinates=function(t){this.x=this.attribute("x").toPixels("x"),this.y=this.attribute("y").toPixels("y"),this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),this.x+=this.getAnchorDelta(t,this,0)},this.getBoundingBox=function(t){this.initializeCoordinates(t);for(var e=null,i=0;i<this.children.length;i++){var n=this.getChildBoundingBox(t,this,this,i);null==e?e=n:e.addBoundingBox(n)}return e},this.renderChildren=function(t){this.initializeCoordinates(t);for(var e=0;e<this.children.length;e++)this.renderChild(t,this,this,e)},this.getAnchorDelta=function(t,e,i){var n=this.style("text-anchor").valueOrDefault("start");if("start"!=n){for(var s=0,a=i;a<e.children.length;a++){var r=e.children[a];if(i<a&&r.attribute("x").hasValue())break;s+=r.measureTextRecursive(t)}return-1*("end"==n?s:s/2)}return 0},this.adjustChildCoordinates=function(t,e,i,n){var s=i.children[n];return s.attribute("x").hasValue()?(s.x=s.attribute("x").toPixels("x")+e.getAnchorDelta(t,i,n),s.attribute("dx").hasValue()&&(s.x+=s.attribute("dx").toPixels("x"))):(s.attribute("dx").hasValue()&&(e.x+=s.attribute("dx").toPixels("x")),s.x=e.x),e.x=s.x+s.measureText(t),s.attribute("y").hasValue()?(s.y=s.attribute("y").toPixels("y"),s.attribute("dy").hasValue()&&(s.y+=s.attribute("dy").toPixels("y"))):(s.attribute("dy").hasValue()&&(e.y+=s.attribute("dy").toPixels("y")),s.y=e.y),e.y=s.y,s},this.getChildBoundingBox=function(t,e,i,n){var s=this.adjustChildCoordinates(t,e,i,n),a=s.getBoundingBox(t);for(n=0;n<s.children.length;n++){var r=e.getChildBoundingBox(t,e,s,n);a.addBoundingBox(r)}return a},this.renderChild=function(t,e,i,n){var s=this.adjustChildCoordinates(t,e,i,n);for(s.render(t),n=0;n<s.children.length;n++)e.renderChild(t,e,s,n)}},A.Element.text.prototype=new A.Element.RenderedElementBase,A.Element.TextElementBase=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.getGlyph=function(t,e,i){var n=e[i],s=null;if(t.isArabic){var a="isolated";(0==i||" "==e[i-1])&&i<e.length-2&&" "!=e[i+1]&&(a="terminal"),0<i&&" "!=e[i-1]&&i<e.length-2&&" "!=e[i+1]&&(a="medial"),0<i&&" "!=e[i-1]&&(i==e.length-1||" "==e[i+1])&&(a="initial"),void 0!==t.glyphs[n]&&null==(s=t.glyphs[n][a])&&"glyph"==t.glyphs[n].type&&(s=t.glyphs[n])}else s=t.glyphs[n];return null==s&&(s=t.missingGlyph),s},this.renderChildren=function(t){var e=this.parent.style("font-family").getDefinition();if(null==e)"stroke"==t.paintOrder?(""!=t.strokeStyle&&t.strokeText(A.compressSpaces(this.getText()),this.x,this.y),""!=t.fillStyle&&t.fillText(A.compressSpaces(this.getText()),this.x,this.y)):(""!=t.fillStyle&&t.fillText(A.compressSpaces(this.getText()),this.x,this.y),""!=t.strokeStyle&&t.strokeText(A.compressSpaces(this.getText()),this.x,this.y));else{var i=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize),n=this.parent.style("font-style").valueOrDefault(A.Font.Parse(A.ctx.font).fontStyle),s=this.getText();e.isRTL&&(s=s.split("").reverse().join(""));for(var a=A.ToNumberArray(this.parent.attribute("dx").value),r=0;r<s.length;r++){var o=this.getGlyph(e,s,r),l=i/e.fontFace.unitsPerEm;t.translate(this.x,this.y),t.scale(l,-l);var h=t.lineWidth;t.lineWidth=t.lineWidth*e.fontFace.unitsPerEm/i,"italic"==n&&t.transform(1,0,.4,1,0,0),o.render(t),"italic"==n&&t.transform(1,0,-.4,1,0,0),t.lineWidth=h,t.scale(1/l,-1/l),t.translate(-this.x,-this.y),this.x+=i*(o.horizAdvX||e.horizAdvX)/e.fontFace.unitsPerEm,void 0===a[r]||isNaN(a[r])||(this.x+=a[r])}}},this.getText=function(){},this.measureTextRecursive=function(t){for(var e=this.measureText(t),i=0;i<this.children.length;i++)e+=this.children[i].measureTextRecursive(t);return e},this.measureText=function(t){var e=this.parent.style("font-family").getDefinition();if(null!=e){var i=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize),n=0,s=this.getText();e.isRTL&&(s=s.split("").reverse().join(""));for(var a=A.ToNumberArray(this.parent.attribute("dx").value),r=0;r<s.length;r++)n+=(this.getGlyph(e,s,r).horizAdvX||e.horizAdvX)*i/e.fontFace.unitsPerEm,void 0===a[r]||isNaN(a[r])||(n+=a[r]);return n}var o=A.compressSpaces(this.getText());if(!t.measureText)return 10*o.length;t.save(),this.setContext(t,!0);var l=t.measureText(o).width;return t.restore(),l},this.getBoundingBox=function(t){var e=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize);return new A.BoundingBox(this.x,this.y-e,this.x+this.measureText(t),this.y)}},A.Element.TextElementBase.prototype=new A.Element.RenderedElementBase,A.Element.tspan=function(t){this.captureTextNodes=!0,this.base=A.Element.TextElementBase,this.base(t),this.text=A.compressSpaces(t.value||t.text||t.textContent||""),this.getText=function(){return 0<this.children.length?"":this.text}},A.Element.tspan.prototype=new A.Element.TextElementBase,A.Element.tref=function(t){this.base=A.Element.TextElementBase,this.base(t),this.getText=function(){var t=this.getHrefAttribute().getDefinition();if(null!=t)return t.children[0].getText()}},A.Element.tref.prototype=new A.Element.TextElementBase,A.Element.a=function(t){this.base=A.Element.TextElementBase,this.base(t),this.hasText=0<t.childNodes.length;for(var e=0;e<t.childNodes.length;e++)3!=t.childNodes[e].nodeType&&(this.hasText=!1);this.text=this.hasText?t.childNodes[0].value||t.childNodes[0].data:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(t){if(this.hasText){this.baseRenderChildren(t);var e=new A.Property("fontSize",A.Font.Parse(A.ctx.font).fontSize);A.Mouse.checkBoundingBox(this,new A.BoundingBox(this.x,this.y-e.toPixels("y"),this.x+this.measureText(t),this.y))}else if(0<this.children.length){var i=new A.Element.g;i.children=this.children,i.parent=this,i.render(t)}},this.onclick=function(){u.open(this.getHrefAttribute().value)},this.onmousemove=function(){A.ctx.canvas.style.cursor="pointer"}},A.Element.a.prototype=new A.Element.TextElementBase,A.Element.image=function(t){this.base=A.Element.RenderedElementBase,this.base(t);var e=this.getHrefAttribute().value;if(""!=e){var a=e.match(/\.svg$/);if(A.Images.push(this),this.loaded=!1,a)this.img=A.ajax(e),this.loaded=!0;else{this.img=document.createElement("img"),1==A.opts.useCORS&&(this.img.crossOrigin="Anonymous");var r=this;this.img.onload=function(){r.loaded=!0},this.img.onerror=function(){A.log('ERROR: image "'+e+'" not found'),r.loaded=!0},this.img.src=e}this.renderChildren=function(t){var e=this.attribute("x").toPixels("x"),i=this.attribute("y").toPixels("y"),n=this.attribute("width").toPixels("x"),s=this.attribute("height").toPixels("y");0!=n&&0!=s&&(t.save(),a?t.drawSvg(this.img,e,i,n,s):(t.translate(e,i),A.AspectRatio(t,this.attribute("preserveAspectRatio").value,n,this.img.width,s,this.img.height,0,0),r.loaded&&(void 0===this.img.complete||this.img.complete)&&t.drawImage(this.img,0,0)),t.restore())},this.getBoundingBox=function(){var t=this.attribute("x").toPixels("x"),e=this.attribute("y").toPixels("y"),i=this.attribute("width").toPixels("x"),n=this.attribute("height").toPixels("y");return new A.BoundingBox(t,e,t+i,e+n)}}},A.Element.image.prototype=new A.Element.RenderedElementBase,A.Element.g=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.getBoundingBox=function(t){for(var e=new A.BoundingBox,i=0;i<this.children.length;i++)e.addBoundingBox(this.children[i].getBoundingBox(t));return e}},A.Element.g.prototype=new A.Element.RenderedElementBase,A.Element.symbol=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.render=function(t){}},A.Element.symbol.prototype=new A.Element.RenderedElementBase,A.Element.style=function(t){this.base=A.Element.ElementBase,this.base(t);for(var e="",i=0;i<t.childNodes.length;i++)e+=t.childNodes[i].data;e=e.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"");var n=(e=A.compressSpaces(e)).split("}");for(i=0;i<n.length;i++)if(""!=A.trim(n[i]))for(var s=n[i].split("{"),a=s[0].split(","),r=s[1].split(";"),o=0;o<a.length;o++){var l=A.trim(a[o]);if(""!=l){for(var h=A.Styles[l]||{},u=0;u<r.length;u++){var c=r[u].indexOf(":"),f=r[u].substr(0,c),m=r[u].substr(c+1,r[u].length-c);null!=f&&null!=m&&(h[A.trim(f)]=new A.Property(A.trim(f),A.trim(m)))}if(A.Styles[l]=h,A.StylesSpecificity[l]=w(l),"@font-face"==l)for(var p=h["font-family"].value.replace(/"/g,""),d=h.src.value.split(","),y=0;y<d.length;y++)if(0<d[y].indexOf('format("svg")'))for(var v=d[y].indexOf("url"),g=d[y].indexOf(")",v),x=d[y].substr(v+5,g-v-6),b=A.parseXml(A.ajax(x)).getElementsByTagName("font"),P=0;P<b.length;P++){var E=A.CreateElement(b[P]);A.Definitions[p]=E}}}},A.Element.style.prototype=new A.Element.ElementBase,A.Element.use=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t),this.attribute("x").hasValue()&&t.translate(this.attribute("x").toPixels("x"),0),this.attribute("y").hasValue()&&t.translate(0,this.attribute("y").toPixels("y"))};var n=this.getHrefAttribute().getDefinition();this.path=function(t){null!=n&&n.path(t)},this.elementTransform=function(){if(null!=n&&n.style("transform",!1,!0).hasValue())return new A.Transform(n.style("transform",!1,!0).value)},this.getBoundingBox=function(t){if(null!=n)return n.getBoundingBox(t)},this.renderChildren=function(t){if(null!=n){var e=n;"symbol"==n.type&&((e=new A.Element.svg).type="svg",e.attributes.viewBox=new A.Property("viewBox",n.attribute("viewBox").value),e.attributes.preserveAspectRatio=new A.Property("preserveAspectRatio",n.attribute("preserveAspectRatio").value),e.attributes.overflow=new A.Property("overflow",n.attribute("overflow").value),e.children=n.children),"svg"==e.type&&(this.attribute("width").hasValue()&&(e.attributes.width=new A.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(e.attributes.height=new A.Property("height",this.attribute("height").value)));var i=e.parent;e.parent=null,e.render(t),e.parent=i}}},A.Element.use.prototype=new A.Element.RenderedElementBase,A.Element.mask=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e){var i=this.attribute("x").toPixels("x"),n=this.attribute("y").toPixels("y"),s=this.attribute("width").toPixels("x"),a=this.attribute("height").toPixels("y");if(0==s&&0==a){for(var r=new A.BoundingBox,o=0;o<this.children.length;o++)r.addBoundingBox(this.children[o].getBoundingBox(t));i=Math.floor(r.x1),n=Math.floor(r.y1),s=Math.floor(r.width()),a=Math.floor(r.height())}var l=e.attribute("mask").value;e.attribute("mask").value="";var h=p();h.width=i+s,h.height=n+a;var u=h.getContext("2d");this.renderChildren(u);var c=p();c.width=i+s,c.height=n+a;var f=c.getContext("2d");e.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=u.createPattern(h,"no-repeat"),f.fillRect(0,0,i+s,n+a),t.fillStyle=f.createPattern(c,"no-repeat"),t.fillRect(0,0,i+s,n+a),e.attribute("mask").value=l},this.render=function(t){}},A.Element.mask.prototype=new A.Element.ElementBase,A.Element.clipPath=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t){var e="undefined"!=typeof CanvasRenderingContext2D,i=t.beginPath,n=t.closePath;e&&(CanvasRenderingContext2D.prototype.beginPath=function(){},CanvasRenderingContext2D.prototype.closePath=function(){}),i.call(t);for(var s=0;s<this.children.length;s++){var a=this.children[s];if(void 0!==a.path){var r=void 0!==a.elementTransform&&a.elementTransform();!r&&a.style("transform",!1,!0).hasValue()&&(r=new A.Transform(a.style("transform",!1,!0).value)),r&&r.apply(t),a.path(t),e&&(CanvasRenderingContext2D.prototype.closePath=n),r&&r.unapply(t)}}n.call(t),t.clip(),e&&(CanvasRenderingContext2D.prototype.beginPath=i,CanvasRenderingContext2D.prototype.closePath=n)},this.render=function(t){}},A.Element.clipPath.prototype=new A.Element.ElementBase,A.Element.filter=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e){var i=e.getBoundingBox(t),n=Math.floor(i.x1),s=Math.floor(i.y1),a=Math.floor(i.width()),r=Math.floor(i.height()),o=e.style("filter").value;e.style("filter").value="";for(var l=0,h=0,u=0;u<this.children.length;u++){var c=this.children[u].extraFilterDistance||0;l=Math.max(l,c),h=Math.max(h,c)}var f=p();f.width=a+2*l,f.height=r+2*h;var m=f.getContext("2d");for(m.translate(-n+l,-s+h),e.render(m),u=0;u<this.children.length;u++)"function"==typeof this.children[u].apply&&this.children[u].apply(m,0,0,a+2*l,r+2*h);t.drawImage(f,0,0,a+2*l,r+2*h,n-l,s-h,a+2*l,r+2*h),e.style("filter",!0).value=o},this.render=function(t){}},A.Element.filter.prototype=new A.Element.ElementBase,A.Element.feMorphology=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e,i,n,s){}},A.Element.feMorphology.prototype=new A.Element.ElementBase,A.Element.feComposite=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e,i,n,s){}},A.Element.feComposite.prototype=new A.Element.ElementBase,A.Element.feColorMatrix=function(t){this.base=A.Element.ElementBase,this.base(t);var n=A.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var e=n[0];n=[.213+.787*e,.715-.715*e,.072-.072*e,0,0,.213-.213*e,.715+.285*e,.072-.072*e,0,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var s=n[0]*Math.PI/180,i=function(t,e,i){return t+Math.cos(s)*e+Math.sin(s)*i};n=[i(.213,.787,-.213),i(.715,-.715,-.715),i(.072,-.072,.928),0,0,i(.213,-.213,.143),i(.715,.285,.14),i(.072,-.072,-.283),0,0,i(.213,-.213,-.787),i(.715,-.715,.715),i(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}function u(t,e,i,n,s,a){return t[i*n*4+4*e+a]}function c(t,e,i,n,s,a,r){t[i*n*4+4*e+a]=r}function f(t,e){var i=n[t];return i*(i<0?e-255:e)}this.apply=function(t,e,i,n,s){var a=t.getImageData(0,0,n,s);for(i=0;i<s;i++)for(e=0;e<n;e++){var r=u(a.data,e,i,n,0,0),o=u(a.data,e,i,n,0,1),l=u(a.data,e,i,n,0,2),h=u(a.data,e,i,n,0,3);c(a.data,e,i,n,0,0,f(0,r)+f(1,o)+f(2,l)+f(3,h)+f(4,1)),c(a.data,e,i,n,0,1,f(5,r)+f(6,o)+f(7,l)+f(8,h)+f(9,1)),c(a.data,e,i,n,0,2,f(10,r)+f(11,o)+f(12,l)+f(13,h)+f(14,1)),c(a.data,e,i,n,0,3,f(15,r)+f(16,o)+f(17,l)+f(18,h)+f(19,1))}t.clearRect(0,0,n,s),t.putImageData(a,0,0)}},A.Element.feColorMatrix.prototype=new A.Element.ElementBase,A.Element.feGaussianBlur=function(t){this.base=A.Element.ElementBase,this.base(t),this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue()),this.extraFilterDistance=this.blurRadius,this.apply=function(t,e,i,n,s){d&&void 0!==d.canvasRGBA?(t.canvas.id=A.UniqueId(),t.canvas.style.display="none",document.body.appendChild(t.canvas),d.canvasRGBA(t.canvas,e,i,n,s,this.blurRadius),document.body.removeChild(t.canvas)):A.log("ERROR: StackBlur.js must be included for blur to work")}},A.Element.feGaussianBlur.prototype=new A.Element.ElementBase,A.Element.title=function(t){},A.Element.title.prototype=new A.Element.ElementBase,A.Element.desc=function(t){},A.Element.desc.prototype=new A.Element.ElementBase,A.Element.MISSING=function(t){A.log("ERROR: Element '"+t.nodeName+"' not yet implemented.")},A.Element.MISSING.prototype=new A.Element.ElementBase,A.CreateElement=function(t){var e=t.nodeName.replace(/^[^:]+:/,"");e=e.replace(/\-/g,"");var i=null;return(i=void 0!==A.Element[e]?new A.Element[e](t):new A.Element.MISSING(t)).type=t.nodeName,i},A.load=function(t,e){A.loadXml(t,A.ajax(e))},A.loadXml=function(t,e){A.loadXmlDoc(t,A.parseXml(e))},A.loadXmlDoc=function(a,r){A.init(a);var i=function(t){for(var e=a.canvas;e;)t.x-=e.offsetLeft,t.y-=e.offsetTop,e=e.offsetParent;return u.scrollX&&(t.x+=u.scrollX),u.scrollY&&(t.y+=u.scrollY),t};1!=A.opts.ignoreMouse&&(a.canvas.onclick=function(t){var e=i(new A.Point(null!=t?t.clientX:event.clientX,null!=t?t.clientY:event.clientY));A.Mouse.onclick(e.x,e.y)},a.canvas.onmousemove=function(t){var e=i(new A.Point(null!=t?t.clientX:event.clientX,null!=t?t.clientY:event.clientY));A.Mouse.onmousemove(e.x,e.y)});var o=A.CreateElement(r.documentElement);o.root=!0,o.addStylesFromStyleDefinition();var l=!0,n=function(){A.ViewPort.Clear(),a.canvas.parentNode?A.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth,a.canvas.parentNode.clientHeight):A.ViewPort.SetCurrent(800,600),1!=A.opts.ignoreDimensions&&(o.style("width").hasValue()&&(a.canvas.width=o.style("width").toPixels("x"),a.canvas.style&&(a.canvas.style.width=a.canvas.width+"px")),o.style("height").hasValue()&&(a.canvas.height=o.style("height").toPixels("y"),a.canvas.style&&(a.canvas.style.height=a.canvas.height+"px")));var t=a.canvas.clientWidth||a.canvas.width,e=a.canvas.clientHeight||a.canvas.height;if(1==A.opts.ignoreDimensions&&o.style("width").hasValue()&&o.style("height").hasValue()&&(t=o.style("width").toPixels("x"),e=o.style("height").toPixels("y")),A.ViewPort.SetCurrent(t,e),null!=A.opts.offsetX&&(o.attribute("x",!0).value=A.opts.offsetX),null!=A.opts.offsetY&&(o.attribute("y",!0).value=A.opts.offsetY),null!=A.opts.scaleWidth||null!=A.opts.scaleHeight){var i=null,n=null,s=A.ToNumberArray(o.attribute("viewBox").value);null!=A.opts.scaleWidth&&(o.attribute("width").hasValue()?i=o.attribute("width").toPixels("x")/A.opts.scaleWidth:isNaN(s[2])||(i=s[2]/A.opts.scaleWidth)),null!=A.opts.scaleHeight&&(o.attribute("height").hasValue()?n=o.attribute("height").toPixels("y")/A.opts.scaleHeight:isNaN(s[3])||(n=s[3]/A.opts.scaleHeight)),null==i&&(i=n),null==n&&(n=i),o.attribute("width",!0).value=A.opts.scaleWidth,o.attribute("height",!0).value=A.opts.scaleHeight,o.style("transform",!0,!0).value+=" scale("+1/i+","+1/n+")"}1!=A.opts.ignoreClear&&a.clearRect(0,0,t,e),o.render(a),l&&(l=!1,"function"==typeof A.opts.renderCallback&&A.opts.renderCallback(r))},s=!0;A.ImagesLoaded()&&(s=!1,n()),A.intervalID=setInterval(function(){var t=!1;if(s&&A.ImagesLoaded()&&(t=!(s=!1)),1!=A.opts.ignoreMouse&&(t|=A.Mouse.hasEvents()),1!=A.opts.ignoreAnimation)for(var e=0;e<A.Animations.length;e++)t|=A.Animations[e].update(1e3/A.FRAMERATE);"function"==typeof A.opts.forceRedraw&&1==A.opts.forceRedraw()&&(t=!0),t&&(n(),A.Mouse.runEvents())},1e3/A.FRAMERATE)},A.stop=function(){A.intervalID&&clearInterval(A.intervalID)},A.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(t,e){this.events.push({type:"onclick",x:t,y:e,run:function(t){t.onclick&&t.onclick()}})},this.onmousemove=function(t,e){this.events.push({type:"onmousemove",x:t,y:e,run:function(t){t.onmousemove&&t.onmousemove()}})},this.eventElements=[],this.checkPath=function(t,e){for(var i=0;i<this.events.length;i++){var n=this.events[i];e.isPointInPath&&e.isPointInPath(n.x,n.y)&&(this.eventElements[i]=t)}},this.checkBoundingBox=function(t,e){for(var i=0;i<this.events.length;i++){var n=this.events[i];e.isPointInBox(n.x,n.y)&&(this.eventElements[i]=t)}},this.runEvents=function(){A.ctx.canvas.style.cursor="";for(var t=0;t<this.events.length;t++)for(var e=this.events[t],i=this.eventElements[t];i;)e.run(i),i=i.parent;this.events=[],this.eventElements=[]}},A}(i||{});"string"==typeof t&&(t=document.getElementById(t)),null!=t.svg&&t.svg.stop(),t.childNodes&&1==t.childNodes.length&&"OBJECT"==t.childNodes[0].nodeName||(t.svg=n);var s=t.getContext("2d");void 0!==e.documentElement?n.loadXmlDoc(s,e):"<"==e.substr(0,1)?n.loadXml(s,e):n.load(s,e)}else for(var a=document.querySelectorAll("svg"),r=0;r<a.length;r++){var o=a[r],l=document.createElement("canvas");l.width=o.clientWidth,l.height=o.clientHeight,o.parentNode.insertBefore(l,o),o.parentNode.removeChild(o);var h=document.createElement("div");h.appendChild(o),c(l,h.innerHTML)}};"undefined"==typeof Element||(void 0!==Element.prototype.matches?f=function(t,e){return t.matches(e)}:void 0!==Element.prototype.webkitMatchesSelector?f=function(t,e){return t.webkitMatchesSelector(e)}:void 0!==Element.prototype.mozMatchesSelector?f=function(t,e){return t.mozMatchesSelector(e)}:void 0!==Element.prototype.msMatchesSelector?f=function(t,e){return t.msMatchesSelector(e)}:void 0!==Element.prototype.oMatchesSelector?f=function(t,e){return t.oMatchesSelector(e)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(f=function(t,e){return $(t).is(e)}),void 0===f&&"undefined"!=typeof Sizzle&&(f=Sizzle.matchesSelector)));var e=/(\[[^\]]+\])/g,i=/(#[^\s\+>~\.\[:]+)/g,a=/(\.[^\s\+>~\.\[:]+)/g,r=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,o=/(:[\w-]+\([^\)]*\))/gi,l=/(:[^\s\+>~\.\[:]+)/g,h=/([^\s\+>~\.\[:]+)/g;function w(n){var s=[0,0,0],t=function(t,e){var i=n.match(t);null!=i&&(s[e]+=i.length,n=n.replace(t," "))};return n=(n=n.replace(/:not\(([^\)]*)\)/g," $1 ")).replace(/{[\s\S]*/gm," "),t(e,1),t(i,0),t(a,1),t(r,2),t(o,1),t(l,1),n=(n=n.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," "),t(h,2),s.join("")}"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(t,e,i,n,s,a){var r={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:e,offsetY:i,scaleWidth:n,scaleHeight:s};for(var o in a)a.hasOwnProperty(o)&&(r[o]=a[o]);c(this.canvas,t,r)}),t.exports=c}(t={exports:{}},t.exports),t.exports});
  15061. /***/ }),
  15062. /* 98 */
  15063. /***/ (function(module, exports) {
  15064. /*
  15065. Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
  15066. http://www.phpied.com/rgb-color-parser-in-javascript/
  15067. */
  15068. module.exports = function(color_string) {
  15069. this.ok = false;
  15070. this.alpha = 1.0;
  15071. // strip any leading #
  15072. if (color_string.charAt(0) == '#') { // remove # if any
  15073. color_string = color_string.substr(1,6);
  15074. }
  15075. color_string = color_string.replace(/ /g,'');
  15076. color_string = color_string.toLowerCase();
  15077. // before getting into regexps, try simple matches
  15078. // and overwrite the input
  15079. var simple_colors = {
  15080. aliceblue: 'f0f8ff',
  15081. antiquewhite: 'faebd7',
  15082. aqua: '00ffff',
  15083. aquamarine: '7fffd4',
  15084. azure: 'f0ffff',
  15085. beige: 'f5f5dc',
  15086. bisque: 'ffe4c4',
  15087. black: '000000',
  15088. blanchedalmond: 'ffebcd',
  15089. blue: '0000ff',
  15090. blueviolet: '8a2be2',
  15091. brown: 'a52a2a',
  15092. burlywood: 'deb887',
  15093. cadetblue: '5f9ea0',
  15094. chartreuse: '7fff00',
  15095. chocolate: 'd2691e',
  15096. coral: 'ff7f50',
  15097. cornflowerblue: '6495ed',
  15098. cornsilk: 'fff8dc',
  15099. crimson: 'dc143c',
  15100. cyan: '00ffff',
  15101. darkblue: '00008b',
  15102. darkcyan: '008b8b',
  15103. darkgoldenrod: 'b8860b',
  15104. darkgray: 'a9a9a9',
  15105. darkgreen: '006400',
  15106. darkkhaki: 'bdb76b',
  15107. darkmagenta: '8b008b',
  15108. darkolivegreen: '556b2f',
  15109. darkorange: 'ff8c00',
  15110. darkorchid: '9932cc',
  15111. darkred: '8b0000',
  15112. darksalmon: 'e9967a',
  15113. darkseagreen: '8fbc8f',
  15114. darkslateblue: '483d8b',
  15115. darkslategray: '2f4f4f',
  15116. darkturquoise: '00ced1',
  15117. darkviolet: '9400d3',
  15118. deeppink: 'ff1493',
  15119. deepskyblue: '00bfff',
  15120. dimgray: '696969',
  15121. dodgerblue: '1e90ff',
  15122. feldspar: 'd19275',
  15123. firebrick: 'b22222',
  15124. floralwhite: 'fffaf0',
  15125. forestgreen: '228b22',
  15126. fuchsia: 'ff00ff',
  15127. gainsboro: 'dcdcdc',
  15128. ghostwhite: 'f8f8ff',
  15129. gold: 'ffd700',
  15130. goldenrod: 'daa520',
  15131. gray: '808080',
  15132. green: '008000',
  15133. greenyellow: 'adff2f',
  15134. honeydew: 'f0fff0',
  15135. hotpink: 'ff69b4',
  15136. indianred : 'cd5c5c',
  15137. indigo : '4b0082',
  15138. ivory: 'fffff0',
  15139. khaki: 'f0e68c',
  15140. lavender: 'e6e6fa',
  15141. lavenderblush: 'fff0f5',
  15142. lawngreen: '7cfc00',
  15143. lemonchiffon: 'fffacd',
  15144. lightblue: 'add8e6',
  15145. lightcoral: 'f08080',
  15146. lightcyan: 'e0ffff',
  15147. lightgoldenrodyellow: 'fafad2',
  15148. lightgrey: 'd3d3d3',
  15149. lightgreen: '90ee90',
  15150. lightpink: 'ffb6c1',
  15151. lightsalmon: 'ffa07a',
  15152. lightseagreen: '20b2aa',
  15153. lightskyblue: '87cefa',
  15154. lightslateblue: '8470ff',
  15155. lightslategray: '778899',
  15156. lightsteelblue: 'b0c4de',
  15157. lightyellow: 'ffffe0',
  15158. lime: '00ff00',
  15159. limegreen: '32cd32',
  15160. linen: 'faf0e6',
  15161. magenta: 'ff00ff',
  15162. maroon: '800000',
  15163. mediumaquamarine: '66cdaa',
  15164. mediumblue: '0000cd',
  15165. mediumorchid: 'ba55d3',
  15166. mediumpurple: '9370d8',
  15167. mediumseagreen: '3cb371',
  15168. mediumslateblue: '7b68ee',
  15169. mediumspringgreen: '00fa9a',
  15170. mediumturquoise: '48d1cc',
  15171. mediumvioletred: 'c71585',
  15172. midnightblue: '191970',
  15173. mintcream: 'f5fffa',
  15174. mistyrose: 'ffe4e1',
  15175. moccasin: 'ffe4b5',
  15176. navajowhite: 'ffdead',
  15177. navy: '000080',
  15178. oldlace: 'fdf5e6',
  15179. olive: '808000',
  15180. olivedrab: '6b8e23',
  15181. orange: 'ffa500',
  15182. orangered: 'ff4500',
  15183. orchid: 'da70d6',
  15184. palegoldenrod: 'eee8aa',
  15185. palegreen: '98fb98',
  15186. paleturquoise: 'afeeee',
  15187. palevioletred: 'd87093',
  15188. papayawhip: 'ffefd5',
  15189. peachpuff: 'ffdab9',
  15190. peru: 'cd853f',
  15191. pink: 'ffc0cb',
  15192. plum: 'dda0dd',
  15193. powderblue: 'b0e0e6',
  15194. purple: '800080',
  15195. rebeccapurple: '663399',
  15196. red: 'ff0000',
  15197. rosybrown: 'bc8f8f',
  15198. royalblue: '4169e1',
  15199. saddlebrown: '8b4513',
  15200. salmon: 'fa8072',
  15201. sandybrown: 'f4a460',
  15202. seagreen: '2e8b57',
  15203. seashell: 'fff5ee',
  15204. sienna: 'a0522d',
  15205. silver: 'c0c0c0',
  15206. skyblue: '87ceeb',
  15207. slateblue: '6a5acd',
  15208. slategray: '708090',
  15209. snow: 'fffafa',
  15210. springgreen: '00ff7f',
  15211. steelblue: '4682b4',
  15212. tan: 'd2b48c',
  15213. teal: '008080',
  15214. thistle: 'd8bfd8',
  15215. tomato: 'ff6347',
  15216. turquoise: '40e0d0',
  15217. violet: 'ee82ee',
  15218. violetred: 'd02090',
  15219. wheat: 'f5deb3',
  15220. white: 'ffffff',
  15221. whitesmoke: 'f5f5f5',
  15222. yellow: 'ffff00',
  15223. yellowgreen: '9acd32'
  15224. };
  15225. color_string = simple_colors[color_string] || color_string;
  15226. // emd of simple type-in colors
  15227. // array of color definition objects
  15228. var color_defs = [
  15229. {
  15230. re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
  15231. example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
  15232. process: function (bits){
  15233. return [
  15234. parseInt(bits[1]),
  15235. parseInt(bits[2]),
  15236. parseInt(bits[3]),
  15237. parseFloat(bits[4])
  15238. ];
  15239. }
  15240. },
  15241. {
  15242. re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
  15243. example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
  15244. process: function (bits){
  15245. return [
  15246. parseInt(bits[1]),
  15247. parseInt(bits[2]),
  15248. parseInt(bits[3])
  15249. ];
  15250. }
  15251. },
  15252. {
  15253. re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  15254. example: ['#00ff00', '336699'],
  15255. process: function (bits){
  15256. return [
  15257. parseInt(bits[1], 16),
  15258. parseInt(bits[2], 16),
  15259. parseInt(bits[3], 16)
  15260. ];
  15261. }
  15262. },
  15263. {
  15264. re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  15265. example: ['#fb0', 'f0f'],
  15266. process: function (bits){
  15267. return [
  15268. parseInt(bits[1] + bits[1], 16),
  15269. parseInt(bits[2] + bits[2], 16),
  15270. parseInt(bits[3] + bits[3], 16)
  15271. ];
  15272. }
  15273. }
  15274. ];
  15275. // search through the definitions to find a match
  15276. for (var i = 0; i < color_defs.length; i++) {
  15277. var re = color_defs[i].re;
  15278. var processor = color_defs[i].process;
  15279. var bits = re.exec(color_string);
  15280. if (bits) {
  15281. var channels = processor(bits);
  15282. this.r = channels[0];
  15283. this.g = channels[1];
  15284. this.b = channels[2];
  15285. if (channels.length > 3) {
  15286. this.alpha = channels[3];
  15287. }
  15288. this.ok = true;
  15289. }
  15290. }
  15291. // validate/cleanup values
  15292. this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
  15293. this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
  15294. this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
  15295. this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);
  15296. // some getters
  15297. this.toRGB = function () {
  15298. return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
  15299. }
  15300. this.toRGBA = function () {
  15301. return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
  15302. }
  15303. this.toHex = function () {
  15304. var r = this.r.toString(16);
  15305. var g = this.g.toString(16);
  15306. var b = this.b.toString(16);
  15307. if (r.length == 1) r = '0' + r;
  15308. if (g.length == 1) g = '0' + g;
  15309. if (b.length == 1) b = '0' + b;
  15310. return '#' + r + g + b;
  15311. }
  15312. // help
  15313. this.getHelpXML = function () {
  15314. var examples = new Array();
  15315. // add regexps
  15316. for (var i = 0; i < color_defs.length; i++) {
  15317. var example = color_defs[i].example;
  15318. for (var j = 0; j < example.length; j++) {
  15319. examples[examples.length] = example[j];
  15320. }
  15321. }
  15322. // add type-in colors
  15323. for (var sc in simple_colors) {
  15324. examples[examples.length] = sc;
  15325. }
  15326. var xml = document.createElement('ul');
  15327. xml.setAttribute('id', 'rgbcolor-examples');
  15328. for (var i = 0; i < examples.length; i++) {
  15329. try {
  15330. var list_item = document.createElement('li');
  15331. var list_color = new RGBColor(examples[i]);
  15332. var example_div = document.createElement('div');
  15333. example_div.style.cssText =
  15334. 'margin: 3px; '
  15335. + 'border: 1px solid black; '
  15336. + 'background:' + list_color.toHex() + '; '
  15337. + 'color:' + list_color.toHex()
  15338. ;
  15339. example_div.appendChild(document.createTextNode('test'));
  15340. var list_item_value = document.createTextNode(
  15341. ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
  15342. );
  15343. list_item.appendChild(example_div);
  15344. list_item.appendChild(list_item_value);
  15345. xml.appendChild(list_item);
  15346. } catch(e){}
  15347. }
  15348. return xml;
  15349. }
  15350. }
  15351. /***/ }),
  15352. /* 99 */
  15353. /***/ (function(module, exports) {
  15354. /*
  15355. StackBlur - a fast almost Gaussian Blur For Canvas
  15356. Version: 0.5
  15357. Author: Mario Klingemann
  15358. Contact: mario@quasimondo.com
  15359. Website: http://www.quasimondo.com/StackBlurForCanvas
  15360. Twitter: @quasimondo
  15361. In case you find this class useful - especially in commercial projects -
  15362. I am not totally unhappy for a small donation to my PayPal account
  15363. mario@quasimondo.de
  15364. Or support me on flattr:
  15365. https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript
  15366. Copyright (c) 2010 Mario Klingemann
  15367. Permission is hereby granted, free of charge, to any person
  15368. obtaining a copy of this software and associated documentation
  15369. files (the "Software"), to deal in the Software without
  15370. restriction, including without limitation the rights to use,
  15371. copy, modify, merge, publish, distribute, sublicense, and/or sell
  15372. copies of the Software, and to permit persons to whom the
  15373. Software is furnished to do so, subject to the following
  15374. conditions:
  15375. The above copyright notice and this permission notice shall be
  15376. included in all copies or substantial portions of the Software.
  15377. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  15378. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  15379. OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  15380. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  15381. HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  15382. WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  15383. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  15384. OTHER DEALINGS IN THE SOFTWARE.
  15385. */
  15386. var mul_table = [
  15387. 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,
  15388. 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,
  15389. 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,
  15390. 437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,
  15391. 497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,
  15392. 320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,
  15393. 446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,
  15394. 329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,
  15395. 505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,
  15396. 399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,
  15397. 324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,
  15398. 268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,
  15399. 451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,
  15400. 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,
  15401. 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,
  15402. 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];
  15403. var shg_table = [
  15404. 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17,
  15405. 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,
  15406. 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,
  15407. 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
  15408. 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
  15409. 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,
  15410. 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
  15411. 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
  15412. 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
  15413. 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
  15414. 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
  15415. 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  15416. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  15417. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  15418. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  15419. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ];
  15420. function processImage(img, canvas, radius, blurAlphaChannel)
  15421. {
  15422. if (typeof(img) == 'string') {
  15423. var img = document.getElementById(img);
  15424. }
  15425. else if (typeof HTMLImageElement !== 'undefined' && !img instanceof HTMLImageElement) {
  15426. return;
  15427. }
  15428. var w = img.naturalWidth;
  15429. var h = img.naturalHeight;
  15430. if (typeof(canvas) == 'string') {
  15431. var canvas = document.getElementById(canvas);
  15432. }
  15433. else if (typeof HTMLCanvasElement !== 'undefined' && !canvas instanceof HTMLCanvasElement) {
  15434. return;
  15435. }
  15436. canvas.style.width = w + 'px';
  15437. canvas.style.height = h + 'px';
  15438. canvas.width = w;
  15439. canvas.height = h;
  15440. var context = canvas.getContext('2d');
  15441. context.clearRect(0, 0, w, h);
  15442. context.drawImage(img, 0, 0);
  15443. if (isNaN(radius) || radius < 1) return;
  15444. if (blurAlphaChannel)
  15445. processCanvasRGBA(canvas, 0, 0, w, h, radius);
  15446. else
  15447. processCanvasRGB(canvas, 0, 0, w, h, radius);
  15448. }
  15449. function getImageDataFromCanvas(canvas, top_x, top_y, width, height)
  15450. {
  15451. if (typeof(canvas) == 'string')
  15452. var canvas = document.getElementById(canvas);
  15453. else if (typeof HTMLCanvasElement !== 'undefined' && !canvas instanceof HTMLCanvasElement)
  15454. return;
  15455. var context = canvas.getContext('2d');
  15456. var imageData;
  15457. try {
  15458. try {
  15459. imageData = context.getImageData(top_x, top_y, width, height);
  15460. } catch(e) {
  15461. throw new Error("unable to access local image data: " + e);
  15462. return;
  15463. }
  15464. } catch(e) {
  15465. throw new Error("unable to access image data: " + e);
  15466. }
  15467. return imageData;
  15468. }
  15469. function processCanvasRGBA(canvas, top_x, top_y, width, height, radius)
  15470. {
  15471. if (isNaN(radius) || radius < 1) return;
  15472. radius |= 0;
  15473. var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);
  15474. imageData = processImageDataRGBA(imageData, top_x, top_y, width, height, radius);
  15475. canvas.getContext('2d').putImageData(imageData, top_x, top_y);
  15476. }
  15477. function processImageDataRGBA(imageData, top_x, top_y, width, height, radius)
  15478. {
  15479. var pixels = imageData.data;
  15480. var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum,
  15481. r_out_sum, g_out_sum, b_out_sum, a_out_sum,
  15482. r_in_sum, g_in_sum, b_in_sum, a_in_sum,
  15483. pr, pg, pb, pa, rbs;
  15484. var div = radius + radius + 1;
  15485. var w4 = width << 2;
  15486. var widthMinus1 = width - 1;
  15487. var heightMinus1 = height - 1;
  15488. var radiusPlus1 = radius + 1;
  15489. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  15490. var stackStart = new BlurStack();
  15491. var stack = stackStart;
  15492. for (i = 1; i < div; i++)
  15493. {
  15494. stack = stack.next = new BlurStack();
  15495. if (i == radiusPlus1) var stackEnd = stack;
  15496. }
  15497. stack.next = stackStart;
  15498. var stackIn = null;
  15499. var stackOut = null;
  15500. yw = yi = 0;
  15501. var mul_sum = mul_table[radius];
  15502. var shg_sum = shg_table[radius];
  15503. for (y = 0; y < height; y++)
  15504. {
  15505. r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;
  15506. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  15507. g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
  15508. b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
  15509. a_out_sum = radiusPlus1 * (pa = pixels[yi+3]);
  15510. r_sum += sumFactor * pr;
  15511. g_sum += sumFactor * pg;
  15512. b_sum += sumFactor * pb;
  15513. a_sum += sumFactor * pa;
  15514. stack = stackStart;
  15515. for (i = 0; i < radiusPlus1; i++)
  15516. {
  15517. stack.r = pr;
  15518. stack.g = pg;
  15519. stack.b = pb;
  15520. stack.a = pa;
  15521. stack = stack.next;
  15522. }
  15523. for (i = 1; i < radiusPlus1; i++)
  15524. {
  15525. p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
  15526. r_sum += (stack.r = (pr = pixels[p])) * (rbs = radiusPlus1 - i);
  15527. g_sum += (stack.g = (pg = pixels[p+1])) * rbs;
  15528. b_sum += (stack.b = (pb = pixels[p+2])) * rbs;
  15529. a_sum += (stack.a = (pa = pixels[p+3])) * rbs;
  15530. r_in_sum += pr;
  15531. g_in_sum += pg;
  15532. b_in_sum += pb;
  15533. a_in_sum += pa;
  15534. stack = stack.next;
  15535. }
  15536. stackIn = stackStart;
  15537. stackOut = stackEnd;
  15538. for (x = 0; x < width; x++)
  15539. {
  15540. pixels[yi+3] = pa = (a_sum * mul_sum) >> shg_sum;
  15541. if (pa != 0)
  15542. {
  15543. pa = 255 / pa;
  15544. pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;
  15545. pixels[yi+1] = ((g_sum * mul_sum) >> shg_sum) * pa;
  15546. pixels[yi+2] = ((b_sum * mul_sum) >> shg_sum) * pa;
  15547. } else {
  15548. pixels[yi] = pixels[yi+1] = pixels[yi+2] = 0;
  15549. }
  15550. r_sum -= r_out_sum;
  15551. g_sum -= g_out_sum;
  15552. b_sum -= b_out_sum;
  15553. a_sum -= a_out_sum;
  15554. r_out_sum -= stackIn.r;
  15555. g_out_sum -= stackIn.g;
  15556. b_out_sum -= stackIn.b;
  15557. a_out_sum -= stackIn.a;
  15558. p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;
  15559. r_in_sum += (stackIn.r = pixels[p]);
  15560. g_in_sum += (stackIn.g = pixels[p+1]);
  15561. b_in_sum += (stackIn.b = pixels[p+2]);
  15562. a_in_sum += (stackIn.a = pixels[p+3]);
  15563. r_sum += r_in_sum;
  15564. g_sum += g_in_sum;
  15565. b_sum += b_in_sum;
  15566. a_sum += a_in_sum;
  15567. stackIn = stackIn.next;
  15568. r_out_sum += (pr = stackOut.r);
  15569. g_out_sum += (pg = stackOut.g);
  15570. b_out_sum += (pb = stackOut.b);
  15571. a_out_sum += (pa = stackOut.a);
  15572. r_in_sum -= pr;
  15573. g_in_sum -= pg;
  15574. b_in_sum -= pb;
  15575. a_in_sum -= pa;
  15576. stackOut = stackOut.next;
  15577. yi += 4;
  15578. }
  15579. yw += width;
  15580. }
  15581. for (x = 0; x < width; x++)
  15582. {
  15583. g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;
  15584. yi = x << 2;
  15585. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  15586. g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
  15587. b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
  15588. a_out_sum = radiusPlus1 * (pa = pixels[yi+3]);
  15589. r_sum += sumFactor * pr;
  15590. g_sum += sumFactor * pg;
  15591. b_sum += sumFactor * pb;
  15592. a_sum += sumFactor * pa;
  15593. stack = stackStart;
  15594. for (i = 0; i < radiusPlus1; i++)
  15595. {
  15596. stack.r = pr;
  15597. stack.g = pg;
  15598. stack.b = pb;
  15599. stack.a = pa;
  15600. stack = stack.next;
  15601. }
  15602. yp = width;
  15603. for (i = 1; i <= radius; i++)
  15604. {
  15605. yi = (yp + x) << 2;
  15606. r_sum += (stack.r = (pr = pixels[yi])) * (rbs = radiusPlus1 - i);
  15607. g_sum += (stack.g = (pg = pixels[yi+1])) * rbs;
  15608. b_sum += (stack.b = (pb = pixels[yi+2])) * rbs;
  15609. a_sum += (stack.a = (pa = pixels[yi+3])) * rbs;
  15610. r_in_sum += pr;
  15611. g_in_sum += pg;
  15612. b_in_sum += pb;
  15613. a_in_sum += pa;
  15614. stack = stack.next;
  15615. if(i < heightMinus1)
  15616. {
  15617. yp += width;
  15618. }
  15619. }
  15620. yi = x;
  15621. stackIn = stackStart;
  15622. stackOut = stackEnd;
  15623. for (y = 0; y < height; y++)
  15624. {
  15625. p = yi << 2;
  15626. pixels[p+3] = pa = (a_sum * mul_sum) >> shg_sum;
  15627. if (pa > 0)
  15628. {
  15629. pa = 255 / pa;
  15630. pixels[p] = ((r_sum * mul_sum) >> shg_sum) * pa;
  15631. pixels[p+1] = ((g_sum * mul_sum) >> shg_sum) * pa;
  15632. pixels[p+2] = ((b_sum * mul_sum) >> shg_sum) * pa;
  15633. } else {
  15634. pixels[p] = pixels[p+1] = pixels[p+2] = 0;
  15635. }
  15636. r_sum -= r_out_sum;
  15637. g_sum -= g_out_sum;
  15638. b_sum -= b_out_sum;
  15639. a_sum -= a_out_sum;
  15640. r_out_sum -= stackIn.r;
  15641. g_out_sum -= stackIn.g;
  15642. b_out_sum -= stackIn.b;
  15643. a_out_sum -= stackIn.a;
  15644. p = (x + (((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width)) << 2;
  15645. r_sum += (r_in_sum += (stackIn.r = pixels[p]));
  15646. g_sum += (g_in_sum += (stackIn.g = pixels[p+1]));
  15647. b_sum += (b_in_sum += (stackIn.b = pixels[p+2]));
  15648. a_sum += (a_in_sum += (stackIn.a = pixels[p+3]));
  15649. stackIn = stackIn.next;
  15650. r_out_sum += (pr = stackOut.r);
  15651. g_out_sum += (pg = stackOut.g);
  15652. b_out_sum += (pb = stackOut.b);
  15653. a_out_sum += (pa = stackOut.a);
  15654. r_in_sum -= pr;
  15655. g_in_sum -= pg;
  15656. b_in_sum -= pb;
  15657. a_in_sum -= pa;
  15658. stackOut = stackOut.next;
  15659. yi += width;
  15660. }
  15661. }
  15662. return imageData;
  15663. }
  15664. function processCanvasRGB(canvas, top_x, top_y, width, height, radius)
  15665. {
  15666. if (isNaN(radius) || radius < 1) return;
  15667. radius |= 0;
  15668. var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);
  15669. imageData = processImageDataRGB(imageData, top_x, top_y, width, height, radius);
  15670. canvas.getContext('2d').putImageData(imageData, top_x, top_y);
  15671. }
  15672. function processImageDataRGB(imageData, top_x, top_y, width, height, radius)
  15673. {
  15674. var pixels = imageData.data;
  15675. var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum,
  15676. r_out_sum, g_out_sum, b_out_sum,
  15677. r_in_sum, g_in_sum, b_in_sum,
  15678. pr, pg, pb, rbs;
  15679. var div = radius + radius + 1;
  15680. var w4 = width << 2;
  15681. var widthMinus1 = width - 1;
  15682. var heightMinus1 = height - 1;
  15683. var radiusPlus1 = radius + 1;
  15684. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  15685. var stackStart = new BlurStack();
  15686. var stack = stackStart;
  15687. for (i = 1; i < div; i++)
  15688. {
  15689. stack = stack.next = new BlurStack();
  15690. if (i == radiusPlus1) var stackEnd = stack;
  15691. }
  15692. stack.next = stackStart;
  15693. var stackIn = null;
  15694. var stackOut = null;
  15695. yw = yi = 0;
  15696. var mul_sum = mul_table[radius];
  15697. var shg_sum = shg_table[radius];
  15698. for (y = 0; y < height; y++)
  15699. {
  15700. r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;
  15701. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  15702. g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
  15703. b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
  15704. r_sum += sumFactor * pr;
  15705. g_sum += sumFactor * pg;
  15706. b_sum += sumFactor * pb;
  15707. stack = stackStart;
  15708. for (i = 0; i < radiusPlus1; i++)
  15709. {
  15710. stack.r = pr;
  15711. stack.g = pg;
  15712. stack.b = pb;
  15713. stack = stack.next;
  15714. }
  15715. for (i = 1; i < radiusPlus1; i++)
  15716. {
  15717. p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
  15718. r_sum += (stack.r = (pr = pixels[p])) * (rbs = radiusPlus1 - i);
  15719. g_sum += (stack.g = (pg = pixels[p+1])) * rbs;
  15720. b_sum += (stack.b = (pb = pixels[p+2])) * rbs;
  15721. r_in_sum += pr;
  15722. g_in_sum += pg;
  15723. b_in_sum += pb;
  15724. stack = stack.next;
  15725. }
  15726. stackIn = stackStart;
  15727. stackOut = stackEnd;
  15728. for (x = 0; x < width; x++)
  15729. {
  15730. pixels[yi] = (r_sum * mul_sum) >> shg_sum;
  15731. pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;
  15732. pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;
  15733. r_sum -= r_out_sum;
  15734. g_sum -= g_out_sum;
  15735. b_sum -= b_out_sum;
  15736. r_out_sum -= stackIn.r;
  15737. g_out_sum -= stackIn.g;
  15738. b_out_sum -= stackIn.b;
  15739. p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;
  15740. r_in_sum += (stackIn.r = pixels[p]);
  15741. g_in_sum += (stackIn.g = pixels[p+1]);
  15742. b_in_sum += (stackIn.b = pixels[p+2]);
  15743. r_sum += r_in_sum;
  15744. g_sum += g_in_sum;
  15745. b_sum += b_in_sum;
  15746. stackIn = stackIn.next;
  15747. r_out_sum += (pr = stackOut.r);
  15748. g_out_sum += (pg = stackOut.g);
  15749. b_out_sum += (pb = stackOut.b);
  15750. r_in_sum -= pr;
  15751. g_in_sum -= pg;
  15752. b_in_sum -= pb;
  15753. stackOut = stackOut.next;
  15754. yi += 4;
  15755. }
  15756. yw += width;
  15757. }
  15758. for (x = 0; x < width; x++)
  15759. {
  15760. g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;
  15761. yi = x << 2;
  15762. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  15763. g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
  15764. b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
  15765. r_sum += sumFactor * pr;
  15766. g_sum += sumFactor * pg;
  15767. b_sum += sumFactor * pb;
  15768. stack = stackStart;
  15769. for (i = 0; i < radiusPlus1; i++)
  15770. {
  15771. stack.r = pr;
  15772. stack.g = pg;
  15773. stack.b = pb;
  15774. stack = stack.next;
  15775. }
  15776. yp = width;
  15777. for (i = 1; i <= radius; i++)
  15778. {
  15779. yi = (yp + x) << 2;
  15780. r_sum += (stack.r = (pr = pixels[yi])) * (rbs = radiusPlus1 - i);
  15781. g_sum += (stack.g = (pg = pixels[yi+1])) * rbs;
  15782. b_sum += (stack.b = (pb = pixels[yi+2])) * rbs;
  15783. r_in_sum += pr;
  15784. g_in_sum += pg;
  15785. b_in_sum += pb;
  15786. stack = stack.next;
  15787. if(i < heightMinus1)
  15788. {
  15789. yp += width;
  15790. }
  15791. }
  15792. yi = x;
  15793. stackIn = stackStart;
  15794. stackOut = stackEnd;
  15795. for (y = 0; y < height; y++)
  15796. {
  15797. p = yi << 2;
  15798. pixels[p] = (r_sum * mul_sum) >> shg_sum;
  15799. pixels[p+1] = (g_sum * mul_sum) >> shg_sum;
  15800. pixels[p+2] = (b_sum * mul_sum) >> shg_sum;
  15801. r_sum -= r_out_sum;
  15802. g_sum -= g_out_sum;
  15803. b_sum -= b_out_sum;
  15804. r_out_sum -= stackIn.r;
  15805. g_out_sum -= stackIn.g;
  15806. b_out_sum -= stackIn.b;
  15807. p = (x + (((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width)) << 2;
  15808. r_sum += (r_in_sum += (stackIn.r = pixels[p]));
  15809. g_sum += (g_in_sum += (stackIn.g = pixels[p+1]));
  15810. b_sum += (b_in_sum += (stackIn.b = pixels[p+2]));
  15811. stackIn = stackIn.next;
  15812. r_out_sum += (pr = stackOut.r);
  15813. g_out_sum += (pg = stackOut.g);
  15814. b_out_sum += (pb = stackOut.b);
  15815. r_in_sum -= pr;
  15816. g_in_sum -= pg;
  15817. b_in_sum -= pb;
  15818. stackOut = stackOut.next;
  15819. yi += width;
  15820. }
  15821. }
  15822. return imageData;
  15823. }
  15824. function BlurStack()
  15825. {
  15826. this.r = 0;
  15827. this.g = 0;
  15828. this.b = 0;
  15829. this.a = 0;
  15830. this.next = null;
  15831. }
  15832. module.exports = {
  15833. image: processImage,
  15834. canvasRGBA: processCanvasRGBA,
  15835. canvasRGB: processCanvasRGB,
  15836. imageDataRGBA: processImageDataRGBA,
  15837. imageDataRGB: processImageDataRGB
  15838. };
  15839. /***/ }),
  15840. /* 100 */
  15841. /***/ (function(module) {
  15842. module.exports = JSON.parse("[{\"name\":\"黑龙江省\",\"coord\":[127.64559817675396,48.48668098449708]},{\"name\":\"内蒙古自治区\",\"coord\":[118.34519572208615,45.370218276977525]},{\"name\":\"新疆维吾尔自治区\",\"coord\":[87.13479065593184,41.75497055053711]},{\"name\":\"吉林省\",\"coord\":[126.12985278813787,43.57983207702637]},{\"name\":\"辽宁省\",\"coord\":[124.02494773936439,41.105743408203125]},{\"name\":\"甘肃省\",\"coord\":[102.87785725633012,37.69582366943361]},{\"name\":\"河北省\",\"coord\":[115.66327227481898,39.33383178710938]},{\"name\":\"北京市\",\"coord\":[116.62199343603638,40.25053787231445]},{\"name\":\"山西省\",\"coord\":[112.45180235808988,37.666561126708984]},{\"name\":\"天津市\",\"coord\":[117.35711842642581,39.406789779663086]},{\"name\":\"陕西省\",\"coord\":[109.56294003056632,35.64754199981689]},{\"name\":\"宁夏回族自治区\",\"coord\":[105.96110877640074,37.3081169128418]},{\"name\":\"青海省\",\"coord\":[96.07301048277901,35.44417190551758]},{\"name\":\"山东省\",\"coord\":[118.03833752951093,36.29800605773925]},{\"name\":\"西藏自治区\",\"coord\":[87.47361520439412,31.6703872680664]},{\"name\":\"河南省\",\"coord\":[113.07832397097275,33.87751102447509]},{\"name\":\"江苏省\",\"coord\":[119.93926538201052,32.945452690124505]},{\"name\":\"安徽省\",\"coord\":[117.15146765881019,32.024482727050774]},{\"name\":\"四川省\",\"coord\":[102.28998890142759,30.182161331176758]},{\"name\":\"湖北省\",\"coord\":[112.87798261431585,31.157071113586426]},{\"name\":\"重庆市\",\"coord\":[107.870126637831,30.188085556030266]},{\"name\":\"上海市\",\"coord\":[121.42561166015514,31.276043891906745]},{\"name\":\"浙江省\",\"coord\":[119.75337092707514,29.175934791564945]},{\"name\":\"湖南省\",\"coord\":[111.52770282777405,27.38110256195069]},{\"name\":\"江西省\",\"coord\":[115.51091280655628,27.283511161804206]},{\"name\":\"云南省\",\"coord\":[101.27053825991308,25.19783210754396]},{\"name\":\"贵州省\",\"coord\":[106.49672346773299,26.92267990112305]},{\"name\":\"福建省\",\"coord\":[117.9976766946587,25.939599990844727]},{\"name\":\"广西壮族自治区\",\"coord\":[108.98706831086302,23.891559600830078]},{\"name\":\"台湾省\",\"coord\":[120.82468432537434,23.602651596069336]},{\"name\":\"香港特别行政区\",\"coord\":[114.21036850371561,22.374858856201172]},{\"name\":\"海南省\",\"coord\":[109.62792940960824,19.163116455078125]},{\"name\":\"广东省\",\"coord\":[113.32127888266032,22.873867034912106]},{\"name\":\"澳门特别行政区\",\"coord\":[113.56819996291901,22.160347992976]}]");
  15843. /***/ }),
  15844. /* 101 */
  15845. /***/ (function(module) {
  15846. module.exports = JSON.parse("[{\"name\":\"克拉玛依市\",\"coord\":[85.01486759299489,45.406422237230046]},{\"name\":\"昌吉回族自治州\",\"coord\":[88.7154624754753,44.26991024636568]},{\"name\":\"石河子市\",\"coord\":[86.0208600035924,44.239045558096805]},{\"name\":\"霍林郭勒市\",\"coord\":[114.73479243733115,44.16058374713977]},{\"name\":\"本溪市\",\"coord\":[124.64357865201586,41.177197783134275]},{\"name\":\"嘉峪关市\",\"coord\":[98.16891560537093,39.76279786284264]},{\"name\":\"莱芜市\",\"coord\":[117.65723565456207,36.27916499211527]},{\"name\":\"神农架林区\",\"coord\":[110.48296222218153,31.581260143666697]},{\"name\":\"天门市\",\"coord\":[113.00615321481195,30.64105781887143]},{\"name\":\"鄂州市\",\"coord\":[114.94764081970385,30.325634953844585]},{\"name\":\"潜江市\",\"coord\":[112.70703817700621,30.349210666019893]},{\"name\":\"仙桃市\",\"coord\":[113.34688900729822,30.315951161935402]},{\"name\":\"萍乡市\",\"coord\":[113.88072263074415,27.47193090553213]},{\"name\":\"台湾省\",\"coord\":[120.14338943402045,23.596002465926095]},{\"name\":\"东莞市\",\"coord\":[113.89443658529342,22.897826158636448]},{\"name\":\"中山市\",\"coord\":[113.37118387764659,22.501478858616522]},{\"name\":\"珠海市\",\"coord\":[113.21799258934986,22.23782602992192]},{\"name\":\"北海市\",\"coord\":[109.18248083043899,21.695773689750148]},{\"name\":\"香港\",\"coord\":[114.20689279508653,22.36016760139811]},{\"name\":\"舟山市\",\"coord\":[122.22514712841459,30.338633120695956]},{\"name\":\"克孜勒苏柯尔克孜\",\"coord\":[74.62910472637343,39.59886016069875]},{\"name\":\"喀什地区\",\"coord\":[77.19899922143753,37.85462871211595]},{\"name\":\"阿克苏地区\",\"coord\":[81.43930290016381,41.067304799230456]},{\"name\":\"和田地区\",\"coord\":[80.69780509160952,36.95287032287055]},{\"name\":\"阿里地区\",\"coord\":[82.536487505389,32.69566569631762]},{\"name\":\"日喀则地区\",\"coord\":[86.5996831353606,29.54861754814263]},{\"name\":\"那曲地区\",\"coord\":[88.32523292667608,33.20600450932715]},{\"name\":\"玉树藏族自治州\",\"coord\":[95.2107128446203,33.90320387919257]},{\"name\":\"迪庆藏族自治州\",\"coord\":[99.42465312188943,28.052797714348895]},{\"name\":\"怒江傈傈族自治州\",\"coord\":[98.85737910439825,26.98345757528851]},{\"name\":\"大理白族自治州\",\"coord\":[99.93934374816013,25.684737357453045]},{\"name\":\"德宏傣族景颇族自\",\"coord\":[98.13830877778075,24.593421919561205]},{\"name\":\"保山市\",\"coord\":[99.19031013453166,24.979380341662]},{\"name\":\"临沧市\",\"coord\":[99.62483778975081,24.058807858948214]},{\"name\":\"普洱市\",\"coord\":[100.94440267992684,23.44121660743221]},{\"name\":\"西双版纳傣族自治\",\"coord\":[100.86105801845994,21.882475641324206]},{\"name\":\"拉萨市\",\"coord\":[91.3684790613129,30.14176592960237]},{\"name\":\"山南地区\",\"coord\":[92.11665242621062,28.33000201578789]},{\"name\":\"林芝地区\",\"coord\":[94.9307847458166,29.125110156601963]},{\"name\":\"昌都地区\",\"coord\":[97.33912235873476,30.48520825551814]},{\"name\":\"丽江市\",\"coord\":[100.65713436205135,26.96190318191959]},{\"name\":\"攀枝花市\",\"coord\":[101.73355913301131,26.714486678752795]},{\"name\":\"凉山彝族自治州\",\"coord\":[102.08678551422615,27.683020519860396]},{\"name\":\"楚雄彝族自治州\",\"coord\":[101.68264761198458,25.369603845264024]},{\"name\":\"红河哈尼族彝族自\",\"coord\":[102.95101719613119,23.624860095239875]},{\"name\":\"文山壮族苗族自治\",\"coord\":[104.8708359910614,23.579587266862504]},{\"name\":\"百色市\",\"coord\":[106.69546907589859,23.98220841166522]},{\"name\":\"崇左市\",\"coord\":[107.3277087317123,22.49769755349952]},{\"name\":\"防城港市\",\"coord\":[107.88939931155171,21.94550204069006]},{\"name\":\"南宁市\",\"coord\":[108.67078983716917,23.12207641861882]},{\"name\":\"钦州市\",\"coord\":[108.8532307305186,22.157690108421384]},{\"name\":\"玉林市\",\"coord\":[110.26918466489103,22.391823643610415]},{\"name\":\"湛江市\",\"coord\":[109.93033457863683,21.086751055633457]},{\"name\":\"茂名市\",\"coord\":[110.80336192333934,22.069184739040775]},{\"name\":\"阳江市\",\"coord\":[111.70471342186183,22.108751366417575]},{\"name\":\"江门市\",\"coord\":[112.53715618649149,22.297368082806777]},{\"name\":\"广州市\",\"coord\":[113.4949302208309,23.28359314707863]},{\"name\":\"清远市\",\"coord\":[113.10957368131268,24.334444053233856]},{\"name\":\"肇庆市\",\"coord\":[112.11117530204233,23.60241158796112]},{\"name\":\"梧州市\",\"coord\":[111.01709510772797,23.518132876753846]},{\"name\":\"贺州市\",\"coord\":[111.50423061842756,24.4095096817199]},{\"name\":\"桂林市\",\"coord\":[110.44046163393094,25.353966673735407]},{\"name\":\"柳州市\",\"coord\":[109.34854449214147,24.972408051485047]},{\"name\":\"河池市\",\"coord\":[107.81191841865586,24.649291651298164]},{\"name\":\"黔东南苗族侗族自\",\"coord\":[108.39952601614591,26.429286420465576]},{\"name\":\"贵阳市\",\"coord\":[106.59784062851153,26.797907456479816]},{\"name\":\"安顺市\",\"coord\":[105.76161265300635,25.988644902171018]},{\"name\":\"黔西南布依族苗族\",\"coord\":[105.5954078788574,25.404850939549405]},{\"name\":\"曲靖市\",\"coord\":[103.9164335632742,25.697243690315265]},{\"name\":\"六盘水市\",\"coord\":[104.77723228072432,26.15402255629164]},{\"name\":\"毕节地区\",\"coord\":[105.03867422931839,27.077913968069666]},{\"name\":\"昭通市\",\"coord\":[104.29730513046874,27.62418247971078]},{\"name\":\"宜宾市\",\"coord\":[104.76748901448207,28.553501804266475]},{\"name\":\"乐山市\",\"coord\":[103.56027669102787,29.160754519210577]},{\"name\":\"自贡市\",\"coord\":[104.63272827056402,29.273152614922402]},{\"name\":\"内江市\",\"coord\":[104.82644562304716,29.61272653799929]},{\"name\":\"遵义市\",\"coord\":[106.82413636302059,28.191847588570702]},{\"name\":\"达州市\",\"coord\":[107.59704170009518,31.32138258839703]},{\"name\":\"遂宁市\",\"coord\":[105.48979445433736,30.677687821242678]},{\"name\":\"广安市\",\"coord\":[106.56708164098042,30.43500706741521]},{\"name\":\"泸州市\",\"coord\":[105.42591761727707,28.50277238478137]},{\"name\":\"资阳市\",\"coord\":[104.97995126874034,30.154251886139654]},{\"name\":\"雅安市\",\"coord\":[102.69931299964517,29.892630706195035]},{\"name\":\"眉山市\",\"coord\":[104.07052881858888,29.894202166560405]},{\"name\":\"甘孜藏族自治州\",\"coord\":[100.50721042614238,30.975216556269658]},{\"name\":\"果洛藏族自治州\",\"coord\":[99.30775565051923,34.03539865224808]},{\"name\":\"海南藏族自治州\",\"coord\":[100.39969108016373,35.90048272566899]},{\"name\":\"黄南藏族自治州\",\"coord\":[101.5360706381689,35.10286360841902]},{\"name\":\"赣南藏族自治州\",\"coord\":[102.97083885806067,34.326752803339026]},{\"name\":\"陇南市\",\"coord\":[105.24780098912132,33.57031117443431]},{\"name\":\"天水市\",\"coord\":[105.53503634660417,34.62320421368087]},{\"name\":\"定西市\",\"coord\":[104.58787768541339,35.08900966621695]},{\"name\":\"临夏回族自治州\",\"coord\":[103.2612870434902,35.591577124455235]},{\"name\":\"西宁市\",\"coord\":[101.57680657999033,36.84800271717157]},{\"name\":\"海东地区\",\"coord\":[102.30909850729282,36.287400615025646]},{\"name\":\"海北藏族自治州\",\"coord\":[100.27122484450717,37.892557516083826]},{\"name\":\"金昌市\",\"coord\":[102.02244049169511,38.497330414886164]},{\"name\":\"酒泉市\",\"coord\":[95.94486678270127,40.56891536586272]},{\"name\":\"海西蒙古族藏族自\",\"coord\":[94.67143298050689,36.022725148503724]},{\"name\":\"巴音郭楞蒙古自治\",\"coord\":[88.18116214759745,39.556478810319916]},{\"name\":\"哈密地区\",\"coord\":[93.84302392518026,42.95015211178875]},{\"name\":\"叶鲁番地区\",\"coord\":[89.82035217277885,42.399368632283505]},{\"name\":\"乌鲁木齐市\",\"coord\":[88.00048109561487,43.549986370786]},{\"name\":\"阿勒泰地区\",\"coord\":[88.11213933257655,47.05593413019629]},{\"name\":\"博尔塔拉蒙古自治\",\"coord\":[82.26402238163408,44.671135542630864]},{\"name\":\"伊犁哈萨克自治州\",\"coord\":[82.80778717477179,43.53783381365267]},{\"name\":\"阿拉善盟\",\"coord\":[103.29923966842289,40.10955801781495]},{\"name\":\"武威市\",\"coord\":[102.73362058791429,37.94211141321436]},{\"name\":\"兰州市\",\"coord\":[103.73793563506032,36.27379827886003]},{\"name\":\"中卫市\",\"coord\":[105.6943786030716,37.20654236148948]},{\"name\":\"银川市\",\"coord\":[106.20022174140034,38.52103167597483]},{\"name\":\"石嘴山市\",\"coord\":[106.41544011793628,38.84054137571417]},{\"name\":\"乌海市\",\"coord\":[106.8984175998405,39.54616572239788]},{\"name\":\"鄂尔多斯市\",\"coord\":[108.43285571424619,39.24036799350715]},{\"name\":\"巴彦淖尔市\",\"coord\":[107.45840392808307,41.30159860424196]},{\"name\":\"包头市\",\"coord\":[110.46472193224272,41.48017783644221]},{\"name\":\"呼和浩特市\",\"coord\":[111.48365173603975,40.498363056149884]},{\"name\":\"乌兰察布市\",\"coord\":[112.61568977597707,41.75789561273154]},{\"name\":\"大同市\",\"coord\":[113.7107192749083,39.898956799744184]},{\"name\":\"朔州市\",\"coord\":[112.65428748167508,39.681772914701924]},{\"name\":\"忻州市\",\"coord\":[112.36127575589583,38.88990233614568]},{\"name\":\"榆林市\",\"coord\":[109.68473112169593,38.19921027134876]},{\"name\":\"延安市\",\"coord\":[109.52425222161318,36.406522726136814]},{\"name\":\"庆阳市\",\"coord\":[107.73052193155061,36.183821532624464]},{\"name\":\"固原市\",\"coord\":[106.20191575442442,36.11634909496382]},{\"name\":\"白银市\",\"coord\":[104.68634478137065,36.51582865625868]},{\"name\":\"宝鸡市\",\"coord\":[107.33534779230747,34.3387216485855]},{\"name\":\"汉中市\",\"coord\":[107.03534754266246,33.00142998064871]},{\"name\":\"广元市\",\"coord\":[105.92928137563939,32.21872447205537]},{\"name\":\"巴中市\",\"coord\":[107.03422410306194,31.99874720836291]},{\"name\":\"南充市\",\"coord\":[106.32964805032347,31.156657700184095]},{\"name\":\"绵阳市\",\"coord\":[104.58949560201106,31.88628780630976]},{\"name\":\"德阳市\",\"coord\":[104.41542984932845,31.110558133718676]},{\"name\":\"成都市\",\"coord\":[103.8852290010473,30.777258040348634]},{\"name\":\"阿坝藏族羌族自治\",\"coord\":[102.26209319552814,32.45725845387284]},{\"name\":\"安康市\",\"coord\":[109.14236501848015,32.77467694678074]},{\"name\":\"十堰市\",\"coord\":[110.39934083416314,32.376209039347906]},{\"name\":\"襄阳市\",\"coord\":[111.97539147094662,31.93399822417465]},{\"name\":\"宜昌市\",\"coord\":[111.22204852395754,30.772457669035354]},{\"name\":\"恩施市\",\"coord\":[109.42158366502872,30.260366574390105]},{\"name\":\"张家界市\",\"coord\":[110.59760006538717,29.330107409240718]},{\"name\":\"吉首市\",\"coord\":[109.72176899848378,28.681903937242495]},{\"name\":\"铜仁地区\",\"coord\":[108.54247523485463,28.11736237519646]},{\"name\":\"重庆市\",\"coord\":[107.86007108564992,30.186253395053196]},{\"name\":\"怀化市\",\"coord\":[109.94325166787243,27.43919084801186]},{\"name\":\"益阳市\",\"coord\":[112.43060358108062,28.75127294553697]},{\"name\":\"娄底市\",\"coord\":[111.41891416951897,27.696312460064604]},{\"name\":\"常德市\",\"coord\":[111.72571610131646,29.27189463838195]},{\"name\":\"荆州市\",\"coord\":[112.65896596965268,30.05161542755362]},{\"name\":\"荆门市\",\"coord\":[112.6586855902184,31.01267124474617]},{\"name\":\"岳阳市\",\"coord\":[113.2595036144316,29.106247116930163]},{\"name\":\"长沙市\",\"coord\":[113.15415586456598,28.222934680488425]},{\"name\":\"湘潭市\",\"coord\":[112.51092596317824,27.69881544105668]},{\"name\":\"株州市\",\"coord\":[113.49665538546823,27.03993794610501]},{\"name\":\"衡阳市\",\"coord\":[112.48849636578527,26.783613569970782]},{\"name\":\"邵阳市\",\"coord\":[110.6723832117475,26.81652287086792]},{\"name\":\"永州市\",\"coord\":[111.8565364154186,25.768488267811968]},{\"name\":\"韶关市\",\"coord\":[113.53420325850979,24.69848878771937]},{\"name\":\"惠州市\",\"coord\":[114.32029589634925,23.25504544231892]},{\"name\":\"佛山市\",\"coord\":[112.95925897403649,23.10116677189257]},{\"name\":\"云浮市\",\"coord\":[111.78042514904234,22.840400494105687]},{\"name\":\"深圳市\",\"coord\":[114.13138648919008,22.649563063468342]},{\"name\":\"汕尾市\",\"coord\":[115.57412892884373,23.06989642104901]},{\"name\":\"河源市\",\"coord\":[114.89746229844398,23.97971937124767]},{\"name\":\"揭阳市\",\"coord\":[116.04290004239446,23.304802704715357]},{\"name\":\"汕头市\",\"coord\":[116.7008461897183,23.35898625947344]},{\"name\":\"潮州市\",\"coord\":[116.75405548481658,23.854381508863064]},{\"name\":\"梅州市\",\"coord\":[116.13719397345734,24.15633544812716]},{\"name\":\"漳州市\",\"coord\":[117.38279760543345,24.41111215459575]},{\"name\":\"厦门市\",\"coord\":[118.04275971554665,24.675908246507944]},{\"name\":\"龙岩市\",\"coord\":[116.69341144552507,25.20284542644492]},{\"name\":\"泉州市\",\"coord\":[118.12035864630246,25.22984144365049]},{\"name\":\"莆田市\",\"coord\":[118.82439690138142,25.439653480972687]},{\"name\":\"福州市\",\"coord\":[119.1608285845262,25.99117532466728]},{\"name\":\"三明市\",\"coord\":[117.51188176216434,26.318292906961602]},{\"name\":\"南平市\",\"coord\":[118.16153136678187,27.306303151805437]},{\"name\":\"抚州市\",\"coord\":[116.3455359885574,27.487043655935366]},{\"name\":\"鹰潭市\",\"coord\":[117.01082360702333,28.241253742969946]},{\"name\":\"吉安市\",\"coord\":[114.91377151807418,26.957486660664525]},{\"name\":\"赣州市\",\"coord\":[115.046455717572,25.81565075681663]},{\"name\":\"郴州市\",\"coord\":[113.1544526703492,25.871927095452524]},{\"name\":\"新余市\",\"coord\":[114.94161795877827,27.79044654578371]},{\"name\":\"宜春市\",\"coord\":[115.04574494880995,28.306428044943356]},{\"name\":\"南昌市\",\"coord\":[115.9963824234495,28.664803351584705]},{\"name\":\"九江市\",\"coord\":[115.53225905704193,29.362905920276297]},{\"name\":\"上饶市\",\"coord\":[117.8595355766598,28.765755150094634]},{\"name\":\"景德镇市\",\"coord\":[117.25387030721845,29.33426823662448]},{\"name\":\"黄山市\",\"coord\":[117.85476357809696,29.969632034273722]},{\"name\":\"池州市\",\"coord\":[117.34517113140791,30.208089337922335]},{\"name\":\"铜陵市\",\"coord\":[117.93160431300694,30.926442655001676]},{\"name\":\"安庆市\",\"coord\":[116.54307680610799,30.524265461641296]},{\"name\":\"黄石市\",\"coord\":[115.02354597728443,29.924060229331015]},{\"name\":\"咸宁市\",\"coord\":[114.26967602231792,29.652174021136048]},{\"name\":\"黄冈市\",\"coord\":[115.2859016705373,30.65856897065683]},{\"name\":\"武汉市\",\"coord\":[114.34552076948799,30.68836237966767]},{\"name\":\"随州市\",\"coord\":[113.3850627838818,31.87891659924412]},{\"name\":\"信阳市\",\"coord\":[114.81374730587638,32.0309685135914]},{\"name\":\"驻马店市\",\"coord\":[114.07756451509235,32.896720987266114]},{\"name\":\"商洛市\",\"coord\":[109.82044421310393,33.77403373563189]},{\"name\":\"西安市\",\"coord\":[109.11839808451401,34.225257215515896]},{\"name\":\"渭南市\",\"coord\":[109.75732444226935,35.025913644359306]},{\"name\":\"铜川市\",\"coord\":[108.98695328111377,35.19235092947735]},{\"name\":\"咸阳市\",\"coord\":[108.36398776446165,34.84311348287181]},{\"name\":\"三门峡市\",\"coord\":[110.80049688104964,34.31818709571671]},{\"name\":\"运城市\",\"coord\":[111.1736679525165,35.19010372283576]},{\"name\":\"洛阳市\",\"coord\":[111.87577573098216,34.33379926109848]},{\"name\":\"平顶山市\",\"coord\":[112.80931281928427,33.759895800153096]},{\"name\":\"漯河市\",\"coord\":[113.83505724178012,33.70034266174508]},{\"name\":\"许昌市\",\"coord\":[113.78762484088509,34.051835688452435]},{\"name\":\"郑州市\",\"coord\":[113.49619951867594,34.61181797865449]},{\"name\":\"焦作市\",\"coord\":[113.13404280173008,35.134167097471625]},{\"name\":\"晋城市\",\"coord\":[112.7495732073233,35.63186423091449]},{\"name\":\"长治市\",\"coord\":[112.85900842873183,36.45872910742828]},{\"name\":\"临汾市\",\"coord\":[111.49379787924448,36.22810800777857]},{\"name\":\"太原市\",\"coord\":[112.15628804033796,37.91704444063036]},{\"name\":\"吕梁市\",\"coord\":[111.31901105774872,37.712740463356496]},{\"name\":\"晋中市\",\"coord\":[113.08199599739676,37.36532613794343]},{\"name\":\"邯郸市\",\"coord\":[114.41824047234618,36.530119932543315]},{\"name\":\"安阳市\",\"coord\":[113.88883283163116,35.7797611183252]},{\"name\":\"鹤壁市\",\"coord\":[114.3654094911545,35.75770487428472]},{\"name\":\"新乡市\",\"coord\":[113.9184107718167,35.348471214026716]},{\"name\":\"开封市\",\"coord\":[114.52801677500626,34.61371216679872]},{\"name\":\"周口市\",\"coord\":[114.88509782391864,33.69999759722657]},{\"name\":\"阜阳市\",\"coord\":[115.44595951398213,32.98060371610532]},{\"name\":\"淮南市\",\"coord\":[116.68941991880993,32.79972275772595]},{\"name\":\"蚌埠市\",\"coord\":[117.38594715783302,33.106729536033896]},{\"name\":\"淮北市\",\"coord\":[116.69651711889378,33.69527529383458]},{\"name\":\"宿州市\",\"coord\":[117.30175405886838,33.943330421260015]},{\"name\":\"亳州市\",\"coord\":[116.12410804185097,33.46769392946132]},{\"name\":\"商丘市\",\"coord\":[115.59575176872548,34.28339840831147]},{\"name\":\"菏泽市\",\"coord\":[115.53631974831816,35.197319393220624]},{\"name\":\"濮阳市\",\"coord\":[115.3070485514902,35.775883510964334]},{\"name\":\"聊城市\",\"coord\":[115.8870069012884,36.40529594548765]},{\"name\":\"邢台市\",\"coord\":[114.74259008644859,37.251396750084155]},{\"name\":\"石家庄市\",\"coord\":[114.56923838363613,38.13141710980106]},{\"name\":\"阳泉市\",\"coord\":[113.39216149668508,38.09075470547468]},{\"name\":\"保定市\",\"coord\":[115.261524468934,39.09118520781398]},{\"name\":\"衡水市\",\"coord\":[115.8182936677897,37.715661598187154]},{\"name\":\"德州市\",\"coord\":[116.4582273790399,37.19372347888644]},{\"name\":\"沧州市\",\"coord\":[116.76192710911863,38.20240042039232]},{\"name\":\"廊坊市\",\"coord\":[116.50410772133856,39.27896741763884]},{\"name\":\"天津市\",\"coord\":[117.31988934444873,39.37154482470619]},{\"name\":\"北京市\",\"coord\":[116.59734730757869,40.237112944270976]},{\"name\":\"张家口市\",\"coord\":[115.1823606483226,40.83732566607167]},{\"name\":\"唐山市\",\"coord\":[117.8693184261954,39.71862889477249]},{\"name\":\"秦皇岛市\",\"coord\":[119.30467355367742,39.990574652162564]},{\"name\":\"承德市\",\"coord\":[117.16275671911026,41.36623845548547]},{\"name\":\"葫芦岛市\",\"coord\":[119.9342336210531,40.5628822626519]},{\"name\":\"朝阳市\",\"coord\":[120.11853493535794,41.471852354885755]},{\"name\":\"赤峰市\",\"coord\":[118.50943546234379,43.25452976059767]},{\"name\":\"锦州市\",\"coord\":[121.5167549323861,41.45933087433065]},{\"name\":\"营口市\",\"coord\":[122.58571915054674,40.42093503997384]},{\"name\":\"丹东市\",\"coord\":[124.33549382902183,40.46369290272115]},{\"name\":\"辽阳市\",\"coord\":[123.34064798039414,41.152331397771356]},{\"name\":\"盘锦市\",\"coord\":[122.06718005354679,41.05573599862555]},{\"name\":\"阜新市\",\"coord\":[121.93889757908204,42.27641773244204]},{\"name\":\"鞍山市\",\"coord\":[122.78904432242356,40.77781183142038]},{\"name\":\"沈阳市\",\"coord\":[122.99508899709724,42.1162195010079]},{\"name\":\"铁岭市\",\"coord\":[124.23100515588399,42.72666083611828]},{\"name\":\"扶顺市\",\"coord\":[124.46027188217573,41.82955407638859]},{\"name\":\"通辽市\",\"coord\":[122.0729370657937,43.90889130864869]},{\"name\":\"兴安盟\",\"coord\":[120.79456431092532,45.92003249442161]},{\"name\":\"白城市\",\"coord\":[123.10619907715235,45.25475749267784]},{\"name\":\"齐齐哈尔市\",\"coord\":[124.5462214659102,47.55395009317394]},{\"name\":\"大兴安岭地区\",\"coord\":[124.50992855161529,52.18438447846694]},{\"name\":\"黑河市\",\"coord\":[127.14721400335922,49.25080134026901]},{\"name\":\"大庆市\",\"coord\":[124.40329830095243,46.401048760966745]},{\"name\":\"绥化市\",\"coord\":[126.5214484055605,46.76992452194825]},{\"name\":\"松原市\",\"coord\":[124.21244334807682,44.75779381338502]},{\"name\":\"四平市\",\"coord\":[124.27839350328821,43.52139065090318]},{\"name\":\"通化市\",\"coord\":[125.67392830706305,41.91771808663852]},{\"name\":\"辽源市\",\"coord\":[125.33529527643432,42.758340204944986]},{\"name\":\"吉林市\",\"coord\":[126.83350281902375,43.60730120049175]},{\"name\":\"长春市\",\"coord\":[125.53597875970374,44.24624314701737]},{\"name\":\"白山市\",\"coord\":[127.16780160322108,42.093893880305075]},{\"name\":\"哈尔滨市\",\"coord\":[127.39125008786029,45.36200668820575]},{\"name\":\"鹤岗市\",\"coord\":[130.4703811258197,47.66520688940109]},{\"name\":\"伊春市\",\"coord\":[128.91240831703635,47.93833794565277]},{\"name\":\"七台河市\",\"coord\":[131.2677920224311,45.945099776108584]},{\"name\":\"鸡西市\",\"coord\":[132.38059153660274,45.722934218318535]},{\"name\":\"双鸭山市\",\"coord\":[132.3184817002743,46.65813679030265]},{\"name\":\"佳木斯市\",\"coord\":[132.26174446608726,47.17569713691394]},{\"name\":\"呼伦贝尔市\",\"coord\":[122.3210739998419,50.18176996070858]},{\"name\":\"孝感市\",\"coord\":[113.83749892135485,31.11757234692128]},{\"name\":\"贵港市\",\"coord\":[110.07354588052804,23.380735604767374]},{\"name\":\"黔南布依族苗族自\",\"coord\":[107.30931767543106,26.2976919432269]},{\"name\":\"宁德市\",\"coord\":[119.52482556634342,27.013151692716413]},{\"name\":\"温州市\",\"coord\":[120.30037042732202,27.8699145504001]},{\"name\":\"台州市\",\"coord\":[120.88886782713843,28.670799172772313]},{\"name\":\"丽水市\",\"coord\":[119.56796851966463,28.170268394477755]},{\"name\":\"衢州市\",\"coord\":[118.79479802644406,28.865874397158763]},{\"name\":\"金华市\",\"coord\":[119.99381920686633,29.093455548185744]},{\"name\":\"绍兴市\",\"coord\":[120.46546691682343,29.69382513836818]},{\"name\":\"宁波市\",\"coord\":[121.42142987830871,29.70001162878972]},{\"name\":\"杭州市\",\"coord\":[119.4405685790891,29.87218307296989]},{\"name\":\"宣城市\",\"coord\":[118.68748382914703,30.628143499626418]},{\"name\":\"湖州市\",\"coord\":[119.98261306633574,30.7945175862809]},{\"name\":\"嘉兴市\",\"coord\":[120.83889215988998,30.67538495499343]},{\"name\":\"上海市\",\"coord\":[121.37534147322967,31.25628247908459]},{\"name\":\"苏州市\",\"coord\":[120.6906182622391,31.381280695137775]},{\"name\":\"无锡市\",\"coord\":[120.32182300914366,31.54113306724517]},{\"name\":\"常州市\",\"coord\":[119.61953292830165,31.611878565375576]},{\"name\":\"南京市\",\"coord\":[118.71890548838064,31.910863187910323]},{\"name\":\"镇江市\",\"coord\":[119.42349332902813,31.97942313430778]},{\"name\":\"合肥市\",\"coord\":[117.30651975617157,31.79407863049138]},{\"name\":\"六安市\",\"coord\":[116.24668220575353,31.820846193819513]},{\"name\":\"滁州市\",\"coord\":[117.88422385307969,32.51792621904418]},{\"name\":\"泰州市\",\"coord\":[120.03124303305091,32.56503102346783]},{\"name\":\"南通市\",\"coord\":[120.85599446760912,32.18496706099728]},{\"name\":\"盐城市\",\"coord\":[120.01812490612667,33.54219948734023]},{\"name\":\"淮安市\",\"coord\":[119.0749424205415,33.39203631772854]},{\"name\":\"宿迁市\",\"coord\":[118.45404943216346,33.666258719120265]},{\"name\":\"徐州市\",\"coord\":[117.77482249295966,34.30847766157078]},{\"name\":\"济宁市\",\"coord\":[116.74147276546373,35.27488504351119]},{\"name\":\"枣庄市\",\"coord\":[117.43359942491492,34.884162021736]},{\"name\":\"连云港市\",\"coord\":[119.01553213785074,34.54316517587849]},{\"name\":\"临沂市\",\"coord\":[118.31478835349617,35.28173079028279]},{\"name\":\"日照市\",\"coord\":[119.14265350444272,35.54479073199592]},{\"name\":\"青岛市\",\"coord\":[120.27779044405756,36.3464117375903]},{\"name\":\"威海市\",\"coord\":[122.12963327195605,37.13879077904251]},{\"name\":\"烟台市\",\"coord\":[120.7689567423966,37.19772002195597]},{\"name\":\"潍坊市\",\"coord\":[119.02178548592039,36.49292234053931]},{\"name\":\"淄博市\",\"coord\":[117.92936024367185,36.60871347163638]},{\"name\":\"泰安市\",\"coord\":[116.93810893944303,36.0423330118612]},{\"name\":\"济南市\",\"coord\":[117.34560282551296,36.769574973846304]},{\"name\":\"东营市\",\"coord\":[118.4915054457184,37.52194690335787]},{\"name\":\"滨州市\",\"coord\":[117.67610299757533,37.4439597758601]},{\"name\":\"昆明市\",\"coord\":[102.93100245594789,25.481300763922075]},{\"name\":\"玉溪市\",\"coord\":[102.23080854291823,24.156168324611663]},{\"name\":\"塔城地区\",\"coord\":[83.60908162840168,45.3721852373893]},{\"name\":\"张掖市\",\"coord\":[100.47710030600572,38.704239320458385]},{\"name\":\"南阳市\",\"coord\":[112.1400670951149,33.03033276715801]},{\"name\":\"扬州市\",\"coord\":[119.48949608990988,32.80956776339646]},{\"name\":\"延边朝鲜族自治州\",\"coord\":[129.3577692895626,43.24968794080283]},{\"name\":\"牡丹江市\",\"coord\":[129.87240796405672,44.7073040108322]},{\"name\":\"澳门\",\"coord\":[113.56289691515346,22.14602596262204]},{\"name\":\"吴忠市\",\"coord\":[106.76894508116403,37.72566765880316]},{\"name\":\"来宾市\",\"coord\":[109.25592217010114,23.86346274681084]},{\"name\":\"平凉市\",\"coord\":[107.0708132782897,35.30329631658711]},{\"name\":\"马鞍山市\",\"coord\":[118.27245878467022,31.657727937739004]},{\"name\":\"芜湖市\",\"coord\":[118.32992684415504,31.081688223101658]},{\"name\":\"澄迈县\",\"coord\":[110.04198076060266,19.694955078668105]},{\"name\":\"保亭黎族苗族自治\",\"coord\":[109.6055304964257,18.6101488675304]},{\"name\":\"乐东黎族自治县\",\"coord\":[109.04051999525574,18.643137437909203]},{\"name\":\"儋州市\",\"coord\":[109.3431358337404,19.550974957403195]},{\"name\":\"定安县\",\"coord\":[110.38744429685676,19.47557074114284]},{\"name\":\"屯昌县\",\"coord\":[110.00574767630334,19.367175093044388]},{\"name\":\"白沙黎族自治县\",\"coord\":[109.36860737761768,19.214416393082217]},{\"name\":\"琼中黎族苗族自治\",\"coord\":[109.86691465937548,19.073671135862682]},{\"name\":\"东方市\",\"coord\":[108.86903802405428,19.017352815445214]},{\"name\":\"昌江黎族自治县\",\"coord\":[108.9686431884767,19.182594167127824]},{\"name\":\"海口市\",\"coord\":[110.420654296875,19.806565564640795]},{\"name\":\"济源市\",\"coord\":[112.38051465474433,35.07958362422394]},{\"name\":\"五指山市\",\"coord\":[109.53595187364496,18.832908264613966]},{\"name\":\"大连市\",\"coord\":[121.96662235866603,39.444150542439914]},{\"name\":\"文昌市三沙市\",\"coord\":[110.81828537536748,19.756501444162936]},{\"name\":\"三亚市\",\"coord\":[109.38424600793707,18.39186315877128]},{\"name\":\"万宁市\",\"coord\":[110.28485046979574,18.860240588635115]},{\"name\":\"陵水黎族自治县\",\"coord\":[109.95577603229562,18.594712684620465]},{\"name\":\"临高县\",\"coord\":[109.71915395436967,19.79420403032508]},{\"name\":\"琼海市\",\"coord\":[110.41650700703043,19.22315873149372]}]");
  15847. /***/ }),
  15848. /* 102 */
  15849. /***/ (function(module, exports, __webpack_require__) {
  15850. "use strict";
  15851. var _interopRequireWildcard=__webpack_require__(19);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectSpread2=_interopRequireDefault(__webpack_require__(15));var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(18));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _react=_interopRequireWildcard(__webpack_require__(5));var _interface=__webpack_require__(54);var _MapViewModal=_interopRequireDefault(__webpack_require__(103));var _lodash=_interopRequireDefault(__webpack_require__(34));var _lodash2=_interopRequireDefault(__webpack_require__(26));var _lodash3=_interopRequireDefault(__webpack_require__(35));var _lodash4=_interopRequireDefault(__webpack_require__(37));var _lodash5=_interopRequireDefault(__webpack_require__(13));var _resizeDetector=__webpack_require__(33);var _mapEvent=_interopRequireDefault(__webpack_require__(27));var _util=__webpack_require__(11);var Map=/*#__PURE__*/function(_Component){(0,_inherits2.default)(Map,_Component);var _super=(0,_createSuper2.default)(Map);function Map(props){var _this;(0,_classCallCheck2.default)(this,Map);_this=_super.call(this,props);_this.selfRef=void 0;_this.viewModel=void 0;_this.map=void 0;_this.viewModelProps=['mapOptions.center','mapOptions.zoom','mapOptions.crs','mapOptions.minZoom','mapOptions.maxZoom','mapOptions.maxBounds','mapOptions.renderWorldCopies','mapOptions.bearing','mapOptions.pitch'];_this.initializeWebMap=function(){var _this$props=_this.props,target=_this$props.target,tiandituKey=_this$props.tiandituKey,mapOptions=_this$props.mapOptions,autoresize=_this$props.autoresize;_this.viewModel=new _MapViewModal.default({target:target,tiandituKey:tiandituKey},mapOptions);if(autoresize){(0,_resizeDetector.addListener)(_this.selfRef.current,_this.__resizeHandler);}};_this.registerEvents=function(){var _this$props2=_this.props,target=_this$props2.target,onLoad=_this$props2.onLoad;_this.viewModel.on('addlayerssucceeded',function(e){_this.setState({spinning:false});_mapEvent.default.setMap(target,e.map);_this.viewModel&&_mapEvent.default.setWebMap(target,_this.viewModel);_mapEvent.default.emit('load-map',e.map,target);e.map.resize();_this.map=e.map;if(false){}// 绑定map event
  15852. _this.bindMapEvents();/**
  15853. * @event load
  15854. * @desc webmap 加载完成之后触发。
  15855. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  15856. */(0,_util.isFunction)(onLoad)&&onLoad((0,_objectSpread2.default)((0,_objectSpread2.default)({},e),{},{component:(0,_assertThisInitialized2.default)(_this)}));});};_this.mapEventCallback=function(event){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_this.emitMapEvent(event.type,(0,_objectSpread2.default)({mapboxEvent:event},data));};_this.state={spinning:true};_this.selfRef=_react.default.createRef();_this.__resizeHandler=(0,_lodash.default)(_this.__resizeHandler.bind((0,_assertThisInitialized2.default)(_this)),100,{leading:true});return _this;}(0,_createClass2.default)(Map,[{key:"componentDidMount",value:function componentDidMount(){this.initializeWebMap();this.registerEvents();}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this2=this;this.viewModel&&this.viewModelProps.forEach(function(prop){var name=prop.includes('.')?prop.split('.')[1]:prop;var funcName="set".concat((0,_lodash3.default)(name));var propsValue=(0,_lodash4.default)(_this2.props,prop);var prevPropsValue=(0,_lodash4.default)(prevProps,prop);if(propsValue&&!(0,_lodash5.default)(propsValue,prevPropsValue)){_this2.viewModel[funcName](propsValue);}});var _this$props3=this.props,sprites=_this$props3.sprites,glyphs=_this$props3.glyphs;for(var id in sprites){if(prevProps.sprites[id]!==sprites[id]){this.viewModel.addSprites(id,sprites[id]);}}for(var _id in glyphs){if(prevProps.glyphs[_id]!==glyphs[_id]){this.viewModel.addGlyphs(_id,glyphs[_id]);}}}},{key:"componentWillUnmount",value:function componentWillUnmount(){var _this$props4=this.props,target=_this$props4.target,autoresize=_this$props4.autoresize;_mapEvent.default.deleteMap(target);_mapEvent.default.deleteWebMap(target);if(autoresize&&this.selfRef.current){(0,_resizeDetector.removeListener)(this.selfRef.current,this.__resizeHandler);}}},{key:"bindMapEvents",value:function bindMapEvents(){var _this3=this;Object.keys(this.props).forEach(function(eventName){if(_interface.MAP_EVENT_NAMES.includes(eventName)){var name=eventName.replace('on','');_this3.bindMapEvent(name.toLowerCase(),_this3.mapEventCallback);}});}},{key:"bindMapEvent",value:function bindMapEvent(eventName,eventCallback){this.map.on(eventName,eventCallback);}},{key:"emitMapEvent",value:function emitMapEvent(name){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var originEventName="on".concat((0,_lodash2.default)(name));if((0,_util.isFunction)(this.props[originEventName])){this.props[originEventName]((0,_objectSpread2.default)({map:this.map,component:this},data));}}},{key:"__resizeHandler",value:function __resizeHandler(){this.resize();}},{key:"resize",value:function resize(){if(this.viewModel&&this.viewModel.resize){this.viewModel.resize();}}},{key:"render",value:function render(){var spinning=this.state.spinning;var _this$props5=this.props,target=_this$props5.target,children=_this$props5.children;return/*#__PURE__*/_react.default.createElement("div",{id:target,className:"sm-component-map",ref:this.selfRef},!spinning&&children);}}]);return Map;}(_react.Component);Map.defaultProps={target:'map',autoresize:true};var _default=Map;exports.default=_default;
  15857. /***/ }),
  15858. /* 103 */
  15859. /***/ (function(module, exports, __webpack_require__) {
  15860. "use strict";
  15861. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));var MapViewModal=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(MapViewModal,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(MapViewModal);function MapViewModal(options){var _this;var mapOptions=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{style:{version:8,sources:{},layers:[]}};(0,_classCallCheck2.default)(this,MapViewModal);_this=_super.call(this);_this.map=void 0;_this.mapOptions=void 0;_this.tiandituKey=void 0;_this.target=void 0;_this.center=void 0;_this.zoom=void 0;_this.mapOptions=Object.assign({style:{version:8,sources:{},layers:[]}},mapOptions);_this.tiandituKey=options.tiandituKey||'';_this.target=options.target||'map';_this.center=mapOptions.center||[];_this.zoom=mapOptions.zoom;_this._createMap();return _this;}(0,_createClass2.default)(MapViewModal,[{key:"_createMap",value:function _createMap(){var _this2=this;if(this.map){this.map.remove();this.center=[];this.zoom=null;}this.mapOptions.container=this.target;setTimeout(function(){_this2.map=new _mapboxGlEnhance.default.Map(_this2.mapOptions);_this2.map.on('load',function(){_this2.fire('addlayerssucceeded',{map:_this2.map});});},0);return;}/**
  15862. * @function WebMapViewModel.prototype.resize
  15863. * @description Map 更新大小。
  15864. */},{key:"resize",value:function resize(){this.map&&this.map.resize();}/**
  15865. * @function WebMapViewModel.prototype.setCRS
  15866. * @description 设置地图的投影。
  15867. * @param {Number} crs - 地图投影。
  15868. */},{key:"setCrs",value:function setCrs(crs){if(this.map){this.mapOptions.crs=crs;//@ts-ignore
  15869. crs&&this.map.setCRS(_mapboxGlEnhance.default.CRS.get(crs));}}/**
  15870. * @function WebMapViewModel.prototype.setZoom
  15871. * @description 设置地图的缩放级别。
  15872. * @param {Number} zoom - 地图缩放级别。
  15873. */},{key:"setZoom",value:function setZoom(zoom){if(this.map){this.mapOptions.zoom=zoom;(zoom||zoom===0)&&this.map.setZoom(zoom);}}/**
  15874. * @function WebMapViewModel.prototype.setCenter
  15875. * @description 设置地图的中心点。
  15876. * @param {Array} center - 地图中心点。
  15877. */},{key:"setCenter",value:function setCenter(center){if(this.map){this.mapOptions.center=center;center&&center.length>0&&this.map.setCenter(center);}}/**
  15878. * @function WebMapViewModel.prototype.setMaxBounds
  15879. * @description 设置地图的最大范围。
  15880. * @param {Array} maxBounds - 地图最大范围。
  15881. */},{key:"setMaxBounds",value:function setMaxBounds(maxBounds){if(this.map){this.mapOptions.maxBounds=maxBounds;maxBounds&&maxBounds.length>0&&this.map.setMaxBounds(maxBounds);}}/**
  15882. * @function WebMapViewModel.prototype.setMinZoom
  15883. * @description 设置地图的最小级别。
  15884. * @param {Number} minZoom - 地图最小级别。
  15885. */},{key:"setMinZoom",value:function setMinZoom(minZoom){if(this.map){this.mapOptions.minZoom=minZoom;(minZoom||minZoom===0)&&this.map.setMinZoom(minZoom);}}/**
  15886. * @function WebMapViewModel.prototype.setMaxZoom
  15887. * @description 设置地图的最大级别。
  15888. * @param {Number} maxZoom - 地图最大级别。
  15889. */},{key:"setMaxZoom",value:function setMaxZoom(maxZoom){if(this.map){this.mapOptions.maxZoom=maxZoom;(maxZoom||maxZoom===0)&&this.map.setMinZoom(maxZoom);}}/**
  15890. * @function WebMapViewModel.prototype.setRenderWorldCopies
  15891. * @description 设置地图的平铺。
  15892. * @param {Boolean} renderWorldCopies - 地图是否平铺。
  15893. */},{key:"setRenderWorldCopies",value:function setRenderWorldCopies(renderWorldCopies){if(this.map){this.mapOptions.renderWorldCopies=renderWorldCopies;renderWorldCopies&&this.map.setRenderWorldCopies(renderWorldCopies);}}/**
  15894. * @function WebMapViewModel.prototype.setBearing
  15895. * @description 设置地图的方位。
  15896. * @param {Number} bearing - 地图的初始方位。
  15897. */},{key:"setBearing",value:function setBearing(bearing){if(this.map){this.mapOptions.bearing=bearing;(bearing||bearing===0)&&this.map.setBearing(bearing);}}/**
  15898. * @function WebMapViewModel.prototype.setPitch
  15899. * @description 设置地图的俯仰。
  15900. * @param {Number} pitch - 地图的初始俯仰。
  15901. */},{key:"setPitch",value:function setPitch(pitch){if(this.map){this.mapOptions.pitch=pitch;(pitch||pitch===0)&&this.map.setPitch(pitch);}}},{key:"addSprites",value:function addSprites(sourceId,sprite){var _this$map;if((_this$map=this.map)===null||_this$map===void 0?void 0:_this$map.style){this.map.style.addSprite(sourceId,sprite);}}},{key:"addGlyphs",value:function addGlyphs(sourceId,glyph){var _this$map2;if((_this$map2=this.map)===null||_this$map2===void 0?void 0:_this$map2.style){this.map.style.addGlyphs(sourceId,glyph);}}}]);return MapViewModal;}(_mapboxGlEnhance.default.Evented);var _default=MapViewModal;exports.default=_default;
  15902. /***/ }),
  15903. /* 104 */
  15904. /***/ (function(module, exports, __webpack_require__) {
  15905. "use strict";
  15906. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(158));var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _dec,_class,_temp;var Source=(_dec=(0,_compose2.default)(_mapGetter.default),_dec(_class=(_temp=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2.default)(Source,_React$PureComponent);var _super=(0,_createSuper2.default)(Source);function Source(props){var _this;(0,_classCallCheck2.default)(this,Source);_this=_super.call(this,props);_this._map=void 0;_this._map=null;return _this;}(0,_createClass2.default)(Source,[{key:"componentDidUpdate",value:function componentDidUpdate(){console.log("source \"".concat(this.props.id,"\" updated"));}},{key:"componentWillUnmount",value:function componentWillUnmount(){var _this2=this;setTimeout(function(){_this2._map.removeSource(_this2.props.id);console.log('source "'.concat(_this2.props.id,'" removed'));},100);}},{key:"loaded",value:function loaded(map){this._map=map;var _this$props=this.props,id=_this$props.id,mapNotLoadedTip=_this$props.mapNotLoadedTip,sourceOption=(0,_objectWithoutProperties2.default)(_this$props,["id","mapNotLoadedTip"]);if(this._map.getSource(id)){console.log("There is already a source with the id \"".concat(id,"\""));return;}this._map.addSource(id,sourceOption);}},{key:"render",value:function render(){return null;}}]);return Source;}(_react.default.PureComponent),_temp))||_class);exports.default=Source;
  15907. /***/ }),
  15908. /* 105 */
  15909. /***/ (function(module, exports, __webpack_require__) {
  15910. "use strict";
  15911. exports.__esModule = true;
  15912. exports.default = void 0;
  15913. var getDisplayName = function getDisplayName(Component) {
  15914. if (typeof Component === 'string') {
  15915. return Component;
  15916. }
  15917. if (!Component) {
  15918. return undefined;
  15919. }
  15920. return Component.displayName || Component.name || 'Component';
  15921. };
  15922. var _default = getDisplayName;
  15923. exports.default = _default;
  15924. /***/ }),
  15925. /* 106 */
  15926. /***/ (function(module, exports, __webpack_require__) {
  15927. "use strict";
  15928. if (true) {
  15929. module.exports = __webpack_require__(107);
  15930. } else {}
  15931. /***/ }),
  15932. /* 107 */
  15933. /***/ (function(module, exports, __webpack_require__) {
  15934. "use strict";
  15935. /** @license React v16.11.0
  15936. * react-is.production.min.js
  15937. *
  15938. * Copyright (c) Facebook, Inc. and its affiliates.
  15939. *
  15940. * This source code is licensed under the MIT license found in the
  15941. * LICENSE file in the root directory of this source tree.
  15942. */
  15943. Object.defineProperty(exports,"__esModule",{value:!0});
  15944. var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):
  15945. 60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case t:case r:case d:return u}}}function z(a){return y(a)===m}
  15946. exports.typeOf=y;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;
  15947. exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
  15948. exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
  15949. /***/ }),
  15950. /* 108 */
  15951. /***/ (function(module, exports, __webpack_require__) {
  15952. "use strict";
  15953. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _dec,_class;var Layer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(Layer,_React$Component);var _super=(0,_createSuper2.default)(Layer);function Layer(){(0,_classCallCheck2.default)(this,Layer);return _super.apply(this,arguments);}(0,_createClass2.default)(Layer,[{key:"loaded",value:function loaded(map){var _this$props=this.props,type=_this$props.type,source=_this$props.source,layerId=_this$props.layerId,minzoom=_this$props.minzoom,maxzoom=_this$props.maxzoom,filter=_this$props.filter,layout=_this$props.layout,paint=_this$props.paint,metadata=_this$props.metadata,before=_this$props.before;if(map.getLayer(layerId)){console.error("There is already a layer with the id \"".concat(layerId,"\""));return;}if(typeof source==='string'&&!map.getSource(source)){console.error("Source \"".concat(source,"\" is not loaded"));return;}if(type!=='background'&&!source){console.error("Source is required unless type is background");return;}var layerOption={id:layerId,type:type};source&&(layerOption.source=source);minzoom!==undefined&&(layerOption.minzoom=minzoom);maxzoom!==undefined&&(layerOption.maxzoom=maxzoom);filter&&(layerOption.filter=filter);layout&&(layerOption.layout=layout);paint&&(layerOption.paint=paint);metadata&&(layerOption.metadata=metadata);this.props['source-layer']&&(layerOption['source-layer']=this.props['source-layer']);map.addLayer(layerOption,before);}},{key:"removed",value:function removed(){}},{key:"render",value:function render(){return null;}}]);return Layer;}(_react.default.Component))||_class);exports.default=Layer;
  15954. /***/ }),
  15955. /* 109 */
  15956. /***/ (function(module, exports, __webpack_require__) {
  15957. "use strict";
  15958. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=__webpack_require__(5);var _GeojsonLayerViewModel=_interopRequireDefault(__webpack_require__(110));var _lodash=_interopRequireDefault(__webpack_require__(13));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _dec,_class,_temp;var GeojsonLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=/*#__PURE__*/function(_Component){(0,_inherits2.default)(GeojsonLayer,_Component);var _super=(0,_createSuper2.default)(GeojsonLayer);function GeojsonLayer(){var _this;(0,_classCallCheck2.default)(this,GeojsonLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(GeojsonLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(prevProps.layerStyle!==this.props.layerStyle){this.viewModel&&this.viewModel.setLayerStyle(this.props.layerStyle);}if(!(0,_lodash.default)(this.props.data,prevProps.data)&&this.viewModel){this.viewModel.setData(this.props.data);}}},{key:"loaded",value:function loaded(map){this.viewModel=new _GeojsonLayerViewModel.default(map,this.props);}},{key:"render",value:function render(){return null;}}]);return GeojsonLayer;}(_react.Component),_temp))||_class);exports.default=GeojsonLayer;
  15959. /***/ }),
  15960. /* 110 */
  15961. /***/ (function(module, exports, __webpack_require__) {
  15962. "use strict";
  15963. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));var GeojsonLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(GeojsonLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(GeojsonLayerViewModel);function GeojsonLayerViewModel(map,GeojsonLayerOptions){var _this;(0,_classCallCheck2.default)(this,GeojsonLayerViewModel);_this=_super.call(this);if(!map){throw new Error('map is requierd');}_this.map=map;var layerStyle=GeojsonLayerOptions.layerStyle,data=GeojsonLayerOptions.data,layerId=GeojsonLayerOptions.layerId;_this.data=data;_this.layerStyle=layerStyle;_this.layerId=layerId;_this.data&&_this._addLayer();return _this;}(0,_createClass2.default)(GeojsonLayerViewModel,[{key:"setData",value:function setData(data){if(!data||!this.map.getSource(this.layerId)){return;}this.data=data;if(this.layerId&&!this.map.getSource(this.layerId)){this._addLayer();}else{this.map.getSource(this.layerId).setData(data);}}},{key:"setLayerStyle",value:function setLayerStyle(layerStyle){if(!layerStyle||!this.map.getSource(this.layerId)){return;}var paint=layerStyle.paint,layout=layerStyle.layout;for(var _i=0,_Object$keys=Object.keys(paint);_i<_Object$keys.length;_i++){var prop=_Object$keys[_i];this.map.setPaintProperty(this.layerId,prop,paint[prop]);}for(var _i2=0,_Object$keys2=Object.keys(layout);_i2<_Object$keys2.length;_i2++){var _prop=_Object$keys2[_i2];this.map.setLayoutProperty(this.layerId,_prop,layout[_prop]);}this.layerStyle=layerStyle;}},{key:"_addLayer",value:function _addLayer(){if(!(this.layerStyle instanceof Object))throw new Error('layerStyle 不能为空');var _this$layerStyle=this.layerStyle,paint=_this$layerStyle.paint,layout=_this$layerStyle.layout;this.map.addLayer({id:this.layerId,type:this._getLayerType(paint),source:{type:'geojson',data:this.data},layout:layout||{},paint:paint||{}});}},{key:"_getLayerType",value:function _getLayerType(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var keys=Object.keys(paint).join(' ');var reg=/circle-|line-|fill-extrusion-|fill-+/i;var matchType=keys.match(reg);var type=matchType?matchType[0]:'';return type.substr(0,type.length-1);}}]);return GeojsonLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=GeojsonLayerViewModel;
  15964. /***/ }),
  15965. /* 111 */
  15966. /***/ (function(module, exports, __webpack_require__) {
  15967. "use strict";
  15968. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _RasterTileLayerViewModel=_interopRequireDefault(__webpack_require__(112));var _dec,_class,_class2,_temp;var RasterTileLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(RasterTileLayer,_React$Component);var _super=(0,_createSuper2.default)(RasterTileLayer);function RasterTileLayer(){var _this;(0,_classCallCheck2.default)(this,RasterTileLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(RasterTileLayer,[{key:"loaded",value:function loaded(map){this.viewModel=new _RasterTileLayerViewModel.default(map,this.props);}},{key:"removed",value:function removed(){this.viewModel=null;}},{key:"render",value:function render(){return null;}}]);return RasterTileLayer;}(_react.default.Component),_class2.defaultProps={scheme:'xyz',visible:true,opacity:1},_temp))||_class);exports.default=RasterTileLayer;
  15969. /***/ }),
  15970. /* 112 */
  15971. /***/ (function(module, exports, __webpack_require__) {
  15972. "use strict";
  15973. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);var RasterTileLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(RasterTileLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(RasterTileLayerViewModel);function RasterTileLayerViewModel(map,rasterLayerOptions){var _this;(0,_classCallCheck2.default)(this,RasterTileLayerViewModel);_this=_super.call(this);_this.map=map;var layerId=rasterLayerOptions.layerId,tileSize=rasterLayerOptions.tileSize,mapUrl=rasterLayerOptions.mapUrl,tiles=rasterLayerOptions.tiles,bounds=rasterLayerOptions.bounds,_rasterLayerOptions$m=rasterLayerOptions.minZoom,minZoom=_rasterLayerOptions$m===void 0?0:_rasterLayerOptions$m,_rasterLayerOptions$m2=rasterLayerOptions.maxZoom,maxZoom=_rasterLayerOptions$m2===void 0?22:_rasterLayerOptions$m2,attribution=rasterLayerOptions.attribution,_rasterLayerOptions$s=rasterLayerOptions.scheme,scheme=_rasterLayerOptions$s===void 0?'xyz':_rasterLayerOptions$s,_rasterLayerOptions$v=rasterLayerOptions.visible,visible=_rasterLayerOptions$v===void 0?true:_rasterLayerOptions$v,_rasterLayerOptions$o=rasterLayerOptions.opacity,opacity=_rasterLayerOptions$o===void 0?1:_rasterLayerOptions$o,before=rasterLayerOptions.before;_this.layerId=layerId;_this.tileSize=tileSize;_this.mapUrl=mapUrl;_this.tiles=tiles;_this.bounds=bounds;_this.minZoom=minZoom;_this.maxZoom=maxZoom;_this.attribution=attribution;_this.scheme=scheme;_this.opacity=opacity;_this.visibility=visible?'visible':'none';_this.before=before;// enhance扩展,传iserver标识是iserver rest map
  15974. _this.rasterSource='';_this._init();return _this;}(0,_createClass2.default)(RasterTileLayerViewModel,[{key:"_init",value:function _init(){if(this.mapUrl){this._addRestMapLayer();}else{this._addLayer();}}},{key:"_addRestMapLayer",value:function _addRestMapLayer(){var _this2=this;var service=new _mapboxGlEnhance.default.supermap.MapService(this.mapUrl);service.getMapInfo(function(mapObj){if(!_this2.layerId){_this2.layerId=mapObj.name;}if(!_this2.tileSize&&mapObj.viewer){_this2.tileSize=mapObj.viewer.width;}var bounds=mapObj.bounds;if(!_this2.bounds&&bounds){_this2.bounds=[bounds.left,bounds.bottom,bounds.right,bounds.top];}_this2.rasterSource='iserver';_this2.tiles=[_this2.mapUrl];_this2._addLayer(mapObj);});}},{key:"_addLayer",value:function _addLayer(){this.map.addLayer({id:this.layerId||"raster-layer-".concat(new Date().getTime()),type:'raster',layout:{visibility:this.visibility},paint:{'raster-opacity':this.opacity},source:{bounds:this.bounds||[-180,-85.051129,180,85.051129],type:'raster',tileSize:this.tileSize||256,tiles:this.tiles,rasterSource:this.rasterSource,minzoom:this.minZoom,maxzoom:this.maxZoom,scheme:this.scheme}},this.before);}}]);return RasterTileLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=RasterTileLayerViewModel;
  15975. /***/ }),
  15976. /* 113 */
  15977. /***/ (function(module, exports, __webpack_require__) {
  15978. "use strict";
  15979. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _dec,_class;var VectorTileLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(VectorTileLayer,_React$Component);var _super=(0,_createSuper2.default)(VectorTileLayer);function VectorTileLayer(){(0,_classCallCheck2.default)(this,VectorTileLayer);return _super.apply(this,arguments);}(0,_createClass2.default)(VectorTileLayer,[{key:"loaded",value:function loaded(map){if(map&&map['addStyle']){map['addStyle'](this.props.styleOptions,this.props.before);}}},{key:"render",value:function render(){return null;}}]);return VectorTileLayer;}(_react.default.Component))||_class);exports.default=VectorTileLayer;
  15980. /***/ }),
  15981. /* 114 */
  15982. /***/ (function(module, exports, __webpack_require__) {
  15983. "use strict";
  15984. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _lodash=_interopRequireDefault(__webpack_require__(13));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _util=__webpack_require__(11);var _UniqueThemeLayerViewModel=_interopRequireDefault(__webpack_require__(115));var _dec,_class,_class2,_temp;var UniqueThemeLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(UniqueThemeLayer,_React$Component);var _super=(0,_createSuper2.default)(UniqueThemeLayer);function UniqueThemeLayer(){var _this;(0,_classCallCheck2.default)(this,UniqueThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(UniqueThemeLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var data=this.props.data;if(!(0,_lodash.default)(prevProps.data,data)&&this.viewModel){this.viewModel.setData(data);}}},{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new _UniqueThemeLayerViewModel.default(map,this.props);(0,_util.isFunction)(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return UniqueThemeLayer;}(_react.default.Component),_class2.defaultProps={options:{}},_temp))||_class);exports.default=UniqueThemeLayer;
  15985. /***/ }),
  15986. /* 115 */
  15987. /***/ (function(module, exports, __webpack_require__) {
  15988. "use strict";
  15989. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);var UniqueThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(UniqueThemeLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(UniqueThemeLayerViewModel);function UniqueThemeLayerViewModel(map,themeProps){var _this;(0,_classCallCheck2.default)(this,UniqueThemeLayerViewModel);_this=_super.call(this);_this.map=map;var options=themeProps.options,layerId=themeProps.layerId,data=themeProps.data,layerName=themeProps.layerName;_this.layerName=layerName||layerId;options.id=options.id||layerId;_this.options=options;_this.data=data||[];_this._init();return _this;}(0,_createClass2.default)(UniqueThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new _mapboxGlEnhance.default.supermap.UniqueThemeLayer(this.layerName,this.options);this.map.addLayer(this.themeLayer);if(this.data&&this.data.length){this.setData(this.data);}}},{key:"setData",value:function setData(data){this.themeLayer.addFeatures(data);}}]);return UniqueThemeLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=UniqueThemeLayerViewModel;
  15990. /***/ }),
  15991. /* 116 */
  15992. /***/ (function(module, exports, __webpack_require__) {
  15993. "use strict";
  15994. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=__webpack_require__(5);var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _util=__webpack_require__(11);var _RanksymbolThemeLayerViewModel=_interopRequireDefault(__webpack_require__(117));var _dec,_class,_temp;var RanksymbolThemeLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=/*#__PURE__*/function(_Component){(0,_inherits2.default)(RanksymbolThemeLayer,_Component);var _super=(0,_createSuper2.default)(RanksymbolThemeLayer);function RanksymbolThemeLayer(){var _this;(0,_classCallCheck2.default)(this,RanksymbolThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(RanksymbolThemeLayer,[{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new _RanksymbolThemeLayerViewModel.default(map,this.props);(0,_util.isFunction)(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return RanksymbolThemeLayer;}(_react.Component),_temp))||_class);exports.default=RanksymbolThemeLayer;
  15995. /***/ }),
  15996. /* 117 */
  15997. /***/ (function(module, exports, __webpack_require__) {
  15998. "use strict";
  15999. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);var RanksymbolThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(RanksymbolThemeLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(RanksymbolThemeLayerViewModel);function RanksymbolThemeLayerViewModel(map,themeProps){var _this;(0,_classCallCheck2.default)(this,RanksymbolThemeLayerViewModel);_this=_super.call(this);_this.map=map;var layerName=themeProps.layerName,options=themeProps.options,symbolType=themeProps.symbolType,layerId=themeProps.layerId,data=themeProps.data;_this.layerName=layerName||layerId;_this.symbolType=symbolType||'Circle';options.id=options.id||layerId;_this.options=options;_this.data=data||[];_this._init();return _this;}(0,_createClass2.default)(RanksymbolThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new _mapboxGlEnhance.default.supermap.RankSymbolThemeLayer(this.layerName,this.symbolType,this.options);this.map.addLayer(this.themeLayer);this.themeLayer.addFeatures(this.data);}}]);return RanksymbolThemeLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=RanksymbolThemeLayerViewModel;
  16000. /***/ }),
  16001. /* 118 */
  16002. /***/ (function(module, exports, __webpack_require__) {
  16003. "use strict";
  16004. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _lodash=_interopRequireDefault(__webpack_require__(13));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _util=__webpack_require__(11);var _RangeThemeLayerViewModel=_interopRequireDefault(__webpack_require__(119));var _dec,_class,_class2,_temp;var RangeThemeLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(RangeThemeLayer,_React$Component);var _super=(0,_createSuper2.default)(RangeThemeLayer);function RangeThemeLayer(){var _this;(0,_classCallCheck2.default)(this,RangeThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(RangeThemeLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var data=this.props.data;if(!(0,_lodash.default)(prevProps.data,data)&&this.viewModel){this.viewModel.setData(data);}}},{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new _RangeThemeLayerViewModel.default(map,this.props);(0,_util.isFunction)(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return RangeThemeLayer;}(_react.default.Component),_class2.defaultProps={options:{}},_temp))||_class);exports.default=RangeThemeLayer;
  16005. /***/ }),
  16006. /* 119 */
  16007. /***/ (function(module, exports, __webpack_require__) {
  16008. "use strict";
  16009. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);var RangeThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(RangeThemeLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(RangeThemeLayerViewModel);function RangeThemeLayerViewModel(map,themeProps){var _this;(0,_classCallCheck2.default)(this,RangeThemeLayerViewModel);_this=_super.call(this);var layerName=themeProps.layerName,options=themeProps.options,layerId=themeProps.layerId,data=themeProps.data;_this.map=map;_this.layerName=layerName||layerId;options.id=options.id||layerId;_this.options=options;_this.data=data||[];_this._init();return _this;}(0,_createClass2.default)(RangeThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new _mapboxGlEnhance.default.supermap.RangeThemeLayer(this.layerName,this.options);this.map.addLayer(this.themeLayer);if(this.data&&this.data.length){this.setData(this.data);}}},{key:"setData",value:function setData(data){this.themeLayer.addFeatures(data);}}]);return RangeThemeLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=RangeThemeLayerViewModel;
  16010. /***/ }),
  16011. /* 120 */
  16012. /***/ (function(module, exports, __webpack_require__) {
  16013. "use strict";
  16014. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _lodash=_interopRequireDefault(__webpack_require__(13));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _util=__webpack_require__(11);var _GraphThemeLayerViewModel=_interopRequireDefault(__webpack_require__(121));var _dec,_class,_class2,_temp;var GraphThemeLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(GraphThemeLayer,_React$Component);var _super=(0,_createSuper2.default)(GraphThemeLayer);function GraphThemeLayer(){var _this;(0,_classCallCheck2.default)(this,GraphThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(GraphThemeLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var data=this.props.data;if(!(0,_lodash.default)(prevProps.data,data)&&this.viewModel){this.viewModel.setData(data);}}},{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new _GraphThemeLayerViewModel.default(map,this.props);(0,_util.isFunction)(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return GraphThemeLayer;}(_react.default.Component),_class2.defaultProps={options:{},chartsType:'Bar'},_temp))||_class);exports.default=GraphThemeLayer;
  16015. /***/ }),
  16016. /* 121 */
  16017. /***/ (function(module, exports, __webpack_require__) {
  16018. "use strict";
  16019. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);var GraphThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(GraphThemeLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(GraphThemeLayerViewModel);function GraphThemeLayerViewModel(map,themeProps){var _this;(0,_classCallCheck2.default)(this,GraphThemeLayerViewModel);_this=_super.call(this);_this.map=map;var layerName=themeProps.layerName,options=themeProps.options,chartsType=themeProps.chartsType,layerId=themeProps.layerId,data=themeProps.data;_this.layerName=layerName||layerId;_this.chartsType=chartsType||'Bar';options.id=options.id||layerId;_this.options=options;_this.data=data||{};_this._init();return _this;}(0,_createClass2.default)(GraphThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new _mapboxGlEnhance.default.supermap.GraphThemeLayer(this.layerName,this.chartsType,this.options);this.map.addLayer(this.themeLayer);if(JSON.stringify(this.data)!=='{}'){this.setData(this.data);}}},{key:"setData",value:function setData(data){this.themeLayer.addFeatures(data);}}]);return GraphThemeLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=GraphThemeLayerViewModel;
  16020. /***/ }),
  16021. /* 122 */
  16022. /***/ (function(module, exports, __webpack_require__) {
  16023. "use strict";
  16024. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectSpread2=_interopRequireDefault(__webpack_require__(15));var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=__webpack_require__(5);var _ClusterLayerViewModel=_interopRequireDefault(__webpack_require__(123));var _CircleStyle=_interopRequireDefault(__webpack_require__(57));var _lodash=_interopRequireDefault(__webpack_require__(13));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _dec,_class,_class2,_temp;var ClusterLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_Component){(0,_inherits2.default)(ClusterLayer,_Component);var _super=(0,_createSuper2.default)(ClusterLayer);function ClusterLayer(){var _this;(0,_classCallCheck2.default)(this,ClusterLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(ClusterLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this$props=this.props,data=_this$props.data,clusteredPointStyle=_this$props.clusteredPointStyle,unclusteredPointStyle=_this$props.unclusteredPointStyle,clusteredPointTextLayout=_this$props.clusteredPointTextLayout;if(!(0,_lodash.default)(data,prevProps.data)){this.viewModel&&this.viewModel.setData(data);}if(prevProps.clusteredPointStyle!==clusteredPointStyle){this.viewModel&&this.viewModel.setClusteredPointStyle(clusteredPointStyle);}if(prevProps.unclusteredPointStyle!==unclusteredPointStyle){this.viewModel&&this.viewModel.setUnclusteredPointStyle(unclusteredPointStyle);}if(prevProps.clusteredPointTextLayout!==clusteredPointTextLayout){this.viewModel&&this.viewModel.setClusteredPointTextLayout(clusteredPointTextLayout);}}},{key:"loaded",value:function loaded(map){var options=JSON.parse(JSON.stringify(this.props));delete options.data;this.viewModel=new _ClusterLayerViewModel.default(map,this.props.data,(0,_objectSpread2.default)({},options));}},{key:"render",value:function render(){return null;}}]);return ClusterLayer;}(_react.Component),_class2.defaultProps={radius:50,maxZoom:14,clusteredPointStyle:new _CircleStyle.default({'circle-color':['step',['get','point_count'],'#51bbd6',100,'#f1f075',750,'#f28cb1'],'circle-radius':['step',['get','point_count'],20,100,30,750,40]}),unclusteredPointStyle:new _CircleStyle.default({'circle-color':'#11b4da','circle-radius':4,'circle-stroke-width':1,'circle-stroke-color':'#fff'})},_temp))||_class);var _default=ClusterLayer;exports.default=_default;
  16025. /***/ }),
  16026. /* 123 */
  16027. /***/ (function(module, exports, __webpack_require__) {
  16028. "use strict";
  16029. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));/**
  16030. * @class ClusterLayerViewModel
  16031. * @param {mapboxgl.map} map - mapboxgl map 对象。
  16032. * @param {Object} data - Cluster layer data。
  16033. * @param {Object} options - 可选参数。
  16034. * @param {String} [options.layerId] - 图层 ID。
  16035. * @param {Object} [options.clusteredPointStyle] - 聚合点的 Paint 对象。
  16036. * @param {Object} [options.unclusteredPointStyle] - 未聚合的点的 Paint 对象。
  16037. * @param {Object} [options.clusteredPointTextLayout] - 聚合点的文本 layout 对象
  16038. * @param {number} [options.radius=50] - 图层聚合点半径。
  16039. * @param {number} [options.maxZoom=14] - 图层最大显示级别。
  16040. */var ClusterLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(ClusterLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(ClusterLayerViewModel);function ClusterLayerViewModel(map,data){var _this;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};(0,_classCallCheck2.default)(this,ClusterLayerViewModel);_this=_super.call(this);_this.options=options;if(!map){throw new Error('map is requierd');}_this.map=map;_this.data=data;_this.layerId=options.layerId||'clusterLayer'+new Date().getTime();_this.data&&_this._initializeClusterLayer();return _this;}(0,_createClass2.default)(ClusterLayerViewModel,[{key:"setData",value:function setData(data){if(!data){return;}this.data=data;if(this.layerId&&!this.map.getSource(this.layerId)){this._initializeClusterLayer();}else{this.map.getSource(this.layerId).setData(data);}}},{key:"setClusteredPointStyle",value:function setClusteredPointStyle(clusteredPointStyle){if(!clusteredPointStyle||this.layerId&&!this.map.getSource(this.layerId)){return;}this.options.clusteredPointStyle=clusteredPointStyle;this._setPaintProperty(clusteredPointStyle.paint,this.layerId);this._setLayoutProperty(clusteredPointStyle.layout,this.layerId);}},{key:"setUnclusteredPointStyle",value:function setUnclusteredPointStyle(unclusteredPointStyle){var layerId='unclustered_point'+this.layerId;if(!unclusteredPointStyle||!this.map.getSource(layerId)){return;}this.options.unclusteredPointStyle=unclusteredPointStyle;this._setPaintProperty(unclusteredPointStyle.paint,layerId);this._setLayoutProperty(unclusteredPointStyle.layout,layerId);}},{key:"setClusteredPointTextLayout",value:function setClusteredPointTextLayout(clusteredPointTextLayout){var layerId='count_'+this.layerId;if(!clusteredPointTextLayout||!this.map.getSource(layerId)){return;}this.options.clusteredPointTextLayout=clusteredPointTextLayout;this._setLayoutProperty(clusteredPointTextLayout,layerId);}},{key:"_setPaintProperty",value:function _setPaintProperty(paint,layerId){var _this2=this;Object.keys(paint).forEach(function(key){_this2.map.setPaintProperty(layerId,key,paint[key]);});}},{key:"_setLayoutProperty",value:function _setLayoutProperty(layout,layerId){var _this3=this;Object.keys(layout).forEach(function(key){_this3.map.setLayoutProperty(layerId,key,layout[key]);});}},{key:"_initializeClusterLayer",value:function _initializeClusterLayer(){var _this4=this;this.map.addSource(this.layerId,{type:'geojson',data:this.data,cluster:true,clusterMaxZoom:this.options.maxZoom||14,clusterRadius:this.options.radius||50});this.map.addLayer({id:this.layerId,type:'circle',source:this.layerId,filter:['has','point_count'],paint:this.options.clusteredPointStyle&&this.options.clusteredPointStyle.paint||{'circle-color':['step',['get','point_count'],'#51bbd6',100,'#f1f075',750,'#f28cb1'],'circle-radius':['step',['get','point_count'],20,100,30,750,40]}});// 聚合点文本 layer
  16041. this.map.addLayer({id:'count_'+this.layerId,type:'symbol',source:this.layerId,filter:['has','point_count'],layout:this.options.clusteredPointTextLayout||{'text-field':'{point_count_abbreviated}','text-font':['DIN Offc Pro Medium','Arial Unicode MS Bold'],'text-size':12}});// 未聚合点 layer
  16042. this.map.addLayer({id:'unclustered_point'+this.layerId,type:'circle',source:this.layerId,filter:['!',['has','point_count']],paint:this.options.unclusteredPointStyle&&this.options.unclusteredPointStyle.paint||{'circle-color':'#11b4da','circle-radius':4,'circle-stroke-width':1,'circle-stroke-color':'#fff'}});/**
  16043. * @event addcusterlayersucceeded
  16044. * @description 添加点聚合图层成功后触发。
  16045. * @property {Object} map - mapboxgl map 对象。
  16046. */this.fire('addcusterlayersucceeded',{map:this.map});this.map.on('click',this.layerId,function(e){var features=_this4.map.queryRenderedFeatures(e.point,{layers:[_this4.layerId]});var clusterId=features[0].properties.cluster_id;_this4.map.getSource(_this4.layerId).getClusterExpansionZoom(clusterId,function(err,zoom){if(err)return;_this4.map.easeTo({center:features[0].geometry.coordinates,zoom:zoom});});});this.map.on('mouseenter',this.layerId,function(){_this4.map.getCanvas().style.cursor='pointer';});this.map.on('mouseleave',this.layerId,function(){_this4.map.getCanvas().style.cursor='';});}}]);return ClusterLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=ClusterLayerViewModel;
  16047. /***/ }),
  16048. /* 124 */
  16049. /***/ (function(module, exports, __webpack_require__) {
  16050. "use strict";
  16051. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=__webpack_require__(5);var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _DeckglLayerViewModel=_interopRequireDefault(__webpack_require__(125));var _dec,_class,_temp;var LAYER_TYPE_ID_LIST=['scatter-plot','path-layer','polygon-layer','arc-layer','hexagon-layer','screen-grid-layer'];var DeckglLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=/*#__PURE__*/function(_Component){(0,_inherits2.default)(DeckglLayer,_Component);var _super=(0,_createSuper2.default)(DeckglLayer);function DeckglLayer(){var _this;(0,_classCallCheck2.default)(this,DeckglLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(DeckglLayer,[{key:"loaded",value:function loaded(map){var _this2=this;var matchIndex=LAYER_TYPE_ID_LIST.findIndex(function(item){return item===_this2.props.layerType;});if(matchIndex>-1){this.viewModel=new _DeckglLayerViewModel.default(map,this.props);}}},{key:"render",value:function render(){return null;}}]);return DeckglLayer;}(_react.Component),_temp))||_class);exports.default=DeckglLayer;
  16052. /***/ }),
  16053. /* 125 */
  16054. /***/ (function(module, exports, __webpack_require__) {
  16055. "use strict";
  16056. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);__webpack_require__(126);var DeckglLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(DeckglLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(DeckglLayerViewModel);function DeckglLayerViewModel(map,deckglProps){var _this;(0,_classCallCheck2.default)(this,DeckglLayerViewModel);_this=_super.call(this);_this.map=map;var layerType=deckglProps.layerType,options=deckglProps.options,layerId=deckglProps.layerId;_this.layerType=layerType;options.data=options.data||[];options.layerId=options.layerId||layerId;_this.options=options;_this._init();return _this;}(0,_createClass2.default)(DeckglLayerViewModel,[{key:"_init",value:function _init(){if(this.layerType&&this.options){this._addDeckglLayer();}}},{key:"_addDeckglLayer",value:function _addDeckglLayer(){var deckglLayer=new _mapboxGlEnhance.default.supermap.DeckglLayer(this.layerType,this.options);this.map.addLayer(deckglLayer);}}]);return DeckglLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=DeckglLayerViewModel;
  16057. /***/ }),
  16058. /* 126 */
  16059. /***/ (function(module, exports) {
  16060. module.exports = __WEBPACK_EXTERNAL_MODULE__126__;
  16061. /***/ }),
  16062. /* 127 */
  16063. /***/ (function(module, exports, __webpack_require__) {
  16064. "use strict";
  16065. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=__webpack_require__(5);var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _util=__webpack_require__(11);var _LabelThemeLayerViewModel=_interopRequireDefault(__webpack_require__(128));var _dec,_class,_class2,_temp;var LabelThemeLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_Component){(0,_inherits2.default)(LabelThemeLayer,_Component);var _super=(0,_createSuper2.default)(LabelThemeLayer);function LabelThemeLayer(){var _this;(0,_classCallCheck2.default)(this,LabelThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(LabelThemeLayer,[{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new _LabelThemeLayerViewModel.default(map,this.props);(0,_util.isFunction)(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return LabelThemeLayer;}(_react.Component),_class2.defaultProps={options:{}},_temp))||_class);exports.default=LabelThemeLayer;
  16066. /***/ }),
  16067. /* 128 */
  16068. /***/ (function(module, exports, __webpack_require__) {
  16069. "use strict";
  16070. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);var LabelThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(LabelThemeLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(LabelThemeLayerViewModel);function LabelThemeLayerViewModel(map,themeProps){var _this;(0,_classCallCheck2.default)(this,LabelThemeLayerViewModel);_this=_super.call(this);var layerName=themeProps.layerName,options=themeProps.options,layerId=themeProps.layerId,data=themeProps.data;_this.map=map;_this.layerName=layerName||layerId;options.id=options.id||layerId;_this.options=options;_this.data=data||[];_this._init();return _this;}(0,_createClass2.default)(LabelThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new _mapboxGlEnhance.default.supermap.LabelThemeLayer(this.layerName,this.options);this.map.addLayer(this.themeLayer);this.themeLayer.addFeatures(this.data);}}]);return LabelThemeLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=LabelThemeLayerViewModel;
  16071. /***/ }),
  16072. /* 129 */
  16073. /***/ (function(module, exports, __webpack_require__) {
  16074. "use strict";
  16075. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _HeatmapLayerViewModel=_interopRequireDefault(__webpack_require__(130));var _HeatMapStyle=_interopRequireDefault(__webpack_require__(58));var _dec,_class,_class2,_temp;var HeatmapLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(HeatmapLayer,_React$Component);var _super=(0,_createSuper2.default)(HeatmapLayer);function HeatmapLayer(){var _this;(0,_classCallCheck2.default)(this,HeatmapLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(HeatmapLayer,[{key:"loaded",value:function loaded(map){var _this$props=this.props,data=_this$props.data,layerId=_this$props.layerId,layerStyle=_this$props.layerStyle;this.viewModel=new _HeatmapLayerViewModel.default(map,data,{layerId:layerId,layerStyle:layerStyle});}},{key:"render",value:function render(){return null;}}]);return HeatmapLayer;}(_react.default.Component),_class2.defaultProps={layerStyle:new _HeatMapStyle.default()},_temp))||_class);exports.default=HeatmapLayer;
  16076. /***/ }),
  16077. /* 130 */
  16078. /***/ (function(module, exports, __webpack_require__) {
  16079. "use strict";
  16080. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));/**
  16081. * @class HeatMapLayerViewModel
  16082. * @param {mapboxgl.map} map - mapboxgl map 对象。
  16083. * @param {String} data - 热力图数据。
  16084. * @param {Object} options - 可选参数。
  16085. * @param {Object} [options.layerId] - 图层名。
  16086. * @param {Object} [options.layerStyle] - 图层样式配置。
  16087. */var HeatMapLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(HeatMapLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(HeatMapLayerViewModel);function HeatMapLayerViewModel(map,data,options){var _this;(0,_classCallCheck2.default)(this,HeatMapLayerViewModel);_this=_super.call(this);if(!map){throw new Error('map is requierd');}options=options||{};_this.map=map;_this.data=data;_this.layerId=options.layerId||'heatmap'+new Date().getTime();var layerStyle=options.layerStyle;_this.paint=layerStyle&&layerStyle.paint;_this.layout=layerStyle&&layerStyle.layout;_this._initializeHeatMapLayer();return _this;}(0,_createClass2.default)(HeatMapLayerViewModel,[{key:"_initializeHeatMapLayer",value:function _initializeHeatMapLayer(){this.map.addSource(this.layerId,{type:'geojson',data:this.data});this.map.addLayer({id:this.layerId,type:'heatmap',source:this.layerId,maxzoom:9,paint:this.paint||{'heatmap-intensity':['interpolate',['linear'],['zoom'],0,1,9,3],'heatmap-color':['interpolate',['linear'],['heatmap-density'],0,'rgba(33,102,172,0)',0.2,'rgb(103,169,207)',0.4,'rgb(209,229,240)',0.6,'rgb(253,219,199)',0.8,'rgb(239,138,98)',1,'rgb(178,24,43)'],'heatmap-radius':['interpolate',['linear'],['zoom'],0,2,9,20],'heatmap-opacity':['interpolate',['linear'],['zoom'],7,1,9,0]},layout:this.layout||{}});this.fire('heatmaplayeraddsucceeded',{map:this.map});}}]);return HeatMapLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=HeatMapLayerViewModel;
  16088. /***/ }),
  16089. /* 131 */
  16090. /***/ (function(module, exports, __webpack_require__) {
  16091. "use strict";
  16092. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _MapvLayerViewModel=_interopRequireDefault(__webpack_require__(132));var _dec,_class,_class2,_temp;var MapvLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(MapvLayer,_React$Component);var _super=(0,_createSuper2.default)(MapvLayer);function MapvLayer(){var _this;(0,_classCallCheck2.default)(this,MapvLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(MapvLayer,[{key:"loaded",value:function loaded(map){this.viewModel=new _MapvLayerViewModel.default(map,this.props);}},{key:"render",value:function render(){return null;}}]);return MapvLayer;}(_react.default.Component),_class2.defaultProps={options:{},data:{}},_temp))||_class);exports.default=MapvLayer;
  16093. /***/ }),
  16094. /* 132 */
  16095. /***/ (function(module, exports, __webpack_require__) {
  16096. "use strict";
  16097. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectSpread2=_interopRequireDefault(__webpack_require__(15));var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);var MapvLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(MapvLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(MapvLayerViewModel);function MapvLayerViewModel(map,mapvLayerProps){var _this;(0,_classCallCheck2.default)(this,MapvLayerViewModel);_this=_super.call(this);_this.map=map;var data=mapvLayerProps.data,options=mapvLayerProps.options,layerId=mapvLayerProps.layerId;_this.data=data;_this.options=options.layerId?options:(0,_objectSpread2.default)((0,_objectSpread2.default)({},options),{},{layerId:layerId});_this._init();return _this;}(0,_createClass2.default)(MapvLayerViewModel,[{key:"_init",value:function _init(){if(this.data&&this.options){this._addMapvLayer();}}},{key:"_addMapvLayer",value:function _addMapvLayer(){var mapVLayer=new _mapboxGlEnhance.default.supermap.MapvLayer('',this.data,this.options);this.map.addLayer(mapVLayer);}}]);return MapvLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=MapvLayerViewModel;
  16098. /***/ }),
  16099. /* 133 */
  16100. /***/ (function(module, exports, __webpack_require__) {
  16101. "use strict";
  16102. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _EchatsLayerViewModel=_interopRequireDefault(__webpack_require__(134));var _dec,_class,_temp;var EchartsLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(EchartsLayer,_React$Component);var _super=(0,_createSuper2.default)(EchartsLayer);function EchartsLayer(){var _this;(0,_classCallCheck2.default)(this,EchartsLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(EchartsLayer,[{key:"loaded",value:function loaded(map){this.viewModel=new _EchatsLayerViewModel.default(map,this.props.options);}},{key:"render",value:function render(){return null;}}]);return EchartsLayer;}(_react.default.Component),_temp))||_class);exports.default=EchartsLayer;
  16103. /***/ }),
  16104. /* 134 */
  16105. /***/ (function(module, exports, __webpack_require__) {
  16106. "use strict";
  16107. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _echarts=_interopRequireDefault(__webpack_require__(50));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));var _EchartsLayer=_interopRequireDefault(__webpack_require__(51));/**
  16108. * @class EchatsLayerViewModel
  16109. * @param {mapboxgl.map} map - mapboxgl map 对象。
  16110. * @param {String} options - EchartsLayer options。
  16111. */var EchatsLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(EchatsLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(EchatsLayerViewModel);function EchatsLayerViewModel(map,options){var _this;(0,_classCallCheck2.default)(this,EchatsLayerViewModel);_this=_super.call(this);if(!options){throw new Error('echarts options is requierd');}if(!map){throw new Error('map is requierd');}_this.map=map;_this.options=options;_this._initializeEchartsLayer();return _this;}(0,_createClass2.default)(EchatsLayerViewModel,[{key:"_initializeEchartsLayer",value:function _initializeEchartsLayer(){window.echarts=_echarts.default;var echartslayer=new _EchartsLayer.default(this.map);echartslayer.chart.setOption(this.options);/**
  16112. * @event echartslayeraddsucceeded
  16113. * @property {Object} layer - Echarts Layer.
  16114. */this.fire('echartslayeraddsucceeded',{layer:echartslayer});this.echartslayer=echartslayer;}}]);return EchatsLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=EchatsLayerViewModel;
  16115. /***/ }),
  16116. /* 135 */
  16117. /***/ (function(module, exports, __webpack_require__) {
  16118. "use strict";
  16119. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectSpread2=_interopRequireDefault(__webpack_require__(15));var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _DataFlowLayerViewModel=_interopRequireDefault(__webpack_require__(136));var _types=__webpack_require__(59);var _util=__webpack_require__(11);var _dec,_class,_class2,_temp;var DataFlowLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(DataFlowLayer,_React$Component);var _super=(0,_createSuper2.default)(DataFlowLayer);function DataFlowLayer(){var _this;(0,_classCallCheck2.default)(this,DataFlowLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(DataFlowLayer,[{key:"loaded",value:function loaded(map){var options=JSON.parse(JSON.stringify(this.props));delete options.serviceUrl;this.viewModel=new _DataFlowLayerViewModel.default(map,this.props.serviceUrl,(0,_objectSpread2.default)({},options));this.registerEvents();}},{key:"registerEvents",value:function registerEvents(){var _this2=this;// @ts-ignore
  16120. this.viewModel.on('subscribefailed',function(e){// this.$message.error(this.$t('dataFlow.dataSubscriptionFailed'));
  16121. /**
  16122. * @event subscribeFailed
  16123. * @desc 数据订阅失败后触发。
  16124. * @property {Object} e - 事件对象。
  16125. */(0,_util.isFunction)(_this2.props.onSubscribeFailed)&&_this2.props.onSubscribeFailed(e);});// @ts-ignore
  16126. this.viewModel.on('subscribesucceeded',function(e){/**
  16127. * @event subscribeSucceeded
  16128. * @desc 数据订阅失败后触发。
  16129. * @property {Object} e - 事件对象。
  16130. */(0,_util.isFunction)(_this2.props.onSubscribeSucceeded)&&_this2.props.onSubscribeSucceeded(e);});// @ts-ignore
  16131. this.viewModel.on('dataupdated',function(e){/**
  16132. * @event dataUpdated
  16133. * @desc 数据更新成功后触发。
  16134. * @property {GeoJSONObject} data - 更新的数据。
  16135. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  16136. */(0,_util.isFunction)(_this2.props.onDataUpdated)&&_this2.props.onDataUpdated(e);});}},{key:"render",value:function render(){return null;}}]);return DataFlowLayer;}(_react.default.Component),_class2.defaultProps={layerStyle:{line:new _types.LineStyle(),circle:new _types.CircleStyle(),fill:new _types.FillStyle()}},_temp))||_class);exports.default=DataFlowLayer;
  16137. /***/ }),
  16138. /* 136 */
  16139. /***/ (function(module, exports, __webpack_require__) {
  16140. "use strict";
  16141. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _lodash=_interopRequireDefault(__webpack_require__(53));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));__webpack_require__(12);/**
  16142. * @class DataFlowLayerViewModel
  16143. * @category ViewModel
  16144. * @classdesc 数据流图层组件功能类。
  16145. * @param {mapboxgl.Map} map - mapboxgl map 对象。
  16146. * @param {String} serviceUrl - 数据流服务地址。
  16147. * @param {Object} [options] - 可选参数。
  16148. * @param {String} [options.layerId] - 图层 ID。
  16149. * @param {Object} [options.layerStyle] - 指定图层样式。
  16150. * @param {GeoJSONObject} [options.geometry] - 指定几何范围,该范围内的要素才能被订阅。
  16151. * @param {String} [options.excludeField] - 排除字段。
  16152. * @param {Object} [options.styleOptions] - style OPtion
  16153. * @fires DataFlowLayerViewModel#subscribesucceeded
  16154. * @fires DataFlowLayerViewModel#subscribefailed
  16155. * @fires DataFlowLayerViewModel#dataUpdated
  16156. */var DataFlowLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(DataFlowLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(DataFlowLayerViewModel);function DataFlowLayerViewModel(map,serviceUrl,options){var _this;(0,_classCallCheck2.default)(this,DataFlowLayerViewModel);_this=_super.call(this);if(!serviceUrl){throw new Error('serviceUrl is requierd');}if(!map){throw new Error('map is requierd');}_this.options=options||{};_this.map=map;_this.serviceUrl=serviceUrl;_this.sourceID=options.layerId||'dataFlow'+new Date().getTime();_this.layerStyle=options.layerStyle||{};if(_this.options.registerToken){SuperMap.SecurityManager.registerToken(_this.serviceUrl,_this.options.registerToken);}_this._initializeDataFlow();return _this;}(0,_createClass2.default)(DataFlowLayerViewModel,[{key:"setLaterStyle",value:function setLaterStyle(layerStyle){this.layerStyle=layerStyle;}/**
  16157. * @function DataFlowLayerViewModel.prototype.setExcludeField
  16158. * @description 设置唯一字段。
  16159. * @param {string} excludeField - 唯一字段。
  16160. */},{key:"setExcludeField",value:function setExcludeField(excludeField){this.dataService.setExcludeField(excludeField);this.options.excludeField=excludeField;return this;}/**
  16161. * @function DataFlowLayerViewModel.prototype.setGeometry
  16162. * @description 设置集合要素。
  16163. * @param {GeoJSONObject} geometry - 待设置的 GeoJSON 几何要素对象。
  16164. */},{key:"setGeometry",value:function setGeometry(geometry){this.dataService.setGeometry(geometry);this.options.geometry=geometry;return this;}},{key:"_initializeDataFlow",value:function _initializeDataFlow(){var _this2=this;var dataService=new _mapboxGlEnhance.default.supermap.DataFlowService(this.serviceUrl,{geometry:this.options.geometry,excludeField:this.options.excludeField}).initSubscribe();dataService.on('subscribeSocketConnected',function(e){/**
  16165. * @event DataFlowLayerViewModel#subscribesucceeded
  16166. * @description 数据订阅成功后触发。
  16167. * @property {Object} e - 事件对象。
  16168. */_this2.fire('subscribesucceeded',e);});dataService.on('subscribeSocketError',function(e){/**
  16169. * @event DataFlowLayerViewModel#subscribefailed
  16170. * @description 数据订阅失败后触发。
  16171. * @property {Object} e - 事件对象。
  16172. */_this2.fire('subscribefailed',e);});dataService.on('messageSucceeded',function(msg){_this2._addLayer(msg);});this.dataService=dataService;}},{key:"_addLayer",value:function _addLayer(msg){if(!msg.featureResult){return;}var feature=msg.featureResult;var type=feature.geometry.type;var layerStyle=this.layerStyle;if(!this.map.getSource(this.sourceID)){this.map.addSource(this.sourceID,{type:'geojson',data:{type:'FeatureCollection',features:[feature]}});if(type==='Point'){var pointType='circle';var pointPaint={'circle-radius':6,'circle-color':'red'};if(layerStyle.symbol){pointType='symbol';pointPaint={};}this.map.addLayer({id:this.sourceID,type:pointType,source:this.sourceID,paint:layerStyle[pointType]&&layerStyle[pointType].paint||pointPaint,layout:layerStyle[pointType]&&layerStyle[pointType].layout||{}});}else if(type==='MultiPolygon'||type==='Polygon'){this.map.addLayer({id:this.sourceID,type:'fill',paint:layerStyle.fill&&layerStyle.fill.paint||{'fill-color':'red','fill-opacity':1},layout:layerStyle.fill&&layerStyle.fill.layout||{},source:this.sourceID});}else if(type==='LineString'||type==='Line'||type==='MultiLineString'){this.map.addLayer({id:this.sourceID,type:'line',paint:layerStyle.line&&layerStyle.line.paint||{'line-width':5,'line-color':'red','line-opacity':1},layout:layerStyle.line&&layerStyle.line.layout||{},source:this.sourceID});}}else{// update layer
  16173. var features=(0,_lodash.default)(this.map.getSource(this.sourceID)._data.features);var has=false;features.forEach(function(item,index){if(item.properties.id===feature.properties.id){has=true;features[index]=feature;}});if(!has){features.push(feature);}this.map.getSource(this.sourceID).setData({type:'FeatureCollection',features:features});/**
  16174. * @event DataFlowLayerViewModel#dataUpdated
  16175. * @description 数据更新成功后触发。
  16176. * @property {GeoJSONObject} data - 更新的数据。
  16177. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  16178. */this.fire('dataupdated',{data:feature,map:this.map});}}}]);return DataFlowLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=DataFlowLayerViewModel;
  16179. /***/ }),
  16180. /* 137 */
  16181. /***/ (function(module, exports, __webpack_require__) {
  16182. "use strict";
  16183. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));/**
  16184. * @class FillStyle
  16185. * @category BaseTypes Style
  16186. * @classdesc 面图层样式类。
  16187. * @param {mapboxgl.LayersFill} paint - MapboxGL 面图层 Paint 配置。
  16188. * @param {mapboxgl.LayersFill} layout - MapboxGL 面图层 Layout 配置。
  16189. */var FillStyle=function FillStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,FillStyle);this.layout={visibility:'visible'};this.paint={'fill-opacity':0.8,'fill-color':'#3fb1e3','fill-translate':[0,0],'fill-antialias':true,'fill-outline-color':'#3fb1e3','fill-translate-anchor':'map'};Object.assign(this.paint,paint);Object.assign(this.layout,layout);};exports.default=FillStyle;
  16190. /***/ }),
  16191. /* 138 */
  16192. /***/ (function(module, exports, __webpack_require__) {
  16193. "use strict";
  16194. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));/**
  16195. * @class LineStyle
  16196. * @category BaseTypes Style
  16197. * @classdesc 线图层样式类。
  16198. * @param {mapboxgl.LayersLine} paint - MapboxGL 线图层 Paint 配置。
  16199. * @param {mapboxgl.LayersLine} layout - MapboxGL 线图层 Layout 配置。
  16200. */var LineStyle=function LineStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,LineStyle);this.layout={visibility:'visible','line-cap':'butt','line-join':'miter'};this.paint={'line-opacity':1,'line-color':'#3fb1e3','line-width':3,'line-blur':1};Object.assign(this.paint,paint);Object.assign(this.layout,layout);};exports.default=LineStyle;
  16201. /***/ }),
  16202. /* 139 */
  16203. /***/ (function(module, exports, __webpack_require__) {
  16204. "use strict";
  16205. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));/**
  16206. * @class SymbolStyle
  16207. * @classdesc symbol 图层样式类。
  16208. */var SymbolStyle=function SymbolStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,SymbolStyle);this.paint=Object.assign({},paint);this.layout=Object.assign({visibility:'visible'},layout);};exports.default=SymbolStyle;
  16209. /***/ }),
  16210. /* 140 */
  16211. /***/ (function(module, exports, __webpack_require__) {
  16212. "use strict";
  16213. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _compose2=_interopRequireDefault(__webpack_require__(8));var _react=_interopRequireDefault(__webpack_require__(5));var _lodash=_interopRequireDefault(__webpack_require__(13));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _baseLayer=_interopRequireDefault(__webpack_require__(9));var _FireLayerViewModel=_interopRequireDefault(__webpack_require__(141));var _dec,_class,_class2,_temp;var FireLayer=(_dec=(0,_compose2.default)(_mapGetter.default,_baseLayer.default),_dec(_class=(_temp=_class2=/*#__PURE__*/function(_React$Component){(0,_inherits2.default)(FireLayer,_React$Component);var _super=(0,_createSuper2.default)(FireLayer);function FireLayer(){var _this;(0,_classCallCheck2.default)(this,FireLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;return _this;}(0,_createClass2.default)(FireLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this$props=this.props,features=_this$props.features,modelScale=_this$props.modelScale;if(this.viewModel){if(!(0,_lodash.default)(prevProps.features,features)){this.viewModel.setFeatures(features);}if(prevProps.modelScale!==modelScale){this.viewModel.setModelScale(modelScale);}}}},{key:"loaded",value:function loaded(map){this.viewModel=new _FireLayerViewModel.default(map,this.props.features,this.props.modelScale,this.props.layerId);}},{key:"render",value:function render(){return null;}}]);return FireLayer;}(_react.default.Component),_class2.defaultProps={modelScale:5.41843220338983e-6},_temp))||_class);exports.default=FireLayer;
  16214. /***/ }),
  16215. /* 141 */
  16216. /***/ (function(module, exports, __webpack_require__) {
  16217. "use strict";
  16218. var _interopRequireWildcard=__webpack_require__(19);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(156));var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var THREE=_interopRequireWildcard(__webpack_require__(142));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));var _tendrils=_interopRequireDefault(__webpack_require__(143));var FireLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(FireLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(FireLayerViewModel);function FireLayerViewModel(map,features){var _this;var modelScale=arguments.length>2&&arguments[2]!==undefined?arguments[2]:5.41843220338983e-6;var layerId=arguments.length>3?arguments[3]:undefined;(0,_classCallCheck2.default)(this,FireLayerViewModel);_this=_super.call(this);_this.map=void 0;_this.layerId=void 0;_this.features=void 0;_this.modelScale=void 0;_this.camera=void 0;_this.scene=void 0;_this.renderer=void 0;_this._object=void 0;_this._fireballs=void 0;_this._height=void 0;_this._radius=void 0;_this._fireMaterial=void 0;_this._light=void 0;_this._lightIntensity=void 0;if(!map){throw new Error('map is requierd');}_this.map=map;_this.layerId=layerId;_this.features=features;_this.modelScale=modelScale;_this.features&&_this._addFireLayer();return _this;}(0,_createClass2.default)(FireLayerViewModel,[{key:"setFeatures",value:function setFeatures(features){this.features=features;this._addFireLayer();}},{key:"setModelScale",value:function setModelScale(modelScale){this.modelScale=modelScale;this._addFireLayer();}},{key:"_addFireLayer",value:function _addFireLayer(){var _this2=this;var feature=this.features.features[0];if(feature.geometry.type!=='Point'){throw new Error("Feature's type must be point");}if(this.features.features.length>50){throw new Error('The maximum number of features is 50');}this.features.features.forEach(function(feature,index){var geometry=feature.geometry;if(geometry.type==='Point'){_this2._initializeFireLayer(geometry.coordinates,index);}});}},{key:"_initializeFireLayer",value:function _initializeFireLayer(originCoordinate,index){var _this3=this;var modelTransform=this._getModelTransform(originCoordinate);var layerId=this.layerId&&this.layerId+'-'+index||"threeLayerFire-".concat(new Date());this.map.getLayer(layerId)&&this.map.removeLayer(layerId);var customLayer={id:layerId,type:'custom',renderingMode:'3d',onAdd:function onAdd(map,gl){_this3.camera=new THREE.PerspectiveCamera(45,map.getCanvas().width/map.getCanvas().height,0.1,2000);_this3.scene=new THREE.Scene();_this3.renderer=new THREE.WebGLRenderer({canvas:map.getCanvas(),context:gl,antialias:true});_this3.renderer.autoClear=false;var rig=new THREE.Group();rig.add(_this3.camera);_this3.scene.add(rig);_this3._fire();_this3.scene.add(_this3._object);var light=new THREE.PointLight(0xffffff,1,100);light.position.set(10,10,20);_this3.scene.add(light);_this3.map=map;},render:function render(gl,matrix){var rotationX=new THREE.Matrix4().makeRotationAxis(new THREE.Vector3(1,0,0),modelTransform.rotateX);var rotationY=new THREE.Matrix4().makeRotationAxis(new THREE.Vector3(0,1,0),modelTransform.rotateY);var rotationZ=new THREE.Matrix4().makeRotationAxis(new THREE.Vector3(0,0,1),modelTransform.rotateZ);var m=new THREE.Matrix4().fromArray(matrix);var l=new THREE.Matrix4().makeTranslation(modelTransform.translateX,modelTransform.translateY,modelTransform.translateZ).scale(new THREE.Vector3(modelTransform.scale,-modelTransform.scale,modelTransform.scale)).multiply(rotationX).multiply(rotationY).multiply(rotationZ);_this3.camera.projectionMatrix.elements=matrix;_this3.camera.projectionMatrix=m.multiply(l);_this3.renderer.state.reset();_this3._update();_this3.renderer.render(_this3.scene,_this3.camera);// @ts-ignore
  16219. _this3.map.triggerRepaint();}};// @ts-ignore TODO mapbox-gl types 未更新
  16220. this.map.addLayer(customLayer);}},{key:"_getModelTransform",value:function _getModelTransform(originCoordinate){var modelOrigin=originCoordinate;var modelAltitude=0;var modelRotate=[Math.PI/2,0,0];var modelTransform={translateX:_mapboxGlEnhance.default.MercatorCoordinate.fromLngLat(modelOrigin,modelAltitude).x,translateY:_mapboxGlEnhance.default.MercatorCoordinate.fromLngLat(modelOrigin,modelAltitude).y,translateZ:_mapboxGlEnhance.default.MercatorCoordinate.fromLngLat(modelOrigin,modelAltitude).z,rotateX:modelRotate[0],rotateY:modelRotate[1],rotateZ:modelRotate[2],scale:this.modelScale};return modelTransform;}},{key:"_fire",value:function _fire(){var _this$_object;var density=arguments.length>0&&arguments[0]!==undefined?arguments[0]:150;var height=arguments.length>1&&arguments[1]!==undefined?arguments[1]:8;var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0.2;this._object=new THREE.Group();this._fireballs=[];this._height=height;this._radius=r;var texture=new THREE.TextureLoader().load(_tendrils.default,function(){console.log('loaded');},undefined,function(e){console.log('error',e);});// @ts-ignore
  16221. texture.crossOrigin='';// "anonymous";
  16222. this._fireMaterial=new THREE.ShaderMaterial({uniforms:{time:{value:1.0},blend:{value:1.0},blendPattern:{type:'t',value:texture}},vertexShader:"precision mediump float;\n precision mediump int;\n attribute vec4 color;\n varying vec2 vUv;\n varying float vFade;\n void main()\t{\n vUv = uv;\n vec4 localPosition = vec4( position, 1);\n vFade = clamp((localPosition.y + 3.0) / 6.0, 0.0, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * localPosition;\n }",fragmentShader:"precision mediump float;\n precision mediump int;\n uniform float time;\n uniform float blend;\n uniform sampler2D blendPattern;\n varying float vFade;\n varying vec2 vUv;\n\n\n void main()\t{\n\n vec4 startColor = vec4(1., 0.5, 0.1, 1.0);\n vec4 endColor = vec4(0.2, 0.2, 0.2, 1.0);\n\n float dissolve = texture2D(blendPattern, vUv).r * 0.5;\n\n float spread = 0.4;\n\n float fadeAmount = smoothstep(\n max(0.0, vFade - spread),\n min(1.0, vFade + spread),\n blend + dissolve\n );\n\n vec4 color = mix(\n startColor, endColor,\n smoothstep(0.1,1., fadeAmount)\n );\n\n gl_FragColor = vec4(color.rgb, 1.-fadeAmount);\n }",transparent:true,side:THREE.DoubleSide,blending:THREE.AdditiveBlending});this._light=new THREE.PointLight(0xff5500,1,100);this._light.position.set(0,0.4,0);this._lightIntensity=Math.random()*5;this._object.add(this._light);// this._fireMaterial = new THREE.MeshStandardMaterial(0x661100);
  16223. for(var i=0;i<density;i++){var geometry=new THREE.SphereGeometry(1,32,32);var mat=this._fireMaterial.clone();mat.uniforms.blendPattern.value=texture;mat.needsUpdate=true;var sphere=new THREE.Mesh(geometry,mat);sphere.position.y=Math.random()*height;sphere.position.x=(0.5-Math.random())*this._radius;sphere.position.z=(0.5-Math.random())*this._radius;sphere.rotateX(Math.random()*5);sphere.rotateZ(Math.random()*5);sphere.rotateY(Math.random()*5);// @ts-ignore
  16224. sphere.dirX=(0.5-Math.random())*0.006;// @ts-ignore
  16225. sphere.dirY=0.006;// @ts-ignore
  16226. sphere.dirZ=(0.5-Math.random())*0.006;this._fireballs.push(sphere);}(_this$_object=this._object).add.apply(_this$_object,(0,_toConsumableArray2.default)(this._fireballs));}},{key:"_update",value:function _update(){var _this4=this;this._fireballs.forEach(function(ball){ball.position.y+=ball.dirY;ball.position.x+=Math.sin(ball.position.y)*ball.dirX;ball.position.z+=Math.cos(ball.position.y)*ball.dirZ;if(ball.position.y>_this4._height){ball.position.y=Math.random()*0.1;ball.position.x=(0.5-Math.random())*_this4._radius;ball.position.z=(0.5-Math.random())*_this4._radius;}var p=0.1+ball.position.y/_this4._height;ball.rotateX((1.2-p)*0.01);ball.rotateZ((1.2-p)*0.01);ball.rotateY((1.2-p)*0.01);ball.scale.set(p,p,p);/// ball.opacity = p;
  16227. ball.material.uniforms.blend.value=p;// ball.material.needsUpdate = true;
  16228. });this._light.intensity+=(this._lightIntensity-this._light.intensity)*0.006;if(Math.random()>0.8){this._lightIntensity=Math.random()*5;}}}]);return FireLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=FireLayerViewModel;
  16229. /***/ }),
  16230. /* 142 */
  16231. /***/ (function(module, exports) {
  16232. module.exports = __WEBPACK_EXTERNAL_MODULE__142__;
  16233. /***/ }),
  16234. /* 143 */
  16235. /***/ (function(module, exports) {
  16236. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAMAAACJuGjuAAAAyVBMVEXb29vV1dXr6+vm5ubh4eHPz8/e3t7j4+PIyMjo6OjY2NjMzMzCwsLS0tK3t7e9vb3y8vLFxcWvr6/v7++rq6vu7u6/v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dRl3yy1jbvhaRJDAub5//tw9vNxg7QRY7En4Uq+fabUIW1SNMvSgynGPK5NV98bNekWTGt0Z7B/Ad2pCaUIEcaQJgoWbvydK+AOa1KWbZpXCIwYzBrA2yK/K52OcdLrrQpuQ9LtCBM0SVCPgXi/zt0uemHP5DeELqo47mE4faA8tllvPcqdqwABFudhiVHO1bNeXy+vXMTPVNd8CVY29/P2is/U9m0PgaduY9h8n0mGnxfbt8khJSe1Ou5DMgFVxRcFEwyl3l8RR0WRyIbCVN932PA3WbD9EASdNkRASuvvGm9TYCELaFIBZ6N32ZFoUCnTqasdgkaNBjajqumbdqgQYDs/HLz5Lwocv4pLcgkExSQXfLZ/QjIeto/rrcXPeZdTRDYuSOwmjIkpXe+xa+DeuottgZ11jOwAAAABJRU5ErkJggg=="
  16237. /***/ }),
  16238. /* 144 */
  16239. /***/ (function(module, exports, __webpack_require__) {
  16240. "use strict";
  16241. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _react=__webpack_require__(5);var _lodash=_interopRequireDefault(__webpack_require__(13));var _mapGetter=_interopRequireDefault(__webpack_require__(6));var _AnimateMarkerLayerViewModel=_interopRequireDefault(__webpack_require__(145));var _BreathingApertureMarker=_interopRequireDefault(__webpack_require__(149));var _DiffusedApertureMarker=_interopRequireDefault(__webpack_require__(150));var _HaloRingMarker=_interopRequireDefault(__webpack_require__(151));var _RotatingApertureMarker=_interopRequireDefault(__webpack_require__(152));var _RotatingTextBorderMarker=_interopRequireDefault(__webpack_require__(153));var _FluorescenceMarker=_interopRequireDefault(__webpack_require__(154));var _class,_class2,_temp;var AnimateMarkerLayer=(0,_mapGetter.default)(_class=(_temp=_class2=/*#__PURE__*/function(_Component){(0,_inherits2.default)(AnimateMarkerLayer,_Component);var _super=(0,_createSuper2.default)(AnimateMarkerLayer);function AnimateMarkerLayer(){var _this;(0,_classCallCheck2.default)(this,AnimateMarkerLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.viewModel=void 0;_this.map=void 0;_this.marker=void 0;_this._markersElement=void 0;return _this;}(0,_createClass2.default)(AnimateMarkerLayer,[{key:"componentDidMount",value:function componentDidMount(){this._markersElement=[];}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(this.viewModel&&!(0,_lodash.default)(prevProps.features,this.props.features)){this._markersElement=[];this._getMarkerElement();this.props.features&&this.viewModel.setFeatures(this.props.features,this._markersElement);}if(this.viewModel&&!(0,_lodash.default)(prevProps.type,this.props.type)){this._markersElement=[];this._getMarkerElement();this.viewModel.setType(this._markersElement);}if(this.viewModel&&this.props.width&&prevProps.width!==this.props.width){this.marker&&this.marker.setMarkersWidth(this.props.width);}if(this.viewModel&&this.props.height&&prevProps.height!==this.props.height){this.marker&&this.marker.setMarkersHeight&&this.marker.setMarkersHeight(this.props.height);}if(this.viewModel&&this.props.textColor&&prevProps.textColor!==this.props.textColor){this.marker&&this.marker.setMarkersTextColor(this.props.textColor);}if(this.viewModel&&this.props.textFontSize&&prevProps.textFontSize!==this.props.textFontSize){this.marker&&this.marker.setMarkersTextFontSize(this.props.textFontSize);}if(this.viewModel&&this.props.colors&&this.props.colors.length&&this.props.colors.length>0&&!(0,_lodash.default)(prevProps.colors,this.props.colors)){this.marker&&this.marker.setMarkersTextFontSize(this.props.textFontSize);}if(this.viewModel&&this.props.textField&&prevProps.textField!==this.props.textField){this.marker&&this.marker.setMarkersTextField(this.props.textField);}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.viewModel&&this.viewModel.clearMarkerLayer();}},{key:"loaded",value:function loaded(map){this.props.features&&this._getMarkerElement();this.viewModel=new _AnimateMarkerLayerViewModel.default(map,this.props.features,this._markersElement,this.props.fitBounds);}},{key:"_getMarkerElement",value:function _getMarkerElement(){this.setState({marker:null});var _this$props=this.props,features=_this$props.features,width=_this$props.width,height=_this$props.height,colors=_this$props.colors,textFontSize=_this$props.textFontSize,textColor=_this$props.textColor,textField=_this$props.textField,type=_this$props.type;if(!features||JSON.stringify(features)==='{}'||!features.features){this.viewModel&&this.viewModel.clearMarkerLayer();return;}switch(type){case'rotatingAperture':this.marker=new _RotatingApertureMarker.default(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'haloRing':this.marker=new _HaloRingMarker.default(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'breathingAperture':this.marker=new _BreathingApertureMarker.default(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'diffusedAperture':this.marker=new _DiffusedApertureMarker.default(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'rotatingTextBorder':this.marker=new _RotatingTextBorderMarker.default(features,{width:width,height:height,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'fluorescence':this.marker=new _FluorescenceMarker.default(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;}this.marker&&(this._markersElement=this.marker.getMarkersElement());}},{key:"render",value:function render(){return null;}}]);return AnimateMarkerLayer;}(_react.Component),_class2.defaultProps={type:'breathingAperture',textFontSize:14},_temp))||_class;exports.default=AnimateMarkerLayer;
  16242. /***/ }),
  16243. /* 145 */
  16244. /***/ (function(module, exports, __webpack_require__) {
  16245. "use strict";
  16246. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _mapboxGlEnhance=_interopRequireDefault(__webpack_require__(7));var _envelope=_interopRequireDefault(__webpack_require__(157));var _bbox=_interopRequireDefault(__webpack_require__(146));var _transformScale=_interopRequireDefault(__webpack_require__(155));var AnimateMarkerLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){(0,_inherits2.default)(AnimateMarkerLayerViewModel,_mapboxgl$Evented);var _super=(0,_createSuper2.default)(AnimateMarkerLayerViewModel);function AnimateMarkerLayerViewModel(map,features,markersElement){var _this;var fitBounds=arguments.length>3&&arguments[3]!==undefined?arguments[3]:true;(0,_classCallCheck2.default)(this,AnimateMarkerLayerViewModel);_this=_super.call(this);_this.map=void 0;_this.features=void 0;_this.markers=void 0;_this.markersElement=void 0;_this.fitBounds=void 0;if(!map){throw new Error('map is requierd');}_this.map=map;_this.features=features;_this.markers=[];_this.markersElement=markersElement;_this.fitBounds=fitBounds;_this.features&&_this._initalizeMarkerLayer();return _this;}(0,_createClass2.default)(AnimateMarkerLayerViewModel,[{key:"setType",value:function setType(markersElement){this.markersElement=markersElement;this._initalizeMarkerLayer();}},{key:"setFeatures",value:function setFeatures(features,markersElement){this.markersElement=markersElement;this.features=features;this._initalizeMarkerLayer();}},{key:"_initalizeMarkerLayer",value:function _initalizeMarkerLayer(){if(!this.features||JSON.stringify(this.features)==='{}'){return;}this.clearMarkerLayer();this._createMarker();}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point,index){var marker=new _mapboxGlEnhance.default.Marker(_this2.markersElement[index]||_this2.markersElement[0])// @ts-ignore
  16247. .setLngLat(point.geometry.coordinates).addTo(_this2.map);_this2.markers.push(marker);},this);if(this.fitBounds){// @ts-ignore
  16248. var bounds=(0,_bbox.default)((0,_transformScale.default)((0,_envelope.default)(this.features),1.7));this.fitBounds&&this.map.fitBounds([[bounds[0],bounds[1]],[bounds[2],bounds[3]]],{maxZoom:17});}}},{key:"clearMarkerLayer",value:function clearMarkerLayer(){this.markers.length>0&&this.markers.forEach(function(marker){marker&&marker.remove();});this.markers=[];}}]);return AnimateMarkerLayerViewModel;}(_mapboxGlEnhance.default.Evented);exports.default=AnimateMarkerLayerViewModel;
  16249. /***/ }),
  16250. /* 146 */
  16251. /***/ (function(module, exports, __webpack_require__) {
  16252. "use strict";
  16253. Object.defineProperty(exports, "__esModule", { value: true });
  16254. var meta_1 = __webpack_require__(147);
  16255. /**
  16256. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  16257. *
  16258. * @name bbox
  16259. * @param {GeoJSON} geojson any GeoJSON object
  16260. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  16261. * @example
  16262. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  16263. * var bbox = turf.bbox(line);
  16264. * var bboxPolygon = turf.bboxPolygon(bbox);
  16265. *
  16266. * //addToMap
  16267. * var addToMap = [line, bboxPolygon]
  16268. */
  16269. function bbox(geojson) {
  16270. var result = [Infinity, Infinity, -Infinity, -Infinity];
  16271. meta_1.coordEach(geojson, function (coord) {
  16272. if (result[0] > coord[0]) {
  16273. result[0] = coord[0];
  16274. }
  16275. if (result[1] > coord[1]) {
  16276. result[1] = coord[1];
  16277. }
  16278. if (result[2] < coord[0]) {
  16279. result[2] = coord[0];
  16280. }
  16281. if (result[3] < coord[1]) {
  16282. result[3] = coord[1];
  16283. }
  16284. });
  16285. return result;
  16286. }
  16287. exports.default = bbox;
  16288. /***/ }),
  16289. /* 147 */
  16290. /***/ (function(module, exports, __webpack_require__) {
  16291. "use strict";
  16292. Object.defineProperty(exports, '__esModule', { value: true });
  16293. var helpers = __webpack_require__(148);
  16294. /**
  16295. * Callback for coordEach
  16296. *
  16297. * @callback coordEachCallback
  16298. * @param {Array<number>} currentCoord The current coordinate being processed.
  16299. * @param {number} coordIndex The current index of the coordinate being processed.
  16300. * @param {number} featureIndex The current index of the Feature being processed.
  16301. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16302. * @param {number} geometryIndex The current index of the Geometry being processed.
  16303. */
  16304. /**
  16305. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  16306. *
  16307. * @name coordEach
  16308. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16309. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  16310. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  16311. * @returns {void}
  16312. * @example
  16313. * var features = turf.featureCollection([
  16314. * turf.point([26, 37], {"foo": "bar"}),
  16315. * turf.point([36, 53], {"hello": "world"})
  16316. * ]);
  16317. *
  16318. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  16319. * //=currentCoord
  16320. * //=coordIndex
  16321. * //=featureIndex
  16322. * //=multiFeatureIndex
  16323. * //=geometryIndex
  16324. * });
  16325. */
  16326. function coordEach(geojson, callback, excludeWrapCoord) {
  16327. // Handles null Geometry -- Skips this GeoJSON
  16328. if (geojson === null) return;
  16329. var j, k, l, geometry, stopG, coords,
  16330. geometryMaybeCollection,
  16331. wrapShrink = 0,
  16332. coordIndex = 0,
  16333. isGeometryCollection,
  16334. type = geojson.type,
  16335. isFeatureCollection = type === 'FeatureCollection',
  16336. isFeature = type === 'Feature',
  16337. stop = isFeatureCollection ? geojson.features.length : 1;
  16338. // This logic may look a little weird. The reason why it is that way
  16339. // is because it's trying to be fast. GeoJSON supports multiple kinds
  16340. // of objects at its root: FeatureCollection, Features, Geometries.
  16341. // This function has the responsibility of handling all of them, and that
  16342. // means that some of the `for` loops you see below actually just don't apply
  16343. // to certain inputs. For instance, if you give this just a
  16344. // Point geometry, then both loops are short-circuited and all we do
  16345. // is gradually rename the input until it's called 'geometry'.
  16346. //
  16347. // This also aims to allocate as few resources as possible: just a
  16348. // few numbers and booleans, rather than any temporary arrays as would
  16349. // be required with the normalization approach.
  16350. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  16351. geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :
  16352. (isFeature ? geojson.geometry : geojson));
  16353. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  16354. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  16355. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  16356. var multiFeatureIndex = 0;
  16357. var geometryIndex = 0;
  16358. geometry = isGeometryCollection ?
  16359. geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;
  16360. // Handles null Geometry -- Skips this geometry
  16361. if (geometry === null) continue;
  16362. coords = geometry.coordinates;
  16363. var geomType = geometry.type;
  16364. wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;
  16365. switch (geomType) {
  16366. case null:
  16367. break;
  16368. case 'Point':
  16369. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  16370. coordIndex++;
  16371. multiFeatureIndex++;
  16372. break;
  16373. case 'LineString':
  16374. case 'MultiPoint':
  16375. for (j = 0; j < coords.length; j++) {
  16376. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  16377. coordIndex++;
  16378. if (geomType === 'MultiPoint') multiFeatureIndex++;
  16379. }
  16380. if (geomType === 'LineString') multiFeatureIndex++;
  16381. break;
  16382. case 'Polygon':
  16383. case 'MultiLineString':
  16384. for (j = 0; j < coords.length; j++) {
  16385. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  16386. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  16387. coordIndex++;
  16388. }
  16389. if (geomType === 'MultiLineString') multiFeatureIndex++;
  16390. if (geomType === 'Polygon') geometryIndex++;
  16391. }
  16392. if (geomType === 'Polygon') multiFeatureIndex++;
  16393. break;
  16394. case 'MultiPolygon':
  16395. for (j = 0; j < coords.length; j++) {
  16396. geometryIndex = 0;
  16397. for (k = 0; k < coords[j].length; k++) {
  16398. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  16399. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  16400. coordIndex++;
  16401. }
  16402. geometryIndex++;
  16403. }
  16404. multiFeatureIndex++;
  16405. }
  16406. break;
  16407. case 'GeometryCollection':
  16408. for (j = 0; j < geometry.geometries.length; j++)
  16409. if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  16410. break;
  16411. default:
  16412. throw new Error('Unknown Geometry Type');
  16413. }
  16414. }
  16415. }
  16416. }
  16417. /**
  16418. * Callback for coordReduce
  16419. *
  16420. * The first time the callback function is called, the values provided as arguments depend
  16421. * on whether the reduce method has an initialValue argument.
  16422. *
  16423. * If an initialValue is provided to the reduce method:
  16424. * - The previousValue argument is initialValue.
  16425. * - The currentValue argument is the value of the first element present in the array.
  16426. *
  16427. * If an initialValue is not provided:
  16428. * - The previousValue argument is the value of the first element present in the array.
  16429. * - The currentValue argument is the value of the second element present in the array.
  16430. *
  16431. * @callback coordReduceCallback
  16432. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16433. * of the callback, or initialValue, if supplied.
  16434. * @param {Array<number>} currentCoord The current coordinate being processed.
  16435. * @param {number} coordIndex The current index of the coordinate being processed.
  16436. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  16437. * @param {number} featureIndex The current index of the Feature being processed.
  16438. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16439. * @param {number} geometryIndex The current index of the Geometry being processed.
  16440. */
  16441. /**
  16442. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  16443. *
  16444. * @name coordReduce
  16445. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  16446. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  16447. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16448. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  16449. * @returns {*} The value that results from the reduction.
  16450. * @example
  16451. * var features = turf.featureCollection([
  16452. * turf.point([26, 37], {"foo": "bar"}),
  16453. * turf.point([36, 53], {"hello": "world"})
  16454. * ]);
  16455. *
  16456. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  16457. * //=previousValue
  16458. * //=currentCoord
  16459. * //=coordIndex
  16460. * //=featureIndex
  16461. * //=multiFeatureIndex
  16462. * //=geometryIndex
  16463. * return currentCoord;
  16464. * });
  16465. */
  16466. function coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  16467. var previousValue = initialValue;
  16468. coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  16469. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;
  16470. else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  16471. }, excludeWrapCoord);
  16472. return previousValue;
  16473. }
  16474. /**
  16475. * Callback for propEach
  16476. *
  16477. * @callback propEachCallback
  16478. * @param {Object} currentProperties The current Properties being processed.
  16479. * @param {number} featureIndex The current index of the Feature being processed.
  16480. */
  16481. /**
  16482. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  16483. *
  16484. * @name propEach
  16485. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  16486. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  16487. * @returns {void}
  16488. * @example
  16489. * var features = turf.featureCollection([
  16490. * turf.point([26, 37], {foo: 'bar'}),
  16491. * turf.point([36, 53], {hello: 'world'})
  16492. * ]);
  16493. *
  16494. * turf.propEach(features, function (currentProperties, featureIndex) {
  16495. * //=currentProperties
  16496. * //=featureIndex
  16497. * });
  16498. */
  16499. function propEach(geojson, callback) {
  16500. var i;
  16501. switch (geojson.type) {
  16502. case 'FeatureCollection':
  16503. for (i = 0; i < geojson.features.length; i++) {
  16504. if (callback(geojson.features[i].properties, i) === false) break;
  16505. }
  16506. break;
  16507. case 'Feature':
  16508. callback(geojson.properties, 0);
  16509. break;
  16510. }
  16511. }
  16512. /**
  16513. * Callback for propReduce
  16514. *
  16515. * The first time the callback function is called, the values provided as arguments depend
  16516. * on whether the reduce method has an initialValue argument.
  16517. *
  16518. * If an initialValue is provided to the reduce method:
  16519. * - The previousValue argument is initialValue.
  16520. * - The currentValue argument is the value of the first element present in the array.
  16521. *
  16522. * If an initialValue is not provided:
  16523. * - The previousValue argument is the value of the first element present in the array.
  16524. * - The currentValue argument is the value of the second element present in the array.
  16525. *
  16526. * @callback propReduceCallback
  16527. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16528. * of the callback, or initialValue, if supplied.
  16529. * @param {*} currentProperties The current Properties being processed.
  16530. * @param {number} featureIndex The current index of the Feature being processed.
  16531. */
  16532. /**
  16533. * Reduce properties in any GeoJSON object into a single value,
  16534. * similar to how Array.reduce works. However, in this case we lazily run
  16535. * the reduction, so an array of all properties is unnecessary.
  16536. *
  16537. * @name propReduce
  16538. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  16539. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  16540. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16541. * @returns {*} The value that results from the reduction.
  16542. * @example
  16543. * var features = turf.featureCollection([
  16544. * turf.point([26, 37], {foo: 'bar'}),
  16545. * turf.point([36, 53], {hello: 'world'})
  16546. * ]);
  16547. *
  16548. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  16549. * //=previousValue
  16550. * //=currentProperties
  16551. * //=featureIndex
  16552. * return currentProperties
  16553. * });
  16554. */
  16555. function propReduce(geojson, callback, initialValue) {
  16556. var previousValue = initialValue;
  16557. propEach(geojson, function (currentProperties, featureIndex) {
  16558. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;
  16559. else previousValue = callback(previousValue, currentProperties, featureIndex);
  16560. });
  16561. return previousValue;
  16562. }
  16563. /**
  16564. * Callback for featureEach
  16565. *
  16566. * @callback featureEachCallback
  16567. * @param {Feature<any>} currentFeature The current Feature being processed.
  16568. * @param {number} featureIndex The current index of the Feature being processed.
  16569. */
  16570. /**
  16571. * Iterate over features in any GeoJSON object, similar to
  16572. * Array.forEach.
  16573. *
  16574. * @name featureEach
  16575. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16576. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  16577. * @returns {void}
  16578. * @example
  16579. * var features = turf.featureCollection([
  16580. * turf.point([26, 37], {foo: 'bar'}),
  16581. * turf.point([36, 53], {hello: 'world'})
  16582. * ]);
  16583. *
  16584. * turf.featureEach(features, function (currentFeature, featureIndex) {
  16585. * //=currentFeature
  16586. * //=featureIndex
  16587. * });
  16588. */
  16589. function featureEach(geojson, callback) {
  16590. if (geojson.type === 'Feature') {
  16591. callback(geojson, 0);
  16592. } else if (geojson.type === 'FeatureCollection') {
  16593. for (var i = 0; i < geojson.features.length; i++) {
  16594. if (callback(geojson.features[i], i) === false) break;
  16595. }
  16596. }
  16597. }
  16598. /**
  16599. * Callback for featureReduce
  16600. *
  16601. * The first time the callback function is called, the values provided as arguments depend
  16602. * on whether the reduce method has an initialValue argument.
  16603. *
  16604. * If an initialValue is provided to the reduce method:
  16605. * - The previousValue argument is initialValue.
  16606. * - The currentValue argument is the value of the first element present in the array.
  16607. *
  16608. * If an initialValue is not provided:
  16609. * - The previousValue argument is the value of the first element present in the array.
  16610. * - The currentValue argument is the value of the second element present in the array.
  16611. *
  16612. * @callback featureReduceCallback
  16613. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16614. * of the callback, or initialValue, if supplied.
  16615. * @param {Feature} currentFeature The current Feature being processed.
  16616. * @param {number} featureIndex The current index of the Feature being processed.
  16617. */
  16618. /**
  16619. * Reduce features in any GeoJSON object, similar to Array.reduce().
  16620. *
  16621. * @name featureReduce
  16622. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16623. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  16624. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16625. * @returns {*} The value that results from the reduction.
  16626. * @example
  16627. * var features = turf.featureCollection([
  16628. * turf.point([26, 37], {"foo": "bar"}),
  16629. * turf.point([36, 53], {"hello": "world"})
  16630. * ]);
  16631. *
  16632. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  16633. * //=previousValue
  16634. * //=currentFeature
  16635. * //=featureIndex
  16636. * return currentFeature
  16637. * });
  16638. */
  16639. function featureReduce(geojson, callback, initialValue) {
  16640. var previousValue = initialValue;
  16641. featureEach(geojson, function (currentFeature, featureIndex) {
  16642. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  16643. else previousValue = callback(previousValue, currentFeature, featureIndex);
  16644. });
  16645. return previousValue;
  16646. }
  16647. /**
  16648. * Get all coordinates from any GeoJSON object.
  16649. *
  16650. * @name coordAll
  16651. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16652. * @returns {Array<Array<number>>} coordinate position array
  16653. * @example
  16654. * var features = turf.featureCollection([
  16655. * turf.point([26, 37], {foo: 'bar'}),
  16656. * turf.point([36, 53], {hello: 'world'})
  16657. * ]);
  16658. *
  16659. * var coords = turf.coordAll(features);
  16660. * //= [[26, 37], [36, 53]]
  16661. */
  16662. function coordAll(geojson) {
  16663. var coords = [];
  16664. coordEach(geojson, function (coord) {
  16665. coords.push(coord);
  16666. });
  16667. return coords;
  16668. }
  16669. /**
  16670. * Callback for geomEach
  16671. *
  16672. * @callback geomEachCallback
  16673. * @param {Geometry} currentGeometry The current Geometry being processed.
  16674. * @param {number} featureIndex The current index of the Feature being processed.
  16675. * @param {Object} featureProperties The current Feature Properties being processed.
  16676. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  16677. * @param {number|string} featureId The current Feature Id being processed.
  16678. */
  16679. /**
  16680. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  16681. *
  16682. * @name geomEach
  16683. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16684. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  16685. * @returns {void}
  16686. * @example
  16687. * var features = turf.featureCollection([
  16688. * turf.point([26, 37], {foo: 'bar'}),
  16689. * turf.point([36, 53], {hello: 'world'})
  16690. * ]);
  16691. *
  16692. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  16693. * //=currentGeometry
  16694. * //=featureIndex
  16695. * //=featureProperties
  16696. * //=featureBBox
  16697. * //=featureId
  16698. * });
  16699. */
  16700. function geomEach(geojson, callback) {
  16701. var i, j, g, geometry, stopG,
  16702. geometryMaybeCollection,
  16703. isGeometryCollection,
  16704. featureProperties,
  16705. featureBBox,
  16706. featureId,
  16707. featureIndex = 0,
  16708. isFeatureCollection = geojson.type === 'FeatureCollection',
  16709. isFeature = geojson.type === 'Feature',
  16710. stop = isFeatureCollection ? geojson.features.length : 1;
  16711. // This logic may look a little weird. The reason why it is that way
  16712. // is because it's trying to be fast. GeoJSON supports multiple kinds
  16713. // of objects at its root: FeatureCollection, Features, Geometries.
  16714. // This function has the responsibility of handling all of them, and that
  16715. // means that some of the `for` loops you see below actually just don't apply
  16716. // to certain inputs. For instance, if you give this just a
  16717. // Point geometry, then both loops are short-circuited and all we do
  16718. // is gradually rename the input until it's called 'geometry'.
  16719. //
  16720. // This also aims to allocate as few resources as possible: just a
  16721. // few numbers and booleans, rather than any temporary arrays as would
  16722. // be required with the normalization approach.
  16723. for (i = 0; i < stop; i++) {
  16724. geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :
  16725. (isFeature ? geojson.geometry : geojson));
  16726. featureProperties = (isFeatureCollection ? geojson.features[i].properties :
  16727. (isFeature ? geojson.properties : {}));
  16728. featureBBox = (isFeatureCollection ? geojson.features[i].bbox :
  16729. (isFeature ? geojson.bbox : undefined));
  16730. featureId = (isFeatureCollection ? geojson.features[i].id :
  16731. (isFeature ? geojson.id : undefined));
  16732. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  16733. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  16734. for (g = 0; g < stopG; g++) {
  16735. geometry = isGeometryCollection ?
  16736. geometryMaybeCollection.geometries[g] : geometryMaybeCollection;
  16737. // Handle null Geometry
  16738. if (geometry === null) {
  16739. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  16740. continue;
  16741. }
  16742. switch (geometry.type) {
  16743. case 'Point':
  16744. case 'LineString':
  16745. case 'MultiPoint':
  16746. case 'Polygon':
  16747. case 'MultiLineString':
  16748. case 'MultiPolygon': {
  16749. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  16750. break;
  16751. }
  16752. case 'GeometryCollection': {
  16753. for (j = 0; j < geometry.geometries.length; j++) {
  16754. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  16755. }
  16756. break;
  16757. }
  16758. default:
  16759. throw new Error('Unknown Geometry Type');
  16760. }
  16761. }
  16762. // Only increase `featureIndex` per each feature
  16763. featureIndex++;
  16764. }
  16765. }
  16766. /**
  16767. * Callback for geomReduce
  16768. *
  16769. * The first time the callback function is called, the values provided as arguments depend
  16770. * on whether the reduce method has an initialValue argument.
  16771. *
  16772. * If an initialValue is provided to the reduce method:
  16773. * - The previousValue argument is initialValue.
  16774. * - The currentValue argument is the value of the first element present in the array.
  16775. *
  16776. * If an initialValue is not provided:
  16777. * - The previousValue argument is the value of the first element present in the array.
  16778. * - The currentValue argument is the value of the second element present in the array.
  16779. *
  16780. * @callback geomReduceCallback
  16781. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16782. * of the callback, or initialValue, if supplied.
  16783. * @param {Geometry} currentGeometry The current Geometry being processed.
  16784. * @param {number} featureIndex The current index of the Feature being processed.
  16785. * @param {Object} featureProperties The current Feature Properties being processed.
  16786. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  16787. * @param {number|string} featureId The current Feature Id being processed.
  16788. */
  16789. /**
  16790. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  16791. *
  16792. * @name geomReduce
  16793. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16794. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  16795. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16796. * @returns {*} The value that results from the reduction.
  16797. * @example
  16798. * var features = turf.featureCollection([
  16799. * turf.point([26, 37], {foo: 'bar'}),
  16800. * turf.point([36, 53], {hello: 'world'})
  16801. * ]);
  16802. *
  16803. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  16804. * //=previousValue
  16805. * //=currentGeometry
  16806. * //=featureIndex
  16807. * //=featureProperties
  16808. * //=featureBBox
  16809. * //=featureId
  16810. * return currentGeometry
  16811. * });
  16812. */
  16813. function geomReduce(geojson, callback, initialValue) {
  16814. var previousValue = initialValue;
  16815. geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  16816. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;
  16817. else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  16818. });
  16819. return previousValue;
  16820. }
  16821. /**
  16822. * Callback for flattenEach
  16823. *
  16824. * @callback flattenEachCallback
  16825. * @param {Feature} currentFeature The current flattened feature being processed.
  16826. * @param {number} featureIndex The current index of the Feature being processed.
  16827. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16828. */
  16829. /**
  16830. * Iterate over flattened features in any GeoJSON object, similar to
  16831. * Array.forEach.
  16832. *
  16833. * @name flattenEach
  16834. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16835. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  16836. * @example
  16837. * var features = turf.featureCollection([
  16838. * turf.point([26, 37], {foo: 'bar'}),
  16839. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  16840. * ]);
  16841. *
  16842. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  16843. * //=currentFeature
  16844. * //=featureIndex
  16845. * //=multiFeatureIndex
  16846. * });
  16847. */
  16848. function flattenEach(geojson, callback) {
  16849. geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  16850. // Callback for single geometry
  16851. var type = (geometry === null) ? null : geometry.type;
  16852. switch (type) {
  16853. case null:
  16854. case 'Point':
  16855. case 'LineString':
  16856. case 'Polygon':
  16857. if (callback(helpers.feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0) === false) return false;
  16858. return;
  16859. }
  16860. var geomType;
  16861. // Callback for multi-geometry
  16862. switch (type) {
  16863. case 'MultiPoint':
  16864. geomType = 'Point';
  16865. break;
  16866. case 'MultiLineString':
  16867. geomType = 'LineString';
  16868. break;
  16869. case 'MultiPolygon':
  16870. geomType = 'Polygon';
  16871. break;
  16872. }
  16873. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  16874. var coordinate = geometry.coordinates[multiFeatureIndex];
  16875. var geom = {
  16876. type: geomType,
  16877. coordinates: coordinate
  16878. };
  16879. if (callback(helpers.feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  16880. }
  16881. });
  16882. }
  16883. /**
  16884. * Callback for flattenReduce
  16885. *
  16886. * The first time the callback function is called, the values provided as arguments depend
  16887. * on whether the reduce method has an initialValue argument.
  16888. *
  16889. * If an initialValue is provided to the reduce method:
  16890. * - The previousValue argument is initialValue.
  16891. * - The currentValue argument is the value of the first element present in the array.
  16892. *
  16893. * If an initialValue is not provided:
  16894. * - The previousValue argument is the value of the first element present in the array.
  16895. * - The currentValue argument is the value of the second element present in the array.
  16896. *
  16897. * @callback flattenReduceCallback
  16898. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16899. * of the callback, or initialValue, if supplied.
  16900. * @param {Feature} currentFeature The current Feature being processed.
  16901. * @param {number} featureIndex The current index of the Feature being processed.
  16902. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16903. */
  16904. /**
  16905. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  16906. *
  16907. * @name flattenReduce
  16908. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16909. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  16910. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16911. * @returns {*} The value that results from the reduction.
  16912. * @example
  16913. * var features = turf.featureCollection([
  16914. * turf.point([26, 37], {foo: 'bar'}),
  16915. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  16916. * ]);
  16917. *
  16918. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  16919. * //=previousValue
  16920. * //=currentFeature
  16921. * //=featureIndex
  16922. * //=multiFeatureIndex
  16923. * return currentFeature
  16924. * });
  16925. */
  16926. function flattenReduce(geojson, callback, initialValue) {
  16927. var previousValue = initialValue;
  16928. flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  16929. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  16930. else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  16931. });
  16932. return previousValue;
  16933. }
  16934. /**
  16935. * Callback for segmentEach
  16936. *
  16937. * @callback segmentEachCallback
  16938. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  16939. * @param {number} featureIndex The current index of the Feature being processed.
  16940. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16941. * @param {number} geometryIndex The current index of the Geometry being processed.
  16942. * @param {number} segmentIndex The current index of the Segment being processed.
  16943. * @returns {void}
  16944. */
  16945. /**
  16946. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  16947. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  16948. *
  16949. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  16950. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  16951. * @returns {void}
  16952. * @example
  16953. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  16954. *
  16955. * // Iterate over GeoJSON by 2-vertex segments
  16956. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  16957. * //=currentSegment
  16958. * //=featureIndex
  16959. * //=multiFeatureIndex
  16960. * //=geometryIndex
  16961. * //=segmentIndex
  16962. * });
  16963. *
  16964. * // Calculate the total number of segments
  16965. * var total = 0;
  16966. * turf.segmentEach(polygon, function () {
  16967. * total++;
  16968. * });
  16969. */
  16970. function segmentEach(geojson, callback) {
  16971. flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {
  16972. var segmentIndex = 0;
  16973. // Exclude null Geometries
  16974. if (!feature.geometry) return;
  16975. // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  16976. var type = feature.geometry.type;
  16977. if (type === 'Point' || type === 'MultiPoint') return;
  16978. // Generate 2-vertex line segments
  16979. var previousCoords;
  16980. var previousFeatureIndex = 0;
  16981. var previousMultiIndex = 0;
  16982. var prevGeomIndex = 0;
  16983. if (coordEach(feature, function (currentCoord, coordIndex, featureIndexCoord, multiPartIndexCoord, geometryIndex) {
  16984. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  16985. if (previousCoords === undefined || featureIndex > previousFeatureIndex || multiPartIndexCoord > previousMultiIndex || geometryIndex > prevGeomIndex) {
  16986. previousCoords = currentCoord;
  16987. previousFeatureIndex = featureIndex;
  16988. previousMultiIndex = multiPartIndexCoord;
  16989. prevGeomIndex = geometryIndex;
  16990. segmentIndex = 0;
  16991. return;
  16992. }
  16993. var currentSegment = helpers.lineString([previousCoords, currentCoord], feature.properties);
  16994. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  16995. segmentIndex++;
  16996. previousCoords = currentCoord;
  16997. }) === false) return false;
  16998. });
  16999. }
  17000. /**
  17001. * Callback for segmentReduce
  17002. *
  17003. * The first time the callback function is called, the values provided as arguments depend
  17004. * on whether the reduce method has an initialValue argument.
  17005. *
  17006. * If an initialValue is provided to the reduce method:
  17007. * - The previousValue argument is initialValue.
  17008. * - The currentValue argument is the value of the first element present in the array.
  17009. *
  17010. * If an initialValue is not provided:
  17011. * - The previousValue argument is the value of the first element present in the array.
  17012. * - The currentValue argument is the value of the second element present in the array.
  17013. *
  17014. * @callback segmentReduceCallback
  17015. * @param {*} previousValue The accumulated value previously returned in the last invocation
  17016. * of the callback, or initialValue, if supplied.
  17017. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  17018. * @param {number} featureIndex The current index of the Feature being processed.
  17019. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  17020. * @param {number} geometryIndex The current index of the Geometry being processed.
  17021. * @param {number} segmentIndex The current index of the Segment being processed.
  17022. */
  17023. /**
  17024. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  17025. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  17026. *
  17027. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  17028. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  17029. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  17030. * @returns {void}
  17031. * @example
  17032. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  17033. *
  17034. * // Iterate over GeoJSON by 2-vertex segments
  17035. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  17036. * //= previousSegment
  17037. * //= currentSegment
  17038. * //= featureIndex
  17039. * //= multiFeatureIndex
  17040. * //= geometryIndex
  17041. * //= segmentInex
  17042. * return currentSegment
  17043. * });
  17044. *
  17045. * // Calculate the total number of segments
  17046. * var initialValue = 0
  17047. * var total = turf.segmentReduce(polygon, function (previousValue) {
  17048. * previousValue++;
  17049. * return previousValue;
  17050. * }, initialValue);
  17051. */
  17052. function segmentReduce(geojson, callback, initialValue) {
  17053. var previousValue = initialValue;
  17054. var started = false;
  17055. segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  17056. if (started === false && initialValue === undefined) previousValue = currentSegment;
  17057. else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  17058. started = true;
  17059. });
  17060. return previousValue;
  17061. }
  17062. /**
  17063. * Callback for lineEach
  17064. *
  17065. * @callback lineEachCallback
  17066. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  17067. * @param {number} featureIndex The current index of the Feature being processed
  17068. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  17069. * @param {number} geometryIndex The current index of the Geometry being processed
  17070. */
  17071. /**
  17072. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  17073. * similar to Array.forEach.
  17074. *
  17075. * @name lineEach
  17076. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  17077. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  17078. * @example
  17079. * var multiLine = turf.multiLineString([
  17080. * [[26, 37], [35, 45]],
  17081. * [[36, 53], [38, 50], [41, 55]]
  17082. * ]);
  17083. *
  17084. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  17085. * //=currentLine
  17086. * //=featureIndex
  17087. * //=multiFeatureIndex
  17088. * //=geometryIndex
  17089. * });
  17090. */
  17091. function lineEach(geojson, callback) {
  17092. // validation
  17093. if (!geojson) throw new Error('geojson is required');
  17094. flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {
  17095. if (feature.geometry === null) return;
  17096. var type = feature.geometry.type;
  17097. var coords = feature.geometry.coordinates;
  17098. switch (type) {
  17099. case 'LineString':
  17100. if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  17101. break;
  17102. case 'Polygon':
  17103. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  17104. if (callback(helpers.lineString(coords[geometryIndex], feature.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  17105. }
  17106. break;
  17107. }
  17108. });
  17109. }
  17110. /**
  17111. * Callback for lineReduce
  17112. *
  17113. * The first time the callback function is called, the values provided as arguments depend
  17114. * on whether the reduce method has an initialValue argument.
  17115. *
  17116. * If an initialValue is provided to the reduce method:
  17117. * - The previousValue argument is initialValue.
  17118. * - The currentValue argument is the value of the first element present in the array.
  17119. *
  17120. * If an initialValue is not provided:
  17121. * - The previousValue argument is the value of the first element present in the array.
  17122. * - The currentValue argument is the value of the second element present in the array.
  17123. *
  17124. * @callback lineReduceCallback
  17125. * @param {*} previousValue The accumulated value previously returned in the last invocation
  17126. * of the callback, or initialValue, if supplied.
  17127. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  17128. * @param {number} featureIndex The current index of the Feature being processed
  17129. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  17130. * @param {number} geometryIndex The current index of the Geometry being processed
  17131. */
  17132. /**
  17133. * Reduce features in any GeoJSON object, similar to Array.reduce().
  17134. *
  17135. * @name lineReduce
  17136. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  17137. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  17138. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  17139. * @returns {*} The value that results from the reduction.
  17140. * @example
  17141. * var multiPoly = turf.multiPolygon([
  17142. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  17143. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  17144. * ]);
  17145. *
  17146. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  17147. * //=previousValue
  17148. * //=currentLine
  17149. * //=featureIndex
  17150. * //=multiFeatureIndex
  17151. * //=geometryIndex
  17152. * return currentLine
  17153. * });
  17154. */
  17155. function lineReduce(geojson, callback, initialValue) {
  17156. var previousValue = initialValue;
  17157. lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  17158. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;
  17159. else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  17160. });
  17161. return previousValue;
  17162. }
  17163. /**
  17164. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  17165. *
  17166. * Negative indexes are permitted.
  17167. * Point & MultiPoint will always return null.
  17168. *
  17169. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  17170. * @param {Object} [options={}] Optional parameters
  17171. * @param {number} [options.featureIndex=0] Feature Index
  17172. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  17173. * @param {number} [options.geometryIndex=0] Geometry Index
  17174. * @param {number} [options.segmentIndex=0] Segment Index
  17175. * @param {Object} [options.properties={}] Translate Properties to output LineString
  17176. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  17177. * @param {number|string} [options.id={}] Translate Id to output LineString
  17178. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  17179. * @example
  17180. * var multiLine = turf.multiLineString([
  17181. * [[10, 10], [50, 30], [30, 40]],
  17182. * [[-10, -10], [-50, -30], [-30, -40]]
  17183. * ]);
  17184. *
  17185. * // First Segment (defaults are 0)
  17186. * turf.findSegment(multiLine);
  17187. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  17188. *
  17189. * // First Segment of 2nd Multi Feature
  17190. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  17191. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  17192. *
  17193. * // Last Segment of Last Multi Feature
  17194. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  17195. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  17196. */
  17197. function findSegment(geojson, options) {
  17198. // Optional Parameters
  17199. options = options || {};
  17200. if (!helpers.isObject(options)) throw new Error('options is invalid');
  17201. var featureIndex = options.featureIndex || 0;
  17202. var multiFeatureIndex = options.multiFeatureIndex || 0;
  17203. var geometryIndex = options.geometryIndex || 0;
  17204. var segmentIndex = options.segmentIndex || 0;
  17205. // Find FeatureIndex
  17206. var properties = options.properties;
  17207. var geometry;
  17208. switch (geojson.type) {
  17209. case 'FeatureCollection':
  17210. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  17211. properties = properties || geojson.features[featureIndex].properties;
  17212. geometry = geojson.features[featureIndex].geometry;
  17213. break;
  17214. case 'Feature':
  17215. properties = properties || geojson.properties;
  17216. geometry = geojson.geometry;
  17217. break;
  17218. case 'Point':
  17219. case 'MultiPoint':
  17220. return null;
  17221. case 'LineString':
  17222. case 'Polygon':
  17223. case 'MultiLineString':
  17224. case 'MultiPolygon':
  17225. geometry = geojson;
  17226. break;
  17227. default:
  17228. throw new Error('geojson is invalid');
  17229. }
  17230. // Find SegmentIndex
  17231. if (geometry === null) return null;
  17232. var coords = geometry.coordinates;
  17233. switch (geometry.type) {
  17234. case 'Point':
  17235. case 'MultiPoint':
  17236. return null;
  17237. case 'LineString':
  17238. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  17239. return helpers.lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  17240. case 'Polygon':
  17241. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  17242. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  17243. return helpers.lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  17244. case 'MultiLineString':
  17245. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17246. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  17247. return helpers.lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  17248. case 'MultiPolygon':
  17249. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17250. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  17251. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  17252. return helpers.lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  17253. }
  17254. throw new Error('geojson is invalid');
  17255. }
  17256. /**
  17257. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  17258. *
  17259. * Negative indexes are permitted.
  17260. *
  17261. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  17262. * @param {Object} [options={}] Optional parameters
  17263. * @param {number} [options.featureIndex=0] Feature Index
  17264. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  17265. * @param {number} [options.geometryIndex=0] Geometry Index
  17266. * @param {number} [options.coordIndex=0] Coord Index
  17267. * @param {Object} [options.properties={}] Translate Properties to output Point
  17268. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  17269. * @param {number|string} [options.id={}] Translate Id to output Point
  17270. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  17271. * @example
  17272. * var multiLine = turf.multiLineString([
  17273. * [[10, 10], [50, 30], [30, 40]],
  17274. * [[-10, -10], [-50, -30], [-30, -40]]
  17275. * ]);
  17276. *
  17277. * // First Segment (defaults are 0)
  17278. * turf.findPoint(multiLine);
  17279. * // => Feature<Point<[10, 10]>>
  17280. *
  17281. * // First Segment of the 2nd Multi-Feature
  17282. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  17283. * // => Feature<Point<[-10, -10]>>
  17284. *
  17285. * // Last Segment of last Multi-Feature
  17286. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  17287. * // => Feature<Point<[-30, -40]>>
  17288. */
  17289. function findPoint(geojson, options) {
  17290. // Optional Parameters
  17291. options = options || {};
  17292. if (!helpers.isObject(options)) throw new Error('options is invalid');
  17293. var featureIndex = options.featureIndex || 0;
  17294. var multiFeatureIndex = options.multiFeatureIndex || 0;
  17295. var geometryIndex = options.geometryIndex || 0;
  17296. var coordIndex = options.coordIndex || 0;
  17297. // Find FeatureIndex
  17298. var properties = options.properties;
  17299. var geometry;
  17300. switch (geojson.type) {
  17301. case 'FeatureCollection':
  17302. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  17303. properties = properties || geojson.features[featureIndex].properties;
  17304. geometry = geojson.features[featureIndex].geometry;
  17305. break;
  17306. case 'Feature':
  17307. properties = properties || geojson.properties;
  17308. geometry = geojson.geometry;
  17309. break;
  17310. case 'Point':
  17311. case 'MultiPoint':
  17312. return null;
  17313. case 'LineString':
  17314. case 'Polygon':
  17315. case 'MultiLineString':
  17316. case 'MultiPolygon':
  17317. geometry = geojson;
  17318. break;
  17319. default:
  17320. throw new Error('geojson is invalid');
  17321. }
  17322. // Find Coord Index
  17323. if (geometry === null) return null;
  17324. var coords = geometry.coordinates;
  17325. switch (geometry.type) {
  17326. case 'Point':
  17327. return helpers.point(coords, properties, options);
  17328. case 'MultiPoint':
  17329. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17330. return helpers.point(coords[multiFeatureIndex], properties, options);
  17331. case 'LineString':
  17332. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  17333. return helpers.point(coords[coordIndex], properties, options);
  17334. case 'Polygon':
  17335. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  17336. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  17337. return helpers.point(coords[geometryIndex][coordIndex], properties, options);
  17338. case 'MultiLineString':
  17339. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17340. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  17341. return helpers.point(coords[multiFeatureIndex][coordIndex], properties, options);
  17342. case 'MultiPolygon':
  17343. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17344. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  17345. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  17346. return helpers.point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  17347. }
  17348. throw new Error('geojson is invalid');
  17349. }
  17350. exports.coordEach = coordEach;
  17351. exports.coordReduce = coordReduce;
  17352. exports.propEach = propEach;
  17353. exports.propReduce = propReduce;
  17354. exports.featureEach = featureEach;
  17355. exports.featureReduce = featureReduce;
  17356. exports.coordAll = coordAll;
  17357. exports.geomEach = geomEach;
  17358. exports.geomReduce = geomReduce;
  17359. exports.flattenEach = flattenEach;
  17360. exports.flattenReduce = flattenReduce;
  17361. exports.segmentEach = segmentEach;
  17362. exports.segmentReduce = segmentReduce;
  17363. exports.lineEach = lineEach;
  17364. exports.lineReduce = lineReduce;
  17365. exports.findSegment = findSegment;
  17366. exports.findPoint = findPoint;
  17367. /***/ }),
  17368. /* 148 */
  17369. /***/ (function(module, exports, __webpack_require__) {
  17370. "use strict";
  17371. Object.defineProperty(exports, "__esModule", { value: true });
  17372. /**
  17373. * @module helpers
  17374. */
  17375. /**
  17376. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  17377. *
  17378. * @memberof helpers
  17379. * @type {number}
  17380. */
  17381. exports.earthRadius = 6371008.8;
  17382. /**
  17383. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  17384. *
  17385. * @memberof helpers
  17386. * @type {Object}
  17387. */
  17388. exports.factors = {
  17389. centimeters: exports.earthRadius * 100,
  17390. centimetres: exports.earthRadius * 100,
  17391. degrees: exports.earthRadius / 111325,
  17392. feet: exports.earthRadius * 3.28084,
  17393. inches: exports.earthRadius * 39.370,
  17394. kilometers: exports.earthRadius / 1000,
  17395. kilometres: exports.earthRadius / 1000,
  17396. meters: exports.earthRadius,
  17397. metres: exports.earthRadius,
  17398. miles: exports.earthRadius / 1609.344,
  17399. millimeters: exports.earthRadius * 1000,
  17400. millimetres: exports.earthRadius * 1000,
  17401. nauticalmiles: exports.earthRadius / 1852,
  17402. radians: 1,
  17403. yards: exports.earthRadius / 1.0936,
  17404. };
  17405. /**
  17406. * Units of measurement factors based on 1 meter.
  17407. *
  17408. * @memberof helpers
  17409. * @type {Object}
  17410. */
  17411. exports.unitsFactors = {
  17412. centimeters: 100,
  17413. centimetres: 100,
  17414. degrees: 1 / 111325,
  17415. feet: 3.28084,
  17416. inches: 39.370,
  17417. kilometers: 1 / 1000,
  17418. kilometres: 1 / 1000,
  17419. meters: 1,
  17420. metres: 1,
  17421. miles: 1 / 1609.344,
  17422. millimeters: 1000,
  17423. millimetres: 1000,
  17424. nauticalmiles: 1 / 1852,
  17425. radians: 1 / exports.earthRadius,
  17426. yards: 1 / 1.0936,
  17427. };
  17428. /**
  17429. * Area of measurement factors based on 1 square meter.
  17430. *
  17431. * @memberof helpers
  17432. * @type {Object}
  17433. */
  17434. exports.areaFactors = {
  17435. acres: 0.000247105,
  17436. centimeters: 10000,
  17437. centimetres: 10000,
  17438. feet: 10.763910417,
  17439. inches: 1550.003100006,
  17440. kilometers: 0.000001,
  17441. kilometres: 0.000001,
  17442. meters: 1,
  17443. metres: 1,
  17444. miles: 3.86e-7,
  17445. millimeters: 1000000,
  17446. millimetres: 1000000,
  17447. yards: 1.195990046,
  17448. };
  17449. /**
  17450. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  17451. *
  17452. * @name feature
  17453. * @param {Geometry} geometry input geometry
  17454. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17455. * @param {Object} [options={}] Optional Parameters
  17456. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17457. * @param {string|number} [options.id] Identifier associated with the Feature
  17458. * @returns {Feature} a GeoJSON Feature
  17459. * @example
  17460. * var geometry = {
  17461. * "type": "Point",
  17462. * "coordinates": [110, 50]
  17463. * };
  17464. *
  17465. * var feature = turf.feature(geometry);
  17466. *
  17467. * //=feature
  17468. */
  17469. function feature(geom, properties, options) {
  17470. if (options === void 0) { options = {}; }
  17471. var feat = { type: "Feature" };
  17472. if (options.id === 0 || options.id) {
  17473. feat.id = options.id;
  17474. }
  17475. if (options.bbox) {
  17476. feat.bbox = options.bbox;
  17477. }
  17478. feat.properties = properties || {};
  17479. feat.geometry = geom;
  17480. return feat;
  17481. }
  17482. exports.feature = feature;
  17483. /**
  17484. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  17485. * For GeometryCollection type use `helpers.geometryCollection`
  17486. *
  17487. * @name geometry
  17488. * @param {string} type Geometry Type
  17489. * @param {Array<any>} coordinates Coordinates
  17490. * @param {Object} [options={}] Optional Parameters
  17491. * @returns {Geometry} a GeoJSON Geometry
  17492. * @example
  17493. * var type = "Point";
  17494. * var coordinates = [110, 50];
  17495. * var geometry = turf.geometry(type, coordinates);
  17496. * // => geometry
  17497. */
  17498. function geometry(type, coordinates, options) {
  17499. if (options === void 0) { options = {}; }
  17500. switch (type) {
  17501. case "Point": return point(coordinates).geometry;
  17502. case "LineString": return lineString(coordinates).geometry;
  17503. case "Polygon": return polygon(coordinates).geometry;
  17504. case "MultiPoint": return multiPoint(coordinates).geometry;
  17505. case "MultiLineString": return multiLineString(coordinates).geometry;
  17506. case "MultiPolygon": return multiPolygon(coordinates).geometry;
  17507. default: throw new Error(type + " is invalid");
  17508. }
  17509. }
  17510. exports.geometry = geometry;
  17511. /**
  17512. * Creates a {@link Point} {@link Feature} from a Position.
  17513. *
  17514. * @name point
  17515. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  17516. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17517. * @param {Object} [options={}] Optional Parameters
  17518. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17519. * @param {string|number} [options.id] Identifier associated with the Feature
  17520. * @returns {Feature<Point>} a Point feature
  17521. * @example
  17522. * var point = turf.point([-75.343, 39.984]);
  17523. *
  17524. * //=point
  17525. */
  17526. function point(coordinates, properties, options) {
  17527. if (options === void 0) { options = {}; }
  17528. var geom = {
  17529. type: "Point",
  17530. coordinates: coordinates,
  17531. };
  17532. return feature(geom, properties, options);
  17533. }
  17534. exports.point = point;
  17535. /**
  17536. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  17537. *
  17538. * @name points
  17539. * @param {Array<Array<number>>} coordinates an array of Points
  17540. * @param {Object} [properties={}] Translate these properties to each Feature
  17541. * @param {Object} [options={}] Optional Parameters
  17542. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]
  17543. * associated with the FeatureCollection
  17544. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  17545. * @returns {FeatureCollection<Point>} Point Feature
  17546. * @example
  17547. * var points = turf.points([
  17548. * [-75, 39],
  17549. * [-80, 45],
  17550. * [-78, 50]
  17551. * ]);
  17552. *
  17553. * //=points
  17554. */
  17555. function points(coordinates, properties, options) {
  17556. if (options === void 0) { options = {}; }
  17557. return featureCollection(coordinates.map(function (coords) {
  17558. return point(coords, properties);
  17559. }), options);
  17560. }
  17561. exports.points = points;
  17562. /**
  17563. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  17564. *
  17565. * @name polygon
  17566. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  17567. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17568. * @param {Object} [options={}] Optional Parameters
  17569. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17570. * @param {string|number} [options.id] Identifier associated with the Feature
  17571. * @returns {Feature<Polygon>} Polygon Feature
  17572. * @example
  17573. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  17574. *
  17575. * //=polygon
  17576. */
  17577. function polygon(coordinates, properties, options) {
  17578. if (options === void 0) { options = {}; }
  17579. for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {
  17580. var ring = coordinates_1[_i];
  17581. if (ring.length < 4) {
  17582. throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
  17583. }
  17584. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  17585. // Check if first point of Polygon contains two numbers
  17586. if (ring[ring.length - 1][j] !== ring[0][j]) {
  17587. throw new Error("First and last Position are not equivalent.");
  17588. }
  17589. }
  17590. }
  17591. var geom = {
  17592. type: "Polygon",
  17593. coordinates: coordinates,
  17594. };
  17595. return feature(geom, properties, options);
  17596. }
  17597. exports.polygon = polygon;
  17598. /**
  17599. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  17600. *
  17601. * @name polygons
  17602. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  17603. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17604. * @param {Object} [options={}] Optional Parameters
  17605. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17606. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  17607. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  17608. * @example
  17609. * var polygons = turf.polygons([
  17610. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  17611. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  17612. * ]);
  17613. *
  17614. * //=polygons
  17615. */
  17616. function polygons(coordinates, properties, options) {
  17617. if (options === void 0) { options = {}; }
  17618. return featureCollection(coordinates.map(function (coords) {
  17619. return polygon(coords, properties);
  17620. }), options);
  17621. }
  17622. exports.polygons = polygons;
  17623. /**
  17624. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  17625. *
  17626. * @name lineString
  17627. * @param {Array<Array<number>>} coordinates an array of Positions
  17628. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17629. * @param {Object} [options={}] Optional Parameters
  17630. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17631. * @param {string|number} [options.id] Identifier associated with the Feature
  17632. * @returns {Feature<LineString>} LineString Feature
  17633. * @example
  17634. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  17635. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  17636. *
  17637. * //=linestring1
  17638. * //=linestring2
  17639. */
  17640. function lineString(coordinates, properties, options) {
  17641. if (options === void 0) { options = {}; }
  17642. if (coordinates.length < 2) {
  17643. throw new Error("coordinates must be an array of two or more positions");
  17644. }
  17645. var geom = {
  17646. type: "LineString",
  17647. coordinates: coordinates,
  17648. };
  17649. return feature(geom, properties, options);
  17650. }
  17651. exports.lineString = lineString;
  17652. /**
  17653. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  17654. *
  17655. * @name lineStrings
  17656. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  17657. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17658. * @param {Object} [options={}] Optional Parameters
  17659. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]
  17660. * associated with the FeatureCollection
  17661. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  17662. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  17663. * @example
  17664. * var linestrings = turf.lineStrings([
  17665. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  17666. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  17667. * ]);
  17668. *
  17669. * //=linestrings
  17670. */
  17671. function lineStrings(coordinates, properties, options) {
  17672. if (options === void 0) { options = {}; }
  17673. return featureCollection(coordinates.map(function (coords) {
  17674. return lineString(coords, properties);
  17675. }), options);
  17676. }
  17677. exports.lineStrings = lineStrings;
  17678. /**
  17679. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  17680. *
  17681. * @name featureCollection
  17682. * @param {Feature[]} features input features
  17683. * @param {Object} [options={}] Optional Parameters
  17684. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17685. * @param {string|number} [options.id] Identifier associated with the Feature
  17686. * @returns {FeatureCollection} FeatureCollection of Features
  17687. * @example
  17688. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  17689. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  17690. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  17691. *
  17692. * var collection = turf.featureCollection([
  17693. * locationA,
  17694. * locationB,
  17695. * locationC
  17696. * ]);
  17697. *
  17698. * //=collection
  17699. */
  17700. function featureCollection(features, options) {
  17701. if (options === void 0) { options = {}; }
  17702. var fc = { type: "FeatureCollection" };
  17703. if (options.id) {
  17704. fc.id = options.id;
  17705. }
  17706. if (options.bbox) {
  17707. fc.bbox = options.bbox;
  17708. }
  17709. fc.features = features;
  17710. return fc;
  17711. }
  17712. exports.featureCollection = featureCollection;
  17713. /**
  17714. * Creates a {@link Feature<MultiLineString>} based on a
  17715. * coordinate array. Properties can be added optionally.
  17716. *
  17717. * @name multiLineString
  17718. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  17719. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17720. * @param {Object} [options={}] Optional Parameters
  17721. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17722. * @param {string|number} [options.id] Identifier associated with the Feature
  17723. * @returns {Feature<MultiLineString>} a MultiLineString feature
  17724. * @throws {Error} if no coordinates are passed
  17725. * @example
  17726. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  17727. *
  17728. * //=multiLine
  17729. */
  17730. function multiLineString(coordinates, properties, options) {
  17731. if (options === void 0) { options = {}; }
  17732. var geom = {
  17733. type: "MultiLineString",
  17734. coordinates: coordinates,
  17735. };
  17736. return feature(geom, properties, options);
  17737. }
  17738. exports.multiLineString = multiLineString;
  17739. /**
  17740. * Creates a {@link Feature<MultiPoint>} based on a
  17741. * coordinate array. Properties can be added optionally.
  17742. *
  17743. * @name multiPoint
  17744. * @param {Array<Array<number>>} coordinates an array of Positions
  17745. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17746. * @param {Object} [options={}] Optional Parameters
  17747. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17748. * @param {string|number} [options.id] Identifier associated with the Feature
  17749. * @returns {Feature<MultiPoint>} a MultiPoint feature
  17750. * @throws {Error} if no coordinates are passed
  17751. * @example
  17752. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  17753. *
  17754. * //=multiPt
  17755. */
  17756. function multiPoint(coordinates, properties, options) {
  17757. if (options === void 0) { options = {}; }
  17758. var geom = {
  17759. type: "MultiPoint",
  17760. coordinates: coordinates,
  17761. };
  17762. return feature(geom, properties, options);
  17763. }
  17764. exports.multiPoint = multiPoint;
  17765. /**
  17766. * Creates a {@link Feature<MultiPolygon>} based on a
  17767. * coordinate array. Properties can be added optionally.
  17768. *
  17769. * @name multiPolygon
  17770. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  17771. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17772. * @param {Object} [options={}] Optional Parameters
  17773. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17774. * @param {string|number} [options.id] Identifier associated with the Feature
  17775. * @returns {Feature<MultiPolygon>} a multipolygon feature
  17776. * @throws {Error} if no coordinates are passed
  17777. * @example
  17778. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  17779. *
  17780. * //=multiPoly
  17781. *
  17782. */
  17783. function multiPolygon(coordinates, properties, options) {
  17784. if (options === void 0) { options = {}; }
  17785. var geom = {
  17786. type: "MultiPolygon",
  17787. coordinates: coordinates,
  17788. };
  17789. return feature(geom, properties, options);
  17790. }
  17791. exports.multiPolygon = multiPolygon;
  17792. /**
  17793. * Creates a {@link Feature<GeometryCollection>} based on a
  17794. * coordinate array. Properties can be added optionally.
  17795. *
  17796. * @name geometryCollection
  17797. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  17798. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17799. * @param {Object} [options={}] Optional Parameters
  17800. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17801. * @param {string|number} [options.id] Identifier associated with the Feature
  17802. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  17803. * @example
  17804. * var pt = turf.geometry("Point", [100, 0]);
  17805. * var line = turf.geometry("LineString", [[101, 0], [102, 1]]);
  17806. * var collection = turf.geometryCollection([pt, line]);
  17807. *
  17808. * // => collection
  17809. */
  17810. function geometryCollection(geometries, properties, options) {
  17811. if (options === void 0) { options = {}; }
  17812. var geom = {
  17813. type: "GeometryCollection",
  17814. geometries: geometries,
  17815. };
  17816. return feature(geom, properties, options);
  17817. }
  17818. exports.geometryCollection = geometryCollection;
  17819. /**
  17820. * Round number to precision
  17821. *
  17822. * @param {number} num Number
  17823. * @param {number} [precision=0] Precision
  17824. * @returns {number} rounded number
  17825. * @example
  17826. * turf.round(120.4321)
  17827. * //=120
  17828. *
  17829. * turf.round(120.4321, 2)
  17830. * //=120.43
  17831. */
  17832. function round(num, precision) {
  17833. if (precision === void 0) { precision = 0; }
  17834. if (precision && !(precision >= 0)) {
  17835. throw new Error("precision must be a positive number");
  17836. }
  17837. var multiplier = Math.pow(10, precision || 0);
  17838. return Math.round(num * multiplier) / multiplier;
  17839. }
  17840. exports.round = round;
  17841. /**
  17842. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  17843. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  17844. *
  17845. * @name radiansToLength
  17846. * @param {number} radians in radians across the sphere
  17847. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  17848. * meters, kilometres, kilometers.
  17849. * @returns {number} distance
  17850. */
  17851. function radiansToLength(radians, units) {
  17852. if (units === void 0) { units = "kilometers"; }
  17853. var factor = exports.factors[units];
  17854. if (!factor) {
  17855. throw new Error(units + " units is invalid");
  17856. }
  17857. return radians * factor;
  17858. }
  17859. exports.radiansToLength = radiansToLength;
  17860. /**
  17861. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  17862. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  17863. *
  17864. * @name lengthToRadians
  17865. * @param {number} distance in real units
  17866. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  17867. * meters, kilometres, kilometers.
  17868. * @returns {number} radians
  17869. */
  17870. function lengthToRadians(distance, units) {
  17871. if (units === void 0) { units = "kilometers"; }
  17872. var factor = exports.factors[units];
  17873. if (!factor) {
  17874. throw new Error(units + " units is invalid");
  17875. }
  17876. return distance / factor;
  17877. }
  17878. exports.lengthToRadians = lengthToRadians;
  17879. /**
  17880. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  17881. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  17882. *
  17883. * @name lengthToDegrees
  17884. * @param {number} distance in real units
  17885. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  17886. * meters, kilometres, kilometers.
  17887. * @returns {number} degrees
  17888. */
  17889. function lengthToDegrees(distance, units) {
  17890. return radiansToDegrees(lengthToRadians(distance, units));
  17891. }
  17892. exports.lengthToDegrees = lengthToDegrees;
  17893. /**
  17894. * Converts any bearing angle from the north line direction (positive clockwise)
  17895. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  17896. *
  17897. * @name bearingToAzimuth
  17898. * @param {number} bearing angle, between -180 and +180 degrees
  17899. * @returns {number} angle between 0 and 360 degrees
  17900. */
  17901. function bearingToAzimuth(bearing) {
  17902. var angle = bearing % 360;
  17903. if (angle < 0) {
  17904. angle += 360;
  17905. }
  17906. return angle;
  17907. }
  17908. exports.bearingToAzimuth = bearingToAzimuth;
  17909. /**
  17910. * Converts an angle in radians to degrees
  17911. *
  17912. * @name radiansToDegrees
  17913. * @param {number} radians angle in radians
  17914. * @returns {number} degrees between 0 and 360 degrees
  17915. */
  17916. function radiansToDegrees(radians) {
  17917. var degrees = radians % (2 * Math.PI);
  17918. return degrees * 180 / Math.PI;
  17919. }
  17920. exports.radiansToDegrees = radiansToDegrees;
  17921. /**
  17922. * Converts an angle in degrees to radians
  17923. *
  17924. * @name degreesToRadians
  17925. * @param {number} degrees angle between 0 and 360 degrees
  17926. * @returns {number} angle in radians
  17927. */
  17928. function degreesToRadians(degrees) {
  17929. var radians = degrees % 360;
  17930. return radians * Math.PI / 180;
  17931. }
  17932. exports.degreesToRadians = degreesToRadians;
  17933. /**
  17934. * Converts a length to the requested unit.
  17935. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  17936. *
  17937. * @param {number} length to be converted
  17938. * @param {Units} [originalUnit="kilometers"] of the length
  17939. * @param {Units} [finalUnit="kilometers"] returned unit
  17940. * @returns {number} the converted length
  17941. */
  17942. function convertLength(length, originalUnit, finalUnit) {
  17943. if (originalUnit === void 0) { originalUnit = "kilometers"; }
  17944. if (finalUnit === void 0) { finalUnit = "kilometers"; }
  17945. if (!(length >= 0)) {
  17946. throw new Error("length must be a positive number");
  17947. }
  17948. return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);
  17949. }
  17950. exports.convertLength = convertLength;
  17951. /**
  17952. * Converts a area to the requested unit.
  17953. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  17954. * @param {number} area to be converted
  17955. * @param {Units} [originalUnit="meters"] of the distance
  17956. * @param {Units} [finalUnit="kilometers"] returned unit
  17957. * @returns {number} the converted distance
  17958. */
  17959. function convertArea(area, originalUnit, finalUnit) {
  17960. if (originalUnit === void 0) { originalUnit = "meters"; }
  17961. if (finalUnit === void 0) { finalUnit = "kilometers"; }
  17962. if (!(area >= 0)) {
  17963. throw new Error("area must be a positive number");
  17964. }
  17965. var startFactor = exports.areaFactors[originalUnit];
  17966. if (!startFactor) {
  17967. throw new Error("invalid original units");
  17968. }
  17969. var finalFactor = exports.areaFactors[finalUnit];
  17970. if (!finalFactor) {
  17971. throw new Error("invalid final units");
  17972. }
  17973. return (area / startFactor) * finalFactor;
  17974. }
  17975. exports.convertArea = convertArea;
  17976. /**
  17977. * isNumber
  17978. *
  17979. * @param {*} num Number to validate
  17980. * @returns {boolean} true/false
  17981. * @example
  17982. * turf.isNumber(123)
  17983. * //=true
  17984. * turf.isNumber('foo')
  17985. * //=false
  17986. */
  17987. function isNumber(num) {
  17988. return !isNaN(num) && num !== null && !Array.isArray(num) && !/^\s*$/.test(num);
  17989. }
  17990. exports.isNumber = isNumber;
  17991. /**
  17992. * isObject
  17993. *
  17994. * @param {*} input variable to validate
  17995. * @returns {boolean} true/false
  17996. * @example
  17997. * turf.isObject({elevation: 10})
  17998. * //=true
  17999. * turf.isObject('foo')
  18000. * //=false
  18001. */
  18002. function isObject(input) {
  18003. return (!!input) && (input.constructor === Object);
  18004. }
  18005. exports.isObject = isObject;
  18006. /**
  18007. * Validate BBox
  18008. *
  18009. * @private
  18010. * @param {Array<number>} bbox BBox to validate
  18011. * @returns {void}
  18012. * @throws Error if BBox is not valid
  18013. * @example
  18014. * validateBBox([-180, -40, 110, 50])
  18015. * //=OK
  18016. * validateBBox([-180, -40])
  18017. * //=Error
  18018. * validateBBox('Foo')
  18019. * //=Error
  18020. * validateBBox(5)
  18021. * //=Error
  18022. * validateBBox(null)
  18023. * //=Error
  18024. * validateBBox(undefined)
  18025. * //=Error
  18026. */
  18027. function validateBBox(bbox) {
  18028. if (!bbox) {
  18029. throw new Error("bbox is required");
  18030. }
  18031. if (!Array.isArray(bbox)) {
  18032. throw new Error("bbox must be an Array");
  18033. }
  18034. if (bbox.length !== 4 && bbox.length !== 6) {
  18035. throw new Error("bbox must be an Array of 4 or 6 numbers");
  18036. }
  18037. bbox.forEach(function (num) {
  18038. if (!isNumber(num)) {
  18039. throw new Error("bbox must only contain numbers");
  18040. }
  18041. });
  18042. }
  18043. exports.validateBBox = validateBBox;
  18044. /**
  18045. * Validate Id
  18046. *
  18047. * @private
  18048. * @param {string|number} id Id to validate
  18049. * @returns {void}
  18050. * @throws Error if Id is not valid
  18051. * @example
  18052. * validateId([-180, -40, 110, 50])
  18053. * //=Error
  18054. * validateId([-180, -40])
  18055. * //=Error
  18056. * validateId('Foo')
  18057. * //=OK
  18058. * validateId(5)
  18059. * //=OK
  18060. * validateId(null)
  18061. * //=Error
  18062. * validateId(undefined)
  18063. * //=Error
  18064. */
  18065. function validateId(id) {
  18066. if (!id) {
  18067. throw new Error("id is required");
  18068. }
  18069. if (["string", "number"].indexOf(typeof id) === -1) {
  18070. throw new Error("id must be a number or a string");
  18071. }
  18072. }
  18073. exports.validateId = validateId;
  18074. // Deprecated methods
  18075. function radians2degrees() {
  18076. throw new Error("method has been renamed to `radiansToDegrees`");
  18077. }
  18078. exports.radians2degrees = radians2degrees;
  18079. function degrees2radians() {
  18080. throw new Error("method has been renamed to `degreesToRadians`");
  18081. }
  18082. exports.degrees2radians = degrees2radians;
  18083. function distanceToDegrees() {
  18084. throw new Error("method has been renamed to `lengthToDegrees`");
  18085. }
  18086. exports.distanceToDegrees = distanceToDegrees;
  18087. function distanceToRadians() {
  18088. throw new Error("method has been renamed to `lengthToRadians`");
  18089. }
  18090. exports.distanceToRadians = distanceToRadians;
  18091. function radiansToDistance() {
  18092. throw new Error("method has been renamed to `radiansToLength`");
  18093. }
  18094. exports.radiansToDistance = radiansToDistance;
  18095. function bearingToAngle() {
  18096. throw new Error("method has been renamed to `bearingToAzimuth`");
  18097. }
  18098. exports.bearingToAngle = bearingToAngle;
  18099. function convertDistance() {
  18100. throw new Error("method has been renamed to `convertLength`");
  18101. }
  18102. exports.convertDistance = convertDistance;
  18103. /***/ }),
  18104. /* 149 */
  18105. /***/ (function(module, exports, __webpack_require__) {
  18106. "use strict";
  18107. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _Marker2=_interopRequireDefault(__webpack_require__(17));var BreathingApertureMarker=/*#__PURE__*/function(_Marker){(0,_inherits2.default)(BreathingApertureMarker,_Marker);var _super=(0,_createSuper2.default)(BreathingApertureMarker);function BreathingApertureMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,BreathingApertureMarker);_this=_super.call(this,features,options);_this.features&&_this._createMarker();return _this;}(0,_createClass2.default)(BreathingApertureMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;var pulse=document.getElementsByClassName('sm-component-animate-marker__pulse');for(var i=0;i<pulse.length;i++){// @ts-ignore
  18108. this._setBreathingApertureWidth(pulse[i].style);}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var dot=document.getElementsByClassName('sm-component-animate-marker__dot-point');for(var i=0;i<dot.length;i++){// @ts-ignore
  18109. dot[i].style.background=this.options.colors[0];}var pulse=document.getElementsByClassName('sm-component-animate-marker__pulse');for(var _i=0;_i<pulse.length;_i++){// @ts-ignore
  18110. var style=pulse[_i].style;style.borderColor=this.options.colors[0];style.boxShadow="0 0 12px ".concat(this.options.colors[1],", 0 0 20px ").concat(this.options.colors[1]," inset");}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--breathing-aperture';var dot=document.createElement('span');dot.className='sm-component-animate-marker__dot-point';var colors;if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0){colors=_this2.options.colors;}colors&&(dot.style.background=colors[0]);markerContainer.appendChild(dot);var childElements=_this2._createMakerElement(3,'span',['sm-component-animate-marker__delay','sm-component-animate-marker__pulse']);childElements.forEach(function(element){if(colors){element.style.borderColor=colors[0];element.style.boxShadow="0 0 12px ".concat(colors[1],", 0 0 20px ").concat(colors[1]," inset");}_this2._setBreathingApertureWidth(element.style);markerContainer.appendChild(element);});var nameContainer=_this2._getTextContainer(point,'breathing-aperture-name');markerContainer.appendChild(nameContainer);_this2.markersElement.push(markerContainer);},this);}},{key:"_setBreathingApertureWidth",value:function _setBreathingApertureWidth(style){var width=this.options.width;if(width){style.width=width+'px';style.height=width+'px';style.top=-width/2+'px';style.left=-width/2+'px';style.borderRadius=width/2+'px';}}},{key:"_createMakerElement",value:function _createMakerElement(length,type,classNames){var markerElements=[];for(var i=1;i<length+1;i++){var element=document.createElement(type);element.className="".concat(classNames[0],"-0").concat(i," ").concat(classNames[1]);markerElements.push(element);}return markerElements;}}]);return BreathingApertureMarker;}(_Marker2.default);exports.default=BreathingApertureMarker;
  18111. /***/ }),
  18112. /* 150 */
  18113. /***/ (function(module, exports, __webpack_require__) {
  18114. "use strict";
  18115. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _Marker2=_interopRequireDefault(__webpack_require__(17));var DiffusedApertureMarker=/*#__PURE__*/function(_Marker){(0,_inherits2.default)(DiffusedApertureMarker,_Marker);var _super=(0,_createSuper2.default)(DiffusedApertureMarker);function DiffusedApertureMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,DiffusedApertureMarker);_this=_super.call(this,features,options);_this.features&&_this._createMarker();return _this;}(0,_createClass2.default)(DiffusedApertureMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;var markerContainer=document.getElementsByClassName('sm-component-animate-marker--diffused-aperture');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  18116. var style=markerContainer[i].style;style.setProperty('--container-width',width+'px');}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var markerContainer=document.getElementsByClassName('sm-component-animate-marker--diffused-aperture');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  18117. var style=markerContainer[i].style;style.setProperty('--background-color',this.options.colors[0]);style.setProperty('--box-shadow-color',this.options.colors[1]||this.options.colors[0]);}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--diffused-aperture';var wrapper=document.createElement('div');wrapper.className='sm-component-animate-marker__diffused-aperture-wrapper';var bg=document.createElement('div');bg.className='sm-component-animate-marker__bg';wrapper.appendChild(bg);var circle=document.createElement('div');circle.className='sm-component-animate-marker__circle';wrapper.appendChild(circle);markerContainer.appendChild(wrapper);var nameContainer=_this2._getTextContainer(point,'diffused-aperture-name');markerContainer.appendChild(nameContainer);_this2.options.width&&markerContainer.style.setProperty('--container-width',_this2.options.width+'px');if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0){markerContainer.style.setProperty('--background-color',_this2.options.colors[0]);markerContainer.style.setProperty('--box-shadow-color',_this2.options.colors[1]||_this2.options.colors[0]);}_this2.markersElement.push(markerContainer);},this);}}]);return DiffusedApertureMarker;}(_Marker2.default);exports.default=DiffusedApertureMarker;
  18118. /***/ }),
  18119. /* 151 */
  18120. /***/ (function(module, exports, __webpack_require__) {
  18121. "use strict";
  18122. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _colorcolor=_interopRequireDefault(__webpack_require__(41));var _Marker2=_interopRequireDefault(__webpack_require__(17));var HaloRingMarker=/*#__PURE__*/function(_Marker){(0,_inherits2.default)(HaloRingMarker,_Marker);var _super=(0,_createSuper2.default)(HaloRingMarker);function HaloRingMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,HaloRingMarker);_this=_super.call(this,features,options);_this.features&&_this._createMarker();return _this;}(0,_createClass2.default)(HaloRingMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;var markerContainer=document.getElementsByClassName('sm-component-animate-marker--halo-ring');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  18123. var style=markerContainer[i].style;style.setProperty('--halo-width',this.options.width+'px');style.setProperty('--halo-left',-this.options.width/2+'px');style.setProperty('--box-shadow-width-1',this.options.width/10+'px');style.setProperty('--box-shadow-width-2',this.options.width/4+'px');}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var markerContainer=document.getElementsByClassName('sm-component-animate-marker--halo-ring');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  18124. var style=markerContainer[i].style;style.setProperty('--color-1',this._getColorWithOpacity(this.options.colors[0],0.3));style.setProperty('--color-1-transparent',this._getColorWithOpacity(this.options.colors[0],0.1));style.setProperty('--color-2',this._getColorWithOpacity(this.options.colors[1],0.3));style.setProperty('--color-2-transparent',this._getColorWithOpacity(this.options.colors[1],0.1));}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--halo-ring';var childElements=_this2._createMakerElement(8,'div',['sm-component-animate-marker__ring','sm-component-animate-marker__halo']);childElements.forEach(function(element){markerContainer.appendChild(element);});var nameContainer=_this2._getTextContainer(point,'halo-ring-name');markerContainer.appendChild(nameContainer);if(_this2.options.width){markerContainer.style.setProperty('--halo-width',_this2.options.width+'px');markerContainer.style.setProperty('--halo-left',-_this2.options.width/2+'px');markerContainer.style.setProperty('--box-shadow-width-1',_this2.options.width/10+'px');markerContainer.style.setProperty('--box-shadow-width-2',_this2.options.width/4+'px');}if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0){markerContainer.style.setProperty('--color-1',_this2._getColorWithOpacity((0,_colorcolor.default)(_this2.options.colors[0],'rgba',true),0.3));markerContainer.style.setProperty('--color-1-transparent',_this2._getColorWithOpacity((0,_colorcolor.default)(_this2.options.colors[0],'rgba',true),0.1));markerContainer.style.setProperty('--color-2',_this2._getColorWithOpacity((0,_colorcolor.default)(_this2.options.colors[1],'rgba',true),0.3));markerContainer.style.setProperty('--color-2-transparent',_this2._getColorWithOpacity((0,_colorcolor.default)(_this2.options.colors[1],'rgba',true),0.1));}_this2.markersElement.push(markerContainer);},this);}},{key:"_createMakerElement",value:function _createMakerElement(length,type,classNames){var markerElements=[];for(var i=1;i<length+1;i++){var element=document.createElement(type);element.className="".concat(classNames[0],"-0").concat(i," ").concat(classNames[1]);markerElements.push(element);}return markerElements;}}]);return HaloRingMarker;}(_Marker2.default);exports.default=HaloRingMarker;
  18125. /***/ }),
  18126. /* 152 */
  18127. /***/ (function(module, exports, __webpack_require__) {
  18128. "use strict";
  18129. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _Marker2=_interopRequireDefault(__webpack_require__(17));var RotatingApertureMarker=/*#__PURE__*/function(_Marker){(0,_inherits2.default)(RotatingApertureMarker,_Marker);var _super=(0,_createSuper2.default)(RotatingApertureMarker);function RotatingApertureMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,RotatingApertureMarker);_this=_super.call(this,features,options);_this.features&&_this._createMarker();return _this;}(0,_createClass2.default)(RotatingApertureMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;// TODO 待抛出 width 不能小于 40
  18130. if(!this.options.width||this.options.width<40){return;}var dotsMarker=document.getElementsByClassName('sm-component-animate-marker--rotating-aperture');for(var i=0;i<dotsMarker.length;i++){// @ts-ignore
  18131. dotsMarker[i].style.setProperty('--container-width',"".concat(this.options.width,"px"));var dots1=dotsMarker[i].children[0];var dots2=dotsMarker[i].children[1];var dots3=dotsMarker[i].children[2];dots1.setAttribute('style',this._getDotsStyleObj(this.options.width-32));dots2.setAttribute('style',this._getDotsStyleObj(this.options.width-16));dots3.setAttribute('style',this._getDotsStyleObj(this.options.width));}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var dotsMarker=document.getElementsByClassName('sm-component-animate-marker--rotating-aperture');for(var i=0;i<dotsMarker.length;i++){// @ts-ignore
  18132. var style=dotsMarker[i].style;style.setProperty('--light-color',this.options.colors[1]);style.setProperty('--color',this.options.colors[0]);style.setProperty('--line-color',this._getColorWithOpacity(this.options.colors[0],0.2));}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var width=_this2.options.width&&_this2.options.width>=40?_this2.options.width:50;var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--rotating-aperture';var childElements=_this2._createMakerElement(3,'div',['sm-component-animate-marker__dots','sm-component-animate-marker__dots']);childElements.forEach(function(element,index){var elementWidth;index===0&&(elementWidth=width-32);index===1&&(elementWidth=width-16);index===2&&(elementWidth=width);element.setAttribute('style',_this2._getDotsStyleObj(elementWidth));markerContainer.appendChild(element);});var nameContainer=_this2._getTextContainer(point,'rotating-aperture-name');markerContainer.appendChild(nameContainer);if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0&&_this2.options.colors[0].indexOf('rgb')>-1){markerContainer.style.setProperty('--color',_this2.options.colors[0]);markerContainer.style.setProperty('--line-color',_this2._getColorWithOpacity(_this2.options.colors[0],0.2));markerContainer.style.setProperty('--light-color',_this2.options.colors[1]);}markerContainer.style.setProperty('--container-width',width+'px');_this2.markersElement.push(markerContainer);},this);}},{key:"_createMakerElement",value:function _createMakerElement(length,type,classNames){var markerElements=[];for(var i=1;i<length+1;i++){var element=document.createElement(type);element.className="".concat(classNames[0],"-0").concat(i," ").concat(classNames[1]);markerElements.push(element);}return markerElements;}},{key:"_getDotsStyleObj",value:function _getDotsStyleObj(width){return"--dots-width: ".concat(width,"px;\n --dots-height: ").concat(width,"px;\n --dots-box-shadow-x: ").concat(width/2+6,"px;\n --dots-box-shadow-x-negative: -").concat(width/2+6,"px;\n --dots-box-shadow-radius1: ").concat(width/2-2,"px;\n --dots-box-shadow-radius1-negative: -").concat(width/2-2,"px;\n --dots-box-shadow-radius2: ").concat(width/2-3,"px;\n --dots-box-shadow-radius2-negative: -").concat(width/2-3,"px;");}}]);return RotatingApertureMarker;}(_Marker2.default);exports.default=RotatingApertureMarker;
  18133. /***/ }),
  18134. /* 153 */
  18135. /***/ (function(module, exports, __webpack_require__) {
  18136. "use strict";
  18137. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _Marker2=_interopRequireDefault(__webpack_require__(17));var RotatingTextBorderMarker=/*#__PURE__*/function(_Marker){(0,_inherits2.default)(RotatingTextBorderMarker,_Marker);var _super=(0,_createSuper2.default)(RotatingTextBorderMarker);function RotatingTextBorderMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,RotatingTextBorderMarker);_this=_super.call(this,features);_this.options=void 0;_this.options=options;_this.features&&_this._createMarker();return _this;}(0,_createClass2.default)(RotatingTextBorderMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;this._setMarkerContainerProperty({'--clip-width-1':width+width/10+'px','--clip-width-2':width+width/10-2+'px','--boder-width':width+'px','--text-left-position':-width/2+'px'});}},{key:"setMarkersHeight",value:function setMarkersHeight(height){this.options.height=height;this._setMarkerContainerProperty({'--clip-height-1':height+height/10+'px','--clip-height-2':height+height/10-2+'px','--boder-height':height+'px'});}},{key:"setMarkersTextField",value:function setMarkersTextField(textField){if(!this.features||JSON.stringify(this.features)==='{}'){return;}this.options.textField=textField;var name=document.getElementsByClassName('sm-component-animate-marker__text');for(var i=0;i<name.length;i++){var properties=this.features.features[i]&&this.features.features[i].properties;if(properties&&properties[textField]){name[i].innerHTML=properties[textField];}else{name[i].innerHTML='';}}}},{key:"setMarkersTextColor",value:function setMarkersTextColor(textColor){this.options.textColor=textColor;this._setMarkerContainerProperty({'--text-color':textColor});}},{key:"setMarkersTextFontSize",value:function setMarkersTextFontSize(textFontSize){this.options.textFontSize=textFontSize;this._setMarkerContainerProperty({'--text-font-size':textFontSize+'px'});}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){this._setMarkerContainerProperty({'--border-color':colors[0],'--box-shadow-color':colors[1]});}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--text-boder';var border=document.createElement('div');border.className='sm-component-animate-marker__boder';var keys=Object.keys(point.properties);var name;if(point.properties||Object.keys(point.properties).length!==0){name=point.properties[_this2.options.textField]||point.properties[keys[0]];}var span=document.createElement('span');span.className='sm-component-animate-marker__text';span.innerHTML=name||'';border.appendChild(span);if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0){markerContainer.style.setProperty('--border-color',_this2.options.colors[0]);markerContainer.style.setProperty('--box-shadow-color',_this2.options.colors[1]);}_this2.options.textColor&&markerContainer.style.setProperty('--text-color',_this2.options.textColor);_this2.options.textFontSize&&markerContainer.style.setProperty('--text-font-size',_this2.options.textFontSize+'px');if(_this2.options.width){markerContainer.style.setProperty('--clip-width-1',_this2.options.width+_this2.options.width/10+'px');markerContainer.style.setProperty('--clip-width-2',_this2.options.width+_this2.options.width/10-2+'px');markerContainer.style.setProperty('--boder-width',_this2.options.width+'px');markerContainer.style.setProperty('--text-left-position',-_this2.options.width/2+'px');}if(_this2.options.height){markerContainer.style.setProperty('--clip-height-1',_this2.options.height+_this2.options.width/10+'px');markerContainer.style.setProperty('--clip-height-2',_this2.options.height+_this2.options.width/10-2+'px');markerContainer.style.setProperty('--boder-height',_this2.options.height+'px');}if((_this2.options.width||100)>(_this2.options.width||200)){markerContainer.style.setProperty('--animation-name','clipMe2');}else{markerContainer.style.setProperty('--animation-name','clipMe1');}markerContainer.appendChild(border);_this2.markersElement.push(markerContainer);},this);}},{key:"_setMarkerContainerProperty",value:function _setMarkerContainerProperty(properties){var _this3=this;var markerContainer=document.getElementsByClassName('sm-component-animate-marker--text-boder');var _loop=function _loop(i){// @ts-ignore
  18138. var style=markerContainer[i].style;Object.keys(properties).forEach(function(key){style.setProperty(key,properties[key]);});if((_this3.options.height||100)>(_this3.options.width||200)){style.setProperty('--animation-name','clipMe2');}else{style.setProperty('--animation-name','clipMe1');}};for(var i=0;i<markerContainer.length;i++){_loop(i);}}}]);return RotatingTextBorderMarker;}(_Marker2.default);exports.default=RotatingTextBorderMarker;
  18139. /***/ }),
  18140. /* 154 */
  18141. /***/ (function(module, exports, __webpack_require__) {
  18142. "use strict";
  18143. var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(1));var _createClass2=_interopRequireDefault(__webpack_require__(2));var _inherits2=_interopRequireDefault(__webpack_require__(4));var _createSuper2=_interopRequireDefault(__webpack_require__(3));var _Marker2=_interopRequireDefault(__webpack_require__(17));var FluorescenceMarker=/*#__PURE__*/function(_Marker){(0,_inherits2.default)(FluorescenceMarker,_Marker);var _super=(0,_createSuper2.default)(FluorescenceMarker);function FluorescenceMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};(0,_classCallCheck2.default)(this,FluorescenceMarker);_this=_super.call(this,features,options);_this.features&&_this._createMarker();return _this;}(0,_createClass2.default)(FluorescenceMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;var markerContainer=document.getElementsByClassName('sm-component-animate-marker--fluorescence');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  18144. this._setFluorescenceWidth(markerContainer[i].style);}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var markerContainer=document.getElementsByClassName('sm-component-animate-marker--fluorescence');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  18145. this._setFluorescenceColor(markerContainer[i].style);}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--fluorescence';var marker=document.createElement('div');marker.className='sm-component-animate-marker__fluorescence';markerContainer.appendChild(marker);var nameContainer=_this2._getTextContainer(point,'fluorescence-name');markerContainer.appendChild(nameContainer);_this2._setFluorescenceWidth(markerContainer.style);_this2._setFluorescenceColor(markerContainer.style);_this2.markersElement.push(markerContainer);});}},{key:"_setFluorescenceWidth",value:function _setFluorescenceWidth(style){if(this.options.width){style.setProperty('--container-width',this.options.width/3+'px');style.setProperty('--box-shadow-width',this.options.width+'px');}}},{key:"_setFluorescenceColor",value:function _setFluorescenceColor(style){if(this.options.colors&&this.options.colors.length>0){style.setProperty('--box-shadow-color',this.options.colors[0]);style.setProperty('--light-color',this.options.colors[1]);}}}]);return FluorescenceMarker;}(_Marker2.default);exports.default=FluorescenceMarker;
  18146. /***/ }),
  18147. /* 155 */
  18148. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  18149. "use strict";
  18150. __webpack_require__.r(__webpack_exports__);
  18151. // CONCATENATED MODULE: ./node_modules/@turf/clone/main.es.js
  18152. /**
  18153. * Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.
  18154. * ~3-5x faster than the common JSON.parse + JSON.stringify combo method.
  18155. *
  18156. * @name clone
  18157. * @param {GeoJSON} geojson GeoJSON Object
  18158. * @returns {GeoJSON} cloned GeoJSON Object
  18159. * @example
  18160. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});
  18161. *
  18162. * var lineCloned = turf.clone(line);
  18163. */
  18164. function clone(geojson) {
  18165. if (!geojson) throw new Error('geojson is required');
  18166. switch (geojson.type) {
  18167. case 'Feature':
  18168. return cloneFeature(geojson);
  18169. case 'FeatureCollection':
  18170. return cloneFeatureCollection(geojson);
  18171. case 'Point':
  18172. case 'LineString':
  18173. case 'Polygon':
  18174. case 'MultiPoint':
  18175. case 'MultiLineString':
  18176. case 'MultiPolygon':
  18177. case 'GeometryCollection':
  18178. return cloneGeometry(geojson);
  18179. default:
  18180. throw new Error('unknown GeoJSON type');
  18181. }
  18182. }
  18183. /**
  18184. * Clone Feature
  18185. *
  18186. * @private
  18187. * @param {Feature<any>} geojson GeoJSON Feature
  18188. * @returns {Feature<any>} cloned Feature
  18189. */
  18190. function cloneFeature(geojson) {
  18191. var cloned = {type: 'Feature'};
  18192. // Preserve Foreign Members
  18193. Object.keys(geojson).forEach(function (key) {
  18194. switch (key) {
  18195. case 'type':
  18196. case 'properties':
  18197. case 'geometry':
  18198. return;
  18199. default:
  18200. cloned[key] = geojson[key];
  18201. }
  18202. });
  18203. // Add properties & geometry last
  18204. cloned.properties = cloneProperties(geojson.properties);
  18205. cloned.geometry = cloneGeometry(geojson.geometry);
  18206. return cloned;
  18207. }
  18208. /**
  18209. * Clone Properties
  18210. *
  18211. * @private
  18212. * @param {Object} properties GeoJSON Properties
  18213. * @returns {Object} cloned Properties
  18214. */
  18215. function cloneProperties(properties) {
  18216. var cloned = {};
  18217. if (!properties) return cloned;
  18218. Object.keys(properties).forEach(function (key) {
  18219. var value = properties[key];
  18220. if (typeof value === 'object') {
  18221. if (value === null) {
  18222. // handle null
  18223. cloned[key] = null;
  18224. } else if (value.length) {
  18225. // handle Array
  18226. cloned[key] = value.map(function (item) {
  18227. return item;
  18228. });
  18229. } else {
  18230. // handle generic Object
  18231. cloned[key] = cloneProperties(value);
  18232. }
  18233. } else cloned[key] = value;
  18234. });
  18235. return cloned;
  18236. }
  18237. /**
  18238. * Clone Feature Collection
  18239. *
  18240. * @private
  18241. * @param {FeatureCollection<any>} geojson GeoJSON Feature Collection
  18242. * @returns {FeatureCollection<any>} cloned Feature Collection
  18243. */
  18244. function cloneFeatureCollection(geojson) {
  18245. var cloned = {type: 'FeatureCollection'};
  18246. // Preserve Foreign Members
  18247. Object.keys(geojson).forEach(function (key) {
  18248. switch (key) {
  18249. case 'type':
  18250. case 'features':
  18251. return;
  18252. default:
  18253. cloned[key] = geojson[key];
  18254. }
  18255. });
  18256. // Add features
  18257. cloned.features = geojson.features.map(function (feature) {
  18258. return cloneFeature(feature);
  18259. });
  18260. return cloned;
  18261. }
  18262. /**
  18263. * Clone Geometry
  18264. *
  18265. * @private
  18266. * @param {Geometry<any>} geometry GeoJSON Geometry
  18267. * @returns {Geometry<any>} cloned Geometry
  18268. */
  18269. function cloneGeometry(geometry) {
  18270. var geom = {type: geometry.type};
  18271. if (geometry.bbox) geom.bbox = geometry.bbox;
  18272. if (geometry.type === 'GeometryCollection') {
  18273. geom.geometries = geometry.geometries.map(function (geom) {
  18274. return cloneGeometry(geom);
  18275. });
  18276. return geom;
  18277. }
  18278. geom.coordinates = deepSlice(geometry.coordinates);
  18279. return geom;
  18280. }
  18281. /**
  18282. * Deep Slice coordinates
  18283. *
  18284. * @private
  18285. * @param {Coordinates} coords Coordinates
  18286. * @returns {Coordinates} all coordinates sliced
  18287. */
  18288. function deepSlice(coords) {
  18289. if (typeof coords[0] !== 'object') { return coords.slice(); }
  18290. return coords.map(function (coord) {
  18291. return deepSlice(coord);
  18292. });
  18293. }
  18294. /* harmony default export */ var main_es = (clone);
  18295. // CONCATENATED MODULE: ./node_modules/@turf/center/node_modules/@turf/helpers/main.es.js
  18296. /**
  18297. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  18298. */
  18299. var earthRadius = 6371008.8;
  18300. /**
  18301. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  18302. */
  18303. var factors = {
  18304. meters: earthRadius,
  18305. metres: earthRadius,
  18306. millimeters: earthRadius * 1000,
  18307. millimetres: earthRadius * 1000,
  18308. centimeters: earthRadius * 100,
  18309. centimetres: earthRadius * 100,
  18310. kilometers: earthRadius / 1000,
  18311. kilometres: earthRadius / 1000,
  18312. miles: earthRadius / 1609.344,
  18313. nauticalmiles: earthRadius / 1852,
  18314. inches: earthRadius * 39.370,
  18315. yards: earthRadius / 1.0936,
  18316. feet: earthRadius * 3.28084,
  18317. radians: 1,
  18318. degrees: earthRadius / 111325,
  18319. };
  18320. /**
  18321. * Units of measurement factors based on 1 meter.
  18322. */
  18323. var unitsFactors = {
  18324. meters: 1,
  18325. metres: 1,
  18326. millimeters: 1000,
  18327. millimetres: 1000,
  18328. centimeters: 100,
  18329. centimetres: 100,
  18330. kilometers: 1 / 1000,
  18331. kilometres: 1 / 1000,
  18332. miles: 1 / 1609.344,
  18333. nauticalmiles: 1 / 1852,
  18334. inches: 39.370,
  18335. yards: 1 / 1.0936,
  18336. feet: 3.28084,
  18337. radians: 1 / earthRadius,
  18338. degrees: 1 / 111325,
  18339. };
  18340. /**
  18341. * Area of measurement factors based on 1 square meter.
  18342. */
  18343. var areaFactors = {
  18344. meters: 1,
  18345. metres: 1,
  18346. millimeters: 1000000,
  18347. millimetres: 1000000,
  18348. centimeters: 10000,
  18349. centimetres: 10000,
  18350. kilometers: 0.000001,
  18351. kilometres: 0.000001,
  18352. acres: 0.000247105,
  18353. miles: 3.86e-7,
  18354. yards: 1.195990046,
  18355. feet: 10.763910417,
  18356. inches: 1550.003100006
  18357. };
  18358. /**
  18359. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  18360. *
  18361. * @name feature
  18362. * @param {Geometry} geometry input geometry
  18363. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18364. * @param {Object} [options={}] Optional Parameters
  18365. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18366. * @param {string|number} [options.id] Identifier associated with the Feature
  18367. * @returns {Feature} a GeoJSON Feature
  18368. * @example
  18369. * var geometry = {
  18370. * "type": "Point",
  18371. * "coordinates": [110, 50]
  18372. * };
  18373. *
  18374. * var feature = turf.feature(geometry);
  18375. *
  18376. * //=feature
  18377. */
  18378. function main_es_feature(geometry, properties, options) {
  18379. // Optional Parameters
  18380. options = options || {};
  18381. if (!isObject(options)) throw new Error('options is invalid');
  18382. var bbox = options.bbox;
  18383. var id = options.id;
  18384. // Validation
  18385. if (geometry === undefined) throw new Error('geometry is required');
  18386. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  18387. if (bbox) validateBBox(bbox);
  18388. if (id) validateId(id);
  18389. // Main
  18390. var feat = {type: 'Feature'};
  18391. if (id) feat.id = id;
  18392. if (bbox) feat.bbox = bbox;
  18393. feat.properties = properties || {};
  18394. feat.geometry = geometry;
  18395. return feat;
  18396. }
  18397. /**
  18398. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  18399. * For GeometryCollection type use `helpers.geometryCollection`
  18400. *
  18401. * @name geometry
  18402. * @param {string} type Geometry Type
  18403. * @param {Array<number>} coordinates Coordinates
  18404. * @param {Object} [options={}] Optional Parameters
  18405. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  18406. * @returns {Geometry} a GeoJSON Geometry
  18407. * @example
  18408. * var type = 'Point';
  18409. * var coordinates = [110, 50];
  18410. *
  18411. * var geometry = turf.geometry(type, coordinates);
  18412. *
  18413. * //=geometry
  18414. */
  18415. function main_es_geometry(type, coordinates, options) {
  18416. // Optional Parameters
  18417. options = options || {};
  18418. if (!isObject(options)) throw new Error('options is invalid');
  18419. var bbox = options.bbox;
  18420. // Validation
  18421. if (!type) throw new Error('type is required');
  18422. if (!coordinates) throw new Error('coordinates is required');
  18423. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  18424. if (bbox) validateBBox(bbox);
  18425. // Main
  18426. var geom;
  18427. switch (type) {
  18428. case 'Point': geom = point(coordinates).geometry; break;
  18429. case 'LineString': geom = lineString(coordinates).geometry; break;
  18430. case 'Polygon': geom = polygon(coordinates).geometry; break;
  18431. case 'MultiPoint': geom = multiPoint(coordinates).geometry; break;
  18432. case 'MultiLineString': geom = multiLineString(coordinates).geometry; break;
  18433. case 'MultiPolygon': geom = multiPolygon(coordinates).geometry; break;
  18434. default: throw new Error(type + ' is invalid');
  18435. }
  18436. if (bbox) geom.bbox = bbox;
  18437. return geom;
  18438. }
  18439. /**
  18440. * Creates a {@link Point} {@link Feature} from a Position.
  18441. *
  18442. * @name point
  18443. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  18444. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18445. * @param {Object} [options={}] Optional Parameters
  18446. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18447. * @param {string|number} [options.id] Identifier associated with the Feature
  18448. * @returns {Feature<Point>} a Point feature
  18449. * @example
  18450. * var point = turf.point([-75.343, 39.984]);
  18451. *
  18452. * //=point
  18453. */
  18454. function point(coordinates, properties, options) {
  18455. if (!coordinates) throw new Error('coordinates is required');
  18456. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  18457. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  18458. if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  18459. return main_es_feature({
  18460. type: 'Point',
  18461. coordinates: coordinates
  18462. }, properties, options);
  18463. }
  18464. /**
  18465. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  18466. *
  18467. * @name points
  18468. * @param {Array<Array<number>>} coordinates an array of Points
  18469. * @param {Object} [properties={}] Translate these properties to each Feature
  18470. * @param {Object} [options={}] Optional Parameters
  18471. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  18472. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  18473. * @returns {FeatureCollection<Point>} Point Feature
  18474. * @example
  18475. * var points = turf.points([
  18476. * [-75, 39],
  18477. * [-80, 45],
  18478. * [-78, 50]
  18479. * ]);
  18480. *
  18481. * //=points
  18482. */
  18483. function points(coordinates, properties, options) {
  18484. if (!coordinates) throw new Error('coordinates is required');
  18485. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  18486. return featureCollection(coordinates.map(function (coords) {
  18487. return point(coords, properties);
  18488. }), options);
  18489. }
  18490. /**
  18491. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  18492. *
  18493. * @name polygon
  18494. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  18495. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18496. * @param {Object} [options={}] Optional Parameters
  18497. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18498. * @param {string|number} [options.id] Identifier associated with the Feature
  18499. * @returns {Feature<Polygon>} Polygon Feature
  18500. * @example
  18501. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  18502. *
  18503. * //=polygon
  18504. */
  18505. function polygon(coordinates, properties, options) {
  18506. if (!coordinates) throw new Error('coordinates is required');
  18507. for (var i = 0; i < coordinates.length; i++) {
  18508. var ring = coordinates[i];
  18509. if (ring.length < 4) {
  18510. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  18511. }
  18512. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  18513. // Check if first point of Polygon contains two numbers
  18514. if (i === 0 && j === 0 && !isNumber(ring[0][0]) || !isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  18515. if (ring[ring.length - 1][j] !== ring[0][j]) {
  18516. throw new Error('First and last Position are not equivalent.');
  18517. }
  18518. }
  18519. }
  18520. return main_es_feature({
  18521. type: 'Polygon',
  18522. coordinates: coordinates
  18523. }, properties, options);
  18524. }
  18525. /**
  18526. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  18527. *
  18528. * @name polygons
  18529. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  18530. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18531. * @param {Object} [options={}] Optional Parameters
  18532. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18533. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  18534. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  18535. * @example
  18536. * var polygons = turf.polygons([
  18537. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  18538. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  18539. * ]);
  18540. *
  18541. * //=polygons
  18542. */
  18543. function polygons(coordinates, properties, options) {
  18544. if (!coordinates) throw new Error('coordinates is required');
  18545. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  18546. return featureCollection(coordinates.map(function (coords) {
  18547. return polygon(coords, properties);
  18548. }), options);
  18549. }
  18550. /**
  18551. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  18552. *
  18553. * @name lineString
  18554. * @param {Array<Array<number>>} coordinates an array of Positions
  18555. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18556. * @param {Object} [options={}] Optional Parameters
  18557. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18558. * @param {string|number} [options.id] Identifier associated with the Feature
  18559. * @returns {Feature<LineString>} LineString Feature
  18560. * @example
  18561. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  18562. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  18563. *
  18564. * //=linestring1
  18565. * //=linestring2
  18566. */
  18567. function lineString(coordinates, properties, options) {
  18568. if (!coordinates) throw new Error('coordinates is required');
  18569. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  18570. // Check if first point of LineString contains two numbers
  18571. if (!isNumber(coordinates[0][1]) || !isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  18572. return main_es_feature({
  18573. type: 'LineString',
  18574. coordinates: coordinates
  18575. }, properties, options);
  18576. }
  18577. /**
  18578. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  18579. *
  18580. * @name lineStrings
  18581. * @param {Array<Array<number>>} coordinates an array of LinearRings
  18582. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18583. * @param {Object} [options={}] Optional Parameters
  18584. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  18585. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  18586. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  18587. * @example
  18588. * var linestrings = turf.lineStrings([
  18589. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  18590. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  18591. * ]);
  18592. *
  18593. * //=linestrings
  18594. */
  18595. function lineStrings(coordinates, properties, options) {
  18596. if (!coordinates) throw new Error('coordinates is required');
  18597. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  18598. return featureCollection(coordinates.map(function (coords) {
  18599. return lineString(coords, properties);
  18600. }), options);
  18601. }
  18602. /**
  18603. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  18604. *
  18605. * @name featureCollection
  18606. * @param {Feature[]} features input features
  18607. * @param {Object} [options={}] Optional Parameters
  18608. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18609. * @param {string|number} [options.id] Identifier associated with the Feature
  18610. * @returns {FeatureCollection} FeatureCollection of Features
  18611. * @example
  18612. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  18613. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  18614. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  18615. *
  18616. * var collection = turf.featureCollection([
  18617. * locationA,
  18618. * locationB,
  18619. * locationC
  18620. * ]);
  18621. *
  18622. * //=collection
  18623. */
  18624. function featureCollection(features, options) {
  18625. // Optional Parameters
  18626. options = options || {};
  18627. if (!isObject(options)) throw new Error('options is invalid');
  18628. var bbox = options.bbox;
  18629. var id = options.id;
  18630. // Validation
  18631. if (!features) throw new Error('No features passed');
  18632. if (!Array.isArray(features)) throw new Error('features must be an Array');
  18633. if (bbox) validateBBox(bbox);
  18634. if (id) validateId(id);
  18635. // Main
  18636. var fc = {type: 'FeatureCollection'};
  18637. if (id) fc.id = id;
  18638. if (bbox) fc.bbox = bbox;
  18639. fc.features = features;
  18640. return fc;
  18641. }
  18642. /**
  18643. * Creates a {@link Feature<MultiLineString>} based on a
  18644. * coordinate array. Properties can be added optionally.
  18645. *
  18646. * @name multiLineString
  18647. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  18648. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18649. * @param {Object} [options={}] Optional Parameters
  18650. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18651. * @param {string|number} [options.id] Identifier associated with the Feature
  18652. * @returns {Feature<MultiLineString>} a MultiLineString feature
  18653. * @throws {Error} if no coordinates are passed
  18654. * @example
  18655. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  18656. *
  18657. * //=multiLine
  18658. */
  18659. function multiLineString(coordinates, properties, options) {
  18660. if (!coordinates) throw new Error('coordinates is required');
  18661. return main_es_feature({
  18662. type: 'MultiLineString',
  18663. coordinates: coordinates
  18664. }, properties, options);
  18665. }
  18666. /**
  18667. * Creates a {@link Feature<MultiPoint>} based on a
  18668. * coordinate array. Properties can be added optionally.
  18669. *
  18670. * @name multiPoint
  18671. * @param {Array<Array<number>>} coordinates an array of Positions
  18672. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18673. * @param {Object} [options={}] Optional Parameters
  18674. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18675. * @param {string|number} [options.id] Identifier associated with the Feature
  18676. * @returns {Feature<MultiPoint>} a MultiPoint feature
  18677. * @throws {Error} if no coordinates are passed
  18678. * @example
  18679. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  18680. *
  18681. * //=multiPt
  18682. */
  18683. function multiPoint(coordinates, properties, options) {
  18684. if (!coordinates) throw new Error('coordinates is required');
  18685. return main_es_feature({
  18686. type: 'MultiPoint',
  18687. coordinates: coordinates
  18688. }, properties, options);
  18689. }
  18690. /**
  18691. * Creates a {@link Feature<MultiPolygon>} based on a
  18692. * coordinate array. Properties can be added optionally.
  18693. *
  18694. * @name multiPolygon
  18695. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  18696. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18697. * @param {Object} [options={}] Optional Parameters
  18698. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18699. * @param {string|number} [options.id] Identifier associated with the Feature
  18700. * @returns {Feature<MultiPolygon>} a multipolygon feature
  18701. * @throws {Error} if no coordinates are passed
  18702. * @example
  18703. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  18704. *
  18705. * //=multiPoly
  18706. *
  18707. */
  18708. function multiPolygon(coordinates, properties, options) {
  18709. if (!coordinates) throw new Error('coordinates is required');
  18710. return main_es_feature({
  18711. type: 'MultiPolygon',
  18712. coordinates: coordinates
  18713. }, properties, options);
  18714. }
  18715. /**
  18716. * Creates a {@link Feature<GeometryCollection>} based on a
  18717. * coordinate array. Properties can be added optionally.
  18718. *
  18719. * @name geometryCollection
  18720. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  18721. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  18722. * @param {Object} [options={}] Optional Parameters
  18723. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  18724. * @param {string|number} [options.id] Identifier associated with the Feature
  18725. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  18726. * @example
  18727. * var pt = {
  18728. * "type": "Point",
  18729. * "coordinates": [100, 0]
  18730. * };
  18731. * var line = {
  18732. * "type": "LineString",
  18733. * "coordinates": [ [101, 0], [102, 1] ]
  18734. * };
  18735. * var collection = turf.geometryCollection([pt, line]);
  18736. *
  18737. * //=collection
  18738. */
  18739. function geometryCollection(geometries, properties, options) {
  18740. if (!geometries) throw new Error('geometries is required');
  18741. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  18742. return main_es_feature({
  18743. type: 'GeometryCollection',
  18744. geometries: geometries
  18745. }, properties, options);
  18746. }
  18747. /**
  18748. * Round number to precision
  18749. *
  18750. * @param {number} num Number
  18751. * @param {number} [precision=0] Precision
  18752. * @returns {number} rounded number
  18753. * @example
  18754. * turf.round(120.4321)
  18755. * //=120
  18756. *
  18757. * turf.round(120.4321, 2)
  18758. * //=120.43
  18759. */
  18760. function round(num, precision) {
  18761. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  18762. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  18763. var multiplier = Math.pow(10, precision || 0);
  18764. return Math.round(num * multiplier) / multiplier;
  18765. }
  18766. /**
  18767. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  18768. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  18769. *
  18770. * @name radiansToLength
  18771. * @param {number} radians in radians across the sphere
  18772. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  18773. * @returns {number} distance
  18774. */
  18775. function radiansToLength(radians, units) {
  18776. if (radians === undefined || radians === null) throw new Error('radians is required');
  18777. if (units && typeof units !== 'string') throw new Error('units must be a string');
  18778. var factor = factors[units || 'kilometers'];
  18779. if (!factor) throw new Error(units + ' units is invalid');
  18780. return radians * factor;
  18781. }
  18782. /**
  18783. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  18784. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  18785. *
  18786. * @name lengthToRadians
  18787. * @param {number} distance in real units
  18788. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  18789. * @returns {number} radians
  18790. */
  18791. function lengthToRadians(distance, units) {
  18792. if (distance === undefined || distance === null) throw new Error('distance is required');
  18793. if (units && typeof units !== 'string') throw new Error('units must be a string');
  18794. var factor = factors[units || 'kilometers'];
  18795. if (!factor) throw new Error(units + ' units is invalid');
  18796. return distance / factor;
  18797. }
  18798. /**
  18799. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  18800. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  18801. *
  18802. * @name lengthToDegrees
  18803. * @param {number} distance in real units
  18804. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  18805. * @returns {number} degrees
  18806. */
  18807. function lengthToDegrees(distance, units) {
  18808. return radiansToDegrees(lengthToRadians(distance, units));
  18809. }
  18810. /**
  18811. * Converts any bearing angle from the north line direction (positive clockwise)
  18812. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  18813. *
  18814. * @name bearingToAzimuth
  18815. * @param {number} bearing angle, between -180 and +180 degrees
  18816. * @returns {number} angle between 0 and 360 degrees
  18817. */
  18818. function bearingToAzimuth(bearing) {
  18819. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  18820. var angle = bearing % 360;
  18821. if (angle < 0) angle += 360;
  18822. return angle;
  18823. }
  18824. /**
  18825. * Converts an angle in radians to degrees
  18826. *
  18827. * @name radiansToDegrees
  18828. * @param {number} radians angle in radians
  18829. * @returns {number} degrees between 0 and 360 degrees
  18830. */
  18831. function radiansToDegrees(radians) {
  18832. if (radians === null || radians === undefined) throw new Error('radians is required');
  18833. var degrees = radians % (2 * Math.PI);
  18834. return degrees * 180 / Math.PI;
  18835. }
  18836. /**
  18837. * Converts an angle in degrees to radians
  18838. *
  18839. * @name degreesToRadians
  18840. * @param {number} degrees angle between 0 and 360 degrees
  18841. * @returns {number} angle in radians
  18842. */
  18843. function degreesToRadians(degrees) {
  18844. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  18845. var radians = degrees % 360;
  18846. return radians * Math.PI / 180;
  18847. }
  18848. /**
  18849. * Converts a length to the requested unit.
  18850. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  18851. *
  18852. * @param {number} length to be converted
  18853. * @param {string} originalUnit of the length
  18854. * @param {string} [finalUnit='kilometers'] returned unit
  18855. * @returns {number} the converted length
  18856. */
  18857. function convertLength(length, originalUnit, finalUnit) {
  18858. if (length === null || length === undefined) throw new Error('length is required');
  18859. if (!(length >= 0)) throw new Error('length must be a positive number');
  18860. return radiansToLength(lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  18861. }
  18862. /**
  18863. * Converts a area to the requested unit.
  18864. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  18865. * @param {number} area to be converted
  18866. * @param {string} [originalUnit='meters'] of the distance
  18867. * @param {string} [finalUnit='kilometers'] returned unit
  18868. * @returns {number} the converted distance
  18869. */
  18870. function convertArea(area, originalUnit, finalUnit) {
  18871. if (area === null || area === undefined) throw new Error('area is required');
  18872. if (!(area >= 0)) throw new Error('area must be a positive number');
  18873. var startFactor = areaFactors[originalUnit || 'meters'];
  18874. if (!startFactor) throw new Error('invalid original units');
  18875. var finalFactor = areaFactors[finalUnit || 'kilometers'];
  18876. if (!finalFactor) throw new Error('invalid final units');
  18877. return (area / startFactor) * finalFactor;
  18878. }
  18879. /**
  18880. * isNumber
  18881. *
  18882. * @param {*} num Number to validate
  18883. * @returns {boolean} true/false
  18884. * @example
  18885. * turf.isNumber(123)
  18886. * //=true
  18887. * turf.isNumber('foo')
  18888. * //=false
  18889. */
  18890. function isNumber(num) {
  18891. return !isNaN(num) && num !== null && !Array.isArray(num);
  18892. }
  18893. /**
  18894. * isObject
  18895. *
  18896. * @param {*} input variable to validate
  18897. * @returns {boolean} true/false
  18898. * @example
  18899. * turf.isObject({elevation: 10})
  18900. * //=true
  18901. * turf.isObject('foo')
  18902. * //=false
  18903. */
  18904. function isObject(input) {
  18905. return (!!input) && (input.constructor === Object);
  18906. }
  18907. /**
  18908. * Validate BBox
  18909. *
  18910. * @private
  18911. * @param {Array<number>} bbox BBox to validate
  18912. * @returns {void}
  18913. * @throws Error if BBox is not valid
  18914. * @example
  18915. * validateBBox([-180, -40, 110, 50])
  18916. * //=OK
  18917. * validateBBox([-180, -40])
  18918. * //=Error
  18919. * validateBBox('Foo')
  18920. * //=Error
  18921. * validateBBox(5)
  18922. * //=Error
  18923. * validateBBox(null)
  18924. * //=Error
  18925. * validateBBox(undefined)
  18926. * //=Error
  18927. */
  18928. function validateBBox(bbox) {
  18929. if (!bbox) throw new Error('bbox is required');
  18930. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  18931. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  18932. bbox.forEach(function (num) {
  18933. if (!isNumber(num)) throw new Error('bbox must only contain numbers');
  18934. });
  18935. }
  18936. /**
  18937. * Validate Id
  18938. *
  18939. * @private
  18940. * @param {string|number} id Id to validate
  18941. * @returns {void}
  18942. * @throws Error if Id is not valid
  18943. * @example
  18944. * validateId([-180, -40, 110, 50])
  18945. * //=Error
  18946. * validateId([-180, -40])
  18947. * //=Error
  18948. * validateId('Foo')
  18949. * //=OK
  18950. * validateId(5)
  18951. * //=OK
  18952. * validateId(null)
  18953. * //=Error
  18954. * validateId(undefined)
  18955. * //=Error
  18956. */
  18957. function validateId(id) {
  18958. if (!id) throw new Error('id is required');
  18959. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  18960. }
  18961. // Deprecated methods
  18962. function radians2degrees() {
  18963. throw new Error('method has been renamed to `radiansToDegrees`');
  18964. }
  18965. function degrees2radians() {
  18966. throw new Error('method has been renamed to `degreesToRadians`');
  18967. }
  18968. function distanceToDegrees() {
  18969. throw new Error('method has been renamed to `lengthToDegrees`');
  18970. }
  18971. function distanceToRadians() {
  18972. throw new Error('method has been renamed to `lengthToRadians`');
  18973. }
  18974. function radiansToDistance() {
  18975. throw new Error('method has been renamed to `radiansToLength`');
  18976. }
  18977. function bearingToAngle() {
  18978. throw new Error('method has been renamed to `bearingToAzimuth`');
  18979. }
  18980. function convertDistance() {
  18981. throw new Error('method has been renamed to `convertLength`');
  18982. }
  18983. // CONCATENATED MODULE: ./node_modules/@turf/center/node_modules/@turf/meta/main.es.js
  18984. /**
  18985. * Callback for coordEach
  18986. *
  18987. * @callback coordEachCallback
  18988. * @param {Array<number>} currentCoord The current coordinate being processed.
  18989. * @param {number} coordIndex The current index of the coordinate being processed.
  18990. * @param {number} featureIndex The current index of the Feature being processed.
  18991. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  18992. * @param {number} geometryIndex The current index of the Geometry being processed.
  18993. */
  18994. /**
  18995. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  18996. *
  18997. * @name coordEach
  18998. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  18999. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  19000. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  19001. * @returns {void}
  19002. * @example
  19003. * var features = turf.featureCollection([
  19004. * turf.point([26, 37], {"foo": "bar"}),
  19005. * turf.point([36, 53], {"hello": "world"})
  19006. * ]);
  19007. *
  19008. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  19009. * //=currentCoord
  19010. * //=coordIndex
  19011. * //=featureIndex
  19012. * //=multiFeatureIndex
  19013. * //=geometryIndex
  19014. * });
  19015. */
  19016. function coordEach(geojson, callback, excludeWrapCoord) {
  19017. // Handles null Geometry -- Skips this GeoJSON
  19018. if (geojson === null) return;
  19019. var j, k, l, geometry, stopG, coords,
  19020. geometryMaybeCollection,
  19021. wrapShrink = 0,
  19022. coordIndex = 0,
  19023. isGeometryCollection,
  19024. type = geojson.type,
  19025. isFeatureCollection = type === 'FeatureCollection',
  19026. isFeature = type === 'Feature',
  19027. stop = isFeatureCollection ? geojson.features.length : 1;
  19028. // This logic may look a little weird. The reason why it is that way
  19029. // is because it's trying to be fast. GeoJSON supports multiple kinds
  19030. // of objects at its root: FeatureCollection, Features, Geometries.
  19031. // This function has the responsibility of handling all of them, and that
  19032. // means that some of the `for` loops you see below actually just don't apply
  19033. // to certain inputs. For instance, if you give this just a
  19034. // Point geometry, then both loops are short-circuited and all we do
  19035. // is gradually rename the input until it's called 'geometry'.
  19036. //
  19037. // This also aims to allocate as few resources as possible: just a
  19038. // few numbers and booleans, rather than any temporary arrays as would
  19039. // be required with the normalization approach.
  19040. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  19041. geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :
  19042. (isFeature ? geojson.geometry : geojson));
  19043. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  19044. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  19045. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  19046. var multiFeatureIndex = 0;
  19047. var geometryIndex = 0;
  19048. geometry = isGeometryCollection ?
  19049. geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;
  19050. // Handles null Geometry -- Skips this geometry
  19051. if (geometry === null) continue;
  19052. coords = geometry.coordinates;
  19053. var geomType = geometry.type;
  19054. wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;
  19055. switch (geomType) {
  19056. case null:
  19057. break;
  19058. case 'Point':
  19059. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  19060. coordIndex++;
  19061. multiFeatureIndex++;
  19062. break;
  19063. case 'LineString':
  19064. case 'MultiPoint':
  19065. for (j = 0; j < coords.length; j++) {
  19066. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  19067. coordIndex++;
  19068. if (geomType === 'MultiPoint') multiFeatureIndex++;
  19069. }
  19070. if (geomType === 'LineString') multiFeatureIndex++;
  19071. break;
  19072. case 'Polygon':
  19073. case 'MultiLineString':
  19074. for (j = 0; j < coords.length; j++) {
  19075. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  19076. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  19077. coordIndex++;
  19078. }
  19079. if (geomType === 'MultiLineString') multiFeatureIndex++;
  19080. if (geomType === 'Polygon') geometryIndex++;
  19081. }
  19082. if (geomType === 'Polygon') multiFeatureIndex++;
  19083. break;
  19084. case 'MultiPolygon':
  19085. for (j = 0; j < coords.length; j++) {
  19086. if (geomType === 'MultiPolygon') geometryIndex = 0;
  19087. for (k = 0; k < coords[j].length; k++) {
  19088. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  19089. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  19090. coordIndex++;
  19091. }
  19092. geometryIndex++;
  19093. }
  19094. multiFeatureIndex++;
  19095. }
  19096. break;
  19097. case 'GeometryCollection':
  19098. for (j = 0; j < geometry.geometries.length; j++)
  19099. if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  19100. break;
  19101. default:
  19102. throw new Error('Unknown Geometry Type');
  19103. }
  19104. }
  19105. }
  19106. }
  19107. /**
  19108. * Callback for coordReduce
  19109. *
  19110. * The first time the callback function is called, the values provided as arguments depend
  19111. * on whether the reduce method has an initialValue argument.
  19112. *
  19113. * If an initialValue is provided to the reduce method:
  19114. * - The previousValue argument is initialValue.
  19115. * - The currentValue argument is the value of the first element present in the array.
  19116. *
  19117. * If an initialValue is not provided:
  19118. * - The previousValue argument is the value of the first element present in the array.
  19119. * - The currentValue argument is the value of the second element present in the array.
  19120. *
  19121. * @callback coordReduceCallback
  19122. * @param {*} previousValue The accumulated value previously returned in the last invocation
  19123. * of the callback, or initialValue, if supplied.
  19124. * @param {Array<number>} currentCoord The current coordinate being processed.
  19125. * @param {number} coordIndex The current index of the coordinate being processed.
  19126. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  19127. * @param {number} featureIndex The current index of the Feature being processed.
  19128. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  19129. * @param {number} geometryIndex The current index of the Geometry being processed.
  19130. */
  19131. /**
  19132. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  19133. *
  19134. * @name coordReduce
  19135. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  19136. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  19137. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  19138. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  19139. * @returns {*} The value that results from the reduction.
  19140. * @example
  19141. * var features = turf.featureCollection([
  19142. * turf.point([26, 37], {"foo": "bar"}),
  19143. * turf.point([36, 53], {"hello": "world"})
  19144. * ]);
  19145. *
  19146. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  19147. * //=previousValue
  19148. * //=currentCoord
  19149. * //=coordIndex
  19150. * //=featureIndex
  19151. * //=multiFeatureIndex
  19152. * //=geometryIndex
  19153. * return currentCoord;
  19154. * });
  19155. */
  19156. function coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  19157. var previousValue = initialValue;
  19158. coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  19159. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;
  19160. else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  19161. }, excludeWrapCoord);
  19162. return previousValue;
  19163. }
  19164. /**
  19165. * Callback for propEach
  19166. *
  19167. * @callback propEachCallback
  19168. * @param {Object} currentProperties The current Properties being processed.
  19169. * @param {number} featureIndex The current index of the Feature being processed.
  19170. */
  19171. /**
  19172. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  19173. *
  19174. * @name propEach
  19175. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  19176. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  19177. * @returns {void}
  19178. * @example
  19179. * var features = turf.featureCollection([
  19180. * turf.point([26, 37], {foo: 'bar'}),
  19181. * turf.point([36, 53], {hello: 'world'})
  19182. * ]);
  19183. *
  19184. * turf.propEach(features, function (currentProperties, featureIndex) {
  19185. * //=currentProperties
  19186. * //=featureIndex
  19187. * });
  19188. */
  19189. function propEach(geojson, callback) {
  19190. var i;
  19191. switch (geojson.type) {
  19192. case 'FeatureCollection':
  19193. for (i = 0; i < geojson.features.length; i++) {
  19194. if (callback(geojson.features[i].properties, i) === false) break;
  19195. }
  19196. break;
  19197. case 'Feature':
  19198. callback(geojson.properties, 0);
  19199. break;
  19200. }
  19201. }
  19202. /**
  19203. * Callback for propReduce
  19204. *
  19205. * The first time the callback function is called, the values provided as arguments depend
  19206. * on whether the reduce method has an initialValue argument.
  19207. *
  19208. * If an initialValue is provided to the reduce method:
  19209. * - The previousValue argument is initialValue.
  19210. * - The currentValue argument is the value of the first element present in the array.
  19211. *
  19212. * If an initialValue is not provided:
  19213. * - The previousValue argument is the value of the first element present in the array.
  19214. * - The currentValue argument is the value of the second element present in the array.
  19215. *
  19216. * @callback propReduceCallback
  19217. * @param {*} previousValue The accumulated value previously returned in the last invocation
  19218. * of the callback, or initialValue, if supplied.
  19219. * @param {*} currentProperties The current Properties being processed.
  19220. * @param {number} featureIndex The current index of the Feature being processed.
  19221. */
  19222. /**
  19223. * Reduce properties in any GeoJSON object into a single value,
  19224. * similar to how Array.reduce works. However, in this case we lazily run
  19225. * the reduction, so an array of all properties is unnecessary.
  19226. *
  19227. * @name propReduce
  19228. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  19229. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  19230. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  19231. * @returns {*} The value that results from the reduction.
  19232. * @example
  19233. * var features = turf.featureCollection([
  19234. * turf.point([26, 37], {foo: 'bar'}),
  19235. * turf.point([36, 53], {hello: 'world'})
  19236. * ]);
  19237. *
  19238. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  19239. * //=previousValue
  19240. * //=currentProperties
  19241. * //=featureIndex
  19242. * return currentProperties
  19243. * });
  19244. */
  19245. function propReduce(geojson, callback, initialValue) {
  19246. var previousValue = initialValue;
  19247. propEach(geojson, function (currentProperties, featureIndex) {
  19248. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;
  19249. else previousValue = callback(previousValue, currentProperties, featureIndex);
  19250. });
  19251. return previousValue;
  19252. }
  19253. /**
  19254. * Callback for featureEach
  19255. *
  19256. * @callback featureEachCallback
  19257. * @param {Feature<any>} currentFeature The current Feature being processed.
  19258. * @param {number} featureIndex The current index of the Feature being processed.
  19259. */
  19260. /**
  19261. * Iterate over features in any GeoJSON object, similar to
  19262. * Array.forEach.
  19263. *
  19264. * @name featureEach
  19265. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  19266. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  19267. * @returns {void}
  19268. * @example
  19269. * var features = turf.featureCollection([
  19270. * turf.point([26, 37], {foo: 'bar'}),
  19271. * turf.point([36, 53], {hello: 'world'})
  19272. * ]);
  19273. *
  19274. * turf.featureEach(features, function (currentFeature, featureIndex) {
  19275. * //=currentFeature
  19276. * //=featureIndex
  19277. * });
  19278. */
  19279. function featureEach(geojson, callback) {
  19280. if (geojson.type === 'Feature') {
  19281. callback(geojson, 0);
  19282. } else if (geojson.type === 'FeatureCollection') {
  19283. for (var i = 0; i < geojson.features.length; i++) {
  19284. if (callback(geojson.features[i], i) === false) break;
  19285. }
  19286. }
  19287. }
  19288. /**
  19289. * Callback for featureReduce
  19290. *
  19291. * The first time the callback function is called, the values provided as arguments depend
  19292. * on whether the reduce method has an initialValue argument.
  19293. *
  19294. * If an initialValue is provided to the reduce method:
  19295. * - The previousValue argument is initialValue.
  19296. * - The currentValue argument is the value of the first element present in the array.
  19297. *
  19298. * If an initialValue is not provided:
  19299. * - The previousValue argument is the value of the first element present in the array.
  19300. * - The currentValue argument is the value of the second element present in the array.
  19301. *
  19302. * @callback featureReduceCallback
  19303. * @param {*} previousValue The accumulated value previously returned in the last invocation
  19304. * of the callback, or initialValue, if supplied.
  19305. * @param {Feature} currentFeature The current Feature being processed.
  19306. * @param {number} featureIndex The current index of the Feature being processed.
  19307. */
  19308. /**
  19309. * Reduce features in any GeoJSON object, similar to Array.reduce().
  19310. *
  19311. * @name featureReduce
  19312. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  19313. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  19314. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  19315. * @returns {*} The value that results from the reduction.
  19316. * @example
  19317. * var features = turf.featureCollection([
  19318. * turf.point([26, 37], {"foo": "bar"}),
  19319. * turf.point([36, 53], {"hello": "world"})
  19320. * ]);
  19321. *
  19322. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  19323. * //=previousValue
  19324. * //=currentFeature
  19325. * //=featureIndex
  19326. * return currentFeature
  19327. * });
  19328. */
  19329. function featureReduce(geojson, callback, initialValue) {
  19330. var previousValue = initialValue;
  19331. featureEach(geojson, function (currentFeature, featureIndex) {
  19332. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  19333. else previousValue = callback(previousValue, currentFeature, featureIndex);
  19334. });
  19335. return previousValue;
  19336. }
  19337. /**
  19338. * Get all coordinates from any GeoJSON object.
  19339. *
  19340. * @name coordAll
  19341. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  19342. * @returns {Array<Array<number>>} coordinate position array
  19343. * @example
  19344. * var features = turf.featureCollection([
  19345. * turf.point([26, 37], {foo: 'bar'}),
  19346. * turf.point([36, 53], {hello: 'world'})
  19347. * ]);
  19348. *
  19349. * var coords = turf.coordAll(features);
  19350. * //= [[26, 37], [36, 53]]
  19351. */
  19352. function coordAll(geojson) {
  19353. var coords = [];
  19354. coordEach(geojson, function (coord) {
  19355. coords.push(coord);
  19356. });
  19357. return coords;
  19358. }
  19359. /**
  19360. * Callback for geomEach
  19361. *
  19362. * @callback geomEachCallback
  19363. * @param {Geometry} currentGeometry The current Geometry being processed.
  19364. * @param {number} featureIndex The current index of the Feature being processed.
  19365. * @param {Object} featureProperties The current Feature Properties being processed.
  19366. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  19367. * @param {number|string} featureId The current Feature Id being processed.
  19368. */
  19369. /**
  19370. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  19371. *
  19372. * @name geomEach
  19373. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  19374. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  19375. * @returns {void}
  19376. * @example
  19377. * var features = turf.featureCollection([
  19378. * turf.point([26, 37], {foo: 'bar'}),
  19379. * turf.point([36, 53], {hello: 'world'})
  19380. * ]);
  19381. *
  19382. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  19383. * //=currentGeometry
  19384. * //=featureIndex
  19385. * //=featureProperties
  19386. * //=featureBBox
  19387. * //=featureId
  19388. * });
  19389. */
  19390. function geomEach(geojson, callback) {
  19391. var i, j, g, geometry, stopG,
  19392. geometryMaybeCollection,
  19393. isGeometryCollection,
  19394. featureProperties,
  19395. featureBBox,
  19396. featureId,
  19397. featureIndex = 0,
  19398. isFeatureCollection = geojson.type === 'FeatureCollection',
  19399. isFeature = geojson.type === 'Feature',
  19400. stop = isFeatureCollection ? geojson.features.length : 1;
  19401. // This logic may look a little weird. The reason why it is that way
  19402. // is because it's trying to be fast. GeoJSON supports multiple kinds
  19403. // of objects at its root: FeatureCollection, Features, Geometries.
  19404. // This function has the responsibility of handling all of them, and that
  19405. // means that some of the `for` loops you see below actually just don't apply
  19406. // to certain inputs. For instance, if you give this just a
  19407. // Point geometry, then both loops are short-circuited and all we do
  19408. // is gradually rename the input until it's called 'geometry'.
  19409. //
  19410. // This also aims to allocate as few resources as possible: just a
  19411. // few numbers and booleans, rather than any temporary arrays as would
  19412. // be required with the normalization approach.
  19413. for (i = 0; i < stop; i++) {
  19414. geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :
  19415. (isFeature ? geojson.geometry : geojson));
  19416. featureProperties = (isFeatureCollection ? geojson.features[i].properties :
  19417. (isFeature ? geojson.properties : {}));
  19418. featureBBox = (isFeatureCollection ? geojson.features[i].bbox :
  19419. (isFeature ? geojson.bbox : undefined));
  19420. featureId = (isFeatureCollection ? geojson.features[i].id :
  19421. (isFeature ? geojson.id : undefined));
  19422. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  19423. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  19424. for (g = 0; g < stopG; g++) {
  19425. geometry = isGeometryCollection ?
  19426. geometryMaybeCollection.geometries[g] : geometryMaybeCollection;
  19427. // Handle null Geometry
  19428. if (geometry === null) {
  19429. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  19430. continue;
  19431. }
  19432. switch (geometry.type) {
  19433. case 'Point':
  19434. case 'LineString':
  19435. case 'MultiPoint':
  19436. case 'Polygon':
  19437. case 'MultiLineString':
  19438. case 'MultiPolygon': {
  19439. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  19440. break;
  19441. }
  19442. case 'GeometryCollection': {
  19443. for (j = 0; j < geometry.geometries.length; j++) {
  19444. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  19445. }
  19446. break;
  19447. }
  19448. default:
  19449. throw new Error('Unknown Geometry Type');
  19450. }
  19451. }
  19452. // Only increase `featureIndex` per each feature
  19453. featureIndex++;
  19454. }
  19455. }
  19456. /**
  19457. * Callback for geomReduce
  19458. *
  19459. * The first time the callback function is called, the values provided as arguments depend
  19460. * on whether the reduce method has an initialValue argument.
  19461. *
  19462. * If an initialValue is provided to the reduce method:
  19463. * - The previousValue argument is initialValue.
  19464. * - The currentValue argument is the value of the first element present in the array.
  19465. *
  19466. * If an initialValue is not provided:
  19467. * - The previousValue argument is the value of the first element present in the array.
  19468. * - The currentValue argument is the value of the second element present in the array.
  19469. *
  19470. * @callback geomReduceCallback
  19471. * @param {*} previousValue The accumulated value previously returned in the last invocation
  19472. * of the callback, or initialValue, if supplied.
  19473. * @param {Geometry} currentGeometry The current Geometry being processed.
  19474. * @param {number} featureIndex The current index of the Feature being processed.
  19475. * @param {Object} featureProperties The current Feature Properties being processed.
  19476. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  19477. * @param {number|string} featureId The current Feature Id being processed.
  19478. */
  19479. /**
  19480. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  19481. *
  19482. * @name geomReduce
  19483. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  19484. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  19485. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  19486. * @returns {*} The value that results from the reduction.
  19487. * @example
  19488. * var features = turf.featureCollection([
  19489. * turf.point([26, 37], {foo: 'bar'}),
  19490. * turf.point([36, 53], {hello: 'world'})
  19491. * ]);
  19492. *
  19493. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  19494. * //=previousValue
  19495. * //=currentGeometry
  19496. * //=featureIndex
  19497. * //=featureProperties
  19498. * //=featureBBox
  19499. * //=featureId
  19500. * return currentGeometry
  19501. * });
  19502. */
  19503. function geomReduce(geojson, callback, initialValue) {
  19504. var previousValue = initialValue;
  19505. geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  19506. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;
  19507. else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  19508. });
  19509. return previousValue;
  19510. }
  19511. /**
  19512. * Callback for flattenEach
  19513. *
  19514. * @callback flattenEachCallback
  19515. * @param {Feature} currentFeature The current flattened feature being processed.
  19516. * @param {number} featureIndex The current index of the Feature being processed.
  19517. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  19518. */
  19519. /**
  19520. * Iterate over flattened features in any GeoJSON object, similar to
  19521. * Array.forEach.
  19522. *
  19523. * @name flattenEach
  19524. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  19525. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  19526. * @example
  19527. * var features = turf.featureCollection([
  19528. * turf.point([26, 37], {foo: 'bar'}),
  19529. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  19530. * ]);
  19531. *
  19532. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  19533. * //=currentFeature
  19534. * //=featureIndex
  19535. * //=multiFeatureIndex
  19536. * });
  19537. */
  19538. function flattenEach(geojson, callback) {
  19539. geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  19540. // Callback for single geometry
  19541. var type = (geometry === null) ? null : geometry.type;
  19542. switch (type) {
  19543. case null:
  19544. case 'Point':
  19545. case 'LineString':
  19546. case 'Polygon':
  19547. if (callback(main_es_feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0) === false) return false;
  19548. return;
  19549. }
  19550. var geomType;
  19551. // Callback for multi-geometry
  19552. switch (type) {
  19553. case 'MultiPoint':
  19554. geomType = 'Point';
  19555. break;
  19556. case 'MultiLineString':
  19557. geomType = 'LineString';
  19558. break;
  19559. case 'MultiPolygon':
  19560. geomType = 'Polygon';
  19561. break;
  19562. }
  19563. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  19564. var coordinate = geometry.coordinates[multiFeatureIndex];
  19565. var geom = {
  19566. type: geomType,
  19567. coordinates: coordinate
  19568. };
  19569. if (callback(main_es_feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  19570. }
  19571. });
  19572. }
  19573. /**
  19574. * Callback for flattenReduce
  19575. *
  19576. * The first time the callback function is called, the values provided as arguments depend
  19577. * on whether the reduce method has an initialValue argument.
  19578. *
  19579. * If an initialValue is provided to the reduce method:
  19580. * - The previousValue argument is initialValue.
  19581. * - The currentValue argument is the value of the first element present in the array.
  19582. *
  19583. * If an initialValue is not provided:
  19584. * - The previousValue argument is the value of the first element present in the array.
  19585. * - The currentValue argument is the value of the second element present in the array.
  19586. *
  19587. * @callback flattenReduceCallback
  19588. * @param {*} previousValue The accumulated value previously returned in the last invocation
  19589. * of the callback, or initialValue, if supplied.
  19590. * @param {Feature} currentFeature The current Feature being processed.
  19591. * @param {number} featureIndex The current index of the Feature being processed.
  19592. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  19593. */
  19594. /**
  19595. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  19596. *
  19597. * @name flattenReduce
  19598. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  19599. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  19600. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  19601. * @returns {*} The value that results from the reduction.
  19602. * @example
  19603. * var features = turf.featureCollection([
  19604. * turf.point([26, 37], {foo: 'bar'}),
  19605. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  19606. * ]);
  19607. *
  19608. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  19609. * //=previousValue
  19610. * //=currentFeature
  19611. * //=featureIndex
  19612. * //=multiFeatureIndex
  19613. * return currentFeature
  19614. * });
  19615. */
  19616. function flattenReduce(geojson, callback, initialValue) {
  19617. var previousValue = initialValue;
  19618. flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  19619. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  19620. else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  19621. });
  19622. return previousValue;
  19623. }
  19624. /**
  19625. * Callback for segmentEach
  19626. *
  19627. * @callback segmentEachCallback
  19628. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  19629. * @param {number} featureIndex The current index of the Feature being processed.
  19630. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  19631. * @param {number} geometryIndex The current index of the Geometry being processed.
  19632. * @param {number} segmentIndex The current index of the Segment being processed.
  19633. * @returns {void}
  19634. */
  19635. /**
  19636. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  19637. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  19638. *
  19639. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  19640. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  19641. * @returns {void}
  19642. * @example
  19643. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  19644. *
  19645. * // Iterate over GeoJSON by 2-vertex segments
  19646. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  19647. * //=currentSegment
  19648. * //=featureIndex
  19649. * //=multiFeatureIndex
  19650. * //=geometryIndex
  19651. * //=segmentIndex
  19652. * });
  19653. *
  19654. * // Calculate the total number of segments
  19655. * var total = 0;
  19656. * turf.segmentEach(polygon, function () {
  19657. * total++;
  19658. * });
  19659. */
  19660. function segmentEach(geojson, callback) {
  19661. flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  19662. var segmentIndex = 0;
  19663. // Exclude null Geometries
  19664. if (!feature$$1.geometry) return;
  19665. // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  19666. var type = feature$$1.geometry.type;
  19667. if (type === 'Point' || type === 'MultiPoint') return;
  19668. // Generate 2-vertex line segments
  19669. var previousCoords;
  19670. if (coordEach(feature$$1, function (currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {
  19671. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  19672. if (previousCoords === undefined) {
  19673. previousCoords = currentCoord;
  19674. return;
  19675. }
  19676. var currentSegment = lineString([previousCoords, currentCoord], feature$$1.properties);
  19677. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  19678. segmentIndex++;
  19679. previousCoords = currentCoord;
  19680. }) === false) return false;
  19681. });
  19682. }
  19683. /**
  19684. * Callback for segmentReduce
  19685. *
  19686. * The first time the callback function is called, the values provided as arguments depend
  19687. * on whether the reduce method has an initialValue argument.
  19688. *
  19689. * If an initialValue is provided to the reduce method:
  19690. * - The previousValue argument is initialValue.
  19691. * - The currentValue argument is the value of the first element present in the array.
  19692. *
  19693. * If an initialValue is not provided:
  19694. * - The previousValue argument is the value of the first element present in the array.
  19695. * - The currentValue argument is the value of the second element present in the array.
  19696. *
  19697. * @callback segmentReduceCallback
  19698. * @param {*} previousValue The accumulated value previously returned in the last invocation
  19699. * of the callback, or initialValue, if supplied.
  19700. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  19701. * @param {number} featureIndex The current index of the Feature being processed.
  19702. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  19703. * @param {number} geometryIndex The current index of the Geometry being processed.
  19704. * @param {number} segmentIndex The current index of the Segment being processed.
  19705. */
  19706. /**
  19707. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  19708. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  19709. *
  19710. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  19711. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  19712. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  19713. * @returns {void}
  19714. * @example
  19715. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  19716. *
  19717. * // Iterate over GeoJSON by 2-vertex segments
  19718. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  19719. * //= previousSegment
  19720. * //= currentSegment
  19721. * //= featureIndex
  19722. * //= multiFeatureIndex
  19723. * //= geometryIndex
  19724. * //= segmentInex
  19725. * return currentSegment
  19726. * });
  19727. *
  19728. * // Calculate the total number of segments
  19729. * var initialValue = 0
  19730. * var total = turf.segmentReduce(polygon, function (previousValue) {
  19731. * previousValue++;
  19732. * return previousValue;
  19733. * }, initialValue);
  19734. */
  19735. function segmentReduce(geojson, callback, initialValue) {
  19736. var previousValue = initialValue;
  19737. var started = false;
  19738. segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  19739. if (started === false && initialValue === undefined) previousValue = currentSegment;
  19740. else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  19741. started = true;
  19742. });
  19743. return previousValue;
  19744. }
  19745. /**
  19746. * Callback for lineEach
  19747. *
  19748. * @callback lineEachCallback
  19749. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  19750. * @param {number} featureIndex The current index of the Feature being processed
  19751. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  19752. * @param {number} geometryIndex The current index of the Geometry being processed
  19753. */
  19754. /**
  19755. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  19756. * similar to Array.forEach.
  19757. *
  19758. * @name lineEach
  19759. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  19760. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  19761. * @example
  19762. * var multiLine = turf.multiLineString([
  19763. * [[26, 37], [35, 45]],
  19764. * [[36, 53], [38, 50], [41, 55]]
  19765. * ]);
  19766. *
  19767. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  19768. * //=currentLine
  19769. * //=featureIndex
  19770. * //=multiFeatureIndex
  19771. * //=geometryIndex
  19772. * });
  19773. */
  19774. function lineEach(geojson, callback) {
  19775. // validation
  19776. if (!geojson) throw new Error('geojson is required');
  19777. flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  19778. if (feature$$1.geometry === null) return;
  19779. var type = feature$$1.geometry.type;
  19780. var coords = feature$$1.geometry.coordinates;
  19781. switch (type) {
  19782. case 'LineString':
  19783. if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  19784. break;
  19785. case 'Polygon':
  19786. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  19787. if (callback(lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  19788. }
  19789. break;
  19790. }
  19791. });
  19792. }
  19793. /**
  19794. * Callback for lineReduce
  19795. *
  19796. * The first time the callback function is called, the values provided as arguments depend
  19797. * on whether the reduce method has an initialValue argument.
  19798. *
  19799. * If an initialValue is provided to the reduce method:
  19800. * - The previousValue argument is initialValue.
  19801. * - The currentValue argument is the value of the first element present in the array.
  19802. *
  19803. * If an initialValue is not provided:
  19804. * - The previousValue argument is the value of the first element present in the array.
  19805. * - The currentValue argument is the value of the second element present in the array.
  19806. *
  19807. * @callback lineReduceCallback
  19808. * @param {*} previousValue The accumulated value previously returned in the last invocation
  19809. * of the callback, or initialValue, if supplied.
  19810. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  19811. * @param {number} featureIndex The current index of the Feature being processed
  19812. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  19813. * @param {number} geometryIndex The current index of the Geometry being processed
  19814. */
  19815. /**
  19816. * Reduce features in any GeoJSON object, similar to Array.reduce().
  19817. *
  19818. * @name lineReduce
  19819. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  19820. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  19821. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  19822. * @returns {*} The value that results from the reduction.
  19823. * @example
  19824. * var multiPoly = turf.multiPolygon([
  19825. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  19826. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  19827. * ]);
  19828. *
  19829. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  19830. * //=previousValue
  19831. * //=currentLine
  19832. * //=featureIndex
  19833. * //=multiFeatureIndex
  19834. * //=geometryIndex
  19835. * return currentLine
  19836. * });
  19837. */
  19838. function lineReduce(geojson, callback, initialValue) {
  19839. var previousValue = initialValue;
  19840. lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  19841. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;
  19842. else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  19843. });
  19844. return previousValue;
  19845. }
  19846. /**
  19847. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  19848. *
  19849. * Negative indexes are permitted.
  19850. * Point & MultiPoint will always return null.
  19851. *
  19852. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  19853. * @param {Object} [options={}] Optional parameters
  19854. * @param {number} [options.featureIndex=0] Feature Index
  19855. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  19856. * @param {number} [options.geometryIndex=0] Geometry Index
  19857. * @param {number} [options.segmentIndex=0] Segment Index
  19858. * @param {Object} [options.properties={}] Translate Properties to output LineString
  19859. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  19860. * @param {number|string} [options.id={}] Translate Id to output LineString
  19861. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  19862. * @example
  19863. * var multiLine = turf.multiLineString([
  19864. * [[10, 10], [50, 30], [30, 40]],
  19865. * [[-10, -10], [-50, -30], [-30, -40]]
  19866. * ]);
  19867. *
  19868. * // First Segment (defaults are 0)
  19869. * turf.findSegment(multiLine);
  19870. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  19871. *
  19872. * // First Segment of 2nd Multi Feature
  19873. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  19874. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  19875. *
  19876. * // Last Segment of Last Multi Feature
  19877. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  19878. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  19879. */
  19880. function findSegment(geojson, options) {
  19881. // Optional Parameters
  19882. options = options || {};
  19883. if (!isObject(options)) throw new Error('options is invalid');
  19884. var featureIndex = options.featureIndex || 0;
  19885. var multiFeatureIndex = options.multiFeatureIndex || 0;
  19886. var geometryIndex = options.geometryIndex || 0;
  19887. var segmentIndex = options.segmentIndex || 0;
  19888. // Find FeatureIndex
  19889. var properties = options.properties;
  19890. var geometry;
  19891. switch (geojson.type) {
  19892. case 'FeatureCollection':
  19893. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  19894. properties = properties || geojson.features[featureIndex].properties;
  19895. geometry = geojson.features[featureIndex].geometry;
  19896. break;
  19897. case 'Feature':
  19898. properties = properties || geojson.properties;
  19899. geometry = geojson.geometry;
  19900. break;
  19901. case 'Point':
  19902. case 'MultiPoint':
  19903. return null;
  19904. case 'LineString':
  19905. case 'Polygon':
  19906. case 'MultiLineString':
  19907. case 'MultiPolygon':
  19908. geometry = geojson;
  19909. break;
  19910. default:
  19911. throw new Error('geojson is invalid');
  19912. }
  19913. // Find SegmentIndex
  19914. if (geometry === null) return null;
  19915. var coords = geometry.coordinates;
  19916. switch (geometry.type) {
  19917. case 'Point':
  19918. case 'MultiPoint':
  19919. return null;
  19920. case 'LineString':
  19921. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  19922. return lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  19923. case 'Polygon':
  19924. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  19925. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  19926. return lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  19927. case 'MultiLineString':
  19928. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  19929. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  19930. return lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  19931. case 'MultiPolygon':
  19932. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  19933. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  19934. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  19935. return lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  19936. }
  19937. throw new Error('geojson is invalid');
  19938. }
  19939. /**
  19940. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  19941. *
  19942. * Negative indexes are permitted.
  19943. *
  19944. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  19945. * @param {Object} [options={}] Optional parameters
  19946. * @param {number} [options.featureIndex=0] Feature Index
  19947. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  19948. * @param {number} [options.geometryIndex=0] Geometry Index
  19949. * @param {number} [options.coordIndex=0] Coord Index
  19950. * @param {Object} [options.properties={}] Translate Properties to output Point
  19951. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  19952. * @param {number|string} [options.id={}] Translate Id to output Point
  19953. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  19954. * @example
  19955. * var multiLine = turf.multiLineString([
  19956. * [[10, 10], [50, 30], [30, 40]],
  19957. * [[-10, -10], [-50, -30], [-30, -40]]
  19958. * ]);
  19959. *
  19960. * // First Segment (defaults are 0)
  19961. * turf.findPoint(multiLine);
  19962. * // => Feature<Point<[10, 10]>>
  19963. *
  19964. * // First Segment of the 2nd Multi-Feature
  19965. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  19966. * // => Feature<Point<[-10, -10]>>
  19967. *
  19968. * // Last Segment of last Multi-Feature
  19969. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  19970. * // => Feature<Point<[-30, -40]>>
  19971. */
  19972. function findPoint(geojson, options) {
  19973. // Optional Parameters
  19974. options = options || {};
  19975. if (!isObject(options)) throw new Error('options is invalid');
  19976. var featureIndex = options.featureIndex || 0;
  19977. var multiFeatureIndex = options.multiFeatureIndex || 0;
  19978. var geometryIndex = options.geometryIndex || 0;
  19979. var coordIndex = options.coordIndex || 0;
  19980. // Find FeatureIndex
  19981. var properties = options.properties;
  19982. var geometry;
  19983. switch (geojson.type) {
  19984. case 'FeatureCollection':
  19985. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  19986. properties = properties || geojson.features[featureIndex].properties;
  19987. geometry = geojson.features[featureIndex].geometry;
  19988. break;
  19989. case 'Feature':
  19990. properties = properties || geojson.properties;
  19991. geometry = geojson.geometry;
  19992. break;
  19993. case 'Point':
  19994. case 'MultiPoint':
  19995. return null;
  19996. case 'LineString':
  19997. case 'Polygon':
  19998. case 'MultiLineString':
  19999. case 'MultiPolygon':
  20000. geometry = geojson;
  20001. break;
  20002. default:
  20003. throw new Error('geojson is invalid');
  20004. }
  20005. // Find Coord Index
  20006. if (geometry === null) return null;
  20007. var coords = geometry.coordinates;
  20008. switch (geometry.type) {
  20009. case 'Point':
  20010. return point(coords, properties, options);
  20011. case 'MultiPoint':
  20012. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  20013. return point(coords[multiFeatureIndex], properties, options);
  20014. case 'LineString':
  20015. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  20016. return point(coords[coordIndex], properties, options);
  20017. case 'Polygon':
  20018. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  20019. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  20020. return point(coords[geometryIndex][coordIndex], properties, options);
  20021. case 'MultiLineString':
  20022. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  20023. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  20024. return point(coords[multiFeatureIndex][coordIndex], properties, options);
  20025. case 'MultiPolygon':
  20026. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  20027. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  20028. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  20029. return point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  20030. }
  20031. throw new Error('geojson is invalid');
  20032. }
  20033. // CONCATENATED MODULE: ./node_modules/@turf/center/node_modules/@turf/bbox/main.es.js
  20034. /**
  20035. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  20036. *
  20037. * @name bbox
  20038. * @param {GeoJSON} geojson any GeoJSON object
  20039. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  20040. * @example
  20041. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  20042. * var bbox = turf.bbox(line);
  20043. * var bboxPolygon = turf.bboxPolygon(bbox);
  20044. *
  20045. * //addToMap
  20046. * var addToMap = [line, bboxPolygon]
  20047. */
  20048. function main_es_bbox(geojson) {
  20049. var BBox = [Infinity, Infinity, -Infinity, -Infinity];
  20050. coordEach(geojson, function (coord) {
  20051. if (BBox[0] > coord[0]) BBox[0] = coord[0];
  20052. if (BBox[1] > coord[1]) BBox[1] = coord[1];
  20053. if (BBox[2] < coord[0]) BBox[2] = coord[0];
  20054. if (BBox[3] < coord[1]) BBox[3] = coord[1];
  20055. });
  20056. return BBox;
  20057. }
  20058. /* harmony default export */ var bbox_main_es = (main_es_bbox);
  20059. // CONCATENATED MODULE: ./node_modules/@turf/center/main.es.js
  20060. /**
  20061. * Takes a {@link Feature} or {@link FeatureCollection} and returns the absolute center point of all features.
  20062. *
  20063. * @name center
  20064. * @param {GeoJSON} geojson GeoJSON to be centered
  20065. * @param {Object} [options={}] Optional parameters
  20066. * @param {Object} [options.properties={}] an Object that is used as the {@link Feature}'s properties
  20067. * @returns {Feature<Point>} a Point feature at the absolute center point of all input features
  20068. * @example
  20069. * var features = turf.featureCollection([
  20070. * turf.point( [-97.522259, 35.4691]),
  20071. * turf.point( [-97.502754, 35.463455]),
  20072. * turf.point( [-97.508269, 35.463245])
  20073. * ]);
  20074. *
  20075. * var center = turf.center(features);
  20076. *
  20077. * //addToMap
  20078. * var addToMap = [features, center]
  20079. * center.properties['marker-size'] = 'large';
  20080. * center.properties['marker-color'] = '#000';
  20081. */
  20082. function center(geojson, options) {
  20083. // Optional parameters
  20084. options = options || {};
  20085. if (!isObject(options)) throw new Error('options is invalid');
  20086. var properties = options.properties;
  20087. // Input validation
  20088. if (!geojson) throw new Error('geojson is required');
  20089. var ext = bbox_main_es(geojson);
  20090. var x = (ext[0] + ext[2]) / 2;
  20091. var y = (ext[1] + ext[3]) / 2;
  20092. return point([x, y], properties);
  20093. }
  20094. /* harmony default export */ var center_main_es = (center);
  20095. // CONCATENATED MODULE: ./node_modules/@turf/centroid/node_modules/@turf/helpers/main.es.js
  20096. /**
  20097. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  20098. */
  20099. var main_es_earthRadius = 6371008.8;
  20100. /**
  20101. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  20102. */
  20103. var main_es_factors = {
  20104. meters: main_es_earthRadius,
  20105. metres: main_es_earthRadius,
  20106. millimeters: main_es_earthRadius * 1000,
  20107. millimetres: main_es_earthRadius * 1000,
  20108. centimeters: main_es_earthRadius * 100,
  20109. centimetres: main_es_earthRadius * 100,
  20110. kilometers: main_es_earthRadius / 1000,
  20111. kilometres: main_es_earthRadius / 1000,
  20112. miles: main_es_earthRadius / 1609.344,
  20113. nauticalmiles: main_es_earthRadius / 1852,
  20114. inches: main_es_earthRadius * 39.370,
  20115. yards: main_es_earthRadius / 1.0936,
  20116. feet: main_es_earthRadius * 3.28084,
  20117. radians: 1,
  20118. degrees: main_es_earthRadius / 111325,
  20119. };
  20120. /**
  20121. * Units of measurement factors based on 1 meter.
  20122. */
  20123. var main_es_unitsFactors = {
  20124. meters: 1,
  20125. metres: 1,
  20126. millimeters: 1000,
  20127. millimetres: 1000,
  20128. centimeters: 100,
  20129. centimetres: 100,
  20130. kilometers: 1 / 1000,
  20131. kilometres: 1 / 1000,
  20132. miles: 1 / 1609.344,
  20133. nauticalmiles: 1 / 1852,
  20134. inches: 39.370,
  20135. yards: 1 / 1.0936,
  20136. feet: 3.28084,
  20137. radians: 1 / main_es_earthRadius,
  20138. degrees: 1 / 111325,
  20139. };
  20140. /**
  20141. * Area of measurement factors based on 1 square meter.
  20142. */
  20143. var main_es_areaFactors = {
  20144. meters: 1,
  20145. metres: 1,
  20146. millimeters: 1000000,
  20147. millimetres: 1000000,
  20148. centimeters: 10000,
  20149. centimetres: 10000,
  20150. kilometers: 0.000001,
  20151. kilometres: 0.000001,
  20152. acres: 0.000247105,
  20153. miles: 3.86e-7,
  20154. yards: 1.195990046,
  20155. feet: 10.763910417,
  20156. inches: 1550.003100006
  20157. };
  20158. /**
  20159. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  20160. *
  20161. * @name feature
  20162. * @param {Geometry} geometry input geometry
  20163. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20164. * @param {Object} [options={}] Optional Parameters
  20165. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20166. * @param {string|number} [options.id] Identifier associated with the Feature
  20167. * @returns {Feature} a GeoJSON Feature
  20168. * @example
  20169. * var geometry = {
  20170. * "type": "Point",
  20171. * "coordinates": [110, 50]
  20172. * };
  20173. *
  20174. * var feature = turf.feature(geometry);
  20175. *
  20176. * //=feature
  20177. */
  20178. function helpers_main_es_feature(geometry, properties, options) {
  20179. // Optional Parameters
  20180. options = options || {};
  20181. if (!main_es_isObject(options)) throw new Error('options is invalid');
  20182. var bbox = options.bbox;
  20183. var id = options.id;
  20184. // Validation
  20185. if (geometry === undefined) throw new Error('geometry is required');
  20186. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  20187. if (bbox) main_es_validateBBox(bbox);
  20188. if (id) main_es_validateId(id);
  20189. // Main
  20190. var feat = {type: 'Feature'};
  20191. if (id) feat.id = id;
  20192. if (bbox) feat.bbox = bbox;
  20193. feat.properties = properties || {};
  20194. feat.geometry = geometry;
  20195. return feat;
  20196. }
  20197. /**
  20198. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  20199. * For GeometryCollection type use `helpers.geometryCollection`
  20200. *
  20201. * @name geometry
  20202. * @param {string} type Geometry Type
  20203. * @param {Array<number>} coordinates Coordinates
  20204. * @param {Object} [options={}] Optional Parameters
  20205. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  20206. * @returns {Geometry} a GeoJSON Geometry
  20207. * @example
  20208. * var type = 'Point';
  20209. * var coordinates = [110, 50];
  20210. *
  20211. * var geometry = turf.geometry(type, coordinates);
  20212. *
  20213. * //=geometry
  20214. */
  20215. function helpers_main_es_geometry(type, coordinates, options) {
  20216. // Optional Parameters
  20217. options = options || {};
  20218. if (!main_es_isObject(options)) throw new Error('options is invalid');
  20219. var bbox = options.bbox;
  20220. // Validation
  20221. if (!type) throw new Error('type is required');
  20222. if (!coordinates) throw new Error('coordinates is required');
  20223. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  20224. if (bbox) main_es_validateBBox(bbox);
  20225. // Main
  20226. var geom;
  20227. switch (type) {
  20228. case 'Point': geom = main_es_point(coordinates).geometry; break;
  20229. case 'LineString': geom = main_es_lineString(coordinates).geometry; break;
  20230. case 'Polygon': geom = main_es_polygon(coordinates).geometry; break;
  20231. case 'MultiPoint': geom = main_es_multiPoint(coordinates).geometry; break;
  20232. case 'MultiLineString': geom = main_es_multiLineString(coordinates).geometry; break;
  20233. case 'MultiPolygon': geom = main_es_multiPolygon(coordinates).geometry; break;
  20234. default: throw new Error(type + ' is invalid');
  20235. }
  20236. if (bbox) geom.bbox = bbox;
  20237. return geom;
  20238. }
  20239. /**
  20240. * Creates a {@link Point} {@link Feature} from a Position.
  20241. *
  20242. * @name point
  20243. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  20244. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20245. * @param {Object} [options={}] Optional Parameters
  20246. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20247. * @param {string|number} [options.id] Identifier associated with the Feature
  20248. * @returns {Feature<Point>} a Point feature
  20249. * @example
  20250. * var point = turf.point([-75.343, 39.984]);
  20251. *
  20252. * //=point
  20253. */
  20254. function main_es_point(coordinates, properties, options) {
  20255. if (!coordinates) throw new Error('coordinates is required');
  20256. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  20257. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  20258. if (!main_es_isNumber(coordinates[0]) || !main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  20259. return helpers_main_es_feature({
  20260. type: 'Point',
  20261. coordinates: coordinates
  20262. }, properties, options);
  20263. }
  20264. /**
  20265. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  20266. *
  20267. * @name points
  20268. * @param {Array<Array<number>>} coordinates an array of Points
  20269. * @param {Object} [properties={}] Translate these properties to each Feature
  20270. * @param {Object} [options={}] Optional Parameters
  20271. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  20272. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  20273. * @returns {FeatureCollection<Point>} Point Feature
  20274. * @example
  20275. * var points = turf.points([
  20276. * [-75, 39],
  20277. * [-80, 45],
  20278. * [-78, 50]
  20279. * ]);
  20280. *
  20281. * //=points
  20282. */
  20283. function main_es_points(coordinates, properties, options) {
  20284. if (!coordinates) throw new Error('coordinates is required');
  20285. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  20286. return main_es_featureCollection(coordinates.map(function (coords) {
  20287. return main_es_point(coords, properties);
  20288. }), options);
  20289. }
  20290. /**
  20291. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  20292. *
  20293. * @name polygon
  20294. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  20295. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20296. * @param {Object} [options={}] Optional Parameters
  20297. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20298. * @param {string|number} [options.id] Identifier associated with the Feature
  20299. * @returns {Feature<Polygon>} Polygon Feature
  20300. * @example
  20301. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  20302. *
  20303. * //=polygon
  20304. */
  20305. function main_es_polygon(coordinates, properties, options) {
  20306. if (!coordinates) throw new Error('coordinates is required');
  20307. for (var i = 0; i < coordinates.length; i++) {
  20308. var ring = coordinates[i];
  20309. if (ring.length < 4) {
  20310. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  20311. }
  20312. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  20313. // Check if first point of Polygon contains two numbers
  20314. if (i === 0 && j === 0 && !main_es_isNumber(ring[0][0]) || !main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  20315. if (ring[ring.length - 1][j] !== ring[0][j]) {
  20316. throw new Error('First and last Position are not equivalent.');
  20317. }
  20318. }
  20319. }
  20320. return helpers_main_es_feature({
  20321. type: 'Polygon',
  20322. coordinates: coordinates
  20323. }, properties, options);
  20324. }
  20325. /**
  20326. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  20327. *
  20328. * @name polygons
  20329. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  20330. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20331. * @param {Object} [options={}] Optional Parameters
  20332. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20333. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  20334. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  20335. * @example
  20336. * var polygons = turf.polygons([
  20337. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  20338. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  20339. * ]);
  20340. *
  20341. * //=polygons
  20342. */
  20343. function main_es_polygons(coordinates, properties, options) {
  20344. if (!coordinates) throw new Error('coordinates is required');
  20345. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  20346. return main_es_featureCollection(coordinates.map(function (coords) {
  20347. return main_es_polygon(coords, properties);
  20348. }), options);
  20349. }
  20350. /**
  20351. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  20352. *
  20353. * @name lineString
  20354. * @param {Array<Array<number>>} coordinates an array of Positions
  20355. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20356. * @param {Object} [options={}] Optional Parameters
  20357. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20358. * @param {string|number} [options.id] Identifier associated with the Feature
  20359. * @returns {Feature<LineString>} LineString Feature
  20360. * @example
  20361. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  20362. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  20363. *
  20364. * //=linestring1
  20365. * //=linestring2
  20366. */
  20367. function main_es_lineString(coordinates, properties, options) {
  20368. if (!coordinates) throw new Error('coordinates is required');
  20369. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  20370. // Check if first point of LineString contains two numbers
  20371. if (!main_es_isNumber(coordinates[0][1]) || !main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  20372. return helpers_main_es_feature({
  20373. type: 'LineString',
  20374. coordinates: coordinates
  20375. }, properties, options);
  20376. }
  20377. /**
  20378. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  20379. *
  20380. * @name lineStrings
  20381. * @param {Array<Array<number>>} coordinates an array of LinearRings
  20382. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20383. * @param {Object} [options={}] Optional Parameters
  20384. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  20385. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  20386. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  20387. * @example
  20388. * var linestrings = turf.lineStrings([
  20389. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  20390. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  20391. * ]);
  20392. *
  20393. * //=linestrings
  20394. */
  20395. function main_es_lineStrings(coordinates, properties, options) {
  20396. if (!coordinates) throw new Error('coordinates is required');
  20397. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  20398. return main_es_featureCollection(coordinates.map(function (coords) {
  20399. return main_es_lineString(coords, properties);
  20400. }), options);
  20401. }
  20402. /**
  20403. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  20404. *
  20405. * @name featureCollection
  20406. * @param {Feature[]} features input features
  20407. * @param {Object} [options={}] Optional Parameters
  20408. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20409. * @param {string|number} [options.id] Identifier associated with the Feature
  20410. * @returns {FeatureCollection} FeatureCollection of Features
  20411. * @example
  20412. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  20413. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  20414. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  20415. *
  20416. * var collection = turf.featureCollection([
  20417. * locationA,
  20418. * locationB,
  20419. * locationC
  20420. * ]);
  20421. *
  20422. * //=collection
  20423. */
  20424. function main_es_featureCollection(features, options) {
  20425. // Optional Parameters
  20426. options = options || {};
  20427. if (!main_es_isObject(options)) throw new Error('options is invalid');
  20428. var bbox = options.bbox;
  20429. var id = options.id;
  20430. // Validation
  20431. if (!features) throw new Error('No features passed');
  20432. if (!Array.isArray(features)) throw new Error('features must be an Array');
  20433. if (bbox) main_es_validateBBox(bbox);
  20434. if (id) main_es_validateId(id);
  20435. // Main
  20436. var fc = {type: 'FeatureCollection'};
  20437. if (id) fc.id = id;
  20438. if (bbox) fc.bbox = bbox;
  20439. fc.features = features;
  20440. return fc;
  20441. }
  20442. /**
  20443. * Creates a {@link Feature<MultiLineString>} based on a
  20444. * coordinate array. Properties can be added optionally.
  20445. *
  20446. * @name multiLineString
  20447. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  20448. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20449. * @param {Object} [options={}] Optional Parameters
  20450. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20451. * @param {string|number} [options.id] Identifier associated with the Feature
  20452. * @returns {Feature<MultiLineString>} a MultiLineString feature
  20453. * @throws {Error} if no coordinates are passed
  20454. * @example
  20455. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  20456. *
  20457. * //=multiLine
  20458. */
  20459. function main_es_multiLineString(coordinates, properties, options) {
  20460. if (!coordinates) throw new Error('coordinates is required');
  20461. return helpers_main_es_feature({
  20462. type: 'MultiLineString',
  20463. coordinates: coordinates
  20464. }, properties, options);
  20465. }
  20466. /**
  20467. * Creates a {@link Feature<MultiPoint>} based on a
  20468. * coordinate array. Properties can be added optionally.
  20469. *
  20470. * @name multiPoint
  20471. * @param {Array<Array<number>>} coordinates an array of Positions
  20472. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20473. * @param {Object} [options={}] Optional Parameters
  20474. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20475. * @param {string|number} [options.id] Identifier associated with the Feature
  20476. * @returns {Feature<MultiPoint>} a MultiPoint feature
  20477. * @throws {Error} if no coordinates are passed
  20478. * @example
  20479. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  20480. *
  20481. * //=multiPt
  20482. */
  20483. function main_es_multiPoint(coordinates, properties, options) {
  20484. if (!coordinates) throw new Error('coordinates is required');
  20485. return helpers_main_es_feature({
  20486. type: 'MultiPoint',
  20487. coordinates: coordinates
  20488. }, properties, options);
  20489. }
  20490. /**
  20491. * Creates a {@link Feature<MultiPolygon>} based on a
  20492. * coordinate array. Properties can be added optionally.
  20493. *
  20494. * @name multiPolygon
  20495. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  20496. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20497. * @param {Object} [options={}] Optional Parameters
  20498. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20499. * @param {string|number} [options.id] Identifier associated with the Feature
  20500. * @returns {Feature<MultiPolygon>} a multipolygon feature
  20501. * @throws {Error} if no coordinates are passed
  20502. * @example
  20503. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  20504. *
  20505. * //=multiPoly
  20506. *
  20507. */
  20508. function main_es_multiPolygon(coordinates, properties, options) {
  20509. if (!coordinates) throw new Error('coordinates is required');
  20510. return helpers_main_es_feature({
  20511. type: 'MultiPolygon',
  20512. coordinates: coordinates
  20513. }, properties, options);
  20514. }
  20515. /**
  20516. * Creates a {@link Feature<GeometryCollection>} based on a
  20517. * coordinate array. Properties can be added optionally.
  20518. *
  20519. * @name geometryCollection
  20520. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  20521. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20522. * @param {Object} [options={}] Optional Parameters
  20523. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20524. * @param {string|number} [options.id] Identifier associated with the Feature
  20525. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  20526. * @example
  20527. * var pt = {
  20528. * "type": "Point",
  20529. * "coordinates": [100, 0]
  20530. * };
  20531. * var line = {
  20532. * "type": "LineString",
  20533. * "coordinates": [ [101, 0], [102, 1] ]
  20534. * };
  20535. * var collection = turf.geometryCollection([pt, line]);
  20536. *
  20537. * //=collection
  20538. */
  20539. function main_es_geometryCollection(geometries, properties, options) {
  20540. if (!geometries) throw new Error('geometries is required');
  20541. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  20542. return helpers_main_es_feature({
  20543. type: 'GeometryCollection',
  20544. geometries: geometries
  20545. }, properties, options);
  20546. }
  20547. /**
  20548. * Round number to precision
  20549. *
  20550. * @param {number} num Number
  20551. * @param {number} [precision=0] Precision
  20552. * @returns {number} rounded number
  20553. * @example
  20554. * turf.round(120.4321)
  20555. * //=120
  20556. *
  20557. * turf.round(120.4321, 2)
  20558. * //=120.43
  20559. */
  20560. function main_es_round(num, precision) {
  20561. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  20562. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  20563. var multiplier = Math.pow(10, precision || 0);
  20564. return Math.round(num * multiplier) / multiplier;
  20565. }
  20566. /**
  20567. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  20568. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  20569. *
  20570. * @name radiansToLength
  20571. * @param {number} radians in radians across the sphere
  20572. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  20573. * @returns {number} distance
  20574. */
  20575. function main_es_radiansToLength(radians, units) {
  20576. if (radians === undefined || radians === null) throw new Error('radians is required');
  20577. if (units && typeof units !== 'string') throw new Error('units must be a string');
  20578. var factor = main_es_factors[units || 'kilometers'];
  20579. if (!factor) throw new Error(units + ' units is invalid');
  20580. return radians * factor;
  20581. }
  20582. /**
  20583. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  20584. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  20585. *
  20586. * @name lengthToRadians
  20587. * @param {number} distance in real units
  20588. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  20589. * @returns {number} radians
  20590. */
  20591. function main_es_lengthToRadians(distance, units) {
  20592. if (distance === undefined || distance === null) throw new Error('distance is required');
  20593. if (units && typeof units !== 'string') throw new Error('units must be a string');
  20594. var factor = main_es_factors[units || 'kilometers'];
  20595. if (!factor) throw new Error(units + ' units is invalid');
  20596. return distance / factor;
  20597. }
  20598. /**
  20599. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  20600. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  20601. *
  20602. * @name lengthToDegrees
  20603. * @param {number} distance in real units
  20604. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  20605. * @returns {number} degrees
  20606. */
  20607. function main_es_lengthToDegrees(distance, units) {
  20608. return main_es_radiansToDegrees(main_es_lengthToRadians(distance, units));
  20609. }
  20610. /**
  20611. * Converts any bearing angle from the north line direction (positive clockwise)
  20612. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  20613. *
  20614. * @name bearingToAzimuth
  20615. * @param {number} bearing angle, between -180 and +180 degrees
  20616. * @returns {number} angle between 0 and 360 degrees
  20617. */
  20618. function main_es_bearingToAzimuth(bearing) {
  20619. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  20620. var angle = bearing % 360;
  20621. if (angle < 0) angle += 360;
  20622. return angle;
  20623. }
  20624. /**
  20625. * Converts an angle in radians to degrees
  20626. *
  20627. * @name radiansToDegrees
  20628. * @param {number} radians angle in radians
  20629. * @returns {number} degrees between 0 and 360 degrees
  20630. */
  20631. function main_es_radiansToDegrees(radians) {
  20632. if (radians === null || radians === undefined) throw new Error('radians is required');
  20633. var degrees = radians % (2 * Math.PI);
  20634. return degrees * 180 / Math.PI;
  20635. }
  20636. /**
  20637. * Converts an angle in degrees to radians
  20638. *
  20639. * @name degreesToRadians
  20640. * @param {number} degrees angle between 0 and 360 degrees
  20641. * @returns {number} angle in radians
  20642. */
  20643. function main_es_degreesToRadians(degrees) {
  20644. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  20645. var radians = degrees % 360;
  20646. return radians * Math.PI / 180;
  20647. }
  20648. /**
  20649. * Converts a length to the requested unit.
  20650. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  20651. *
  20652. * @param {number} length to be converted
  20653. * @param {string} originalUnit of the length
  20654. * @param {string} [finalUnit='kilometers'] returned unit
  20655. * @returns {number} the converted length
  20656. */
  20657. function main_es_convertLength(length, originalUnit, finalUnit) {
  20658. if (length === null || length === undefined) throw new Error('length is required');
  20659. if (!(length >= 0)) throw new Error('length must be a positive number');
  20660. return main_es_radiansToLength(main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  20661. }
  20662. /**
  20663. * Converts a area to the requested unit.
  20664. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  20665. * @param {number} area to be converted
  20666. * @param {string} [originalUnit='meters'] of the distance
  20667. * @param {string} [finalUnit='kilometers'] returned unit
  20668. * @returns {number} the converted distance
  20669. */
  20670. function main_es_convertArea(area, originalUnit, finalUnit) {
  20671. if (area === null || area === undefined) throw new Error('area is required');
  20672. if (!(area >= 0)) throw new Error('area must be a positive number');
  20673. var startFactor = main_es_areaFactors[originalUnit || 'meters'];
  20674. if (!startFactor) throw new Error('invalid original units');
  20675. var finalFactor = main_es_areaFactors[finalUnit || 'kilometers'];
  20676. if (!finalFactor) throw new Error('invalid final units');
  20677. return (area / startFactor) * finalFactor;
  20678. }
  20679. /**
  20680. * isNumber
  20681. *
  20682. * @param {*} num Number to validate
  20683. * @returns {boolean} true/false
  20684. * @example
  20685. * turf.isNumber(123)
  20686. * //=true
  20687. * turf.isNumber('foo')
  20688. * //=false
  20689. */
  20690. function main_es_isNumber(num) {
  20691. return !isNaN(num) && num !== null && !Array.isArray(num);
  20692. }
  20693. /**
  20694. * isObject
  20695. *
  20696. * @param {*} input variable to validate
  20697. * @returns {boolean} true/false
  20698. * @example
  20699. * turf.isObject({elevation: 10})
  20700. * //=true
  20701. * turf.isObject('foo')
  20702. * //=false
  20703. */
  20704. function main_es_isObject(input) {
  20705. return (!!input) && (input.constructor === Object);
  20706. }
  20707. /**
  20708. * Validate BBox
  20709. *
  20710. * @private
  20711. * @param {Array<number>} bbox BBox to validate
  20712. * @returns {void}
  20713. * @throws Error if BBox is not valid
  20714. * @example
  20715. * validateBBox([-180, -40, 110, 50])
  20716. * //=OK
  20717. * validateBBox([-180, -40])
  20718. * //=Error
  20719. * validateBBox('Foo')
  20720. * //=Error
  20721. * validateBBox(5)
  20722. * //=Error
  20723. * validateBBox(null)
  20724. * //=Error
  20725. * validateBBox(undefined)
  20726. * //=Error
  20727. */
  20728. function main_es_validateBBox(bbox) {
  20729. if (!bbox) throw new Error('bbox is required');
  20730. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  20731. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  20732. bbox.forEach(function (num) {
  20733. if (!main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  20734. });
  20735. }
  20736. /**
  20737. * Validate Id
  20738. *
  20739. * @private
  20740. * @param {string|number} id Id to validate
  20741. * @returns {void}
  20742. * @throws Error if Id is not valid
  20743. * @example
  20744. * validateId([-180, -40, 110, 50])
  20745. * //=Error
  20746. * validateId([-180, -40])
  20747. * //=Error
  20748. * validateId('Foo')
  20749. * //=OK
  20750. * validateId(5)
  20751. * //=OK
  20752. * validateId(null)
  20753. * //=Error
  20754. * validateId(undefined)
  20755. * //=Error
  20756. */
  20757. function main_es_validateId(id) {
  20758. if (!id) throw new Error('id is required');
  20759. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  20760. }
  20761. // Deprecated methods
  20762. function main_es_radians2degrees() {
  20763. throw new Error('method has been renamed to `radiansToDegrees`');
  20764. }
  20765. function main_es_degrees2radians() {
  20766. throw new Error('method has been renamed to `degreesToRadians`');
  20767. }
  20768. function main_es_distanceToDegrees() {
  20769. throw new Error('method has been renamed to `lengthToDegrees`');
  20770. }
  20771. function main_es_distanceToRadians() {
  20772. throw new Error('method has been renamed to `lengthToRadians`');
  20773. }
  20774. function main_es_radiansToDistance() {
  20775. throw new Error('method has been renamed to `radiansToLength`');
  20776. }
  20777. function main_es_bearingToAngle() {
  20778. throw new Error('method has been renamed to `bearingToAzimuth`');
  20779. }
  20780. function main_es_convertDistance() {
  20781. throw new Error('method has been renamed to `convertLength`');
  20782. }
  20783. // CONCATENATED MODULE: ./node_modules/@turf/centroid/node_modules/@turf/meta/main.es.js
  20784. /**
  20785. * Callback for coordEach
  20786. *
  20787. * @callback coordEachCallback
  20788. * @param {Array<number>} currentCoord The current coordinate being processed.
  20789. * @param {number} coordIndex The current index of the coordinate being processed.
  20790. * @param {number} featureIndex The current index of the Feature being processed.
  20791. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  20792. * @param {number} geometryIndex The current index of the Geometry being processed.
  20793. */
  20794. /**
  20795. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  20796. *
  20797. * @name coordEach
  20798. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20799. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  20800. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  20801. * @returns {void}
  20802. * @example
  20803. * var features = turf.featureCollection([
  20804. * turf.point([26, 37], {"foo": "bar"}),
  20805. * turf.point([36, 53], {"hello": "world"})
  20806. * ]);
  20807. *
  20808. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  20809. * //=currentCoord
  20810. * //=coordIndex
  20811. * //=featureIndex
  20812. * //=multiFeatureIndex
  20813. * //=geometryIndex
  20814. * });
  20815. */
  20816. function main_es_coordEach(geojson, callback, excludeWrapCoord) {
  20817. // Handles null Geometry -- Skips this GeoJSON
  20818. if (geojson === null) return;
  20819. var j, k, l, geometry, stopG, coords,
  20820. geometryMaybeCollection,
  20821. wrapShrink = 0,
  20822. coordIndex = 0,
  20823. isGeometryCollection,
  20824. type = geojson.type,
  20825. isFeatureCollection = type === 'FeatureCollection',
  20826. isFeature = type === 'Feature',
  20827. stop = isFeatureCollection ? geojson.features.length : 1;
  20828. // This logic may look a little weird. The reason why it is that way
  20829. // is because it's trying to be fast. GeoJSON supports multiple kinds
  20830. // of objects at its root: FeatureCollection, Features, Geometries.
  20831. // This function has the responsibility of handling all of them, and that
  20832. // means that some of the `for` loops you see below actually just don't apply
  20833. // to certain inputs. For instance, if you give this just a
  20834. // Point geometry, then both loops are short-circuited and all we do
  20835. // is gradually rename the input until it's called 'geometry'.
  20836. //
  20837. // This also aims to allocate as few resources as possible: just a
  20838. // few numbers and booleans, rather than any temporary arrays as would
  20839. // be required with the normalization approach.
  20840. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  20841. geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :
  20842. (isFeature ? geojson.geometry : geojson));
  20843. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  20844. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  20845. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  20846. var multiFeatureIndex = 0;
  20847. var geometryIndex = 0;
  20848. geometry = isGeometryCollection ?
  20849. geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;
  20850. // Handles null Geometry -- Skips this geometry
  20851. if (geometry === null) continue;
  20852. coords = geometry.coordinates;
  20853. var geomType = geometry.type;
  20854. wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;
  20855. switch (geomType) {
  20856. case null:
  20857. break;
  20858. case 'Point':
  20859. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  20860. coordIndex++;
  20861. multiFeatureIndex++;
  20862. break;
  20863. case 'LineString':
  20864. case 'MultiPoint':
  20865. for (j = 0; j < coords.length; j++) {
  20866. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  20867. coordIndex++;
  20868. if (geomType === 'MultiPoint') multiFeatureIndex++;
  20869. }
  20870. if (geomType === 'LineString') multiFeatureIndex++;
  20871. break;
  20872. case 'Polygon':
  20873. case 'MultiLineString':
  20874. for (j = 0; j < coords.length; j++) {
  20875. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  20876. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  20877. coordIndex++;
  20878. }
  20879. if (geomType === 'MultiLineString') multiFeatureIndex++;
  20880. if (geomType === 'Polygon') geometryIndex++;
  20881. }
  20882. if (geomType === 'Polygon') multiFeatureIndex++;
  20883. break;
  20884. case 'MultiPolygon':
  20885. for (j = 0; j < coords.length; j++) {
  20886. if (geomType === 'MultiPolygon') geometryIndex = 0;
  20887. for (k = 0; k < coords[j].length; k++) {
  20888. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  20889. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  20890. coordIndex++;
  20891. }
  20892. geometryIndex++;
  20893. }
  20894. multiFeatureIndex++;
  20895. }
  20896. break;
  20897. case 'GeometryCollection':
  20898. for (j = 0; j < geometry.geometries.length; j++)
  20899. if (main_es_coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  20900. break;
  20901. default:
  20902. throw new Error('Unknown Geometry Type');
  20903. }
  20904. }
  20905. }
  20906. }
  20907. /**
  20908. * Callback for coordReduce
  20909. *
  20910. * The first time the callback function is called, the values provided as arguments depend
  20911. * on whether the reduce method has an initialValue argument.
  20912. *
  20913. * If an initialValue is provided to the reduce method:
  20914. * - The previousValue argument is initialValue.
  20915. * - The currentValue argument is the value of the first element present in the array.
  20916. *
  20917. * If an initialValue is not provided:
  20918. * - The previousValue argument is the value of the first element present in the array.
  20919. * - The currentValue argument is the value of the second element present in the array.
  20920. *
  20921. * @callback coordReduceCallback
  20922. * @param {*} previousValue The accumulated value previously returned in the last invocation
  20923. * of the callback, or initialValue, if supplied.
  20924. * @param {Array<number>} currentCoord The current coordinate being processed.
  20925. * @param {number} coordIndex The current index of the coordinate being processed.
  20926. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  20927. * @param {number} featureIndex The current index of the Feature being processed.
  20928. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  20929. * @param {number} geometryIndex The current index of the Geometry being processed.
  20930. */
  20931. /**
  20932. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  20933. *
  20934. * @name coordReduce
  20935. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  20936. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  20937. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  20938. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  20939. * @returns {*} The value that results from the reduction.
  20940. * @example
  20941. * var features = turf.featureCollection([
  20942. * turf.point([26, 37], {"foo": "bar"}),
  20943. * turf.point([36, 53], {"hello": "world"})
  20944. * ]);
  20945. *
  20946. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  20947. * //=previousValue
  20948. * //=currentCoord
  20949. * //=coordIndex
  20950. * //=featureIndex
  20951. * //=multiFeatureIndex
  20952. * //=geometryIndex
  20953. * return currentCoord;
  20954. * });
  20955. */
  20956. function main_es_coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  20957. var previousValue = initialValue;
  20958. main_es_coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  20959. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;
  20960. else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  20961. }, excludeWrapCoord);
  20962. return previousValue;
  20963. }
  20964. /**
  20965. * Callback for propEach
  20966. *
  20967. * @callback propEachCallback
  20968. * @param {Object} currentProperties The current Properties being processed.
  20969. * @param {number} featureIndex The current index of the Feature being processed.
  20970. */
  20971. /**
  20972. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  20973. *
  20974. * @name propEach
  20975. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  20976. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  20977. * @returns {void}
  20978. * @example
  20979. * var features = turf.featureCollection([
  20980. * turf.point([26, 37], {foo: 'bar'}),
  20981. * turf.point([36, 53], {hello: 'world'})
  20982. * ]);
  20983. *
  20984. * turf.propEach(features, function (currentProperties, featureIndex) {
  20985. * //=currentProperties
  20986. * //=featureIndex
  20987. * });
  20988. */
  20989. function main_es_propEach(geojson, callback) {
  20990. var i;
  20991. switch (geojson.type) {
  20992. case 'FeatureCollection':
  20993. for (i = 0; i < geojson.features.length; i++) {
  20994. if (callback(geojson.features[i].properties, i) === false) break;
  20995. }
  20996. break;
  20997. case 'Feature':
  20998. callback(geojson.properties, 0);
  20999. break;
  21000. }
  21001. }
  21002. /**
  21003. * Callback for propReduce
  21004. *
  21005. * The first time the callback function is called, the values provided as arguments depend
  21006. * on whether the reduce method has an initialValue argument.
  21007. *
  21008. * If an initialValue is provided to the reduce method:
  21009. * - The previousValue argument is initialValue.
  21010. * - The currentValue argument is the value of the first element present in the array.
  21011. *
  21012. * If an initialValue is not provided:
  21013. * - The previousValue argument is the value of the first element present in the array.
  21014. * - The currentValue argument is the value of the second element present in the array.
  21015. *
  21016. * @callback propReduceCallback
  21017. * @param {*} previousValue The accumulated value previously returned in the last invocation
  21018. * of the callback, or initialValue, if supplied.
  21019. * @param {*} currentProperties The current Properties being processed.
  21020. * @param {number} featureIndex The current index of the Feature being processed.
  21021. */
  21022. /**
  21023. * Reduce properties in any GeoJSON object into a single value,
  21024. * similar to how Array.reduce works. However, in this case we lazily run
  21025. * the reduction, so an array of all properties is unnecessary.
  21026. *
  21027. * @name propReduce
  21028. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  21029. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  21030. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  21031. * @returns {*} The value that results from the reduction.
  21032. * @example
  21033. * var features = turf.featureCollection([
  21034. * turf.point([26, 37], {foo: 'bar'}),
  21035. * turf.point([36, 53], {hello: 'world'})
  21036. * ]);
  21037. *
  21038. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  21039. * //=previousValue
  21040. * //=currentProperties
  21041. * //=featureIndex
  21042. * return currentProperties
  21043. * });
  21044. */
  21045. function main_es_propReduce(geojson, callback, initialValue) {
  21046. var previousValue = initialValue;
  21047. main_es_propEach(geojson, function (currentProperties, featureIndex) {
  21048. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;
  21049. else previousValue = callback(previousValue, currentProperties, featureIndex);
  21050. });
  21051. return previousValue;
  21052. }
  21053. /**
  21054. * Callback for featureEach
  21055. *
  21056. * @callback featureEachCallback
  21057. * @param {Feature<any>} currentFeature The current Feature being processed.
  21058. * @param {number} featureIndex The current index of the Feature being processed.
  21059. */
  21060. /**
  21061. * Iterate over features in any GeoJSON object, similar to
  21062. * Array.forEach.
  21063. *
  21064. * @name featureEach
  21065. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  21066. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  21067. * @returns {void}
  21068. * @example
  21069. * var features = turf.featureCollection([
  21070. * turf.point([26, 37], {foo: 'bar'}),
  21071. * turf.point([36, 53], {hello: 'world'})
  21072. * ]);
  21073. *
  21074. * turf.featureEach(features, function (currentFeature, featureIndex) {
  21075. * //=currentFeature
  21076. * //=featureIndex
  21077. * });
  21078. */
  21079. function main_es_featureEach(geojson, callback) {
  21080. if (geojson.type === 'Feature') {
  21081. callback(geojson, 0);
  21082. } else if (geojson.type === 'FeatureCollection') {
  21083. for (var i = 0; i < geojson.features.length; i++) {
  21084. if (callback(geojson.features[i], i) === false) break;
  21085. }
  21086. }
  21087. }
  21088. /**
  21089. * Callback for featureReduce
  21090. *
  21091. * The first time the callback function is called, the values provided as arguments depend
  21092. * on whether the reduce method has an initialValue argument.
  21093. *
  21094. * If an initialValue is provided to the reduce method:
  21095. * - The previousValue argument is initialValue.
  21096. * - The currentValue argument is the value of the first element present in the array.
  21097. *
  21098. * If an initialValue is not provided:
  21099. * - The previousValue argument is the value of the first element present in the array.
  21100. * - The currentValue argument is the value of the second element present in the array.
  21101. *
  21102. * @callback featureReduceCallback
  21103. * @param {*} previousValue The accumulated value previously returned in the last invocation
  21104. * of the callback, or initialValue, if supplied.
  21105. * @param {Feature} currentFeature The current Feature being processed.
  21106. * @param {number} featureIndex The current index of the Feature being processed.
  21107. */
  21108. /**
  21109. * Reduce features in any GeoJSON object, similar to Array.reduce().
  21110. *
  21111. * @name featureReduce
  21112. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  21113. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  21114. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  21115. * @returns {*} The value that results from the reduction.
  21116. * @example
  21117. * var features = turf.featureCollection([
  21118. * turf.point([26, 37], {"foo": "bar"}),
  21119. * turf.point([36, 53], {"hello": "world"})
  21120. * ]);
  21121. *
  21122. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  21123. * //=previousValue
  21124. * //=currentFeature
  21125. * //=featureIndex
  21126. * return currentFeature
  21127. * });
  21128. */
  21129. function main_es_featureReduce(geojson, callback, initialValue) {
  21130. var previousValue = initialValue;
  21131. main_es_featureEach(geojson, function (currentFeature, featureIndex) {
  21132. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  21133. else previousValue = callback(previousValue, currentFeature, featureIndex);
  21134. });
  21135. return previousValue;
  21136. }
  21137. /**
  21138. * Get all coordinates from any GeoJSON object.
  21139. *
  21140. * @name coordAll
  21141. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  21142. * @returns {Array<Array<number>>} coordinate position array
  21143. * @example
  21144. * var features = turf.featureCollection([
  21145. * turf.point([26, 37], {foo: 'bar'}),
  21146. * turf.point([36, 53], {hello: 'world'})
  21147. * ]);
  21148. *
  21149. * var coords = turf.coordAll(features);
  21150. * //= [[26, 37], [36, 53]]
  21151. */
  21152. function main_es_coordAll(geojson) {
  21153. var coords = [];
  21154. main_es_coordEach(geojson, function (coord) {
  21155. coords.push(coord);
  21156. });
  21157. return coords;
  21158. }
  21159. /**
  21160. * Callback for geomEach
  21161. *
  21162. * @callback geomEachCallback
  21163. * @param {Geometry} currentGeometry The current Geometry being processed.
  21164. * @param {number} featureIndex The current index of the Feature being processed.
  21165. * @param {Object} featureProperties The current Feature Properties being processed.
  21166. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  21167. * @param {number|string} featureId The current Feature Id being processed.
  21168. */
  21169. /**
  21170. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  21171. *
  21172. * @name geomEach
  21173. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  21174. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  21175. * @returns {void}
  21176. * @example
  21177. * var features = turf.featureCollection([
  21178. * turf.point([26, 37], {foo: 'bar'}),
  21179. * turf.point([36, 53], {hello: 'world'})
  21180. * ]);
  21181. *
  21182. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  21183. * //=currentGeometry
  21184. * //=featureIndex
  21185. * //=featureProperties
  21186. * //=featureBBox
  21187. * //=featureId
  21188. * });
  21189. */
  21190. function main_es_geomEach(geojson, callback) {
  21191. var i, j, g, geometry, stopG,
  21192. geometryMaybeCollection,
  21193. isGeometryCollection,
  21194. featureProperties,
  21195. featureBBox,
  21196. featureId,
  21197. featureIndex = 0,
  21198. isFeatureCollection = geojson.type === 'FeatureCollection',
  21199. isFeature = geojson.type === 'Feature',
  21200. stop = isFeatureCollection ? geojson.features.length : 1;
  21201. // This logic may look a little weird. The reason why it is that way
  21202. // is because it's trying to be fast. GeoJSON supports multiple kinds
  21203. // of objects at its root: FeatureCollection, Features, Geometries.
  21204. // This function has the responsibility of handling all of them, and that
  21205. // means that some of the `for` loops you see below actually just don't apply
  21206. // to certain inputs. For instance, if you give this just a
  21207. // Point geometry, then both loops are short-circuited and all we do
  21208. // is gradually rename the input until it's called 'geometry'.
  21209. //
  21210. // This also aims to allocate as few resources as possible: just a
  21211. // few numbers and booleans, rather than any temporary arrays as would
  21212. // be required with the normalization approach.
  21213. for (i = 0; i < stop; i++) {
  21214. geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :
  21215. (isFeature ? geojson.geometry : geojson));
  21216. featureProperties = (isFeatureCollection ? geojson.features[i].properties :
  21217. (isFeature ? geojson.properties : {}));
  21218. featureBBox = (isFeatureCollection ? geojson.features[i].bbox :
  21219. (isFeature ? geojson.bbox : undefined));
  21220. featureId = (isFeatureCollection ? geojson.features[i].id :
  21221. (isFeature ? geojson.id : undefined));
  21222. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  21223. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  21224. for (g = 0; g < stopG; g++) {
  21225. geometry = isGeometryCollection ?
  21226. geometryMaybeCollection.geometries[g] : geometryMaybeCollection;
  21227. // Handle null Geometry
  21228. if (geometry === null) {
  21229. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  21230. continue;
  21231. }
  21232. switch (geometry.type) {
  21233. case 'Point':
  21234. case 'LineString':
  21235. case 'MultiPoint':
  21236. case 'Polygon':
  21237. case 'MultiLineString':
  21238. case 'MultiPolygon': {
  21239. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  21240. break;
  21241. }
  21242. case 'GeometryCollection': {
  21243. for (j = 0; j < geometry.geometries.length; j++) {
  21244. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  21245. }
  21246. break;
  21247. }
  21248. default:
  21249. throw new Error('Unknown Geometry Type');
  21250. }
  21251. }
  21252. // Only increase `featureIndex` per each feature
  21253. featureIndex++;
  21254. }
  21255. }
  21256. /**
  21257. * Callback for geomReduce
  21258. *
  21259. * The first time the callback function is called, the values provided as arguments depend
  21260. * on whether the reduce method has an initialValue argument.
  21261. *
  21262. * If an initialValue is provided to the reduce method:
  21263. * - The previousValue argument is initialValue.
  21264. * - The currentValue argument is the value of the first element present in the array.
  21265. *
  21266. * If an initialValue is not provided:
  21267. * - The previousValue argument is the value of the first element present in the array.
  21268. * - The currentValue argument is the value of the second element present in the array.
  21269. *
  21270. * @callback geomReduceCallback
  21271. * @param {*} previousValue The accumulated value previously returned in the last invocation
  21272. * of the callback, or initialValue, if supplied.
  21273. * @param {Geometry} currentGeometry The current Geometry being processed.
  21274. * @param {number} featureIndex The current index of the Feature being processed.
  21275. * @param {Object} featureProperties The current Feature Properties being processed.
  21276. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  21277. * @param {number|string} featureId The current Feature Id being processed.
  21278. */
  21279. /**
  21280. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  21281. *
  21282. * @name geomReduce
  21283. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  21284. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  21285. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  21286. * @returns {*} The value that results from the reduction.
  21287. * @example
  21288. * var features = turf.featureCollection([
  21289. * turf.point([26, 37], {foo: 'bar'}),
  21290. * turf.point([36, 53], {hello: 'world'})
  21291. * ]);
  21292. *
  21293. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  21294. * //=previousValue
  21295. * //=currentGeometry
  21296. * //=featureIndex
  21297. * //=featureProperties
  21298. * //=featureBBox
  21299. * //=featureId
  21300. * return currentGeometry
  21301. * });
  21302. */
  21303. function main_es_geomReduce(geojson, callback, initialValue) {
  21304. var previousValue = initialValue;
  21305. main_es_geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  21306. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;
  21307. else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  21308. });
  21309. return previousValue;
  21310. }
  21311. /**
  21312. * Callback for flattenEach
  21313. *
  21314. * @callback flattenEachCallback
  21315. * @param {Feature} currentFeature The current flattened feature being processed.
  21316. * @param {number} featureIndex The current index of the Feature being processed.
  21317. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  21318. */
  21319. /**
  21320. * Iterate over flattened features in any GeoJSON object, similar to
  21321. * Array.forEach.
  21322. *
  21323. * @name flattenEach
  21324. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  21325. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  21326. * @example
  21327. * var features = turf.featureCollection([
  21328. * turf.point([26, 37], {foo: 'bar'}),
  21329. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  21330. * ]);
  21331. *
  21332. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  21333. * //=currentFeature
  21334. * //=featureIndex
  21335. * //=multiFeatureIndex
  21336. * });
  21337. */
  21338. function main_es_flattenEach(geojson, callback) {
  21339. main_es_geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  21340. // Callback for single geometry
  21341. var type = (geometry === null) ? null : geometry.type;
  21342. switch (type) {
  21343. case null:
  21344. case 'Point':
  21345. case 'LineString':
  21346. case 'Polygon':
  21347. if (callback(helpers_main_es_feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0) === false) return false;
  21348. return;
  21349. }
  21350. var geomType;
  21351. // Callback for multi-geometry
  21352. switch (type) {
  21353. case 'MultiPoint':
  21354. geomType = 'Point';
  21355. break;
  21356. case 'MultiLineString':
  21357. geomType = 'LineString';
  21358. break;
  21359. case 'MultiPolygon':
  21360. geomType = 'Polygon';
  21361. break;
  21362. }
  21363. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  21364. var coordinate = geometry.coordinates[multiFeatureIndex];
  21365. var geom = {
  21366. type: geomType,
  21367. coordinates: coordinate
  21368. };
  21369. if (callback(helpers_main_es_feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  21370. }
  21371. });
  21372. }
  21373. /**
  21374. * Callback for flattenReduce
  21375. *
  21376. * The first time the callback function is called, the values provided as arguments depend
  21377. * on whether the reduce method has an initialValue argument.
  21378. *
  21379. * If an initialValue is provided to the reduce method:
  21380. * - The previousValue argument is initialValue.
  21381. * - The currentValue argument is the value of the first element present in the array.
  21382. *
  21383. * If an initialValue is not provided:
  21384. * - The previousValue argument is the value of the first element present in the array.
  21385. * - The currentValue argument is the value of the second element present in the array.
  21386. *
  21387. * @callback flattenReduceCallback
  21388. * @param {*} previousValue The accumulated value previously returned in the last invocation
  21389. * of the callback, or initialValue, if supplied.
  21390. * @param {Feature} currentFeature The current Feature being processed.
  21391. * @param {number} featureIndex The current index of the Feature being processed.
  21392. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  21393. */
  21394. /**
  21395. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  21396. *
  21397. * @name flattenReduce
  21398. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  21399. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  21400. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  21401. * @returns {*} The value that results from the reduction.
  21402. * @example
  21403. * var features = turf.featureCollection([
  21404. * turf.point([26, 37], {foo: 'bar'}),
  21405. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  21406. * ]);
  21407. *
  21408. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  21409. * //=previousValue
  21410. * //=currentFeature
  21411. * //=featureIndex
  21412. * //=multiFeatureIndex
  21413. * return currentFeature
  21414. * });
  21415. */
  21416. function main_es_flattenReduce(geojson, callback, initialValue) {
  21417. var previousValue = initialValue;
  21418. main_es_flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  21419. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  21420. else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  21421. });
  21422. return previousValue;
  21423. }
  21424. /**
  21425. * Callback for segmentEach
  21426. *
  21427. * @callback segmentEachCallback
  21428. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  21429. * @param {number} featureIndex The current index of the Feature being processed.
  21430. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  21431. * @param {number} geometryIndex The current index of the Geometry being processed.
  21432. * @param {number} segmentIndex The current index of the Segment being processed.
  21433. * @returns {void}
  21434. */
  21435. /**
  21436. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  21437. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  21438. *
  21439. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  21440. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  21441. * @returns {void}
  21442. * @example
  21443. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  21444. *
  21445. * // Iterate over GeoJSON by 2-vertex segments
  21446. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  21447. * //=currentSegment
  21448. * //=featureIndex
  21449. * //=multiFeatureIndex
  21450. * //=geometryIndex
  21451. * //=segmentIndex
  21452. * });
  21453. *
  21454. * // Calculate the total number of segments
  21455. * var total = 0;
  21456. * turf.segmentEach(polygon, function () {
  21457. * total++;
  21458. * });
  21459. */
  21460. function main_es_segmentEach(geojson, callback) {
  21461. main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  21462. var segmentIndex = 0;
  21463. // Exclude null Geometries
  21464. if (!feature$$1.geometry) return;
  21465. // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  21466. var type = feature$$1.geometry.type;
  21467. if (type === 'Point' || type === 'MultiPoint') return;
  21468. // Generate 2-vertex line segments
  21469. var previousCoords;
  21470. if (main_es_coordEach(feature$$1, function (currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {
  21471. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  21472. if (previousCoords === undefined) {
  21473. previousCoords = currentCoord;
  21474. return;
  21475. }
  21476. var currentSegment = main_es_lineString([previousCoords, currentCoord], feature$$1.properties);
  21477. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  21478. segmentIndex++;
  21479. previousCoords = currentCoord;
  21480. }) === false) return false;
  21481. });
  21482. }
  21483. /**
  21484. * Callback for segmentReduce
  21485. *
  21486. * The first time the callback function is called, the values provided as arguments depend
  21487. * on whether the reduce method has an initialValue argument.
  21488. *
  21489. * If an initialValue is provided to the reduce method:
  21490. * - The previousValue argument is initialValue.
  21491. * - The currentValue argument is the value of the first element present in the array.
  21492. *
  21493. * If an initialValue is not provided:
  21494. * - The previousValue argument is the value of the first element present in the array.
  21495. * - The currentValue argument is the value of the second element present in the array.
  21496. *
  21497. * @callback segmentReduceCallback
  21498. * @param {*} previousValue The accumulated value previously returned in the last invocation
  21499. * of the callback, or initialValue, if supplied.
  21500. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  21501. * @param {number} featureIndex The current index of the Feature being processed.
  21502. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  21503. * @param {number} geometryIndex The current index of the Geometry being processed.
  21504. * @param {number} segmentIndex The current index of the Segment being processed.
  21505. */
  21506. /**
  21507. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  21508. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  21509. *
  21510. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  21511. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  21512. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  21513. * @returns {void}
  21514. * @example
  21515. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  21516. *
  21517. * // Iterate over GeoJSON by 2-vertex segments
  21518. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  21519. * //= previousSegment
  21520. * //= currentSegment
  21521. * //= featureIndex
  21522. * //= multiFeatureIndex
  21523. * //= geometryIndex
  21524. * //= segmentInex
  21525. * return currentSegment
  21526. * });
  21527. *
  21528. * // Calculate the total number of segments
  21529. * var initialValue = 0
  21530. * var total = turf.segmentReduce(polygon, function (previousValue) {
  21531. * previousValue++;
  21532. * return previousValue;
  21533. * }, initialValue);
  21534. */
  21535. function main_es_segmentReduce(geojson, callback, initialValue) {
  21536. var previousValue = initialValue;
  21537. var started = false;
  21538. main_es_segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  21539. if (started === false && initialValue === undefined) previousValue = currentSegment;
  21540. else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  21541. started = true;
  21542. });
  21543. return previousValue;
  21544. }
  21545. /**
  21546. * Callback for lineEach
  21547. *
  21548. * @callback lineEachCallback
  21549. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  21550. * @param {number} featureIndex The current index of the Feature being processed
  21551. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  21552. * @param {number} geometryIndex The current index of the Geometry being processed
  21553. */
  21554. /**
  21555. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  21556. * similar to Array.forEach.
  21557. *
  21558. * @name lineEach
  21559. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  21560. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  21561. * @example
  21562. * var multiLine = turf.multiLineString([
  21563. * [[26, 37], [35, 45]],
  21564. * [[36, 53], [38, 50], [41, 55]]
  21565. * ]);
  21566. *
  21567. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  21568. * //=currentLine
  21569. * //=featureIndex
  21570. * //=multiFeatureIndex
  21571. * //=geometryIndex
  21572. * });
  21573. */
  21574. function main_es_lineEach(geojson, callback) {
  21575. // validation
  21576. if (!geojson) throw new Error('geojson is required');
  21577. main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  21578. if (feature$$1.geometry === null) return;
  21579. var type = feature$$1.geometry.type;
  21580. var coords = feature$$1.geometry.coordinates;
  21581. switch (type) {
  21582. case 'LineString':
  21583. if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  21584. break;
  21585. case 'Polygon':
  21586. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  21587. if (callback(main_es_lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  21588. }
  21589. break;
  21590. }
  21591. });
  21592. }
  21593. /**
  21594. * Callback for lineReduce
  21595. *
  21596. * The first time the callback function is called, the values provided as arguments depend
  21597. * on whether the reduce method has an initialValue argument.
  21598. *
  21599. * If an initialValue is provided to the reduce method:
  21600. * - The previousValue argument is initialValue.
  21601. * - The currentValue argument is the value of the first element present in the array.
  21602. *
  21603. * If an initialValue is not provided:
  21604. * - The previousValue argument is the value of the first element present in the array.
  21605. * - The currentValue argument is the value of the second element present in the array.
  21606. *
  21607. * @callback lineReduceCallback
  21608. * @param {*} previousValue The accumulated value previously returned in the last invocation
  21609. * of the callback, or initialValue, if supplied.
  21610. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  21611. * @param {number} featureIndex The current index of the Feature being processed
  21612. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  21613. * @param {number} geometryIndex The current index of the Geometry being processed
  21614. */
  21615. /**
  21616. * Reduce features in any GeoJSON object, similar to Array.reduce().
  21617. *
  21618. * @name lineReduce
  21619. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  21620. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  21621. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  21622. * @returns {*} The value that results from the reduction.
  21623. * @example
  21624. * var multiPoly = turf.multiPolygon([
  21625. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  21626. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  21627. * ]);
  21628. *
  21629. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  21630. * //=previousValue
  21631. * //=currentLine
  21632. * //=featureIndex
  21633. * //=multiFeatureIndex
  21634. * //=geometryIndex
  21635. * return currentLine
  21636. * });
  21637. */
  21638. function main_es_lineReduce(geojson, callback, initialValue) {
  21639. var previousValue = initialValue;
  21640. main_es_lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  21641. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;
  21642. else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  21643. });
  21644. return previousValue;
  21645. }
  21646. /**
  21647. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  21648. *
  21649. * Negative indexes are permitted.
  21650. * Point & MultiPoint will always return null.
  21651. *
  21652. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  21653. * @param {Object} [options={}] Optional parameters
  21654. * @param {number} [options.featureIndex=0] Feature Index
  21655. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  21656. * @param {number} [options.geometryIndex=0] Geometry Index
  21657. * @param {number} [options.segmentIndex=0] Segment Index
  21658. * @param {Object} [options.properties={}] Translate Properties to output LineString
  21659. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  21660. * @param {number|string} [options.id={}] Translate Id to output LineString
  21661. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  21662. * @example
  21663. * var multiLine = turf.multiLineString([
  21664. * [[10, 10], [50, 30], [30, 40]],
  21665. * [[-10, -10], [-50, -30], [-30, -40]]
  21666. * ]);
  21667. *
  21668. * // First Segment (defaults are 0)
  21669. * turf.findSegment(multiLine);
  21670. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  21671. *
  21672. * // First Segment of 2nd Multi Feature
  21673. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  21674. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  21675. *
  21676. * // Last Segment of Last Multi Feature
  21677. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  21678. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  21679. */
  21680. function main_es_findSegment(geojson, options) {
  21681. // Optional Parameters
  21682. options = options || {};
  21683. if (!main_es_isObject(options)) throw new Error('options is invalid');
  21684. var featureIndex = options.featureIndex || 0;
  21685. var multiFeatureIndex = options.multiFeatureIndex || 0;
  21686. var geometryIndex = options.geometryIndex || 0;
  21687. var segmentIndex = options.segmentIndex || 0;
  21688. // Find FeatureIndex
  21689. var properties = options.properties;
  21690. var geometry;
  21691. switch (geojson.type) {
  21692. case 'FeatureCollection':
  21693. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  21694. properties = properties || geojson.features[featureIndex].properties;
  21695. geometry = geojson.features[featureIndex].geometry;
  21696. break;
  21697. case 'Feature':
  21698. properties = properties || geojson.properties;
  21699. geometry = geojson.geometry;
  21700. break;
  21701. case 'Point':
  21702. case 'MultiPoint':
  21703. return null;
  21704. case 'LineString':
  21705. case 'Polygon':
  21706. case 'MultiLineString':
  21707. case 'MultiPolygon':
  21708. geometry = geojson;
  21709. break;
  21710. default:
  21711. throw new Error('geojson is invalid');
  21712. }
  21713. // Find SegmentIndex
  21714. if (geometry === null) return null;
  21715. var coords = geometry.coordinates;
  21716. switch (geometry.type) {
  21717. case 'Point':
  21718. case 'MultiPoint':
  21719. return null;
  21720. case 'LineString':
  21721. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  21722. return main_es_lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  21723. case 'Polygon':
  21724. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  21725. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  21726. return main_es_lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  21727. case 'MultiLineString':
  21728. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21729. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  21730. return main_es_lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  21731. case 'MultiPolygon':
  21732. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21733. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  21734. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  21735. return main_es_lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  21736. }
  21737. throw new Error('geojson is invalid');
  21738. }
  21739. /**
  21740. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  21741. *
  21742. * Negative indexes are permitted.
  21743. *
  21744. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  21745. * @param {Object} [options={}] Optional parameters
  21746. * @param {number} [options.featureIndex=0] Feature Index
  21747. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  21748. * @param {number} [options.geometryIndex=0] Geometry Index
  21749. * @param {number} [options.coordIndex=0] Coord Index
  21750. * @param {Object} [options.properties={}] Translate Properties to output Point
  21751. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  21752. * @param {number|string} [options.id={}] Translate Id to output Point
  21753. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  21754. * @example
  21755. * var multiLine = turf.multiLineString([
  21756. * [[10, 10], [50, 30], [30, 40]],
  21757. * [[-10, -10], [-50, -30], [-30, -40]]
  21758. * ]);
  21759. *
  21760. * // First Segment (defaults are 0)
  21761. * turf.findPoint(multiLine);
  21762. * // => Feature<Point<[10, 10]>>
  21763. *
  21764. * // First Segment of the 2nd Multi-Feature
  21765. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  21766. * // => Feature<Point<[-10, -10]>>
  21767. *
  21768. * // Last Segment of last Multi-Feature
  21769. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  21770. * // => Feature<Point<[-30, -40]>>
  21771. */
  21772. function main_es_findPoint(geojson, options) {
  21773. // Optional Parameters
  21774. options = options || {};
  21775. if (!main_es_isObject(options)) throw new Error('options is invalid');
  21776. var featureIndex = options.featureIndex || 0;
  21777. var multiFeatureIndex = options.multiFeatureIndex || 0;
  21778. var geometryIndex = options.geometryIndex || 0;
  21779. var coordIndex = options.coordIndex || 0;
  21780. // Find FeatureIndex
  21781. var properties = options.properties;
  21782. var geometry;
  21783. switch (geojson.type) {
  21784. case 'FeatureCollection':
  21785. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  21786. properties = properties || geojson.features[featureIndex].properties;
  21787. geometry = geojson.features[featureIndex].geometry;
  21788. break;
  21789. case 'Feature':
  21790. properties = properties || geojson.properties;
  21791. geometry = geojson.geometry;
  21792. break;
  21793. case 'Point':
  21794. case 'MultiPoint':
  21795. return null;
  21796. case 'LineString':
  21797. case 'Polygon':
  21798. case 'MultiLineString':
  21799. case 'MultiPolygon':
  21800. geometry = geojson;
  21801. break;
  21802. default:
  21803. throw new Error('geojson is invalid');
  21804. }
  21805. // Find Coord Index
  21806. if (geometry === null) return null;
  21807. var coords = geometry.coordinates;
  21808. switch (geometry.type) {
  21809. case 'Point':
  21810. return main_es_point(coords, properties, options);
  21811. case 'MultiPoint':
  21812. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21813. return main_es_point(coords[multiFeatureIndex], properties, options);
  21814. case 'LineString':
  21815. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  21816. return main_es_point(coords[coordIndex], properties, options);
  21817. case 'Polygon':
  21818. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  21819. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  21820. return main_es_point(coords[geometryIndex][coordIndex], properties, options);
  21821. case 'MultiLineString':
  21822. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21823. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  21824. return main_es_point(coords[multiFeatureIndex][coordIndex], properties, options);
  21825. case 'MultiPolygon':
  21826. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21827. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  21828. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  21829. return main_es_point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  21830. }
  21831. throw new Error('geojson is invalid');
  21832. }
  21833. // CONCATENATED MODULE: ./node_modules/@turf/centroid/main.es.js
  21834. /**
  21835. * Takes one or more features and calculates the centroid using the mean of all vertices.
  21836. * This lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.
  21837. *
  21838. * @name centroid
  21839. * @param {GeoJSON} geojson GeoJSON to be centered
  21840. * @param {Object} [properties={}] an Object that is used as the {@link Feature}'s properties
  21841. * @returns {Feature<Point>} the centroid of the input features
  21842. * @example
  21843. * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);
  21844. *
  21845. * var centroid = turf.centroid(polygon);
  21846. *
  21847. * //addToMap
  21848. * var addToMap = [polygon, centroid]
  21849. */
  21850. function centroid(geojson, properties) {
  21851. var xSum = 0;
  21852. var ySum = 0;
  21853. var len = 0;
  21854. main_es_coordEach(geojson, function (coord) {
  21855. xSum += coord[0];
  21856. ySum += coord[1];
  21857. len++;
  21858. }, true);
  21859. return main_es_point([xSum / len, ySum / len], properties);
  21860. }
  21861. /* harmony default export */ var centroid_main_es = (centroid);
  21862. // CONCATENATED MODULE: ./node_modules/@turf/transform-scale/node_modules/@turf/helpers/main.es.js
  21863. /**
  21864. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  21865. */
  21866. var helpers_main_es_earthRadius = 6371008.8;
  21867. /**
  21868. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  21869. */
  21870. var helpers_main_es_factors = {
  21871. meters: helpers_main_es_earthRadius,
  21872. metres: helpers_main_es_earthRadius,
  21873. millimeters: helpers_main_es_earthRadius * 1000,
  21874. millimetres: helpers_main_es_earthRadius * 1000,
  21875. centimeters: helpers_main_es_earthRadius * 100,
  21876. centimetres: helpers_main_es_earthRadius * 100,
  21877. kilometers: helpers_main_es_earthRadius / 1000,
  21878. kilometres: helpers_main_es_earthRadius / 1000,
  21879. miles: helpers_main_es_earthRadius / 1609.344,
  21880. nauticalmiles: helpers_main_es_earthRadius / 1852,
  21881. inches: helpers_main_es_earthRadius * 39.370,
  21882. yards: helpers_main_es_earthRadius / 1.0936,
  21883. feet: helpers_main_es_earthRadius * 3.28084,
  21884. radians: 1,
  21885. degrees: helpers_main_es_earthRadius / 111325,
  21886. };
  21887. /**
  21888. * Units of measurement factors based on 1 meter.
  21889. */
  21890. var helpers_main_es_unitsFactors = {
  21891. meters: 1,
  21892. metres: 1,
  21893. millimeters: 1000,
  21894. millimetres: 1000,
  21895. centimeters: 100,
  21896. centimetres: 100,
  21897. kilometers: 1 / 1000,
  21898. kilometres: 1 / 1000,
  21899. miles: 1 / 1609.344,
  21900. nauticalmiles: 1 / 1852,
  21901. inches: 39.370,
  21902. yards: 1 / 1.0936,
  21903. feet: 3.28084,
  21904. radians: 1 / helpers_main_es_earthRadius,
  21905. degrees: 1 / 111325,
  21906. };
  21907. /**
  21908. * Area of measurement factors based on 1 square meter.
  21909. */
  21910. var helpers_main_es_areaFactors = {
  21911. meters: 1,
  21912. metres: 1,
  21913. millimeters: 1000000,
  21914. millimetres: 1000000,
  21915. centimeters: 10000,
  21916. centimetres: 10000,
  21917. kilometers: 0.000001,
  21918. kilometres: 0.000001,
  21919. acres: 0.000247105,
  21920. miles: 3.86e-7,
  21921. yards: 1.195990046,
  21922. feet: 10.763910417,
  21923. inches: 1550.003100006
  21924. };
  21925. /**
  21926. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  21927. *
  21928. * @name feature
  21929. * @param {Geometry} geometry input geometry
  21930. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21931. * @param {Object} [options={}] Optional Parameters
  21932. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21933. * @param {string|number} [options.id] Identifier associated with the Feature
  21934. * @returns {Feature} a GeoJSON Feature
  21935. * @example
  21936. * var geometry = {
  21937. * "type": "Point",
  21938. * "coordinates": [110, 50]
  21939. * };
  21940. *
  21941. * var feature = turf.feature(geometry);
  21942. *
  21943. * //=feature
  21944. */
  21945. function _turf_helpers_main_es_feature(geometry, properties, options) {
  21946. // Optional Parameters
  21947. options = options || {};
  21948. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  21949. var bbox = options.bbox;
  21950. var id = options.id;
  21951. // Validation
  21952. if (geometry === undefined) throw new Error('geometry is required');
  21953. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  21954. if (bbox) helpers_main_es_validateBBox(bbox);
  21955. if (id) helpers_main_es_validateId(id);
  21956. // Main
  21957. var feat = {type: 'Feature'};
  21958. if (id) feat.id = id;
  21959. if (bbox) feat.bbox = bbox;
  21960. feat.properties = properties || {};
  21961. feat.geometry = geometry;
  21962. return feat;
  21963. }
  21964. /**
  21965. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  21966. * For GeometryCollection type use `helpers.geometryCollection`
  21967. *
  21968. * @name geometry
  21969. * @param {string} type Geometry Type
  21970. * @param {Array<number>} coordinates Coordinates
  21971. * @param {Object} [options={}] Optional Parameters
  21972. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  21973. * @returns {Geometry} a GeoJSON Geometry
  21974. * @example
  21975. * var type = 'Point';
  21976. * var coordinates = [110, 50];
  21977. *
  21978. * var geometry = turf.geometry(type, coordinates);
  21979. *
  21980. * //=geometry
  21981. */
  21982. function _turf_helpers_main_es_geometry(type, coordinates, options) {
  21983. // Optional Parameters
  21984. options = options || {};
  21985. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  21986. var bbox = options.bbox;
  21987. // Validation
  21988. if (!type) throw new Error('type is required');
  21989. if (!coordinates) throw new Error('coordinates is required');
  21990. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  21991. if (bbox) helpers_main_es_validateBBox(bbox);
  21992. // Main
  21993. var geom;
  21994. switch (type) {
  21995. case 'Point': geom = helpers_main_es_point(coordinates).geometry; break;
  21996. case 'LineString': geom = helpers_main_es_lineString(coordinates).geometry; break;
  21997. case 'Polygon': geom = helpers_main_es_polygon(coordinates).geometry; break;
  21998. case 'MultiPoint': geom = helpers_main_es_multiPoint(coordinates).geometry; break;
  21999. case 'MultiLineString': geom = helpers_main_es_multiLineString(coordinates).geometry; break;
  22000. case 'MultiPolygon': geom = helpers_main_es_multiPolygon(coordinates).geometry; break;
  22001. default: throw new Error(type + ' is invalid');
  22002. }
  22003. if (bbox) geom.bbox = bbox;
  22004. return geom;
  22005. }
  22006. /**
  22007. * Creates a {@link Point} {@link Feature} from a Position.
  22008. *
  22009. * @name point
  22010. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  22011. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22012. * @param {Object} [options={}] Optional Parameters
  22013. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22014. * @param {string|number} [options.id] Identifier associated with the Feature
  22015. * @returns {Feature<Point>} a Point feature
  22016. * @example
  22017. * var point = turf.point([-75.343, 39.984]);
  22018. *
  22019. * //=point
  22020. */
  22021. function helpers_main_es_point(coordinates, properties, options) {
  22022. if (!coordinates) throw new Error('coordinates is required');
  22023. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22024. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  22025. if (!helpers_main_es_isNumber(coordinates[0]) || !helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  22026. return _turf_helpers_main_es_feature({
  22027. type: 'Point',
  22028. coordinates: coordinates
  22029. }, properties, options);
  22030. }
  22031. /**
  22032. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  22033. *
  22034. * @name points
  22035. * @param {Array<Array<number>>} coordinates an array of Points
  22036. * @param {Object} [properties={}] Translate these properties to each Feature
  22037. * @param {Object} [options={}] Optional Parameters
  22038. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  22039. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  22040. * @returns {FeatureCollection<Point>} Point Feature
  22041. * @example
  22042. * var points = turf.points([
  22043. * [-75, 39],
  22044. * [-80, 45],
  22045. * [-78, 50]
  22046. * ]);
  22047. *
  22048. * //=points
  22049. */
  22050. function helpers_main_es_points(coordinates, properties, options) {
  22051. if (!coordinates) throw new Error('coordinates is required');
  22052. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22053. return helpers_main_es_featureCollection(coordinates.map(function (coords) {
  22054. return helpers_main_es_point(coords, properties);
  22055. }), options);
  22056. }
  22057. /**
  22058. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  22059. *
  22060. * @name polygon
  22061. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  22062. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22063. * @param {Object} [options={}] Optional Parameters
  22064. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22065. * @param {string|number} [options.id] Identifier associated with the Feature
  22066. * @returns {Feature<Polygon>} Polygon Feature
  22067. * @example
  22068. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  22069. *
  22070. * //=polygon
  22071. */
  22072. function helpers_main_es_polygon(coordinates, properties, options) {
  22073. if (!coordinates) throw new Error('coordinates is required');
  22074. for (var i = 0; i < coordinates.length; i++) {
  22075. var ring = coordinates[i];
  22076. if (ring.length < 4) {
  22077. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  22078. }
  22079. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  22080. // Check if first point of Polygon contains two numbers
  22081. if (i === 0 && j === 0 && !helpers_main_es_isNumber(ring[0][0]) || !helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  22082. if (ring[ring.length - 1][j] !== ring[0][j]) {
  22083. throw new Error('First and last Position are not equivalent.');
  22084. }
  22085. }
  22086. }
  22087. return _turf_helpers_main_es_feature({
  22088. type: 'Polygon',
  22089. coordinates: coordinates
  22090. }, properties, options);
  22091. }
  22092. /**
  22093. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  22094. *
  22095. * @name polygons
  22096. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  22097. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22098. * @param {Object} [options={}] Optional Parameters
  22099. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22100. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  22101. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  22102. * @example
  22103. * var polygons = turf.polygons([
  22104. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  22105. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  22106. * ]);
  22107. *
  22108. * //=polygons
  22109. */
  22110. function helpers_main_es_polygons(coordinates, properties, options) {
  22111. if (!coordinates) throw new Error('coordinates is required');
  22112. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22113. return helpers_main_es_featureCollection(coordinates.map(function (coords) {
  22114. return helpers_main_es_polygon(coords, properties);
  22115. }), options);
  22116. }
  22117. /**
  22118. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  22119. *
  22120. * @name lineString
  22121. * @param {Array<Array<number>>} coordinates an array of Positions
  22122. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22123. * @param {Object} [options={}] Optional Parameters
  22124. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22125. * @param {string|number} [options.id] Identifier associated with the Feature
  22126. * @returns {Feature<LineString>} LineString Feature
  22127. * @example
  22128. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  22129. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  22130. *
  22131. * //=linestring1
  22132. * //=linestring2
  22133. */
  22134. function helpers_main_es_lineString(coordinates, properties, options) {
  22135. if (!coordinates) throw new Error('coordinates is required');
  22136. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  22137. // Check if first point of LineString contains two numbers
  22138. if (!helpers_main_es_isNumber(coordinates[0][1]) || !helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  22139. return _turf_helpers_main_es_feature({
  22140. type: 'LineString',
  22141. coordinates: coordinates
  22142. }, properties, options);
  22143. }
  22144. /**
  22145. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  22146. *
  22147. * @name lineStrings
  22148. * @param {Array<Array<number>>} coordinates an array of LinearRings
  22149. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22150. * @param {Object} [options={}] Optional Parameters
  22151. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  22152. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  22153. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  22154. * @example
  22155. * var linestrings = turf.lineStrings([
  22156. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  22157. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  22158. * ]);
  22159. *
  22160. * //=linestrings
  22161. */
  22162. function helpers_main_es_lineStrings(coordinates, properties, options) {
  22163. if (!coordinates) throw new Error('coordinates is required');
  22164. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22165. return helpers_main_es_featureCollection(coordinates.map(function (coords) {
  22166. return helpers_main_es_lineString(coords, properties);
  22167. }), options);
  22168. }
  22169. /**
  22170. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  22171. *
  22172. * @name featureCollection
  22173. * @param {Feature[]} features input features
  22174. * @param {Object} [options={}] Optional Parameters
  22175. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22176. * @param {string|number} [options.id] Identifier associated with the Feature
  22177. * @returns {FeatureCollection} FeatureCollection of Features
  22178. * @example
  22179. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  22180. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  22181. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  22182. *
  22183. * var collection = turf.featureCollection([
  22184. * locationA,
  22185. * locationB,
  22186. * locationC
  22187. * ]);
  22188. *
  22189. * //=collection
  22190. */
  22191. function helpers_main_es_featureCollection(features, options) {
  22192. // Optional Parameters
  22193. options = options || {};
  22194. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  22195. var bbox = options.bbox;
  22196. var id = options.id;
  22197. // Validation
  22198. if (!features) throw new Error('No features passed');
  22199. if (!Array.isArray(features)) throw new Error('features must be an Array');
  22200. if (bbox) helpers_main_es_validateBBox(bbox);
  22201. if (id) helpers_main_es_validateId(id);
  22202. // Main
  22203. var fc = {type: 'FeatureCollection'};
  22204. if (id) fc.id = id;
  22205. if (bbox) fc.bbox = bbox;
  22206. fc.features = features;
  22207. return fc;
  22208. }
  22209. /**
  22210. * Creates a {@link Feature<MultiLineString>} based on a
  22211. * coordinate array. Properties can be added optionally.
  22212. *
  22213. * @name multiLineString
  22214. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  22215. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22216. * @param {Object} [options={}] Optional Parameters
  22217. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22218. * @param {string|number} [options.id] Identifier associated with the Feature
  22219. * @returns {Feature<MultiLineString>} a MultiLineString feature
  22220. * @throws {Error} if no coordinates are passed
  22221. * @example
  22222. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  22223. *
  22224. * //=multiLine
  22225. */
  22226. function helpers_main_es_multiLineString(coordinates, properties, options) {
  22227. if (!coordinates) throw new Error('coordinates is required');
  22228. return _turf_helpers_main_es_feature({
  22229. type: 'MultiLineString',
  22230. coordinates: coordinates
  22231. }, properties, options);
  22232. }
  22233. /**
  22234. * Creates a {@link Feature<MultiPoint>} based on a
  22235. * coordinate array. Properties can be added optionally.
  22236. *
  22237. * @name multiPoint
  22238. * @param {Array<Array<number>>} coordinates an array of Positions
  22239. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22240. * @param {Object} [options={}] Optional Parameters
  22241. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22242. * @param {string|number} [options.id] Identifier associated with the Feature
  22243. * @returns {Feature<MultiPoint>} a MultiPoint feature
  22244. * @throws {Error} if no coordinates are passed
  22245. * @example
  22246. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  22247. *
  22248. * //=multiPt
  22249. */
  22250. function helpers_main_es_multiPoint(coordinates, properties, options) {
  22251. if (!coordinates) throw new Error('coordinates is required');
  22252. return _turf_helpers_main_es_feature({
  22253. type: 'MultiPoint',
  22254. coordinates: coordinates
  22255. }, properties, options);
  22256. }
  22257. /**
  22258. * Creates a {@link Feature<MultiPolygon>} based on a
  22259. * coordinate array. Properties can be added optionally.
  22260. *
  22261. * @name multiPolygon
  22262. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  22263. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22264. * @param {Object} [options={}] Optional Parameters
  22265. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22266. * @param {string|number} [options.id] Identifier associated with the Feature
  22267. * @returns {Feature<MultiPolygon>} a multipolygon feature
  22268. * @throws {Error} if no coordinates are passed
  22269. * @example
  22270. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  22271. *
  22272. * //=multiPoly
  22273. *
  22274. */
  22275. function helpers_main_es_multiPolygon(coordinates, properties, options) {
  22276. if (!coordinates) throw new Error('coordinates is required');
  22277. return _turf_helpers_main_es_feature({
  22278. type: 'MultiPolygon',
  22279. coordinates: coordinates
  22280. }, properties, options);
  22281. }
  22282. /**
  22283. * Creates a {@link Feature<GeometryCollection>} based on a
  22284. * coordinate array. Properties can be added optionally.
  22285. *
  22286. * @name geometryCollection
  22287. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  22288. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22289. * @param {Object} [options={}] Optional Parameters
  22290. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22291. * @param {string|number} [options.id] Identifier associated with the Feature
  22292. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  22293. * @example
  22294. * var pt = {
  22295. * "type": "Point",
  22296. * "coordinates": [100, 0]
  22297. * };
  22298. * var line = {
  22299. * "type": "LineString",
  22300. * "coordinates": [ [101, 0], [102, 1] ]
  22301. * };
  22302. * var collection = turf.geometryCollection([pt, line]);
  22303. *
  22304. * //=collection
  22305. */
  22306. function helpers_main_es_geometryCollection(geometries, properties, options) {
  22307. if (!geometries) throw new Error('geometries is required');
  22308. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  22309. return _turf_helpers_main_es_feature({
  22310. type: 'GeometryCollection',
  22311. geometries: geometries
  22312. }, properties, options);
  22313. }
  22314. /**
  22315. * Round number to precision
  22316. *
  22317. * @param {number} num Number
  22318. * @param {number} [precision=0] Precision
  22319. * @returns {number} rounded number
  22320. * @example
  22321. * turf.round(120.4321)
  22322. * //=120
  22323. *
  22324. * turf.round(120.4321, 2)
  22325. * //=120.43
  22326. */
  22327. function helpers_main_es_round(num, precision) {
  22328. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  22329. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  22330. var multiplier = Math.pow(10, precision || 0);
  22331. return Math.round(num * multiplier) / multiplier;
  22332. }
  22333. /**
  22334. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  22335. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  22336. *
  22337. * @name radiansToLength
  22338. * @param {number} radians in radians across the sphere
  22339. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  22340. * @returns {number} distance
  22341. */
  22342. function helpers_main_es_radiansToLength(radians, units) {
  22343. if (radians === undefined || radians === null) throw new Error('radians is required');
  22344. if (units && typeof units !== 'string') throw new Error('units must be a string');
  22345. var factor = helpers_main_es_factors[units || 'kilometers'];
  22346. if (!factor) throw new Error(units + ' units is invalid');
  22347. return radians * factor;
  22348. }
  22349. /**
  22350. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  22351. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  22352. *
  22353. * @name lengthToRadians
  22354. * @param {number} distance in real units
  22355. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  22356. * @returns {number} radians
  22357. */
  22358. function helpers_main_es_lengthToRadians(distance, units) {
  22359. if (distance === undefined || distance === null) throw new Error('distance is required');
  22360. if (units && typeof units !== 'string') throw new Error('units must be a string');
  22361. var factor = helpers_main_es_factors[units || 'kilometers'];
  22362. if (!factor) throw new Error(units + ' units is invalid');
  22363. return distance / factor;
  22364. }
  22365. /**
  22366. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  22367. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  22368. *
  22369. * @name lengthToDegrees
  22370. * @param {number} distance in real units
  22371. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  22372. * @returns {number} degrees
  22373. */
  22374. function helpers_main_es_lengthToDegrees(distance, units) {
  22375. return helpers_main_es_radiansToDegrees(helpers_main_es_lengthToRadians(distance, units));
  22376. }
  22377. /**
  22378. * Converts any bearing angle from the north line direction (positive clockwise)
  22379. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  22380. *
  22381. * @name bearingToAzimuth
  22382. * @param {number} bearing angle, between -180 and +180 degrees
  22383. * @returns {number} angle between 0 and 360 degrees
  22384. */
  22385. function helpers_main_es_bearingToAzimuth(bearing) {
  22386. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  22387. var angle = bearing % 360;
  22388. if (angle < 0) angle += 360;
  22389. return angle;
  22390. }
  22391. /**
  22392. * Converts an angle in radians to degrees
  22393. *
  22394. * @name radiansToDegrees
  22395. * @param {number} radians angle in radians
  22396. * @returns {number} degrees between 0 and 360 degrees
  22397. */
  22398. function helpers_main_es_radiansToDegrees(radians) {
  22399. if (radians === null || radians === undefined) throw new Error('radians is required');
  22400. var degrees = radians % (2 * Math.PI);
  22401. return degrees * 180 / Math.PI;
  22402. }
  22403. /**
  22404. * Converts an angle in degrees to radians
  22405. *
  22406. * @name degreesToRadians
  22407. * @param {number} degrees angle between 0 and 360 degrees
  22408. * @returns {number} angle in radians
  22409. */
  22410. function helpers_main_es_degreesToRadians(degrees) {
  22411. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  22412. var radians = degrees % 360;
  22413. return radians * Math.PI / 180;
  22414. }
  22415. /**
  22416. * Converts a length to the requested unit.
  22417. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  22418. *
  22419. * @param {number} length to be converted
  22420. * @param {string} originalUnit of the length
  22421. * @param {string} [finalUnit='kilometers'] returned unit
  22422. * @returns {number} the converted length
  22423. */
  22424. function helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  22425. if (length === null || length === undefined) throw new Error('length is required');
  22426. if (!(length >= 0)) throw new Error('length must be a positive number');
  22427. return helpers_main_es_radiansToLength(helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  22428. }
  22429. /**
  22430. * Converts a area to the requested unit.
  22431. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  22432. * @param {number} area to be converted
  22433. * @param {string} [originalUnit='meters'] of the distance
  22434. * @param {string} [finalUnit='kilometers'] returned unit
  22435. * @returns {number} the converted distance
  22436. */
  22437. function helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  22438. if (area === null || area === undefined) throw new Error('area is required');
  22439. if (!(area >= 0)) throw new Error('area must be a positive number');
  22440. var startFactor = helpers_main_es_areaFactors[originalUnit || 'meters'];
  22441. if (!startFactor) throw new Error('invalid original units');
  22442. var finalFactor = helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  22443. if (!finalFactor) throw new Error('invalid final units');
  22444. return (area / startFactor) * finalFactor;
  22445. }
  22446. /**
  22447. * isNumber
  22448. *
  22449. * @param {*} num Number to validate
  22450. * @returns {boolean} true/false
  22451. * @example
  22452. * turf.isNumber(123)
  22453. * //=true
  22454. * turf.isNumber('foo')
  22455. * //=false
  22456. */
  22457. function helpers_main_es_isNumber(num) {
  22458. return !isNaN(num) && num !== null && !Array.isArray(num);
  22459. }
  22460. /**
  22461. * isObject
  22462. *
  22463. * @param {*} input variable to validate
  22464. * @returns {boolean} true/false
  22465. * @example
  22466. * turf.isObject({elevation: 10})
  22467. * //=true
  22468. * turf.isObject('foo')
  22469. * //=false
  22470. */
  22471. function helpers_main_es_isObject(input) {
  22472. return (!!input) && (input.constructor === Object);
  22473. }
  22474. /**
  22475. * Validate BBox
  22476. *
  22477. * @private
  22478. * @param {Array<number>} bbox BBox to validate
  22479. * @returns {void}
  22480. * @throws Error if BBox is not valid
  22481. * @example
  22482. * validateBBox([-180, -40, 110, 50])
  22483. * //=OK
  22484. * validateBBox([-180, -40])
  22485. * //=Error
  22486. * validateBBox('Foo')
  22487. * //=Error
  22488. * validateBBox(5)
  22489. * //=Error
  22490. * validateBBox(null)
  22491. * //=Error
  22492. * validateBBox(undefined)
  22493. * //=Error
  22494. */
  22495. function helpers_main_es_validateBBox(bbox) {
  22496. if (!bbox) throw new Error('bbox is required');
  22497. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  22498. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  22499. bbox.forEach(function (num) {
  22500. if (!helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  22501. });
  22502. }
  22503. /**
  22504. * Validate Id
  22505. *
  22506. * @private
  22507. * @param {string|number} id Id to validate
  22508. * @returns {void}
  22509. * @throws Error if Id is not valid
  22510. * @example
  22511. * validateId([-180, -40, 110, 50])
  22512. * //=Error
  22513. * validateId([-180, -40])
  22514. * //=Error
  22515. * validateId('Foo')
  22516. * //=OK
  22517. * validateId(5)
  22518. * //=OK
  22519. * validateId(null)
  22520. * //=Error
  22521. * validateId(undefined)
  22522. * //=Error
  22523. */
  22524. function helpers_main_es_validateId(id) {
  22525. if (!id) throw new Error('id is required');
  22526. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  22527. }
  22528. // Deprecated methods
  22529. function helpers_main_es_radians2degrees() {
  22530. throw new Error('method has been renamed to `radiansToDegrees`');
  22531. }
  22532. function helpers_main_es_degrees2radians() {
  22533. throw new Error('method has been renamed to `degreesToRadians`');
  22534. }
  22535. function helpers_main_es_distanceToDegrees() {
  22536. throw new Error('method has been renamed to `lengthToDegrees`');
  22537. }
  22538. function helpers_main_es_distanceToRadians() {
  22539. throw new Error('method has been renamed to `lengthToRadians`');
  22540. }
  22541. function helpers_main_es_radiansToDistance() {
  22542. throw new Error('method has been renamed to `radiansToLength`');
  22543. }
  22544. function helpers_main_es_bearingToAngle() {
  22545. throw new Error('method has been renamed to `bearingToAzimuth`');
  22546. }
  22547. function helpers_main_es_convertDistance() {
  22548. throw new Error('method has been renamed to `convertLength`');
  22549. }
  22550. // CONCATENATED MODULE: ./node_modules/@turf/transform-scale/node_modules/@turf/meta/main.es.js
  22551. /**
  22552. * Callback for coordEach
  22553. *
  22554. * @callback coordEachCallback
  22555. * @param {Array<number>} currentCoord The current coordinate being processed.
  22556. * @param {number} coordIndex The current index of the coordinate being processed.
  22557. * @param {number} featureIndex The current index of the Feature being processed.
  22558. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  22559. * @param {number} geometryIndex The current index of the Geometry being processed.
  22560. */
  22561. /**
  22562. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  22563. *
  22564. * @name coordEach
  22565. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  22566. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  22567. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  22568. * @returns {void}
  22569. * @example
  22570. * var features = turf.featureCollection([
  22571. * turf.point([26, 37], {"foo": "bar"}),
  22572. * turf.point([36, 53], {"hello": "world"})
  22573. * ]);
  22574. *
  22575. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  22576. * //=currentCoord
  22577. * //=coordIndex
  22578. * //=featureIndex
  22579. * //=multiFeatureIndex
  22580. * //=geometryIndex
  22581. * });
  22582. */
  22583. function meta_main_es_coordEach(geojson, callback, excludeWrapCoord) {
  22584. // Handles null Geometry -- Skips this GeoJSON
  22585. if (geojson === null) return;
  22586. var j, k, l, geometry, stopG, coords,
  22587. geometryMaybeCollection,
  22588. wrapShrink = 0,
  22589. coordIndex = 0,
  22590. isGeometryCollection,
  22591. type = geojson.type,
  22592. isFeatureCollection = type === 'FeatureCollection',
  22593. isFeature = type === 'Feature',
  22594. stop = isFeatureCollection ? geojson.features.length : 1;
  22595. // This logic may look a little weird. The reason why it is that way
  22596. // is because it's trying to be fast. GeoJSON supports multiple kinds
  22597. // of objects at its root: FeatureCollection, Features, Geometries.
  22598. // This function has the responsibility of handling all of them, and that
  22599. // means that some of the `for` loops you see below actually just don't apply
  22600. // to certain inputs. For instance, if you give this just a
  22601. // Point geometry, then both loops are short-circuited and all we do
  22602. // is gradually rename the input until it's called 'geometry'.
  22603. //
  22604. // This also aims to allocate as few resources as possible: just a
  22605. // few numbers and booleans, rather than any temporary arrays as would
  22606. // be required with the normalization approach.
  22607. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  22608. geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :
  22609. (isFeature ? geojson.geometry : geojson));
  22610. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  22611. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  22612. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  22613. var multiFeatureIndex = 0;
  22614. var geometryIndex = 0;
  22615. geometry = isGeometryCollection ?
  22616. geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;
  22617. // Handles null Geometry -- Skips this geometry
  22618. if (geometry === null) continue;
  22619. coords = geometry.coordinates;
  22620. var geomType = geometry.type;
  22621. wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;
  22622. switch (geomType) {
  22623. case null:
  22624. break;
  22625. case 'Point':
  22626. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  22627. coordIndex++;
  22628. multiFeatureIndex++;
  22629. break;
  22630. case 'LineString':
  22631. case 'MultiPoint':
  22632. for (j = 0; j < coords.length; j++) {
  22633. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  22634. coordIndex++;
  22635. if (geomType === 'MultiPoint') multiFeatureIndex++;
  22636. }
  22637. if (geomType === 'LineString') multiFeatureIndex++;
  22638. break;
  22639. case 'Polygon':
  22640. case 'MultiLineString':
  22641. for (j = 0; j < coords.length; j++) {
  22642. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  22643. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  22644. coordIndex++;
  22645. }
  22646. if (geomType === 'MultiLineString') multiFeatureIndex++;
  22647. if (geomType === 'Polygon') geometryIndex++;
  22648. }
  22649. if (geomType === 'Polygon') multiFeatureIndex++;
  22650. break;
  22651. case 'MultiPolygon':
  22652. for (j = 0; j < coords.length; j++) {
  22653. if (geomType === 'MultiPolygon') geometryIndex = 0;
  22654. for (k = 0; k < coords[j].length; k++) {
  22655. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  22656. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  22657. coordIndex++;
  22658. }
  22659. geometryIndex++;
  22660. }
  22661. multiFeatureIndex++;
  22662. }
  22663. break;
  22664. case 'GeometryCollection':
  22665. for (j = 0; j < geometry.geometries.length; j++)
  22666. if (meta_main_es_coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  22667. break;
  22668. default:
  22669. throw new Error('Unknown Geometry Type');
  22670. }
  22671. }
  22672. }
  22673. }
  22674. /**
  22675. * Callback for coordReduce
  22676. *
  22677. * The first time the callback function is called, the values provided as arguments depend
  22678. * on whether the reduce method has an initialValue argument.
  22679. *
  22680. * If an initialValue is provided to the reduce method:
  22681. * - The previousValue argument is initialValue.
  22682. * - The currentValue argument is the value of the first element present in the array.
  22683. *
  22684. * If an initialValue is not provided:
  22685. * - The previousValue argument is the value of the first element present in the array.
  22686. * - The currentValue argument is the value of the second element present in the array.
  22687. *
  22688. * @callback coordReduceCallback
  22689. * @param {*} previousValue The accumulated value previously returned in the last invocation
  22690. * of the callback, or initialValue, if supplied.
  22691. * @param {Array<number>} currentCoord The current coordinate being processed.
  22692. * @param {number} coordIndex The current index of the coordinate being processed.
  22693. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  22694. * @param {number} featureIndex The current index of the Feature being processed.
  22695. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  22696. * @param {number} geometryIndex The current index of the Geometry being processed.
  22697. */
  22698. /**
  22699. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  22700. *
  22701. * @name coordReduce
  22702. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  22703. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  22704. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  22705. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  22706. * @returns {*} The value that results from the reduction.
  22707. * @example
  22708. * var features = turf.featureCollection([
  22709. * turf.point([26, 37], {"foo": "bar"}),
  22710. * turf.point([36, 53], {"hello": "world"})
  22711. * ]);
  22712. *
  22713. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  22714. * //=previousValue
  22715. * //=currentCoord
  22716. * //=coordIndex
  22717. * //=featureIndex
  22718. * //=multiFeatureIndex
  22719. * //=geometryIndex
  22720. * return currentCoord;
  22721. * });
  22722. */
  22723. function meta_main_es_coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  22724. var previousValue = initialValue;
  22725. meta_main_es_coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  22726. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;
  22727. else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  22728. }, excludeWrapCoord);
  22729. return previousValue;
  22730. }
  22731. /**
  22732. * Callback for propEach
  22733. *
  22734. * @callback propEachCallback
  22735. * @param {Object} currentProperties The current Properties being processed.
  22736. * @param {number} featureIndex The current index of the Feature being processed.
  22737. */
  22738. /**
  22739. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  22740. *
  22741. * @name propEach
  22742. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  22743. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  22744. * @returns {void}
  22745. * @example
  22746. * var features = turf.featureCollection([
  22747. * turf.point([26, 37], {foo: 'bar'}),
  22748. * turf.point([36, 53], {hello: 'world'})
  22749. * ]);
  22750. *
  22751. * turf.propEach(features, function (currentProperties, featureIndex) {
  22752. * //=currentProperties
  22753. * //=featureIndex
  22754. * });
  22755. */
  22756. function meta_main_es_propEach(geojson, callback) {
  22757. var i;
  22758. switch (geojson.type) {
  22759. case 'FeatureCollection':
  22760. for (i = 0; i < geojson.features.length; i++) {
  22761. if (callback(geojson.features[i].properties, i) === false) break;
  22762. }
  22763. break;
  22764. case 'Feature':
  22765. callback(geojson.properties, 0);
  22766. break;
  22767. }
  22768. }
  22769. /**
  22770. * Callback for propReduce
  22771. *
  22772. * The first time the callback function is called, the values provided as arguments depend
  22773. * on whether the reduce method has an initialValue argument.
  22774. *
  22775. * If an initialValue is provided to the reduce method:
  22776. * - The previousValue argument is initialValue.
  22777. * - The currentValue argument is the value of the first element present in the array.
  22778. *
  22779. * If an initialValue is not provided:
  22780. * - The previousValue argument is the value of the first element present in the array.
  22781. * - The currentValue argument is the value of the second element present in the array.
  22782. *
  22783. * @callback propReduceCallback
  22784. * @param {*} previousValue The accumulated value previously returned in the last invocation
  22785. * of the callback, or initialValue, if supplied.
  22786. * @param {*} currentProperties The current Properties being processed.
  22787. * @param {number} featureIndex The current index of the Feature being processed.
  22788. */
  22789. /**
  22790. * Reduce properties in any GeoJSON object into a single value,
  22791. * similar to how Array.reduce works. However, in this case we lazily run
  22792. * the reduction, so an array of all properties is unnecessary.
  22793. *
  22794. * @name propReduce
  22795. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  22796. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  22797. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  22798. * @returns {*} The value that results from the reduction.
  22799. * @example
  22800. * var features = turf.featureCollection([
  22801. * turf.point([26, 37], {foo: 'bar'}),
  22802. * turf.point([36, 53], {hello: 'world'})
  22803. * ]);
  22804. *
  22805. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  22806. * //=previousValue
  22807. * //=currentProperties
  22808. * //=featureIndex
  22809. * return currentProperties
  22810. * });
  22811. */
  22812. function meta_main_es_propReduce(geojson, callback, initialValue) {
  22813. var previousValue = initialValue;
  22814. meta_main_es_propEach(geojson, function (currentProperties, featureIndex) {
  22815. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;
  22816. else previousValue = callback(previousValue, currentProperties, featureIndex);
  22817. });
  22818. return previousValue;
  22819. }
  22820. /**
  22821. * Callback for featureEach
  22822. *
  22823. * @callback featureEachCallback
  22824. * @param {Feature<any>} currentFeature The current Feature being processed.
  22825. * @param {number} featureIndex The current index of the Feature being processed.
  22826. */
  22827. /**
  22828. * Iterate over features in any GeoJSON object, similar to
  22829. * Array.forEach.
  22830. *
  22831. * @name featureEach
  22832. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  22833. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  22834. * @returns {void}
  22835. * @example
  22836. * var features = turf.featureCollection([
  22837. * turf.point([26, 37], {foo: 'bar'}),
  22838. * turf.point([36, 53], {hello: 'world'})
  22839. * ]);
  22840. *
  22841. * turf.featureEach(features, function (currentFeature, featureIndex) {
  22842. * //=currentFeature
  22843. * //=featureIndex
  22844. * });
  22845. */
  22846. function meta_main_es_featureEach(geojson, callback) {
  22847. if (geojson.type === 'Feature') {
  22848. callback(geojson, 0);
  22849. } else if (geojson.type === 'FeatureCollection') {
  22850. for (var i = 0; i < geojson.features.length; i++) {
  22851. if (callback(geojson.features[i], i) === false) break;
  22852. }
  22853. }
  22854. }
  22855. /**
  22856. * Callback for featureReduce
  22857. *
  22858. * The first time the callback function is called, the values provided as arguments depend
  22859. * on whether the reduce method has an initialValue argument.
  22860. *
  22861. * If an initialValue is provided to the reduce method:
  22862. * - The previousValue argument is initialValue.
  22863. * - The currentValue argument is the value of the first element present in the array.
  22864. *
  22865. * If an initialValue is not provided:
  22866. * - The previousValue argument is the value of the first element present in the array.
  22867. * - The currentValue argument is the value of the second element present in the array.
  22868. *
  22869. * @callback featureReduceCallback
  22870. * @param {*} previousValue The accumulated value previously returned in the last invocation
  22871. * of the callback, or initialValue, if supplied.
  22872. * @param {Feature} currentFeature The current Feature being processed.
  22873. * @param {number} featureIndex The current index of the Feature being processed.
  22874. */
  22875. /**
  22876. * Reduce features in any GeoJSON object, similar to Array.reduce().
  22877. *
  22878. * @name featureReduce
  22879. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  22880. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  22881. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  22882. * @returns {*} The value that results from the reduction.
  22883. * @example
  22884. * var features = turf.featureCollection([
  22885. * turf.point([26, 37], {"foo": "bar"}),
  22886. * turf.point([36, 53], {"hello": "world"})
  22887. * ]);
  22888. *
  22889. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  22890. * //=previousValue
  22891. * //=currentFeature
  22892. * //=featureIndex
  22893. * return currentFeature
  22894. * });
  22895. */
  22896. function meta_main_es_featureReduce(geojson, callback, initialValue) {
  22897. var previousValue = initialValue;
  22898. meta_main_es_featureEach(geojson, function (currentFeature, featureIndex) {
  22899. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  22900. else previousValue = callback(previousValue, currentFeature, featureIndex);
  22901. });
  22902. return previousValue;
  22903. }
  22904. /**
  22905. * Get all coordinates from any GeoJSON object.
  22906. *
  22907. * @name coordAll
  22908. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  22909. * @returns {Array<Array<number>>} coordinate position array
  22910. * @example
  22911. * var features = turf.featureCollection([
  22912. * turf.point([26, 37], {foo: 'bar'}),
  22913. * turf.point([36, 53], {hello: 'world'})
  22914. * ]);
  22915. *
  22916. * var coords = turf.coordAll(features);
  22917. * //= [[26, 37], [36, 53]]
  22918. */
  22919. function meta_main_es_coordAll(geojson) {
  22920. var coords = [];
  22921. meta_main_es_coordEach(geojson, function (coord) {
  22922. coords.push(coord);
  22923. });
  22924. return coords;
  22925. }
  22926. /**
  22927. * Callback for geomEach
  22928. *
  22929. * @callback geomEachCallback
  22930. * @param {Geometry} currentGeometry The current Geometry being processed.
  22931. * @param {number} featureIndex The current index of the Feature being processed.
  22932. * @param {Object} featureProperties The current Feature Properties being processed.
  22933. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  22934. * @param {number|string} featureId The current Feature Id being processed.
  22935. */
  22936. /**
  22937. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  22938. *
  22939. * @name geomEach
  22940. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  22941. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  22942. * @returns {void}
  22943. * @example
  22944. * var features = turf.featureCollection([
  22945. * turf.point([26, 37], {foo: 'bar'}),
  22946. * turf.point([36, 53], {hello: 'world'})
  22947. * ]);
  22948. *
  22949. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  22950. * //=currentGeometry
  22951. * //=featureIndex
  22952. * //=featureProperties
  22953. * //=featureBBox
  22954. * //=featureId
  22955. * });
  22956. */
  22957. function meta_main_es_geomEach(geojson, callback) {
  22958. var i, j, g, geometry, stopG,
  22959. geometryMaybeCollection,
  22960. isGeometryCollection,
  22961. featureProperties,
  22962. featureBBox,
  22963. featureId,
  22964. featureIndex = 0,
  22965. isFeatureCollection = geojson.type === 'FeatureCollection',
  22966. isFeature = geojson.type === 'Feature',
  22967. stop = isFeatureCollection ? geojson.features.length : 1;
  22968. // This logic may look a little weird. The reason why it is that way
  22969. // is because it's trying to be fast. GeoJSON supports multiple kinds
  22970. // of objects at its root: FeatureCollection, Features, Geometries.
  22971. // This function has the responsibility of handling all of them, and that
  22972. // means that some of the `for` loops you see below actually just don't apply
  22973. // to certain inputs. For instance, if you give this just a
  22974. // Point geometry, then both loops are short-circuited and all we do
  22975. // is gradually rename the input until it's called 'geometry'.
  22976. //
  22977. // This also aims to allocate as few resources as possible: just a
  22978. // few numbers and booleans, rather than any temporary arrays as would
  22979. // be required with the normalization approach.
  22980. for (i = 0; i < stop; i++) {
  22981. geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :
  22982. (isFeature ? geojson.geometry : geojson));
  22983. featureProperties = (isFeatureCollection ? geojson.features[i].properties :
  22984. (isFeature ? geojson.properties : {}));
  22985. featureBBox = (isFeatureCollection ? geojson.features[i].bbox :
  22986. (isFeature ? geojson.bbox : undefined));
  22987. featureId = (isFeatureCollection ? geojson.features[i].id :
  22988. (isFeature ? geojson.id : undefined));
  22989. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  22990. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  22991. for (g = 0; g < stopG; g++) {
  22992. geometry = isGeometryCollection ?
  22993. geometryMaybeCollection.geometries[g] : geometryMaybeCollection;
  22994. // Handle null Geometry
  22995. if (geometry === null) {
  22996. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  22997. continue;
  22998. }
  22999. switch (geometry.type) {
  23000. case 'Point':
  23001. case 'LineString':
  23002. case 'MultiPoint':
  23003. case 'Polygon':
  23004. case 'MultiLineString':
  23005. case 'MultiPolygon': {
  23006. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  23007. break;
  23008. }
  23009. case 'GeometryCollection': {
  23010. for (j = 0; j < geometry.geometries.length; j++) {
  23011. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  23012. }
  23013. break;
  23014. }
  23015. default:
  23016. throw new Error('Unknown Geometry Type');
  23017. }
  23018. }
  23019. // Only increase `featureIndex` per each feature
  23020. featureIndex++;
  23021. }
  23022. }
  23023. /**
  23024. * Callback for geomReduce
  23025. *
  23026. * The first time the callback function is called, the values provided as arguments depend
  23027. * on whether the reduce method has an initialValue argument.
  23028. *
  23029. * If an initialValue is provided to the reduce method:
  23030. * - The previousValue argument is initialValue.
  23031. * - The currentValue argument is the value of the first element present in the array.
  23032. *
  23033. * If an initialValue is not provided:
  23034. * - The previousValue argument is the value of the first element present in the array.
  23035. * - The currentValue argument is the value of the second element present in the array.
  23036. *
  23037. * @callback geomReduceCallback
  23038. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23039. * of the callback, or initialValue, if supplied.
  23040. * @param {Geometry} currentGeometry The current Geometry being processed.
  23041. * @param {number} featureIndex The current index of the Feature being processed.
  23042. * @param {Object} featureProperties The current Feature Properties being processed.
  23043. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  23044. * @param {number|string} featureId The current Feature Id being processed.
  23045. */
  23046. /**
  23047. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  23048. *
  23049. * @name geomReduce
  23050. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23051. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  23052. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23053. * @returns {*} The value that results from the reduction.
  23054. * @example
  23055. * var features = turf.featureCollection([
  23056. * turf.point([26, 37], {foo: 'bar'}),
  23057. * turf.point([36, 53], {hello: 'world'})
  23058. * ]);
  23059. *
  23060. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  23061. * //=previousValue
  23062. * //=currentGeometry
  23063. * //=featureIndex
  23064. * //=featureProperties
  23065. * //=featureBBox
  23066. * //=featureId
  23067. * return currentGeometry
  23068. * });
  23069. */
  23070. function meta_main_es_geomReduce(geojson, callback, initialValue) {
  23071. var previousValue = initialValue;
  23072. meta_main_es_geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  23073. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;
  23074. else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  23075. });
  23076. return previousValue;
  23077. }
  23078. /**
  23079. * Callback for flattenEach
  23080. *
  23081. * @callback flattenEachCallback
  23082. * @param {Feature} currentFeature The current flattened feature being processed.
  23083. * @param {number} featureIndex The current index of the Feature being processed.
  23084. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23085. */
  23086. /**
  23087. * Iterate over flattened features in any GeoJSON object, similar to
  23088. * Array.forEach.
  23089. *
  23090. * @name flattenEach
  23091. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23092. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  23093. * @example
  23094. * var features = turf.featureCollection([
  23095. * turf.point([26, 37], {foo: 'bar'}),
  23096. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  23097. * ]);
  23098. *
  23099. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  23100. * //=currentFeature
  23101. * //=featureIndex
  23102. * //=multiFeatureIndex
  23103. * });
  23104. */
  23105. function meta_main_es_flattenEach(geojson, callback) {
  23106. meta_main_es_geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  23107. // Callback for single geometry
  23108. var type = (geometry === null) ? null : geometry.type;
  23109. switch (type) {
  23110. case null:
  23111. case 'Point':
  23112. case 'LineString':
  23113. case 'Polygon':
  23114. if (callback(_turf_helpers_main_es_feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0) === false) return false;
  23115. return;
  23116. }
  23117. var geomType;
  23118. // Callback for multi-geometry
  23119. switch (type) {
  23120. case 'MultiPoint':
  23121. geomType = 'Point';
  23122. break;
  23123. case 'MultiLineString':
  23124. geomType = 'LineString';
  23125. break;
  23126. case 'MultiPolygon':
  23127. geomType = 'Polygon';
  23128. break;
  23129. }
  23130. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  23131. var coordinate = geometry.coordinates[multiFeatureIndex];
  23132. var geom = {
  23133. type: geomType,
  23134. coordinates: coordinate
  23135. };
  23136. if (callback(_turf_helpers_main_es_feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  23137. }
  23138. });
  23139. }
  23140. /**
  23141. * Callback for flattenReduce
  23142. *
  23143. * The first time the callback function is called, the values provided as arguments depend
  23144. * on whether the reduce method has an initialValue argument.
  23145. *
  23146. * If an initialValue is provided to the reduce method:
  23147. * - The previousValue argument is initialValue.
  23148. * - The currentValue argument is the value of the first element present in the array.
  23149. *
  23150. * If an initialValue is not provided:
  23151. * - The previousValue argument is the value of the first element present in the array.
  23152. * - The currentValue argument is the value of the second element present in the array.
  23153. *
  23154. * @callback flattenReduceCallback
  23155. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23156. * of the callback, or initialValue, if supplied.
  23157. * @param {Feature} currentFeature The current Feature being processed.
  23158. * @param {number} featureIndex The current index of the Feature being processed.
  23159. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23160. */
  23161. /**
  23162. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  23163. *
  23164. * @name flattenReduce
  23165. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23166. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  23167. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23168. * @returns {*} The value that results from the reduction.
  23169. * @example
  23170. * var features = turf.featureCollection([
  23171. * turf.point([26, 37], {foo: 'bar'}),
  23172. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  23173. * ]);
  23174. *
  23175. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  23176. * //=previousValue
  23177. * //=currentFeature
  23178. * //=featureIndex
  23179. * //=multiFeatureIndex
  23180. * return currentFeature
  23181. * });
  23182. */
  23183. function meta_main_es_flattenReduce(geojson, callback, initialValue) {
  23184. var previousValue = initialValue;
  23185. meta_main_es_flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  23186. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  23187. else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  23188. });
  23189. return previousValue;
  23190. }
  23191. /**
  23192. * Callback for segmentEach
  23193. *
  23194. * @callback segmentEachCallback
  23195. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  23196. * @param {number} featureIndex The current index of the Feature being processed.
  23197. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23198. * @param {number} geometryIndex The current index of the Geometry being processed.
  23199. * @param {number} segmentIndex The current index of the Segment being processed.
  23200. * @returns {void}
  23201. */
  23202. /**
  23203. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  23204. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  23205. *
  23206. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  23207. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  23208. * @returns {void}
  23209. * @example
  23210. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  23211. *
  23212. * // Iterate over GeoJSON by 2-vertex segments
  23213. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  23214. * //=currentSegment
  23215. * //=featureIndex
  23216. * //=multiFeatureIndex
  23217. * //=geometryIndex
  23218. * //=segmentIndex
  23219. * });
  23220. *
  23221. * // Calculate the total number of segments
  23222. * var total = 0;
  23223. * turf.segmentEach(polygon, function () {
  23224. * total++;
  23225. * });
  23226. */
  23227. function meta_main_es_segmentEach(geojson, callback) {
  23228. meta_main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  23229. var segmentIndex = 0;
  23230. // Exclude null Geometries
  23231. if (!feature$$1.geometry) return;
  23232. // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  23233. var type = feature$$1.geometry.type;
  23234. if (type === 'Point' || type === 'MultiPoint') return;
  23235. // Generate 2-vertex line segments
  23236. var previousCoords;
  23237. if (meta_main_es_coordEach(feature$$1, function (currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {
  23238. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  23239. if (previousCoords === undefined) {
  23240. previousCoords = currentCoord;
  23241. return;
  23242. }
  23243. var currentSegment = helpers_main_es_lineString([previousCoords, currentCoord], feature$$1.properties);
  23244. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  23245. segmentIndex++;
  23246. previousCoords = currentCoord;
  23247. }) === false) return false;
  23248. });
  23249. }
  23250. /**
  23251. * Callback for segmentReduce
  23252. *
  23253. * The first time the callback function is called, the values provided as arguments depend
  23254. * on whether the reduce method has an initialValue argument.
  23255. *
  23256. * If an initialValue is provided to the reduce method:
  23257. * - The previousValue argument is initialValue.
  23258. * - The currentValue argument is the value of the first element present in the array.
  23259. *
  23260. * If an initialValue is not provided:
  23261. * - The previousValue argument is the value of the first element present in the array.
  23262. * - The currentValue argument is the value of the second element present in the array.
  23263. *
  23264. * @callback segmentReduceCallback
  23265. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23266. * of the callback, or initialValue, if supplied.
  23267. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  23268. * @param {number} featureIndex The current index of the Feature being processed.
  23269. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23270. * @param {number} geometryIndex The current index of the Geometry being processed.
  23271. * @param {number} segmentIndex The current index of the Segment being processed.
  23272. */
  23273. /**
  23274. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  23275. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  23276. *
  23277. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  23278. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  23279. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23280. * @returns {void}
  23281. * @example
  23282. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  23283. *
  23284. * // Iterate over GeoJSON by 2-vertex segments
  23285. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  23286. * //= previousSegment
  23287. * //= currentSegment
  23288. * //= featureIndex
  23289. * //= multiFeatureIndex
  23290. * //= geometryIndex
  23291. * //= segmentInex
  23292. * return currentSegment
  23293. * });
  23294. *
  23295. * // Calculate the total number of segments
  23296. * var initialValue = 0
  23297. * var total = turf.segmentReduce(polygon, function (previousValue) {
  23298. * previousValue++;
  23299. * return previousValue;
  23300. * }, initialValue);
  23301. */
  23302. function meta_main_es_segmentReduce(geojson, callback, initialValue) {
  23303. var previousValue = initialValue;
  23304. var started = false;
  23305. meta_main_es_segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  23306. if (started === false && initialValue === undefined) previousValue = currentSegment;
  23307. else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  23308. started = true;
  23309. });
  23310. return previousValue;
  23311. }
  23312. /**
  23313. * Callback for lineEach
  23314. *
  23315. * @callback lineEachCallback
  23316. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  23317. * @param {number} featureIndex The current index of the Feature being processed
  23318. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  23319. * @param {number} geometryIndex The current index of the Geometry being processed
  23320. */
  23321. /**
  23322. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  23323. * similar to Array.forEach.
  23324. *
  23325. * @name lineEach
  23326. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  23327. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  23328. * @example
  23329. * var multiLine = turf.multiLineString([
  23330. * [[26, 37], [35, 45]],
  23331. * [[36, 53], [38, 50], [41, 55]]
  23332. * ]);
  23333. *
  23334. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  23335. * //=currentLine
  23336. * //=featureIndex
  23337. * //=multiFeatureIndex
  23338. * //=geometryIndex
  23339. * });
  23340. */
  23341. function meta_main_es_lineEach(geojson, callback) {
  23342. // validation
  23343. if (!geojson) throw new Error('geojson is required');
  23344. meta_main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  23345. if (feature$$1.geometry === null) return;
  23346. var type = feature$$1.geometry.type;
  23347. var coords = feature$$1.geometry.coordinates;
  23348. switch (type) {
  23349. case 'LineString':
  23350. if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  23351. break;
  23352. case 'Polygon':
  23353. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  23354. if (callback(helpers_main_es_lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  23355. }
  23356. break;
  23357. }
  23358. });
  23359. }
  23360. /**
  23361. * Callback for lineReduce
  23362. *
  23363. * The first time the callback function is called, the values provided as arguments depend
  23364. * on whether the reduce method has an initialValue argument.
  23365. *
  23366. * If an initialValue is provided to the reduce method:
  23367. * - The previousValue argument is initialValue.
  23368. * - The currentValue argument is the value of the first element present in the array.
  23369. *
  23370. * If an initialValue is not provided:
  23371. * - The previousValue argument is the value of the first element present in the array.
  23372. * - The currentValue argument is the value of the second element present in the array.
  23373. *
  23374. * @callback lineReduceCallback
  23375. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23376. * of the callback, or initialValue, if supplied.
  23377. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  23378. * @param {number} featureIndex The current index of the Feature being processed
  23379. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  23380. * @param {number} geometryIndex The current index of the Geometry being processed
  23381. */
  23382. /**
  23383. * Reduce features in any GeoJSON object, similar to Array.reduce().
  23384. *
  23385. * @name lineReduce
  23386. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  23387. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  23388. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23389. * @returns {*} The value that results from the reduction.
  23390. * @example
  23391. * var multiPoly = turf.multiPolygon([
  23392. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  23393. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  23394. * ]);
  23395. *
  23396. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  23397. * //=previousValue
  23398. * //=currentLine
  23399. * //=featureIndex
  23400. * //=multiFeatureIndex
  23401. * //=geometryIndex
  23402. * return currentLine
  23403. * });
  23404. */
  23405. function meta_main_es_lineReduce(geojson, callback, initialValue) {
  23406. var previousValue = initialValue;
  23407. meta_main_es_lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  23408. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;
  23409. else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  23410. });
  23411. return previousValue;
  23412. }
  23413. /**
  23414. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  23415. *
  23416. * Negative indexes are permitted.
  23417. * Point & MultiPoint will always return null.
  23418. *
  23419. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  23420. * @param {Object} [options={}] Optional parameters
  23421. * @param {number} [options.featureIndex=0] Feature Index
  23422. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  23423. * @param {number} [options.geometryIndex=0] Geometry Index
  23424. * @param {number} [options.segmentIndex=0] Segment Index
  23425. * @param {Object} [options.properties={}] Translate Properties to output LineString
  23426. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  23427. * @param {number|string} [options.id={}] Translate Id to output LineString
  23428. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  23429. * @example
  23430. * var multiLine = turf.multiLineString([
  23431. * [[10, 10], [50, 30], [30, 40]],
  23432. * [[-10, -10], [-50, -30], [-30, -40]]
  23433. * ]);
  23434. *
  23435. * // First Segment (defaults are 0)
  23436. * turf.findSegment(multiLine);
  23437. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  23438. *
  23439. * // First Segment of 2nd Multi Feature
  23440. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  23441. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  23442. *
  23443. * // Last Segment of Last Multi Feature
  23444. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  23445. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  23446. */
  23447. function meta_main_es_findSegment(geojson, options) {
  23448. // Optional Parameters
  23449. options = options || {};
  23450. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  23451. var featureIndex = options.featureIndex || 0;
  23452. var multiFeatureIndex = options.multiFeatureIndex || 0;
  23453. var geometryIndex = options.geometryIndex || 0;
  23454. var segmentIndex = options.segmentIndex || 0;
  23455. // Find FeatureIndex
  23456. var properties = options.properties;
  23457. var geometry;
  23458. switch (geojson.type) {
  23459. case 'FeatureCollection':
  23460. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  23461. properties = properties || geojson.features[featureIndex].properties;
  23462. geometry = geojson.features[featureIndex].geometry;
  23463. break;
  23464. case 'Feature':
  23465. properties = properties || geojson.properties;
  23466. geometry = geojson.geometry;
  23467. break;
  23468. case 'Point':
  23469. case 'MultiPoint':
  23470. return null;
  23471. case 'LineString':
  23472. case 'Polygon':
  23473. case 'MultiLineString':
  23474. case 'MultiPolygon':
  23475. geometry = geojson;
  23476. break;
  23477. default:
  23478. throw new Error('geojson is invalid');
  23479. }
  23480. // Find SegmentIndex
  23481. if (geometry === null) return null;
  23482. var coords = geometry.coordinates;
  23483. switch (geometry.type) {
  23484. case 'Point':
  23485. case 'MultiPoint':
  23486. return null;
  23487. case 'LineString':
  23488. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  23489. return helpers_main_es_lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  23490. case 'Polygon':
  23491. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  23492. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  23493. return helpers_main_es_lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  23494. case 'MultiLineString':
  23495. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23496. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  23497. return helpers_main_es_lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  23498. case 'MultiPolygon':
  23499. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23500. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  23501. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  23502. return helpers_main_es_lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  23503. }
  23504. throw new Error('geojson is invalid');
  23505. }
  23506. /**
  23507. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  23508. *
  23509. * Negative indexes are permitted.
  23510. *
  23511. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  23512. * @param {Object} [options={}] Optional parameters
  23513. * @param {number} [options.featureIndex=0] Feature Index
  23514. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  23515. * @param {number} [options.geometryIndex=0] Geometry Index
  23516. * @param {number} [options.coordIndex=0] Coord Index
  23517. * @param {Object} [options.properties={}] Translate Properties to output Point
  23518. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  23519. * @param {number|string} [options.id={}] Translate Id to output Point
  23520. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  23521. * @example
  23522. * var multiLine = turf.multiLineString([
  23523. * [[10, 10], [50, 30], [30, 40]],
  23524. * [[-10, -10], [-50, -30], [-30, -40]]
  23525. * ]);
  23526. *
  23527. * // First Segment (defaults are 0)
  23528. * turf.findPoint(multiLine);
  23529. * // => Feature<Point<[10, 10]>>
  23530. *
  23531. * // First Segment of the 2nd Multi-Feature
  23532. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  23533. * // => Feature<Point<[-10, -10]>>
  23534. *
  23535. * // Last Segment of last Multi-Feature
  23536. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  23537. * // => Feature<Point<[-30, -40]>>
  23538. */
  23539. function meta_main_es_findPoint(geojson, options) {
  23540. // Optional Parameters
  23541. options = options || {};
  23542. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  23543. var featureIndex = options.featureIndex || 0;
  23544. var multiFeatureIndex = options.multiFeatureIndex || 0;
  23545. var geometryIndex = options.geometryIndex || 0;
  23546. var coordIndex = options.coordIndex || 0;
  23547. // Find FeatureIndex
  23548. var properties = options.properties;
  23549. var geometry;
  23550. switch (geojson.type) {
  23551. case 'FeatureCollection':
  23552. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  23553. properties = properties || geojson.features[featureIndex].properties;
  23554. geometry = geojson.features[featureIndex].geometry;
  23555. break;
  23556. case 'Feature':
  23557. properties = properties || geojson.properties;
  23558. geometry = geojson.geometry;
  23559. break;
  23560. case 'Point':
  23561. case 'MultiPoint':
  23562. return null;
  23563. case 'LineString':
  23564. case 'Polygon':
  23565. case 'MultiLineString':
  23566. case 'MultiPolygon':
  23567. geometry = geojson;
  23568. break;
  23569. default:
  23570. throw new Error('geojson is invalid');
  23571. }
  23572. // Find Coord Index
  23573. if (geometry === null) return null;
  23574. var coords = geometry.coordinates;
  23575. switch (geometry.type) {
  23576. case 'Point':
  23577. return helpers_main_es_point(coords, properties, options);
  23578. case 'MultiPoint':
  23579. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23580. return helpers_main_es_point(coords[multiFeatureIndex], properties, options);
  23581. case 'LineString':
  23582. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  23583. return helpers_main_es_point(coords[coordIndex], properties, options);
  23584. case 'Polygon':
  23585. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  23586. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  23587. return helpers_main_es_point(coords[geometryIndex][coordIndex], properties, options);
  23588. case 'MultiLineString':
  23589. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23590. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  23591. return helpers_main_es_point(coords[multiFeatureIndex][coordIndex], properties, options);
  23592. case 'MultiPolygon':
  23593. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23594. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  23595. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  23596. return helpers_main_es_point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  23597. }
  23598. throw new Error('geojson is invalid');
  23599. }
  23600. // CONCATENATED MODULE: ./node_modules/@turf/transform-scale/node_modules/@turf/bbox/main.es.js
  23601. /**
  23602. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  23603. *
  23604. * @name bbox
  23605. * @param {GeoJSON} geojson any GeoJSON object
  23606. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  23607. * @example
  23608. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  23609. * var bbox = turf.bbox(line);
  23610. * var bboxPolygon = turf.bboxPolygon(bbox);
  23611. *
  23612. * //addToMap
  23613. * var addToMap = [line, bboxPolygon]
  23614. */
  23615. function bbox_main_es_bbox(geojson) {
  23616. var BBox = [Infinity, Infinity, -Infinity, -Infinity];
  23617. meta_main_es_coordEach(geojson, function (coord) {
  23618. if (BBox[0] > coord[0]) BBox[0] = coord[0];
  23619. if (BBox[1] > coord[1]) BBox[1] = coord[1];
  23620. if (BBox[2] < coord[0]) BBox[2] = coord[0];
  23621. if (BBox[3] < coord[1]) BBox[3] = coord[1];
  23622. });
  23623. return BBox;
  23624. }
  23625. /* harmony default export */ var _turf_bbox_main_es = (bbox_main_es_bbox);
  23626. // CONCATENATED MODULE: ./node_modules/@turf/invariant/node_modules/@turf/helpers/main.es.js
  23627. /**
  23628. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  23629. */
  23630. var _turf_helpers_main_es_earthRadius = 6371008.8;
  23631. /**
  23632. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  23633. */
  23634. var _turf_helpers_main_es_factors = {
  23635. meters: _turf_helpers_main_es_earthRadius,
  23636. metres: _turf_helpers_main_es_earthRadius,
  23637. millimeters: _turf_helpers_main_es_earthRadius * 1000,
  23638. millimetres: _turf_helpers_main_es_earthRadius * 1000,
  23639. centimeters: _turf_helpers_main_es_earthRadius * 100,
  23640. centimetres: _turf_helpers_main_es_earthRadius * 100,
  23641. kilometers: _turf_helpers_main_es_earthRadius / 1000,
  23642. kilometres: _turf_helpers_main_es_earthRadius / 1000,
  23643. miles: _turf_helpers_main_es_earthRadius / 1609.344,
  23644. nauticalmiles: _turf_helpers_main_es_earthRadius / 1852,
  23645. inches: _turf_helpers_main_es_earthRadius * 39.370,
  23646. yards: _turf_helpers_main_es_earthRadius / 1.0936,
  23647. feet: _turf_helpers_main_es_earthRadius * 3.28084,
  23648. radians: 1,
  23649. degrees: _turf_helpers_main_es_earthRadius / 111325,
  23650. };
  23651. /**
  23652. * Units of measurement factors based on 1 meter.
  23653. */
  23654. var _turf_helpers_main_es_unitsFactors = {
  23655. meters: 1,
  23656. metres: 1,
  23657. millimeters: 1000,
  23658. millimetres: 1000,
  23659. centimeters: 100,
  23660. centimetres: 100,
  23661. kilometers: 1 / 1000,
  23662. kilometres: 1 / 1000,
  23663. miles: 1 / 1609.344,
  23664. nauticalmiles: 1 / 1852,
  23665. inches: 39.370,
  23666. yards: 1 / 1.0936,
  23667. feet: 3.28084,
  23668. radians: 1 / _turf_helpers_main_es_earthRadius,
  23669. degrees: 1 / 111325,
  23670. };
  23671. /**
  23672. * Area of measurement factors based on 1 square meter.
  23673. */
  23674. var _turf_helpers_main_es_areaFactors = {
  23675. meters: 1,
  23676. metres: 1,
  23677. millimeters: 1000000,
  23678. millimetres: 1000000,
  23679. centimeters: 10000,
  23680. centimetres: 10000,
  23681. kilometers: 0.000001,
  23682. kilometres: 0.000001,
  23683. acres: 0.000247105,
  23684. miles: 3.86e-7,
  23685. yards: 1.195990046,
  23686. feet: 10.763910417,
  23687. inches: 1550.003100006
  23688. };
  23689. /**
  23690. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  23691. *
  23692. * @name feature
  23693. * @param {Geometry} geometry input geometry
  23694. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  23695. * @param {Object} [options={}] Optional Parameters
  23696. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  23697. * @param {string|number} [options.id] Identifier associated with the Feature
  23698. * @returns {Feature} a GeoJSON Feature
  23699. * @example
  23700. * var geometry = {
  23701. * "type": "Point",
  23702. * "coordinates": [110, 50]
  23703. * };
  23704. *
  23705. * var feature = turf.feature(geometry);
  23706. *
  23707. * //=feature
  23708. */
  23709. function node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  23710. // Optional Parameters
  23711. options = options || {};
  23712. if (!_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  23713. var bbox = options.bbox;
  23714. var id = options.id;
  23715. // Validation
  23716. if (geometry === undefined) throw new Error('geometry is required');
  23717. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  23718. if (bbox) _turf_helpers_main_es_validateBBox(bbox);
  23719. if (id) _turf_helpers_main_es_validateId(id);
  23720. // Main
  23721. var feat = {type: 'Feature'};
  23722. if (id) feat.id = id;
  23723. if (bbox) feat.bbox = bbox;
  23724. feat.properties = properties || {};
  23725. feat.geometry = geometry;
  23726. return feat;
  23727. }
  23728. /**
  23729. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  23730. * For GeometryCollection type use `helpers.geometryCollection`
  23731. *
  23732. * @name geometry
  23733. * @param {string} type Geometry Type
  23734. * @param {Array<number>} coordinates Coordinates
  23735. * @param {Object} [options={}] Optional Parameters
  23736. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  23737. * @returns {Geometry} a GeoJSON Geometry
  23738. * @example
  23739. * var type = 'Point';
  23740. * var coordinates = [110, 50];
  23741. *
  23742. * var geometry = turf.geometry(type, coordinates);
  23743. *
  23744. * //=geometry
  23745. */
  23746. function node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  23747. // Optional Parameters
  23748. options = options || {};
  23749. if (!_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  23750. var bbox = options.bbox;
  23751. // Validation
  23752. if (!type) throw new Error('type is required');
  23753. if (!coordinates) throw new Error('coordinates is required');
  23754. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  23755. if (bbox) _turf_helpers_main_es_validateBBox(bbox);
  23756. // Main
  23757. var geom;
  23758. switch (type) {
  23759. case 'Point': geom = _turf_helpers_main_es_point(coordinates).geometry; break;
  23760. case 'LineString': geom = _turf_helpers_main_es_lineString(coordinates).geometry; break;
  23761. case 'Polygon': geom = _turf_helpers_main_es_polygon(coordinates).geometry; break;
  23762. case 'MultiPoint': geom = _turf_helpers_main_es_multiPoint(coordinates).geometry; break;
  23763. case 'MultiLineString': geom = _turf_helpers_main_es_multiLineString(coordinates).geometry; break;
  23764. case 'MultiPolygon': geom = _turf_helpers_main_es_multiPolygon(coordinates).geometry; break;
  23765. default: throw new Error(type + ' is invalid');
  23766. }
  23767. if (bbox) geom.bbox = bbox;
  23768. return geom;
  23769. }
  23770. /**
  23771. * Creates a {@link Point} {@link Feature} from a Position.
  23772. *
  23773. * @name point
  23774. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  23775. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  23776. * @param {Object} [options={}] Optional Parameters
  23777. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  23778. * @param {string|number} [options.id] Identifier associated with the Feature
  23779. * @returns {Feature<Point>} a Point feature
  23780. * @example
  23781. * var point = turf.point([-75.343, 39.984]);
  23782. *
  23783. * //=point
  23784. */
  23785. function _turf_helpers_main_es_point(coordinates, properties, options) {
  23786. if (!coordinates) throw new Error('coordinates is required');
  23787. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  23788. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  23789. if (!_turf_helpers_main_es_isNumber(coordinates[0]) || !_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  23790. return node_modules_turf_helpers_main_es_feature({
  23791. type: 'Point',
  23792. coordinates: coordinates
  23793. }, properties, options);
  23794. }
  23795. /**
  23796. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  23797. *
  23798. * @name points
  23799. * @param {Array<Array<number>>} coordinates an array of Points
  23800. * @param {Object} [properties={}] Translate these properties to each Feature
  23801. * @param {Object} [options={}] Optional Parameters
  23802. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  23803. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  23804. * @returns {FeatureCollection<Point>} Point Feature
  23805. * @example
  23806. * var points = turf.points([
  23807. * [-75, 39],
  23808. * [-80, 45],
  23809. * [-78, 50]
  23810. * ]);
  23811. *
  23812. * //=points
  23813. */
  23814. function _turf_helpers_main_es_points(coordinates, properties, options) {
  23815. if (!coordinates) throw new Error('coordinates is required');
  23816. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  23817. return _turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  23818. return _turf_helpers_main_es_point(coords, properties);
  23819. }), options);
  23820. }
  23821. /**
  23822. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  23823. *
  23824. * @name polygon
  23825. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  23826. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  23827. * @param {Object} [options={}] Optional Parameters
  23828. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  23829. * @param {string|number} [options.id] Identifier associated with the Feature
  23830. * @returns {Feature<Polygon>} Polygon Feature
  23831. * @example
  23832. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  23833. *
  23834. * //=polygon
  23835. */
  23836. function _turf_helpers_main_es_polygon(coordinates, properties, options) {
  23837. if (!coordinates) throw new Error('coordinates is required');
  23838. for (var i = 0; i < coordinates.length; i++) {
  23839. var ring = coordinates[i];
  23840. if (ring.length < 4) {
  23841. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  23842. }
  23843. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  23844. // Check if first point of Polygon contains two numbers
  23845. if (i === 0 && j === 0 && !_turf_helpers_main_es_isNumber(ring[0][0]) || !_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  23846. if (ring[ring.length - 1][j] !== ring[0][j]) {
  23847. throw new Error('First and last Position are not equivalent.');
  23848. }
  23849. }
  23850. }
  23851. return node_modules_turf_helpers_main_es_feature({
  23852. type: 'Polygon',
  23853. coordinates: coordinates
  23854. }, properties, options);
  23855. }
  23856. /**
  23857. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  23858. *
  23859. * @name polygons
  23860. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  23861. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  23862. * @param {Object} [options={}] Optional Parameters
  23863. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  23864. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  23865. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  23866. * @example
  23867. * var polygons = turf.polygons([
  23868. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  23869. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  23870. * ]);
  23871. *
  23872. * //=polygons
  23873. */
  23874. function _turf_helpers_main_es_polygons(coordinates, properties, options) {
  23875. if (!coordinates) throw new Error('coordinates is required');
  23876. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  23877. return _turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  23878. return _turf_helpers_main_es_polygon(coords, properties);
  23879. }), options);
  23880. }
  23881. /**
  23882. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  23883. *
  23884. * @name lineString
  23885. * @param {Array<Array<number>>} coordinates an array of Positions
  23886. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  23887. * @param {Object} [options={}] Optional Parameters
  23888. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  23889. * @param {string|number} [options.id] Identifier associated with the Feature
  23890. * @returns {Feature<LineString>} LineString Feature
  23891. * @example
  23892. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  23893. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  23894. *
  23895. * //=linestring1
  23896. * //=linestring2
  23897. */
  23898. function _turf_helpers_main_es_lineString(coordinates, properties, options) {
  23899. if (!coordinates) throw new Error('coordinates is required');
  23900. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  23901. // Check if first point of LineString contains two numbers
  23902. if (!_turf_helpers_main_es_isNumber(coordinates[0][1]) || !_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  23903. return node_modules_turf_helpers_main_es_feature({
  23904. type: 'LineString',
  23905. coordinates: coordinates
  23906. }, properties, options);
  23907. }
  23908. /**
  23909. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  23910. *
  23911. * @name lineStrings
  23912. * @param {Array<Array<number>>} coordinates an array of LinearRings
  23913. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  23914. * @param {Object} [options={}] Optional Parameters
  23915. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  23916. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  23917. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  23918. * @example
  23919. * var linestrings = turf.lineStrings([
  23920. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  23921. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  23922. * ]);
  23923. *
  23924. * //=linestrings
  23925. */
  23926. function _turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  23927. if (!coordinates) throw new Error('coordinates is required');
  23928. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  23929. return _turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  23930. return _turf_helpers_main_es_lineString(coords, properties);
  23931. }), options);
  23932. }
  23933. /**
  23934. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  23935. *
  23936. * @name featureCollection
  23937. * @param {Feature[]} features input features
  23938. * @param {Object} [options={}] Optional Parameters
  23939. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  23940. * @param {string|number} [options.id] Identifier associated with the Feature
  23941. * @returns {FeatureCollection} FeatureCollection of Features
  23942. * @example
  23943. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  23944. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  23945. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  23946. *
  23947. * var collection = turf.featureCollection([
  23948. * locationA,
  23949. * locationB,
  23950. * locationC
  23951. * ]);
  23952. *
  23953. * //=collection
  23954. */
  23955. function _turf_helpers_main_es_featureCollection(features, options) {
  23956. // Optional Parameters
  23957. options = options || {};
  23958. if (!_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  23959. var bbox = options.bbox;
  23960. var id = options.id;
  23961. // Validation
  23962. if (!features) throw new Error('No features passed');
  23963. if (!Array.isArray(features)) throw new Error('features must be an Array');
  23964. if (bbox) _turf_helpers_main_es_validateBBox(bbox);
  23965. if (id) _turf_helpers_main_es_validateId(id);
  23966. // Main
  23967. var fc = {type: 'FeatureCollection'};
  23968. if (id) fc.id = id;
  23969. if (bbox) fc.bbox = bbox;
  23970. fc.features = features;
  23971. return fc;
  23972. }
  23973. /**
  23974. * Creates a {@link Feature<MultiLineString>} based on a
  23975. * coordinate array. Properties can be added optionally.
  23976. *
  23977. * @name multiLineString
  23978. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  23979. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  23980. * @param {Object} [options={}] Optional Parameters
  23981. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  23982. * @param {string|number} [options.id] Identifier associated with the Feature
  23983. * @returns {Feature<MultiLineString>} a MultiLineString feature
  23984. * @throws {Error} if no coordinates are passed
  23985. * @example
  23986. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  23987. *
  23988. * //=multiLine
  23989. */
  23990. function _turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  23991. if (!coordinates) throw new Error('coordinates is required');
  23992. return node_modules_turf_helpers_main_es_feature({
  23993. type: 'MultiLineString',
  23994. coordinates: coordinates
  23995. }, properties, options);
  23996. }
  23997. /**
  23998. * Creates a {@link Feature<MultiPoint>} based on a
  23999. * coordinate array. Properties can be added optionally.
  24000. *
  24001. * @name multiPoint
  24002. * @param {Array<Array<number>>} coordinates an array of Positions
  24003. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24004. * @param {Object} [options={}] Optional Parameters
  24005. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24006. * @param {string|number} [options.id] Identifier associated with the Feature
  24007. * @returns {Feature<MultiPoint>} a MultiPoint feature
  24008. * @throws {Error} if no coordinates are passed
  24009. * @example
  24010. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  24011. *
  24012. * //=multiPt
  24013. */
  24014. function _turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  24015. if (!coordinates) throw new Error('coordinates is required');
  24016. return node_modules_turf_helpers_main_es_feature({
  24017. type: 'MultiPoint',
  24018. coordinates: coordinates
  24019. }, properties, options);
  24020. }
  24021. /**
  24022. * Creates a {@link Feature<MultiPolygon>} based on a
  24023. * coordinate array. Properties can be added optionally.
  24024. *
  24025. * @name multiPolygon
  24026. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  24027. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24028. * @param {Object} [options={}] Optional Parameters
  24029. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24030. * @param {string|number} [options.id] Identifier associated with the Feature
  24031. * @returns {Feature<MultiPolygon>} a multipolygon feature
  24032. * @throws {Error} if no coordinates are passed
  24033. * @example
  24034. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  24035. *
  24036. * //=multiPoly
  24037. *
  24038. */
  24039. function _turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  24040. if (!coordinates) throw new Error('coordinates is required');
  24041. return node_modules_turf_helpers_main_es_feature({
  24042. type: 'MultiPolygon',
  24043. coordinates: coordinates
  24044. }, properties, options);
  24045. }
  24046. /**
  24047. * Creates a {@link Feature<GeometryCollection>} based on a
  24048. * coordinate array. Properties can be added optionally.
  24049. *
  24050. * @name geometryCollection
  24051. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  24052. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24053. * @param {Object} [options={}] Optional Parameters
  24054. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24055. * @param {string|number} [options.id] Identifier associated with the Feature
  24056. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  24057. * @example
  24058. * var pt = {
  24059. * "type": "Point",
  24060. * "coordinates": [100, 0]
  24061. * };
  24062. * var line = {
  24063. * "type": "LineString",
  24064. * "coordinates": [ [101, 0], [102, 1] ]
  24065. * };
  24066. * var collection = turf.geometryCollection([pt, line]);
  24067. *
  24068. * //=collection
  24069. */
  24070. function _turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  24071. if (!geometries) throw new Error('geometries is required');
  24072. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  24073. return node_modules_turf_helpers_main_es_feature({
  24074. type: 'GeometryCollection',
  24075. geometries: geometries
  24076. }, properties, options);
  24077. }
  24078. /**
  24079. * Round number to precision
  24080. *
  24081. * @param {number} num Number
  24082. * @param {number} [precision=0] Precision
  24083. * @returns {number} rounded number
  24084. * @example
  24085. * turf.round(120.4321)
  24086. * //=120
  24087. *
  24088. * turf.round(120.4321, 2)
  24089. * //=120.43
  24090. */
  24091. function _turf_helpers_main_es_round(num, precision) {
  24092. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  24093. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  24094. var multiplier = Math.pow(10, precision || 0);
  24095. return Math.round(num * multiplier) / multiplier;
  24096. }
  24097. /**
  24098. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  24099. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  24100. *
  24101. * @name radiansToLength
  24102. * @param {number} radians in radians across the sphere
  24103. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  24104. * @returns {number} distance
  24105. */
  24106. function _turf_helpers_main_es_radiansToLength(radians, units) {
  24107. if (radians === undefined || radians === null) throw new Error('radians is required');
  24108. if (units && typeof units !== 'string') throw new Error('units must be a string');
  24109. var factor = _turf_helpers_main_es_factors[units || 'kilometers'];
  24110. if (!factor) throw new Error(units + ' units is invalid');
  24111. return radians * factor;
  24112. }
  24113. /**
  24114. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  24115. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  24116. *
  24117. * @name lengthToRadians
  24118. * @param {number} distance in real units
  24119. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  24120. * @returns {number} radians
  24121. */
  24122. function _turf_helpers_main_es_lengthToRadians(distance, units) {
  24123. if (distance === undefined || distance === null) throw new Error('distance is required');
  24124. if (units && typeof units !== 'string') throw new Error('units must be a string');
  24125. var factor = _turf_helpers_main_es_factors[units || 'kilometers'];
  24126. if (!factor) throw new Error(units + ' units is invalid');
  24127. return distance / factor;
  24128. }
  24129. /**
  24130. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  24131. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  24132. *
  24133. * @name lengthToDegrees
  24134. * @param {number} distance in real units
  24135. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  24136. * @returns {number} degrees
  24137. */
  24138. function _turf_helpers_main_es_lengthToDegrees(distance, units) {
  24139. return _turf_helpers_main_es_radiansToDegrees(_turf_helpers_main_es_lengthToRadians(distance, units));
  24140. }
  24141. /**
  24142. * Converts any bearing angle from the north line direction (positive clockwise)
  24143. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  24144. *
  24145. * @name bearingToAzimuth
  24146. * @param {number} bearing angle, between -180 and +180 degrees
  24147. * @returns {number} angle between 0 and 360 degrees
  24148. */
  24149. function _turf_helpers_main_es_bearingToAzimuth(bearing) {
  24150. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  24151. var angle = bearing % 360;
  24152. if (angle < 0) angle += 360;
  24153. return angle;
  24154. }
  24155. /**
  24156. * Converts an angle in radians to degrees
  24157. *
  24158. * @name radiansToDegrees
  24159. * @param {number} radians angle in radians
  24160. * @returns {number} degrees between 0 and 360 degrees
  24161. */
  24162. function _turf_helpers_main_es_radiansToDegrees(radians) {
  24163. if (radians === null || radians === undefined) throw new Error('radians is required');
  24164. var degrees = radians % (2 * Math.PI);
  24165. return degrees * 180 / Math.PI;
  24166. }
  24167. /**
  24168. * Converts an angle in degrees to radians
  24169. *
  24170. * @name degreesToRadians
  24171. * @param {number} degrees angle between 0 and 360 degrees
  24172. * @returns {number} angle in radians
  24173. */
  24174. function _turf_helpers_main_es_degreesToRadians(degrees) {
  24175. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  24176. var radians = degrees % 360;
  24177. return radians * Math.PI / 180;
  24178. }
  24179. /**
  24180. * Converts a length to the requested unit.
  24181. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  24182. *
  24183. * @param {number} length to be converted
  24184. * @param {string} originalUnit of the length
  24185. * @param {string} [finalUnit='kilometers'] returned unit
  24186. * @returns {number} the converted length
  24187. */
  24188. function _turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  24189. if (length === null || length === undefined) throw new Error('length is required');
  24190. if (!(length >= 0)) throw new Error('length must be a positive number');
  24191. return _turf_helpers_main_es_radiansToLength(_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  24192. }
  24193. /**
  24194. * Converts a area to the requested unit.
  24195. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  24196. * @param {number} area to be converted
  24197. * @param {string} [originalUnit='meters'] of the distance
  24198. * @param {string} [finalUnit='kilometers'] returned unit
  24199. * @returns {number} the converted distance
  24200. */
  24201. function _turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  24202. if (area === null || area === undefined) throw new Error('area is required');
  24203. if (!(area >= 0)) throw new Error('area must be a positive number');
  24204. var startFactor = _turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  24205. if (!startFactor) throw new Error('invalid original units');
  24206. var finalFactor = _turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  24207. if (!finalFactor) throw new Error('invalid final units');
  24208. return (area / startFactor) * finalFactor;
  24209. }
  24210. /**
  24211. * isNumber
  24212. *
  24213. * @param {*} num Number to validate
  24214. * @returns {boolean} true/false
  24215. * @example
  24216. * turf.isNumber(123)
  24217. * //=true
  24218. * turf.isNumber('foo')
  24219. * //=false
  24220. */
  24221. function _turf_helpers_main_es_isNumber(num) {
  24222. return !isNaN(num) && num !== null && !Array.isArray(num);
  24223. }
  24224. /**
  24225. * isObject
  24226. *
  24227. * @param {*} input variable to validate
  24228. * @returns {boolean} true/false
  24229. * @example
  24230. * turf.isObject({elevation: 10})
  24231. * //=true
  24232. * turf.isObject('foo')
  24233. * //=false
  24234. */
  24235. function _turf_helpers_main_es_isObject(input) {
  24236. return (!!input) && (input.constructor === Object);
  24237. }
  24238. /**
  24239. * Validate BBox
  24240. *
  24241. * @private
  24242. * @param {Array<number>} bbox BBox to validate
  24243. * @returns {void}
  24244. * @throws Error if BBox is not valid
  24245. * @example
  24246. * validateBBox([-180, -40, 110, 50])
  24247. * //=OK
  24248. * validateBBox([-180, -40])
  24249. * //=Error
  24250. * validateBBox('Foo')
  24251. * //=Error
  24252. * validateBBox(5)
  24253. * //=Error
  24254. * validateBBox(null)
  24255. * //=Error
  24256. * validateBBox(undefined)
  24257. * //=Error
  24258. */
  24259. function _turf_helpers_main_es_validateBBox(bbox) {
  24260. if (!bbox) throw new Error('bbox is required');
  24261. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  24262. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  24263. bbox.forEach(function (num) {
  24264. if (!_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  24265. });
  24266. }
  24267. /**
  24268. * Validate Id
  24269. *
  24270. * @private
  24271. * @param {string|number} id Id to validate
  24272. * @returns {void}
  24273. * @throws Error if Id is not valid
  24274. * @example
  24275. * validateId([-180, -40, 110, 50])
  24276. * //=Error
  24277. * validateId([-180, -40])
  24278. * //=Error
  24279. * validateId('Foo')
  24280. * //=OK
  24281. * validateId(5)
  24282. * //=OK
  24283. * validateId(null)
  24284. * //=Error
  24285. * validateId(undefined)
  24286. * //=Error
  24287. */
  24288. function _turf_helpers_main_es_validateId(id) {
  24289. if (!id) throw new Error('id is required');
  24290. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  24291. }
  24292. // Deprecated methods
  24293. function _turf_helpers_main_es_radians2degrees() {
  24294. throw new Error('method has been renamed to `radiansToDegrees`');
  24295. }
  24296. function _turf_helpers_main_es_degrees2radians() {
  24297. throw new Error('method has been renamed to `degreesToRadians`');
  24298. }
  24299. function _turf_helpers_main_es_distanceToDegrees() {
  24300. throw new Error('method has been renamed to `lengthToDegrees`');
  24301. }
  24302. function _turf_helpers_main_es_distanceToRadians() {
  24303. throw new Error('method has been renamed to `lengthToRadians`');
  24304. }
  24305. function _turf_helpers_main_es_radiansToDistance() {
  24306. throw new Error('method has been renamed to `radiansToLength`');
  24307. }
  24308. function _turf_helpers_main_es_bearingToAngle() {
  24309. throw new Error('method has been renamed to `bearingToAzimuth`');
  24310. }
  24311. function _turf_helpers_main_es_convertDistance() {
  24312. throw new Error('method has been renamed to `convertLength`');
  24313. }
  24314. // CONCATENATED MODULE: ./node_modules/@turf/invariant/main.es.js
  24315. /**
  24316. * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
  24317. *
  24318. * @name getCoord
  24319. * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers
  24320. * @returns {Array<number>} coordinates
  24321. * @example
  24322. * var pt = turf.point([10, 10]);
  24323. *
  24324. * var coord = turf.getCoord(pt);
  24325. * //= [10, 10]
  24326. */
  24327. function getCoord(coord) {
  24328. if (!coord) throw new Error('coord is required');
  24329. if (coord.type === 'Feature' && coord.geometry !== null && coord.geometry.type === 'Point') return coord.geometry.coordinates;
  24330. if (coord.type === 'Point') return coord.coordinates;
  24331. if (Array.isArray(coord) && coord.length >= 2 && coord[0].length === undefined && coord[1].length === undefined) return coord;
  24332. throw new Error('coord must be GeoJSON Point or an Array of numbers');
  24333. }
  24334. /**
  24335. * Unwrap coordinates from a Feature, Geometry Object or an Array
  24336. *
  24337. * @name getCoords
  24338. * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array
  24339. * @returns {Array<any>} coordinates
  24340. * @example
  24341. * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);
  24342. *
  24343. * var coords = turf.getCoords(poly);
  24344. * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]
  24345. */
  24346. function getCoords(coords) {
  24347. if (!coords) throw new Error('coords is required');
  24348. // Feature
  24349. if (coords.type === 'Feature' && coords.geometry !== null) return coords.geometry.coordinates;
  24350. // Geometry
  24351. if (coords.coordinates) return coords.coordinates;
  24352. // Array of numbers
  24353. if (Array.isArray(coords)) return coords;
  24354. throw new Error('coords must be GeoJSON Feature, Geometry Object or an Array');
  24355. }
  24356. /**
  24357. * Checks if coordinates contains a number
  24358. *
  24359. * @name containsNumber
  24360. * @param {Array<any>} coordinates GeoJSON Coordinates
  24361. * @returns {boolean} true if Array contains a number
  24362. */
  24363. function containsNumber(coordinates) {
  24364. if (coordinates.length > 1 && _turf_helpers_main_es_isNumber(coordinates[0]) && _turf_helpers_main_es_isNumber(coordinates[1])) {
  24365. return true;
  24366. }
  24367. if (Array.isArray(coordinates[0]) && coordinates[0].length) {
  24368. return containsNumber(coordinates[0]);
  24369. }
  24370. throw new Error('coordinates must only contain numbers');
  24371. }
  24372. /**
  24373. * Enforce expectations about types of GeoJSON objects for Turf.
  24374. *
  24375. * @name geojsonType
  24376. * @param {GeoJSON} value any GeoJSON object
  24377. * @param {string} type expected GeoJSON type
  24378. * @param {string} name name of calling function
  24379. * @throws {Error} if value is not the expected type.
  24380. */
  24381. function geojsonType(value, type, name) {
  24382. if (!type || !name) throw new Error('type and name required');
  24383. if (!value || value.type !== type) {
  24384. throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + value.type);
  24385. }
  24386. }
  24387. /**
  24388. * Enforce expectations about types of {@link Feature} inputs for Turf.
  24389. * Internally this uses {@link geojsonType} to judge geometry types.
  24390. *
  24391. * @name featureOf
  24392. * @param {Feature} feature a feature with an expected geometry type
  24393. * @param {string} type expected GeoJSON type
  24394. * @param {string} name name of calling function
  24395. * @throws {Error} error if value is not the expected type.
  24396. */
  24397. function featureOf(feature, type, name) {
  24398. if (!feature) throw new Error('No feature passed');
  24399. if (!name) throw new Error('.featureOf() requires a name');
  24400. if (!feature || feature.type !== 'Feature' || !feature.geometry) {
  24401. throw new Error('Invalid input to ' + name + ', Feature with geometry required');
  24402. }
  24403. if (!feature.geometry || feature.geometry.type !== type) {
  24404. throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);
  24405. }
  24406. }
  24407. /**
  24408. * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.
  24409. * Internally this uses {@link geojsonType} to judge geometry types.
  24410. *
  24411. * @name collectionOf
  24412. * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged
  24413. * @param {string} type expected GeoJSON type
  24414. * @param {string} name name of calling function
  24415. * @throws {Error} if value is not the expected type.
  24416. */
  24417. function collectionOf(featureCollection, type, name) {
  24418. if (!featureCollection) throw new Error('No featureCollection passed');
  24419. if (!name) throw new Error('.collectionOf() requires a name');
  24420. if (!featureCollection || featureCollection.type !== 'FeatureCollection') {
  24421. throw new Error('Invalid input to ' + name + ', FeatureCollection required');
  24422. }
  24423. for (var i = 0; i < featureCollection.features.length; i++) {
  24424. var feature = featureCollection.features[i];
  24425. if (!feature || feature.type !== 'Feature' || !feature.geometry) {
  24426. throw new Error('Invalid input to ' + name + ', Feature with geometry required');
  24427. }
  24428. if (!feature.geometry || feature.geometry.type !== type) {
  24429. throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);
  24430. }
  24431. }
  24432. }
  24433. /**
  24434. * Get Geometry from Feature or Geometry Object
  24435. *
  24436. * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object
  24437. * @returns {Geometry|null} GeoJSON Geometry Object
  24438. * @throws {Error} if geojson is not a Feature or Geometry Object
  24439. * @example
  24440. * var point = {
  24441. * "type": "Feature",
  24442. * "properties": {},
  24443. * "geometry": {
  24444. * "type": "Point",
  24445. * "coordinates": [110, 40]
  24446. * }
  24447. * }
  24448. * var geom = turf.getGeom(point)
  24449. * //={"type": "Point", "coordinates": [110, 40]}
  24450. */
  24451. function getGeom(geojson) {
  24452. if (!geojson) throw new Error('geojson is required');
  24453. if (geojson.geometry !== undefined) return geojson.geometry;
  24454. if (geojson.coordinates || geojson.geometries) return geojson;
  24455. throw new Error('geojson must be a valid Feature or Geometry Object');
  24456. }
  24457. /**
  24458. * Get Geometry Type from Feature or Geometry Object
  24459. *
  24460. * @throws {Error} **DEPRECATED** in v5.0.0 in favor of getType
  24461. */
  24462. function getGeomType() {
  24463. throw new Error('invariant.getGeomType has been deprecated in v5.0 in favor of invariant.getType');
  24464. }
  24465. /**
  24466. * Get GeoJSON object's type, Geometry type is prioritize.
  24467. *
  24468. * @param {GeoJSON} geojson GeoJSON object
  24469. * @param {string} [name="geojson"] name of the variable to display in error message
  24470. * @returns {string} GeoJSON type
  24471. * @example
  24472. * var point = {
  24473. * "type": "Feature",
  24474. * "properties": {},
  24475. * "geometry": {
  24476. * "type": "Point",
  24477. * "coordinates": [110, 40]
  24478. * }
  24479. * }
  24480. * var geom = turf.getType(point)
  24481. * //="Point"
  24482. */
  24483. function getType(geojson, name) {
  24484. if (!geojson) throw new Error((name || 'geojson') + ' is required');
  24485. // GeoJSON Feature & GeometryCollection
  24486. if (geojson.geometry && geojson.geometry.type) return geojson.geometry.type;
  24487. // GeoJSON Geometry & FeatureCollection
  24488. if (geojson.type) return geojson.type;
  24489. throw new Error((name || 'geojson') + ' is invalid');
  24490. }
  24491. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-bearing/node_modules/@turf/helpers/main.es.js
  24492. /**
  24493. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  24494. */
  24495. var node_modules_turf_helpers_main_es_earthRadius = 6371008.8;
  24496. /**
  24497. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  24498. */
  24499. var node_modules_turf_helpers_main_es_factors = {
  24500. meters: node_modules_turf_helpers_main_es_earthRadius,
  24501. metres: node_modules_turf_helpers_main_es_earthRadius,
  24502. millimeters: node_modules_turf_helpers_main_es_earthRadius * 1000,
  24503. millimetres: node_modules_turf_helpers_main_es_earthRadius * 1000,
  24504. centimeters: node_modules_turf_helpers_main_es_earthRadius * 100,
  24505. centimetres: node_modules_turf_helpers_main_es_earthRadius * 100,
  24506. kilometers: node_modules_turf_helpers_main_es_earthRadius / 1000,
  24507. kilometres: node_modules_turf_helpers_main_es_earthRadius / 1000,
  24508. miles: node_modules_turf_helpers_main_es_earthRadius / 1609.344,
  24509. nauticalmiles: node_modules_turf_helpers_main_es_earthRadius / 1852,
  24510. inches: node_modules_turf_helpers_main_es_earthRadius * 39.370,
  24511. yards: node_modules_turf_helpers_main_es_earthRadius / 1.0936,
  24512. feet: node_modules_turf_helpers_main_es_earthRadius * 3.28084,
  24513. radians: 1,
  24514. degrees: node_modules_turf_helpers_main_es_earthRadius / 111325,
  24515. };
  24516. /**
  24517. * Units of measurement factors based on 1 meter.
  24518. */
  24519. var node_modules_turf_helpers_main_es_unitsFactors = {
  24520. meters: 1,
  24521. metres: 1,
  24522. millimeters: 1000,
  24523. millimetres: 1000,
  24524. centimeters: 100,
  24525. centimetres: 100,
  24526. kilometers: 1 / 1000,
  24527. kilometres: 1 / 1000,
  24528. miles: 1 / 1609.344,
  24529. nauticalmiles: 1 / 1852,
  24530. inches: 39.370,
  24531. yards: 1 / 1.0936,
  24532. feet: 3.28084,
  24533. radians: 1 / node_modules_turf_helpers_main_es_earthRadius,
  24534. degrees: 1 / 111325,
  24535. };
  24536. /**
  24537. * Area of measurement factors based on 1 square meter.
  24538. */
  24539. var node_modules_turf_helpers_main_es_areaFactors = {
  24540. meters: 1,
  24541. metres: 1,
  24542. millimeters: 1000000,
  24543. millimetres: 1000000,
  24544. centimeters: 10000,
  24545. centimetres: 10000,
  24546. kilometers: 0.000001,
  24547. kilometres: 0.000001,
  24548. acres: 0.000247105,
  24549. miles: 3.86e-7,
  24550. yards: 1.195990046,
  24551. feet: 10.763910417,
  24552. inches: 1550.003100006
  24553. };
  24554. /**
  24555. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  24556. *
  24557. * @name feature
  24558. * @param {Geometry} geometry input geometry
  24559. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24560. * @param {Object} [options={}] Optional Parameters
  24561. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24562. * @param {string|number} [options.id] Identifier associated with the Feature
  24563. * @returns {Feature} a GeoJSON Feature
  24564. * @example
  24565. * var geometry = {
  24566. * "type": "Point",
  24567. * "coordinates": [110, 50]
  24568. * };
  24569. *
  24570. * var feature = turf.feature(geometry);
  24571. *
  24572. * //=feature
  24573. */
  24574. function rhumb_bearing_node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  24575. // Optional Parameters
  24576. options = options || {};
  24577. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  24578. var bbox = options.bbox;
  24579. var id = options.id;
  24580. // Validation
  24581. if (geometry === undefined) throw new Error('geometry is required');
  24582. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  24583. if (bbox) node_modules_turf_helpers_main_es_validateBBox(bbox);
  24584. if (id) node_modules_turf_helpers_main_es_validateId(id);
  24585. // Main
  24586. var feat = {type: 'Feature'};
  24587. if (id) feat.id = id;
  24588. if (bbox) feat.bbox = bbox;
  24589. feat.properties = properties || {};
  24590. feat.geometry = geometry;
  24591. return feat;
  24592. }
  24593. /**
  24594. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  24595. * For GeometryCollection type use `helpers.geometryCollection`
  24596. *
  24597. * @name geometry
  24598. * @param {string} type Geometry Type
  24599. * @param {Array<number>} coordinates Coordinates
  24600. * @param {Object} [options={}] Optional Parameters
  24601. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  24602. * @returns {Geometry} a GeoJSON Geometry
  24603. * @example
  24604. * var type = 'Point';
  24605. * var coordinates = [110, 50];
  24606. *
  24607. * var geometry = turf.geometry(type, coordinates);
  24608. *
  24609. * //=geometry
  24610. */
  24611. function rhumb_bearing_node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  24612. // Optional Parameters
  24613. options = options || {};
  24614. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  24615. var bbox = options.bbox;
  24616. // Validation
  24617. if (!type) throw new Error('type is required');
  24618. if (!coordinates) throw new Error('coordinates is required');
  24619. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24620. if (bbox) node_modules_turf_helpers_main_es_validateBBox(bbox);
  24621. // Main
  24622. var geom;
  24623. switch (type) {
  24624. case 'Point': geom = node_modules_turf_helpers_main_es_point(coordinates).geometry; break;
  24625. case 'LineString': geom = node_modules_turf_helpers_main_es_lineString(coordinates).geometry; break;
  24626. case 'Polygon': geom = node_modules_turf_helpers_main_es_polygon(coordinates).geometry; break;
  24627. case 'MultiPoint': geom = node_modules_turf_helpers_main_es_multiPoint(coordinates).geometry; break;
  24628. case 'MultiLineString': geom = node_modules_turf_helpers_main_es_multiLineString(coordinates).geometry; break;
  24629. case 'MultiPolygon': geom = node_modules_turf_helpers_main_es_multiPolygon(coordinates).geometry; break;
  24630. default: throw new Error(type + ' is invalid');
  24631. }
  24632. if (bbox) geom.bbox = bbox;
  24633. return geom;
  24634. }
  24635. /**
  24636. * Creates a {@link Point} {@link Feature} from a Position.
  24637. *
  24638. * @name point
  24639. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  24640. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24641. * @param {Object} [options={}] Optional Parameters
  24642. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24643. * @param {string|number} [options.id] Identifier associated with the Feature
  24644. * @returns {Feature<Point>} a Point feature
  24645. * @example
  24646. * var point = turf.point([-75.343, 39.984]);
  24647. *
  24648. * //=point
  24649. */
  24650. function node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  24651. if (!coordinates) throw new Error('coordinates is required');
  24652. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24653. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  24654. if (!node_modules_turf_helpers_main_es_isNumber(coordinates[0]) || !node_modules_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  24655. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  24656. type: 'Point',
  24657. coordinates: coordinates
  24658. }, properties, options);
  24659. }
  24660. /**
  24661. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  24662. *
  24663. * @name points
  24664. * @param {Array<Array<number>>} coordinates an array of Points
  24665. * @param {Object} [properties={}] Translate these properties to each Feature
  24666. * @param {Object} [options={}] Optional Parameters
  24667. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  24668. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  24669. * @returns {FeatureCollection<Point>} Point Feature
  24670. * @example
  24671. * var points = turf.points([
  24672. * [-75, 39],
  24673. * [-80, 45],
  24674. * [-78, 50]
  24675. * ]);
  24676. *
  24677. * //=points
  24678. */
  24679. function node_modules_turf_helpers_main_es_points(coordinates, properties, options) {
  24680. if (!coordinates) throw new Error('coordinates is required');
  24681. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24682. return node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  24683. return node_modules_turf_helpers_main_es_point(coords, properties);
  24684. }), options);
  24685. }
  24686. /**
  24687. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  24688. *
  24689. * @name polygon
  24690. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  24691. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24692. * @param {Object} [options={}] Optional Parameters
  24693. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24694. * @param {string|number} [options.id] Identifier associated with the Feature
  24695. * @returns {Feature<Polygon>} Polygon Feature
  24696. * @example
  24697. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  24698. *
  24699. * //=polygon
  24700. */
  24701. function node_modules_turf_helpers_main_es_polygon(coordinates, properties, options) {
  24702. if (!coordinates) throw new Error('coordinates is required');
  24703. for (var i = 0; i < coordinates.length; i++) {
  24704. var ring = coordinates[i];
  24705. if (ring.length < 4) {
  24706. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  24707. }
  24708. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  24709. // Check if first point of Polygon contains two numbers
  24710. if (i === 0 && j === 0 && !node_modules_turf_helpers_main_es_isNumber(ring[0][0]) || !node_modules_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  24711. if (ring[ring.length - 1][j] !== ring[0][j]) {
  24712. throw new Error('First and last Position are not equivalent.');
  24713. }
  24714. }
  24715. }
  24716. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  24717. type: 'Polygon',
  24718. coordinates: coordinates
  24719. }, properties, options);
  24720. }
  24721. /**
  24722. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  24723. *
  24724. * @name polygons
  24725. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  24726. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24727. * @param {Object} [options={}] Optional Parameters
  24728. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24729. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  24730. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  24731. * @example
  24732. * var polygons = turf.polygons([
  24733. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  24734. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  24735. * ]);
  24736. *
  24737. * //=polygons
  24738. */
  24739. function node_modules_turf_helpers_main_es_polygons(coordinates, properties, options) {
  24740. if (!coordinates) throw new Error('coordinates is required');
  24741. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24742. return node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  24743. return node_modules_turf_helpers_main_es_polygon(coords, properties);
  24744. }), options);
  24745. }
  24746. /**
  24747. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  24748. *
  24749. * @name lineString
  24750. * @param {Array<Array<number>>} coordinates an array of Positions
  24751. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24752. * @param {Object} [options={}] Optional Parameters
  24753. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24754. * @param {string|number} [options.id] Identifier associated with the Feature
  24755. * @returns {Feature<LineString>} LineString Feature
  24756. * @example
  24757. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  24758. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  24759. *
  24760. * //=linestring1
  24761. * //=linestring2
  24762. */
  24763. function node_modules_turf_helpers_main_es_lineString(coordinates, properties, options) {
  24764. if (!coordinates) throw new Error('coordinates is required');
  24765. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  24766. // Check if first point of LineString contains two numbers
  24767. if (!node_modules_turf_helpers_main_es_isNumber(coordinates[0][1]) || !node_modules_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  24768. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  24769. type: 'LineString',
  24770. coordinates: coordinates
  24771. }, properties, options);
  24772. }
  24773. /**
  24774. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  24775. *
  24776. * @name lineStrings
  24777. * @param {Array<Array<number>>} coordinates an array of LinearRings
  24778. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24779. * @param {Object} [options={}] Optional Parameters
  24780. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  24781. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  24782. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  24783. * @example
  24784. * var linestrings = turf.lineStrings([
  24785. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  24786. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  24787. * ]);
  24788. *
  24789. * //=linestrings
  24790. */
  24791. function node_modules_turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  24792. if (!coordinates) throw new Error('coordinates is required');
  24793. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24794. return node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  24795. return node_modules_turf_helpers_main_es_lineString(coords, properties);
  24796. }), options);
  24797. }
  24798. /**
  24799. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  24800. *
  24801. * @name featureCollection
  24802. * @param {Feature[]} features input features
  24803. * @param {Object} [options={}] Optional Parameters
  24804. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24805. * @param {string|number} [options.id] Identifier associated with the Feature
  24806. * @returns {FeatureCollection} FeatureCollection of Features
  24807. * @example
  24808. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  24809. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  24810. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  24811. *
  24812. * var collection = turf.featureCollection([
  24813. * locationA,
  24814. * locationB,
  24815. * locationC
  24816. * ]);
  24817. *
  24818. * //=collection
  24819. */
  24820. function node_modules_turf_helpers_main_es_featureCollection(features, options) {
  24821. // Optional Parameters
  24822. options = options || {};
  24823. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  24824. var bbox = options.bbox;
  24825. var id = options.id;
  24826. // Validation
  24827. if (!features) throw new Error('No features passed');
  24828. if (!Array.isArray(features)) throw new Error('features must be an Array');
  24829. if (bbox) node_modules_turf_helpers_main_es_validateBBox(bbox);
  24830. if (id) node_modules_turf_helpers_main_es_validateId(id);
  24831. // Main
  24832. var fc = {type: 'FeatureCollection'};
  24833. if (id) fc.id = id;
  24834. if (bbox) fc.bbox = bbox;
  24835. fc.features = features;
  24836. return fc;
  24837. }
  24838. /**
  24839. * Creates a {@link Feature<MultiLineString>} based on a
  24840. * coordinate array. Properties can be added optionally.
  24841. *
  24842. * @name multiLineString
  24843. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  24844. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24845. * @param {Object} [options={}] Optional Parameters
  24846. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24847. * @param {string|number} [options.id] Identifier associated with the Feature
  24848. * @returns {Feature<MultiLineString>} a MultiLineString feature
  24849. * @throws {Error} if no coordinates are passed
  24850. * @example
  24851. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  24852. *
  24853. * //=multiLine
  24854. */
  24855. function node_modules_turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  24856. if (!coordinates) throw new Error('coordinates is required');
  24857. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  24858. type: 'MultiLineString',
  24859. coordinates: coordinates
  24860. }, properties, options);
  24861. }
  24862. /**
  24863. * Creates a {@link Feature<MultiPoint>} based on a
  24864. * coordinate array. Properties can be added optionally.
  24865. *
  24866. * @name multiPoint
  24867. * @param {Array<Array<number>>} coordinates an array of Positions
  24868. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24869. * @param {Object} [options={}] Optional Parameters
  24870. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24871. * @param {string|number} [options.id] Identifier associated with the Feature
  24872. * @returns {Feature<MultiPoint>} a MultiPoint feature
  24873. * @throws {Error} if no coordinates are passed
  24874. * @example
  24875. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  24876. *
  24877. * //=multiPt
  24878. */
  24879. function node_modules_turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  24880. if (!coordinates) throw new Error('coordinates is required');
  24881. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  24882. type: 'MultiPoint',
  24883. coordinates: coordinates
  24884. }, properties, options);
  24885. }
  24886. /**
  24887. * Creates a {@link Feature<MultiPolygon>} based on a
  24888. * coordinate array. Properties can be added optionally.
  24889. *
  24890. * @name multiPolygon
  24891. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  24892. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24893. * @param {Object} [options={}] Optional Parameters
  24894. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24895. * @param {string|number} [options.id] Identifier associated with the Feature
  24896. * @returns {Feature<MultiPolygon>} a multipolygon feature
  24897. * @throws {Error} if no coordinates are passed
  24898. * @example
  24899. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  24900. *
  24901. * //=multiPoly
  24902. *
  24903. */
  24904. function node_modules_turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  24905. if (!coordinates) throw new Error('coordinates is required');
  24906. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  24907. type: 'MultiPolygon',
  24908. coordinates: coordinates
  24909. }, properties, options);
  24910. }
  24911. /**
  24912. * Creates a {@link Feature<GeometryCollection>} based on a
  24913. * coordinate array. Properties can be added optionally.
  24914. *
  24915. * @name geometryCollection
  24916. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  24917. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24918. * @param {Object} [options={}] Optional Parameters
  24919. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24920. * @param {string|number} [options.id] Identifier associated with the Feature
  24921. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  24922. * @example
  24923. * var pt = {
  24924. * "type": "Point",
  24925. * "coordinates": [100, 0]
  24926. * };
  24927. * var line = {
  24928. * "type": "LineString",
  24929. * "coordinates": [ [101, 0], [102, 1] ]
  24930. * };
  24931. * var collection = turf.geometryCollection([pt, line]);
  24932. *
  24933. * //=collection
  24934. */
  24935. function node_modules_turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  24936. if (!geometries) throw new Error('geometries is required');
  24937. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  24938. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  24939. type: 'GeometryCollection',
  24940. geometries: geometries
  24941. }, properties, options);
  24942. }
  24943. /**
  24944. * Round number to precision
  24945. *
  24946. * @param {number} num Number
  24947. * @param {number} [precision=0] Precision
  24948. * @returns {number} rounded number
  24949. * @example
  24950. * turf.round(120.4321)
  24951. * //=120
  24952. *
  24953. * turf.round(120.4321, 2)
  24954. * //=120.43
  24955. */
  24956. function node_modules_turf_helpers_main_es_round(num, precision) {
  24957. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  24958. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  24959. var multiplier = Math.pow(10, precision || 0);
  24960. return Math.round(num * multiplier) / multiplier;
  24961. }
  24962. /**
  24963. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  24964. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  24965. *
  24966. * @name radiansToLength
  24967. * @param {number} radians in radians across the sphere
  24968. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  24969. * @returns {number} distance
  24970. */
  24971. function node_modules_turf_helpers_main_es_radiansToLength(radians, units) {
  24972. if (radians === undefined || radians === null) throw new Error('radians is required');
  24973. if (units && typeof units !== 'string') throw new Error('units must be a string');
  24974. var factor = node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  24975. if (!factor) throw new Error(units + ' units is invalid');
  24976. return radians * factor;
  24977. }
  24978. /**
  24979. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  24980. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  24981. *
  24982. * @name lengthToRadians
  24983. * @param {number} distance in real units
  24984. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  24985. * @returns {number} radians
  24986. */
  24987. function node_modules_turf_helpers_main_es_lengthToRadians(distance, units) {
  24988. if (distance === undefined || distance === null) throw new Error('distance is required');
  24989. if (units && typeof units !== 'string') throw new Error('units must be a string');
  24990. var factor = node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  24991. if (!factor) throw new Error(units + ' units is invalid');
  24992. return distance / factor;
  24993. }
  24994. /**
  24995. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  24996. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  24997. *
  24998. * @name lengthToDegrees
  24999. * @param {number} distance in real units
  25000. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  25001. * @returns {number} degrees
  25002. */
  25003. function node_modules_turf_helpers_main_es_lengthToDegrees(distance, units) {
  25004. return node_modules_turf_helpers_main_es_radiansToDegrees(node_modules_turf_helpers_main_es_lengthToRadians(distance, units));
  25005. }
  25006. /**
  25007. * Converts any bearing angle from the north line direction (positive clockwise)
  25008. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  25009. *
  25010. * @name bearingToAzimuth
  25011. * @param {number} bearing angle, between -180 and +180 degrees
  25012. * @returns {number} angle between 0 and 360 degrees
  25013. */
  25014. function node_modules_turf_helpers_main_es_bearingToAzimuth(bearing) {
  25015. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  25016. var angle = bearing % 360;
  25017. if (angle < 0) angle += 360;
  25018. return angle;
  25019. }
  25020. /**
  25021. * Converts an angle in radians to degrees
  25022. *
  25023. * @name radiansToDegrees
  25024. * @param {number} radians angle in radians
  25025. * @returns {number} degrees between 0 and 360 degrees
  25026. */
  25027. function node_modules_turf_helpers_main_es_radiansToDegrees(radians) {
  25028. if (radians === null || radians === undefined) throw new Error('radians is required');
  25029. var degrees = radians % (2 * Math.PI);
  25030. return degrees * 180 / Math.PI;
  25031. }
  25032. /**
  25033. * Converts an angle in degrees to radians
  25034. *
  25035. * @name degreesToRadians
  25036. * @param {number} degrees angle between 0 and 360 degrees
  25037. * @returns {number} angle in radians
  25038. */
  25039. function node_modules_turf_helpers_main_es_degreesToRadians(degrees) {
  25040. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  25041. var radians = degrees % 360;
  25042. return radians * Math.PI / 180;
  25043. }
  25044. /**
  25045. * Converts a length to the requested unit.
  25046. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  25047. *
  25048. * @param {number} length to be converted
  25049. * @param {string} originalUnit of the length
  25050. * @param {string} [finalUnit='kilometers'] returned unit
  25051. * @returns {number} the converted length
  25052. */
  25053. function node_modules_turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  25054. if (length === null || length === undefined) throw new Error('length is required');
  25055. if (!(length >= 0)) throw new Error('length must be a positive number');
  25056. return node_modules_turf_helpers_main_es_radiansToLength(node_modules_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  25057. }
  25058. /**
  25059. * Converts a area to the requested unit.
  25060. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  25061. * @param {number} area to be converted
  25062. * @param {string} [originalUnit='meters'] of the distance
  25063. * @param {string} [finalUnit='kilometers'] returned unit
  25064. * @returns {number} the converted distance
  25065. */
  25066. function node_modules_turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  25067. if (area === null || area === undefined) throw new Error('area is required');
  25068. if (!(area >= 0)) throw new Error('area must be a positive number');
  25069. var startFactor = node_modules_turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  25070. if (!startFactor) throw new Error('invalid original units');
  25071. var finalFactor = node_modules_turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  25072. if (!finalFactor) throw new Error('invalid final units');
  25073. return (area / startFactor) * finalFactor;
  25074. }
  25075. /**
  25076. * isNumber
  25077. *
  25078. * @param {*} num Number to validate
  25079. * @returns {boolean} true/false
  25080. * @example
  25081. * turf.isNumber(123)
  25082. * //=true
  25083. * turf.isNumber('foo')
  25084. * //=false
  25085. */
  25086. function node_modules_turf_helpers_main_es_isNumber(num) {
  25087. return !isNaN(num) && num !== null && !Array.isArray(num);
  25088. }
  25089. /**
  25090. * isObject
  25091. *
  25092. * @param {*} input variable to validate
  25093. * @returns {boolean} true/false
  25094. * @example
  25095. * turf.isObject({elevation: 10})
  25096. * //=true
  25097. * turf.isObject('foo')
  25098. * //=false
  25099. */
  25100. function node_modules_turf_helpers_main_es_isObject(input) {
  25101. return (!!input) && (input.constructor === Object);
  25102. }
  25103. /**
  25104. * Validate BBox
  25105. *
  25106. * @private
  25107. * @param {Array<number>} bbox BBox to validate
  25108. * @returns {void}
  25109. * @throws Error if BBox is not valid
  25110. * @example
  25111. * validateBBox([-180, -40, 110, 50])
  25112. * //=OK
  25113. * validateBBox([-180, -40])
  25114. * //=Error
  25115. * validateBBox('Foo')
  25116. * //=Error
  25117. * validateBBox(5)
  25118. * //=Error
  25119. * validateBBox(null)
  25120. * //=Error
  25121. * validateBBox(undefined)
  25122. * //=Error
  25123. */
  25124. function node_modules_turf_helpers_main_es_validateBBox(bbox) {
  25125. if (!bbox) throw new Error('bbox is required');
  25126. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  25127. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  25128. bbox.forEach(function (num) {
  25129. if (!node_modules_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  25130. });
  25131. }
  25132. /**
  25133. * Validate Id
  25134. *
  25135. * @private
  25136. * @param {string|number} id Id to validate
  25137. * @returns {void}
  25138. * @throws Error if Id is not valid
  25139. * @example
  25140. * validateId([-180, -40, 110, 50])
  25141. * //=Error
  25142. * validateId([-180, -40])
  25143. * //=Error
  25144. * validateId('Foo')
  25145. * //=OK
  25146. * validateId(5)
  25147. * //=OK
  25148. * validateId(null)
  25149. * //=Error
  25150. * validateId(undefined)
  25151. * //=Error
  25152. */
  25153. function node_modules_turf_helpers_main_es_validateId(id) {
  25154. if (!id) throw new Error('id is required');
  25155. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  25156. }
  25157. // Deprecated methods
  25158. function node_modules_turf_helpers_main_es_radians2degrees() {
  25159. throw new Error('method has been renamed to `radiansToDegrees`');
  25160. }
  25161. function node_modules_turf_helpers_main_es_degrees2radians() {
  25162. throw new Error('method has been renamed to `degreesToRadians`');
  25163. }
  25164. function node_modules_turf_helpers_main_es_distanceToDegrees() {
  25165. throw new Error('method has been renamed to `lengthToDegrees`');
  25166. }
  25167. function node_modules_turf_helpers_main_es_distanceToRadians() {
  25168. throw new Error('method has been renamed to `lengthToRadians`');
  25169. }
  25170. function node_modules_turf_helpers_main_es_radiansToDistance() {
  25171. throw new Error('method has been renamed to `radiansToLength`');
  25172. }
  25173. function node_modules_turf_helpers_main_es_bearingToAngle() {
  25174. throw new Error('method has been renamed to `bearingToAzimuth`');
  25175. }
  25176. function node_modules_turf_helpers_main_es_convertDistance() {
  25177. throw new Error('method has been renamed to `convertLength`');
  25178. }
  25179. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-bearing/main.es.js
  25180. // https://en.wikipedia.org/wiki/Rhumb_line
  25181. /**
  25182. * Takes two {@link Point|points} and finds the bearing angle between them along a Rhumb line
  25183. * i.e. the angle measured in degrees start the north line (0 degrees)
  25184. *
  25185. * @name rhumbBearing
  25186. * @param {Coord} start starting Point
  25187. * @param {Coord} end ending Point
  25188. * @param {Object} [options] Optional parameters
  25189. * @param {boolean} [options.final=false] calculates the final bearing if true
  25190. * @returns {number} bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise)
  25191. * @example
  25192. * var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});
  25193. * var point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});
  25194. *
  25195. * var bearing = turf.rhumbBearing(point1, point2);
  25196. *
  25197. * //addToMap
  25198. * var addToMap = [point1, point2];
  25199. * point1.properties.bearing = bearing;
  25200. * point2.properties.bearing = bearing;
  25201. */
  25202. function rhumbBearing(start, end, options) {
  25203. // Optional parameters
  25204. options = options || {};
  25205. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25206. var final = options.final;
  25207. // validation
  25208. if (!start) throw new Error('start point is required');
  25209. if (!end) throw new Error('end point is required');
  25210. var bear360;
  25211. if (final) bear360 = calculateRhumbBearing(getCoord(end), getCoord(start));
  25212. else bear360 = calculateRhumbBearing(getCoord(start), getCoord(end));
  25213. var bear180 = (bear360 > 180) ? -(360 - bear360) : bear360;
  25214. return bear180;
  25215. }
  25216. /**
  25217. * Returns the bearing from ‘this’ point to destination point along a rhumb line.
  25218. * Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
  25219. *
  25220. * @private
  25221. * @param {Array<number>} from - origin point.
  25222. * @param {Array<number>} to - destination point.
  25223. * @returns {number} Bearing in degrees from north.
  25224. * @example
  25225. * var p1 = new LatLon(51.127, 1.338);
  25226. * var p2 = new LatLon(50.964, 1.853);
  25227. * var d = p1.rhumbBearingTo(p2); // 116.7 m
  25228. */
  25229. function calculateRhumbBearing(from, to) {
  25230. // φ => phi
  25231. // Δλ => deltaLambda
  25232. // Δψ => deltaPsi
  25233. // θ => theta
  25234. var phi1 = node_modules_turf_helpers_main_es_degreesToRadians(from[1]);
  25235. var phi2 = node_modules_turf_helpers_main_es_degreesToRadians(to[1]);
  25236. var deltaLambda = node_modules_turf_helpers_main_es_degreesToRadians((to[0] - from[0]));
  25237. // if deltaLambdaon over 180° take shorter rhumb line across the anti-meridian:
  25238. if (deltaLambda > Math.PI) deltaLambda -= 2 * Math.PI;
  25239. if (deltaLambda < -Math.PI) deltaLambda += 2 * Math.PI;
  25240. var deltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
  25241. var theta = Math.atan2(deltaLambda, deltaPsi);
  25242. return (node_modules_turf_helpers_main_es_radiansToDegrees(theta) + 360) % 360;
  25243. }
  25244. /* harmony default export */ var rhumb_bearing_main_es = (rhumbBearing);
  25245. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-distance/node_modules/@turf/helpers/main.es.js
  25246. /**
  25247. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  25248. */
  25249. var rhumb_distance_node_modules_turf_helpers_main_es_earthRadius = 6371008.8;
  25250. /**
  25251. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  25252. */
  25253. var rhumb_distance_node_modules_turf_helpers_main_es_factors = {
  25254. meters: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius,
  25255. metres: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius,
  25256. millimeters: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 1000,
  25257. millimetres: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 1000,
  25258. centimeters: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 100,
  25259. centimetres: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 100,
  25260. kilometers: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1000,
  25261. kilometres: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1000,
  25262. miles: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1609.344,
  25263. nauticalmiles: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1852,
  25264. inches: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 39.370,
  25265. yards: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1.0936,
  25266. feet: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 3.28084,
  25267. radians: 1,
  25268. degrees: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 111325,
  25269. };
  25270. /**
  25271. * Units of measurement factors based on 1 meter.
  25272. */
  25273. var rhumb_distance_node_modules_turf_helpers_main_es_unitsFactors = {
  25274. meters: 1,
  25275. metres: 1,
  25276. millimeters: 1000,
  25277. millimetres: 1000,
  25278. centimeters: 100,
  25279. centimetres: 100,
  25280. kilometers: 1 / 1000,
  25281. kilometres: 1 / 1000,
  25282. miles: 1 / 1609.344,
  25283. nauticalmiles: 1 / 1852,
  25284. inches: 39.370,
  25285. yards: 1 / 1.0936,
  25286. feet: 3.28084,
  25287. radians: 1 / rhumb_distance_node_modules_turf_helpers_main_es_earthRadius,
  25288. degrees: 1 / 111325,
  25289. };
  25290. /**
  25291. * Area of measurement factors based on 1 square meter.
  25292. */
  25293. var rhumb_distance_node_modules_turf_helpers_main_es_areaFactors = {
  25294. meters: 1,
  25295. metres: 1,
  25296. millimeters: 1000000,
  25297. millimetres: 1000000,
  25298. centimeters: 10000,
  25299. centimetres: 10000,
  25300. kilometers: 0.000001,
  25301. kilometres: 0.000001,
  25302. acres: 0.000247105,
  25303. miles: 3.86e-7,
  25304. yards: 1.195990046,
  25305. feet: 10.763910417,
  25306. inches: 1550.003100006
  25307. };
  25308. /**
  25309. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  25310. *
  25311. * @name feature
  25312. * @param {Geometry} geometry input geometry
  25313. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25314. * @param {Object} [options={}] Optional Parameters
  25315. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25316. * @param {string|number} [options.id] Identifier associated with the Feature
  25317. * @returns {Feature} a GeoJSON Feature
  25318. * @example
  25319. * var geometry = {
  25320. * "type": "Point",
  25321. * "coordinates": [110, 50]
  25322. * };
  25323. *
  25324. * var feature = turf.feature(geometry);
  25325. *
  25326. * //=feature
  25327. */
  25328. function rhumb_distance_node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  25329. // Optional Parameters
  25330. options = options || {};
  25331. if (!rhumb_distance_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25332. var bbox = options.bbox;
  25333. var id = options.id;
  25334. // Validation
  25335. if (geometry === undefined) throw new Error('geometry is required');
  25336. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  25337. if (bbox) rhumb_distance_node_modules_turf_helpers_main_es_validateBBox(bbox);
  25338. if (id) rhumb_distance_node_modules_turf_helpers_main_es_validateId(id);
  25339. // Main
  25340. var feat = {type: 'Feature'};
  25341. if (id) feat.id = id;
  25342. if (bbox) feat.bbox = bbox;
  25343. feat.properties = properties || {};
  25344. feat.geometry = geometry;
  25345. return feat;
  25346. }
  25347. /**
  25348. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  25349. * For GeometryCollection type use `helpers.geometryCollection`
  25350. *
  25351. * @name geometry
  25352. * @param {string} type Geometry Type
  25353. * @param {Array<number>} coordinates Coordinates
  25354. * @param {Object} [options={}] Optional Parameters
  25355. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  25356. * @returns {Geometry} a GeoJSON Geometry
  25357. * @example
  25358. * var type = 'Point';
  25359. * var coordinates = [110, 50];
  25360. *
  25361. * var geometry = turf.geometry(type, coordinates);
  25362. *
  25363. * //=geometry
  25364. */
  25365. function rhumb_distance_node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  25366. // Optional Parameters
  25367. options = options || {};
  25368. if (!rhumb_distance_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25369. var bbox = options.bbox;
  25370. // Validation
  25371. if (!type) throw new Error('type is required');
  25372. if (!coordinates) throw new Error('coordinates is required');
  25373. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  25374. if (bbox) rhumb_distance_node_modules_turf_helpers_main_es_validateBBox(bbox);
  25375. // Main
  25376. var geom;
  25377. switch (type) {
  25378. case 'Point': geom = rhumb_distance_node_modules_turf_helpers_main_es_point(coordinates).geometry; break;
  25379. case 'LineString': geom = rhumb_distance_node_modules_turf_helpers_main_es_lineString(coordinates).geometry; break;
  25380. case 'Polygon': geom = rhumb_distance_node_modules_turf_helpers_main_es_polygon(coordinates).geometry; break;
  25381. case 'MultiPoint': geom = rhumb_distance_node_modules_turf_helpers_main_es_multiPoint(coordinates).geometry; break;
  25382. case 'MultiLineString': geom = rhumb_distance_node_modules_turf_helpers_main_es_multiLineString(coordinates).geometry; break;
  25383. case 'MultiPolygon': geom = rhumb_distance_node_modules_turf_helpers_main_es_multiPolygon(coordinates).geometry; break;
  25384. default: throw new Error(type + ' is invalid');
  25385. }
  25386. if (bbox) geom.bbox = bbox;
  25387. return geom;
  25388. }
  25389. /**
  25390. * Creates a {@link Point} {@link Feature} from a Position.
  25391. *
  25392. * @name point
  25393. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  25394. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25395. * @param {Object} [options={}] Optional Parameters
  25396. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25397. * @param {string|number} [options.id] Identifier associated with the Feature
  25398. * @returns {Feature<Point>} a Point feature
  25399. * @example
  25400. * var point = turf.point([-75.343, 39.984]);
  25401. *
  25402. * //=point
  25403. */
  25404. function rhumb_distance_node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  25405. if (!coordinates) throw new Error('coordinates is required');
  25406. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  25407. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  25408. if (!rhumb_distance_node_modules_turf_helpers_main_es_isNumber(coordinates[0]) || !rhumb_distance_node_modules_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  25409. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  25410. type: 'Point',
  25411. coordinates: coordinates
  25412. }, properties, options);
  25413. }
  25414. /**
  25415. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  25416. *
  25417. * @name points
  25418. * @param {Array<Array<number>>} coordinates an array of Points
  25419. * @param {Object} [properties={}] Translate these properties to each Feature
  25420. * @param {Object} [options={}] Optional Parameters
  25421. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  25422. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  25423. * @returns {FeatureCollection<Point>} Point Feature
  25424. * @example
  25425. * var points = turf.points([
  25426. * [-75, 39],
  25427. * [-80, 45],
  25428. * [-78, 50]
  25429. * ]);
  25430. *
  25431. * //=points
  25432. */
  25433. function rhumb_distance_node_modules_turf_helpers_main_es_points(coordinates, properties, options) {
  25434. if (!coordinates) throw new Error('coordinates is required');
  25435. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  25436. return rhumb_distance_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  25437. return rhumb_distance_node_modules_turf_helpers_main_es_point(coords, properties);
  25438. }), options);
  25439. }
  25440. /**
  25441. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  25442. *
  25443. * @name polygon
  25444. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  25445. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25446. * @param {Object} [options={}] Optional Parameters
  25447. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25448. * @param {string|number} [options.id] Identifier associated with the Feature
  25449. * @returns {Feature<Polygon>} Polygon Feature
  25450. * @example
  25451. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  25452. *
  25453. * //=polygon
  25454. */
  25455. function rhumb_distance_node_modules_turf_helpers_main_es_polygon(coordinates, properties, options) {
  25456. if (!coordinates) throw new Error('coordinates is required');
  25457. for (var i = 0; i < coordinates.length; i++) {
  25458. var ring = coordinates[i];
  25459. if (ring.length < 4) {
  25460. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  25461. }
  25462. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  25463. // Check if first point of Polygon contains two numbers
  25464. if (i === 0 && j === 0 && !rhumb_distance_node_modules_turf_helpers_main_es_isNumber(ring[0][0]) || !rhumb_distance_node_modules_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  25465. if (ring[ring.length - 1][j] !== ring[0][j]) {
  25466. throw new Error('First and last Position are not equivalent.');
  25467. }
  25468. }
  25469. }
  25470. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  25471. type: 'Polygon',
  25472. coordinates: coordinates
  25473. }, properties, options);
  25474. }
  25475. /**
  25476. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  25477. *
  25478. * @name polygons
  25479. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  25480. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25481. * @param {Object} [options={}] Optional Parameters
  25482. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25483. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  25484. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  25485. * @example
  25486. * var polygons = turf.polygons([
  25487. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  25488. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  25489. * ]);
  25490. *
  25491. * //=polygons
  25492. */
  25493. function rhumb_distance_node_modules_turf_helpers_main_es_polygons(coordinates, properties, options) {
  25494. if (!coordinates) throw new Error('coordinates is required');
  25495. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  25496. return rhumb_distance_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  25497. return rhumb_distance_node_modules_turf_helpers_main_es_polygon(coords, properties);
  25498. }), options);
  25499. }
  25500. /**
  25501. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  25502. *
  25503. * @name lineString
  25504. * @param {Array<Array<number>>} coordinates an array of Positions
  25505. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25506. * @param {Object} [options={}] Optional Parameters
  25507. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25508. * @param {string|number} [options.id] Identifier associated with the Feature
  25509. * @returns {Feature<LineString>} LineString Feature
  25510. * @example
  25511. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  25512. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  25513. *
  25514. * //=linestring1
  25515. * //=linestring2
  25516. */
  25517. function rhumb_distance_node_modules_turf_helpers_main_es_lineString(coordinates, properties, options) {
  25518. if (!coordinates) throw new Error('coordinates is required');
  25519. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  25520. // Check if first point of LineString contains two numbers
  25521. if (!rhumb_distance_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1]) || !rhumb_distance_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  25522. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  25523. type: 'LineString',
  25524. coordinates: coordinates
  25525. }, properties, options);
  25526. }
  25527. /**
  25528. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  25529. *
  25530. * @name lineStrings
  25531. * @param {Array<Array<number>>} coordinates an array of LinearRings
  25532. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25533. * @param {Object} [options={}] Optional Parameters
  25534. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  25535. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  25536. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  25537. * @example
  25538. * var linestrings = turf.lineStrings([
  25539. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  25540. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  25541. * ]);
  25542. *
  25543. * //=linestrings
  25544. */
  25545. function rhumb_distance_node_modules_turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  25546. if (!coordinates) throw new Error('coordinates is required');
  25547. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  25548. return rhumb_distance_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  25549. return rhumb_distance_node_modules_turf_helpers_main_es_lineString(coords, properties);
  25550. }), options);
  25551. }
  25552. /**
  25553. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  25554. *
  25555. * @name featureCollection
  25556. * @param {Feature[]} features input features
  25557. * @param {Object} [options={}] Optional Parameters
  25558. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25559. * @param {string|number} [options.id] Identifier associated with the Feature
  25560. * @returns {FeatureCollection} FeatureCollection of Features
  25561. * @example
  25562. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  25563. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  25564. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  25565. *
  25566. * var collection = turf.featureCollection([
  25567. * locationA,
  25568. * locationB,
  25569. * locationC
  25570. * ]);
  25571. *
  25572. * //=collection
  25573. */
  25574. function rhumb_distance_node_modules_turf_helpers_main_es_featureCollection(features, options) {
  25575. // Optional Parameters
  25576. options = options || {};
  25577. if (!rhumb_distance_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25578. var bbox = options.bbox;
  25579. var id = options.id;
  25580. // Validation
  25581. if (!features) throw new Error('No features passed');
  25582. if (!Array.isArray(features)) throw new Error('features must be an Array');
  25583. if (bbox) rhumb_distance_node_modules_turf_helpers_main_es_validateBBox(bbox);
  25584. if (id) rhumb_distance_node_modules_turf_helpers_main_es_validateId(id);
  25585. // Main
  25586. var fc = {type: 'FeatureCollection'};
  25587. if (id) fc.id = id;
  25588. if (bbox) fc.bbox = bbox;
  25589. fc.features = features;
  25590. return fc;
  25591. }
  25592. /**
  25593. * Creates a {@link Feature<MultiLineString>} based on a
  25594. * coordinate array. Properties can be added optionally.
  25595. *
  25596. * @name multiLineString
  25597. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  25598. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25599. * @param {Object} [options={}] Optional Parameters
  25600. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25601. * @param {string|number} [options.id] Identifier associated with the Feature
  25602. * @returns {Feature<MultiLineString>} a MultiLineString feature
  25603. * @throws {Error} if no coordinates are passed
  25604. * @example
  25605. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  25606. *
  25607. * //=multiLine
  25608. */
  25609. function rhumb_distance_node_modules_turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  25610. if (!coordinates) throw new Error('coordinates is required');
  25611. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  25612. type: 'MultiLineString',
  25613. coordinates: coordinates
  25614. }, properties, options);
  25615. }
  25616. /**
  25617. * Creates a {@link Feature<MultiPoint>} based on a
  25618. * coordinate array. Properties can be added optionally.
  25619. *
  25620. * @name multiPoint
  25621. * @param {Array<Array<number>>} coordinates an array of Positions
  25622. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25623. * @param {Object} [options={}] Optional Parameters
  25624. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25625. * @param {string|number} [options.id] Identifier associated with the Feature
  25626. * @returns {Feature<MultiPoint>} a MultiPoint feature
  25627. * @throws {Error} if no coordinates are passed
  25628. * @example
  25629. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  25630. *
  25631. * //=multiPt
  25632. */
  25633. function rhumb_distance_node_modules_turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  25634. if (!coordinates) throw new Error('coordinates is required');
  25635. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  25636. type: 'MultiPoint',
  25637. coordinates: coordinates
  25638. }, properties, options);
  25639. }
  25640. /**
  25641. * Creates a {@link Feature<MultiPolygon>} based on a
  25642. * coordinate array. Properties can be added optionally.
  25643. *
  25644. * @name multiPolygon
  25645. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  25646. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25647. * @param {Object} [options={}] Optional Parameters
  25648. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25649. * @param {string|number} [options.id] Identifier associated with the Feature
  25650. * @returns {Feature<MultiPolygon>} a multipolygon feature
  25651. * @throws {Error} if no coordinates are passed
  25652. * @example
  25653. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  25654. *
  25655. * //=multiPoly
  25656. *
  25657. */
  25658. function rhumb_distance_node_modules_turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  25659. if (!coordinates) throw new Error('coordinates is required');
  25660. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  25661. type: 'MultiPolygon',
  25662. coordinates: coordinates
  25663. }, properties, options);
  25664. }
  25665. /**
  25666. * Creates a {@link Feature<GeometryCollection>} based on a
  25667. * coordinate array. Properties can be added optionally.
  25668. *
  25669. * @name geometryCollection
  25670. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  25671. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25672. * @param {Object} [options={}] Optional Parameters
  25673. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25674. * @param {string|number} [options.id] Identifier associated with the Feature
  25675. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  25676. * @example
  25677. * var pt = {
  25678. * "type": "Point",
  25679. * "coordinates": [100, 0]
  25680. * };
  25681. * var line = {
  25682. * "type": "LineString",
  25683. * "coordinates": [ [101, 0], [102, 1] ]
  25684. * };
  25685. * var collection = turf.geometryCollection([pt, line]);
  25686. *
  25687. * //=collection
  25688. */
  25689. function rhumb_distance_node_modules_turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  25690. if (!geometries) throw new Error('geometries is required');
  25691. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  25692. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  25693. type: 'GeometryCollection',
  25694. geometries: geometries
  25695. }, properties, options);
  25696. }
  25697. /**
  25698. * Round number to precision
  25699. *
  25700. * @param {number} num Number
  25701. * @param {number} [precision=0] Precision
  25702. * @returns {number} rounded number
  25703. * @example
  25704. * turf.round(120.4321)
  25705. * //=120
  25706. *
  25707. * turf.round(120.4321, 2)
  25708. * //=120.43
  25709. */
  25710. function rhumb_distance_node_modules_turf_helpers_main_es_round(num, precision) {
  25711. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  25712. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  25713. var multiplier = Math.pow(10, precision || 0);
  25714. return Math.round(num * multiplier) / multiplier;
  25715. }
  25716. /**
  25717. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  25718. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  25719. *
  25720. * @name radiansToLength
  25721. * @param {number} radians in radians across the sphere
  25722. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  25723. * @returns {number} distance
  25724. */
  25725. function rhumb_distance_node_modules_turf_helpers_main_es_radiansToLength(radians, units) {
  25726. if (radians === undefined || radians === null) throw new Error('radians is required');
  25727. if (units && typeof units !== 'string') throw new Error('units must be a string');
  25728. var factor = rhumb_distance_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  25729. if (!factor) throw new Error(units + ' units is invalid');
  25730. return radians * factor;
  25731. }
  25732. /**
  25733. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  25734. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  25735. *
  25736. * @name lengthToRadians
  25737. * @param {number} distance in real units
  25738. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  25739. * @returns {number} radians
  25740. */
  25741. function rhumb_distance_node_modules_turf_helpers_main_es_lengthToRadians(distance, units) {
  25742. if (distance === undefined || distance === null) throw new Error('distance is required');
  25743. if (units && typeof units !== 'string') throw new Error('units must be a string');
  25744. var factor = rhumb_distance_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  25745. if (!factor) throw new Error(units + ' units is invalid');
  25746. return distance / factor;
  25747. }
  25748. /**
  25749. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  25750. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  25751. *
  25752. * @name lengthToDegrees
  25753. * @param {number} distance in real units
  25754. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  25755. * @returns {number} degrees
  25756. */
  25757. function rhumb_distance_node_modules_turf_helpers_main_es_lengthToDegrees(distance, units) {
  25758. return rhumb_distance_node_modules_turf_helpers_main_es_radiansToDegrees(rhumb_distance_node_modules_turf_helpers_main_es_lengthToRadians(distance, units));
  25759. }
  25760. /**
  25761. * Converts any bearing angle from the north line direction (positive clockwise)
  25762. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  25763. *
  25764. * @name bearingToAzimuth
  25765. * @param {number} bearing angle, between -180 and +180 degrees
  25766. * @returns {number} angle between 0 and 360 degrees
  25767. */
  25768. function rhumb_distance_node_modules_turf_helpers_main_es_bearingToAzimuth(bearing) {
  25769. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  25770. var angle = bearing % 360;
  25771. if (angle < 0) angle += 360;
  25772. return angle;
  25773. }
  25774. /**
  25775. * Converts an angle in radians to degrees
  25776. *
  25777. * @name radiansToDegrees
  25778. * @param {number} radians angle in radians
  25779. * @returns {number} degrees between 0 and 360 degrees
  25780. */
  25781. function rhumb_distance_node_modules_turf_helpers_main_es_radiansToDegrees(radians) {
  25782. if (radians === null || radians === undefined) throw new Error('radians is required');
  25783. var degrees = radians % (2 * Math.PI);
  25784. return degrees * 180 / Math.PI;
  25785. }
  25786. /**
  25787. * Converts an angle in degrees to radians
  25788. *
  25789. * @name degreesToRadians
  25790. * @param {number} degrees angle between 0 and 360 degrees
  25791. * @returns {number} angle in radians
  25792. */
  25793. function rhumb_distance_node_modules_turf_helpers_main_es_degreesToRadians(degrees) {
  25794. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  25795. var radians = degrees % 360;
  25796. return radians * Math.PI / 180;
  25797. }
  25798. /**
  25799. * Converts a length to the requested unit.
  25800. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  25801. *
  25802. * @param {number} length to be converted
  25803. * @param {string} originalUnit of the length
  25804. * @param {string} [finalUnit='kilometers'] returned unit
  25805. * @returns {number} the converted length
  25806. */
  25807. function rhumb_distance_node_modules_turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  25808. if (length === null || length === undefined) throw new Error('length is required');
  25809. if (!(length >= 0)) throw new Error('length must be a positive number');
  25810. return rhumb_distance_node_modules_turf_helpers_main_es_radiansToLength(rhumb_distance_node_modules_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  25811. }
  25812. /**
  25813. * Converts a area to the requested unit.
  25814. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  25815. * @param {number} area to be converted
  25816. * @param {string} [originalUnit='meters'] of the distance
  25817. * @param {string} [finalUnit='kilometers'] returned unit
  25818. * @returns {number} the converted distance
  25819. */
  25820. function rhumb_distance_node_modules_turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  25821. if (area === null || area === undefined) throw new Error('area is required');
  25822. if (!(area >= 0)) throw new Error('area must be a positive number');
  25823. var startFactor = rhumb_distance_node_modules_turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  25824. if (!startFactor) throw new Error('invalid original units');
  25825. var finalFactor = rhumb_distance_node_modules_turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  25826. if (!finalFactor) throw new Error('invalid final units');
  25827. return (area / startFactor) * finalFactor;
  25828. }
  25829. /**
  25830. * isNumber
  25831. *
  25832. * @param {*} num Number to validate
  25833. * @returns {boolean} true/false
  25834. * @example
  25835. * turf.isNumber(123)
  25836. * //=true
  25837. * turf.isNumber('foo')
  25838. * //=false
  25839. */
  25840. function rhumb_distance_node_modules_turf_helpers_main_es_isNumber(num) {
  25841. return !isNaN(num) && num !== null && !Array.isArray(num);
  25842. }
  25843. /**
  25844. * isObject
  25845. *
  25846. * @param {*} input variable to validate
  25847. * @returns {boolean} true/false
  25848. * @example
  25849. * turf.isObject({elevation: 10})
  25850. * //=true
  25851. * turf.isObject('foo')
  25852. * //=false
  25853. */
  25854. function rhumb_distance_node_modules_turf_helpers_main_es_isObject(input) {
  25855. return (!!input) && (input.constructor === Object);
  25856. }
  25857. /**
  25858. * Validate BBox
  25859. *
  25860. * @private
  25861. * @param {Array<number>} bbox BBox to validate
  25862. * @returns {void}
  25863. * @throws Error if BBox is not valid
  25864. * @example
  25865. * validateBBox([-180, -40, 110, 50])
  25866. * //=OK
  25867. * validateBBox([-180, -40])
  25868. * //=Error
  25869. * validateBBox('Foo')
  25870. * //=Error
  25871. * validateBBox(5)
  25872. * //=Error
  25873. * validateBBox(null)
  25874. * //=Error
  25875. * validateBBox(undefined)
  25876. * //=Error
  25877. */
  25878. function rhumb_distance_node_modules_turf_helpers_main_es_validateBBox(bbox) {
  25879. if (!bbox) throw new Error('bbox is required');
  25880. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  25881. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  25882. bbox.forEach(function (num) {
  25883. if (!rhumb_distance_node_modules_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  25884. });
  25885. }
  25886. /**
  25887. * Validate Id
  25888. *
  25889. * @private
  25890. * @param {string|number} id Id to validate
  25891. * @returns {void}
  25892. * @throws Error if Id is not valid
  25893. * @example
  25894. * validateId([-180, -40, 110, 50])
  25895. * //=Error
  25896. * validateId([-180, -40])
  25897. * //=Error
  25898. * validateId('Foo')
  25899. * //=OK
  25900. * validateId(5)
  25901. * //=OK
  25902. * validateId(null)
  25903. * //=Error
  25904. * validateId(undefined)
  25905. * //=Error
  25906. */
  25907. function rhumb_distance_node_modules_turf_helpers_main_es_validateId(id) {
  25908. if (!id) throw new Error('id is required');
  25909. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  25910. }
  25911. // Deprecated methods
  25912. function rhumb_distance_node_modules_turf_helpers_main_es_radians2degrees() {
  25913. throw new Error('method has been renamed to `radiansToDegrees`');
  25914. }
  25915. function rhumb_distance_node_modules_turf_helpers_main_es_degrees2radians() {
  25916. throw new Error('method has been renamed to `degreesToRadians`');
  25917. }
  25918. function rhumb_distance_node_modules_turf_helpers_main_es_distanceToDegrees() {
  25919. throw new Error('method has been renamed to `lengthToDegrees`');
  25920. }
  25921. function rhumb_distance_node_modules_turf_helpers_main_es_distanceToRadians() {
  25922. throw new Error('method has been renamed to `lengthToRadians`');
  25923. }
  25924. function rhumb_distance_node_modules_turf_helpers_main_es_radiansToDistance() {
  25925. throw new Error('method has been renamed to `radiansToLength`');
  25926. }
  25927. function rhumb_distance_node_modules_turf_helpers_main_es_bearingToAngle() {
  25928. throw new Error('method has been renamed to `bearingToAzimuth`');
  25929. }
  25930. function rhumb_distance_node_modules_turf_helpers_main_es_convertDistance() {
  25931. throw new Error('method has been renamed to `convertLength`');
  25932. }
  25933. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-distance/main.es.js
  25934. // https://en.wikipedia.org/wiki/Rhumb_line
  25935. /**
  25936. * Calculates the distance along a rhumb line between two {@link Point|points} in degrees, radians,
  25937. * miles, or kilometers.
  25938. *
  25939. * @name rhumbDistance
  25940. * @param {Coord} from origin point
  25941. * @param {Coord} to destination point
  25942. * @param {Object} [options] Optional parameters
  25943. * @param {string} [options.units="kilometers"] can be degrees, radians, miles, or kilometers
  25944. * @returns {number} distance between the two points
  25945. * @example
  25946. * var from = turf.point([-75.343, 39.984]);
  25947. * var to = turf.point([-75.534, 39.123]);
  25948. * var options = {units: 'miles'};
  25949. *
  25950. * var distance = turf.rhumbDistance(from, to, options);
  25951. *
  25952. * //addToMap
  25953. * var addToMap = [from, to];
  25954. * from.properties.distance = distance;
  25955. * to.properties.distance = distance;
  25956. */
  25957. function rhumbDistance(from, to, options) {
  25958. // Optional parameters
  25959. options = options || {};
  25960. if (!rhumb_distance_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25961. var units = options.units;
  25962. // validation
  25963. if (!from) throw new Error('from point is required');
  25964. if (!to) throw new Error('to point is required');
  25965. var origin = getCoord(from);
  25966. var destination = getCoord(to);
  25967. // compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
  25968. // solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
  25969. destination[0] += (destination[0] - origin[0] > 180) ? -360 : (origin[0] - destination[0] > 180) ? 360 : 0;
  25970. var distanceInMeters = calculateRhumbDistance(origin, destination);
  25971. var distance = rhumb_distance_node_modules_turf_helpers_main_es_convertLength(distanceInMeters, 'meters', units);
  25972. return distance;
  25973. }
  25974. /**
  25975. * Returns the distance travelling from ‘this’ point to destination point along a rhumb line.
  25976. * Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
  25977. *
  25978. * @private
  25979. * @param {Array<number>} origin point.
  25980. * @param {Array<number>} destination point.
  25981. * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).
  25982. * @returns {number} Distance in km between this point and destination point (same units as radius).
  25983. *
  25984. * @example
  25985. * var p1 = new LatLon(51.127, 1.338);
  25986. * var p2 = new LatLon(50.964, 1.853);
  25987. * var d = p1.distanceTo(p2); // 40.31 km
  25988. */
  25989. function calculateRhumbDistance(origin, destination, radius) {
  25990. // φ => phi
  25991. // λ => lambda
  25992. // ψ => psi
  25993. // Δ => Delta
  25994. // δ => delta
  25995. // θ => theta
  25996. radius = (radius === undefined) ? rhumb_distance_node_modules_turf_helpers_main_es_earthRadius : Number(radius);
  25997. // see www.edwilliams.org/avform.htm#Rhumb
  25998. var R = radius;
  25999. var phi1 = origin[1] * Math.PI / 180;
  26000. var phi2 = destination[1] * Math.PI / 180;
  26001. var DeltaPhi = phi2 - phi1;
  26002. var DeltaLambda = Math.abs(destination[0] - origin[0]) * Math.PI / 180;
  26003. // if dLon over 180° take shorter rhumb line across the anti-meridian:
  26004. if (DeltaLambda > Math.PI) DeltaLambda -= 2 * Math.PI;
  26005. // on Mercator projection, longitude distances shrink by latitude; q is the 'stretch factor'
  26006. // q becomes ill-conditioned along E-W line (0/0); use empirical tolerance to avoid it
  26007. var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
  26008. var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1);
  26009. // distance is pythagoras on 'stretched' Mercator projection
  26010. var delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda); // angular distance in radians
  26011. var dist = delta * R;
  26012. return dist;
  26013. }
  26014. /* harmony default export */ var rhumb_distance_main_es = (rhumbDistance);
  26015. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-destination/node_modules/@turf/helpers/main.es.js
  26016. /**
  26017. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  26018. */
  26019. var rhumb_destination_node_modules_turf_helpers_main_es_earthRadius = 6371008.8;
  26020. /**
  26021. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  26022. */
  26023. var rhumb_destination_node_modules_turf_helpers_main_es_factors = {
  26024. meters: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius,
  26025. metres: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius,
  26026. millimeters: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 1000,
  26027. millimetres: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 1000,
  26028. centimeters: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 100,
  26029. centimetres: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 100,
  26030. kilometers: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1000,
  26031. kilometres: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1000,
  26032. miles: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1609.344,
  26033. nauticalmiles: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1852,
  26034. inches: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 39.370,
  26035. yards: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1.0936,
  26036. feet: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 3.28084,
  26037. radians: 1,
  26038. degrees: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 111325,
  26039. };
  26040. /**
  26041. * Units of measurement factors based on 1 meter.
  26042. */
  26043. var rhumb_destination_node_modules_turf_helpers_main_es_unitsFactors = {
  26044. meters: 1,
  26045. metres: 1,
  26046. millimeters: 1000,
  26047. millimetres: 1000,
  26048. centimeters: 100,
  26049. centimetres: 100,
  26050. kilometers: 1 / 1000,
  26051. kilometres: 1 / 1000,
  26052. miles: 1 / 1609.344,
  26053. nauticalmiles: 1 / 1852,
  26054. inches: 39.370,
  26055. yards: 1 / 1.0936,
  26056. feet: 3.28084,
  26057. radians: 1 / rhumb_destination_node_modules_turf_helpers_main_es_earthRadius,
  26058. degrees: 1 / 111325,
  26059. };
  26060. /**
  26061. * Area of measurement factors based on 1 square meter.
  26062. */
  26063. var rhumb_destination_node_modules_turf_helpers_main_es_areaFactors = {
  26064. meters: 1,
  26065. metres: 1,
  26066. millimeters: 1000000,
  26067. millimetres: 1000000,
  26068. centimeters: 10000,
  26069. centimetres: 10000,
  26070. kilometers: 0.000001,
  26071. kilometres: 0.000001,
  26072. acres: 0.000247105,
  26073. miles: 3.86e-7,
  26074. yards: 1.195990046,
  26075. feet: 10.763910417,
  26076. inches: 1550.003100006
  26077. };
  26078. /**
  26079. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  26080. *
  26081. * @name feature
  26082. * @param {Geometry} geometry input geometry
  26083. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26084. * @param {Object} [options={}] Optional Parameters
  26085. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26086. * @param {string|number} [options.id] Identifier associated with the Feature
  26087. * @returns {Feature} a GeoJSON Feature
  26088. * @example
  26089. * var geometry = {
  26090. * "type": "Point",
  26091. * "coordinates": [110, 50]
  26092. * };
  26093. *
  26094. * var feature = turf.feature(geometry);
  26095. *
  26096. * //=feature
  26097. */
  26098. function rhumb_destination_node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  26099. // Optional Parameters
  26100. options = options || {};
  26101. if (!rhumb_destination_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  26102. var bbox = options.bbox;
  26103. var id = options.id;
  26104. // Validation
  26105. if (geometry === undefined) throw new Error('geometry is required');
  26106. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  26107. if (bbox) rhumb_destination_node_modules_turf_helpers_main_es_validateBBox(bbox);
  26108. if (id) rhumb_destination_node_modules_turf_helpers_main_es_validateId(id);
  26109. // Main
  26110. var feat = {type: 'Feature'};
  26111. if (id) feat.id = id;
  26112. if (bbox) feat.bbox = bbox;
  26113. feat.properties = properties || {};
  26114. feat.geometry = geometry;
  26115. return feat;
  26116. }
  26117. /**
  26118. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  26119. * For GeometryCollection type use `helpers.geometryCollection`
  26120. *
  26121. * @name geometry
  26122. * @param {string} type Geometry Type
  26123. * @param {Array<number>} coordinates Coordinates
  26124. * @param {Object} [options={}] Optional Parameters
  26125. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  26126. * @returns {Geometry} a GeoJSON Geometry
  26127. * @example
  26128. * var type = 'Point';
  26129. * var coordinates = [110, 50];
  26130. *
  26131. * var geometry = turf.geometry(type, coordinates);
  26132. *
  26133. * //=geometry
  26134. */
  26135. function rhumb_destination_node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  26136. // Optional Parameters
  26137. options = options || {};
  26138. if (!rhumb_destination_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  26139. var bbox = options.bbox;
  26140. // Validation
  26141. if (!type) throw new Error('type is required');
  26142. if (!coordinates) throw new Error('coordinates is required');
  26143. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  26144. if (bbox) rhumb_destination_node_modules_turf_helpers_main_es_validateBBox(bbox);
  26145. // Main
  26146. var geom;
  26147. switch (type) {
  26148. case 'Point': geom = rhumb_destination_node_modules_turf_helpers_main_es_point(coordinates).geometry; break;
  26149. case 'LineString': geom = rhumb_destination_node_modules_turf_helpers_main_es_lineString(coordinates).geometry; break;
  26150. case 'Polygon': geom = rhumb_destination_node_modules_turf_helpers_main_es_polygon(coordinates).geometry; break;
  26151. case 'MultiPoint': geom = rhumb_destination_node_modules_turf_helpers_main_es_multiPoint(coordinates).geometry; break;
  26152. case 'MultiLineString': geom = rhumb_destination_node_modules_turf_helpers_main_es_multiLineString(coordinates).geometry; break;
  26153. case 'MultiPolygon': geom = rhumb_destination_node_modules_turf_helpers_main_es_multiPolygon(coordinates).geometry; break;
  26154. default: throw new Error(type + ' is invalid');
  26155. }
  26156. if (bbox) geom.bbox = bbox;
  26157. return geom;
  26158. }
  26159. /**
  26160. * Creates a {@link Point} {@link Feature} from a Position.
  26161. *
  26162. * @name point
  26163. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  26164. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26165. * @param {Object} [options={}] Optional Parameters
  26166. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26167. * @param {string|number} [options.id] Identifier associated with the Feature
  26168. * @returns {Feature<Point>} a Point feature
  26169. * @example
  26170. * var point = turf.point([-75.343, 39.984]);
  26171. *
  26172. * //=point
  26173. */
  26174. function rhumb_destination_node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  26175. if (!coordinates) throw new Error('coordinates is required');
  26176. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  26177. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  26178. if (!rhumb_destination_node_modules_turf_helpers_main_es_isNumber(coordinates[0]) || !rhumb_destination_node_modules_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  26179. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  26180. type: 'Point',
  26181. coordinates: coordinates
  26182. }, properties, options);
  26183. }
  26184. /**
  26185. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  26186. *
  26187. * @name points
  26188. * @param {Array<Array<number>>} coordinates an array of Points
  26189. * @param {Object} [properties={}] Translate these properties to each Feature
  26190. * @param {Object} [options={}] Optional Parameters
  26191. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  26192. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  26193. * @returns {FeatureCollection<Point>} Point Feature
  26194. * @example
  26195. * var points = turf.points([
  26196. * [-75, 39],
  26197. * [-80, 45],
  26198. * [-78, 50]
  26199. * ]);
  26200. *
  26201. * //=points
  26202. */
  26203. function rhumb_destination_node_modules_turf_helpers_main_es_points(coordinates, properties, options) {
  26204. if (!coordinates) throw new Error('coordinates is required');
  26205. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  26206. return rhumb_destination_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  26207. return rhumb_destination_node_modules_turf_helpers_main_es_point(coords, properties);
  26208. }), options);
  26209. }
  26210. /**
  26211. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  26212. *
  26213. * @name polygon
  26214. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  26215. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26216. * @param {Object} [options={}] Optional Parameters
  26217. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26218. * @param {string|number} [options.id] Identifier associated with the Feature
  26219. * @returns {Feature<Polygon>} Polygon Feature
  26220. * @example
  26221. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  26222. *
  26223. * //=polygon
  26224. */
  26225. function rhumb_destination_node_modules_turf_helpers_main_es_polygon(coordinates, properties, options) {
  26226. if (!coordinates) throw new Error('coordinates is required');
  26227. for (var i = 0; i < coordinates.length; i++) {
  26228. var ring = coordinates[i];
  26229. if (ring.length < 4) {
  26230. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  26231. }
  26232. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  26233. // Check if first point of Polygon contains two numbers
  26234. if (i === 0 && j === 0 && !rhumb_destination_node_modules_turf_helpers_main_es_isNumber(ring[0][0]) || !rhumb_destination_node_modules_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  26235. if (ring[ring.length - 1][j] !== ring[0][j]) {
  26236. throw new Error('First and last Position are not equivalent.');
  26237. }
  26238. }
  26239. }
  26240. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  26241. type: 'Polygon',
  26242. coordinates: coordinates
  26243. }, properties, options);
  26244. }
  26245. /**
  26246. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  26247. *
  26248. * @name polygons
  26249. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  26250. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26251. * @param {Object} [options={}] Optional Parameters
  26252. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26253. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  26254. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  26255. * @example
  26256. * var polygons = turf.polygons([
  26257. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  26258. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  26259. * ]);
  26260. *
  26261. * //=polygons
  26262. */
  26263. function rhumb_destination_node_modules_turf_helpers_main_es_polygons(coordinates, properties, options) {
  26264. if (!coordinates) throw new Error('coordinates is required');
  26265. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  26266. return rhumb_destination_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  26267. return rhumb_destination_node_modules_turf_helpers_main_es_polygon(coords, properties);
  26268. }), options);
  26269. }
  26270. /**
  26271. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  26272. *
  26273. * @name lineString
  26274. * @param {Array<Array<number>>} coordinates an array of Positions
  26275. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26276. * @param {Object} [options={}] Optional Parameters
  26277. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26278. * @param {string|number} [options.id] Identifier associated with the Feature
  26279. * @returns {Feature<LineString>} LineString Feature
  26280. * @example
  26281. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  26282. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  26283. *
  26284. * //=linestring1
  26285. * //=linestring2
  26286. */
  26287. function rhumb_destination_node_modules_turf_helpers_main_es_lineString(coordinates, properties, options) {
  26288. if (!coordinates) throw new Error('coordinates is required');
  26289. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  26290. // Check if first point of LineString contains two numbers
  26291. if (!rhumb_destination_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1]) || !rhumb_destination_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  26292. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  26293. type: 'LineString',
  26294. coordinates: coordinates
  26295. }, properties, options);
  26296. }
  26297. /**
  26298. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  26299. *
  26300. * @name lineStrings
  26301. * @param {Array<Array<number>>} coordinates an array of LinearRings
  26302. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26303. * @param {Object} [options={}] Optional Parameters
  26304. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  26305. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  26306. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  26307. * @example
  26308. * var linestrings = turf.lineStrings([
  26309. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  26310. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  26311. * ]);
  26312. *
  26313. * //=linestrings
  26314. */
  26315. function rhumb_destination_node_modules_turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  26316. if (!coordinates) throw new Error('coordinates is required');
  26317. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  26318. return rhumb_destination_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  26319. return rhumb_destination_node_modules_turf_helpers_main_es_lineString(coords, properties);
  26320. }), options);
  26321. }
  26322. /**
  26323. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  26324. *
  26325. * @name featureCollection
  26326. * @param {Feature[]} features input features
  26327. * @param {Object} [options={}] Optional Parameters
  26328. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26329. * @param {string|number} [options.id] Identifier associated with the Feature
  26330. * @returns {FeatureCollection} FeatureCollection of Features
  26331. * @example
  26332. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  26333. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  26334. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  26335. *
  26336. * var collection = turf.featureCollection([
  26337. * locationA,
  26338. * locationB,
  26339. * locationC
  26340. * ]);
  26341. *
  26342. * //=collection
  26343. */
  26344. function rhumb_destination_node_modules_turf_helpers_main_es_featureCollection(features, options) {
  26345. // Optional Parameters
  26346. options = options || {};
  26347. if (!rhumb_destination_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  26348. var bbox = options.bbox;
  26349. var id = options.id;
  26350. // Validation
  26351. if (!features) throw new Error('No features passed');
  26352. if (!Array.isArray(features)) throw new Error('features must be an Array');
  26353. if (bbox) rhumb_destination_node_modules_turf_helpers_main_es_validateBBox(bbox);
  26354. if (id) rhumb_destination_node_modules_turf_helpers_main_es_validateId(id);
  26355. // Main
  26356. var fc = {type: 'FeatureCollection'};
  26357. if (id) fc.id = id;
  26358. if (bbox) fc.bbox = bbox;
  26359. fc.features = features;
  26360. return fc;
  26361. }
  26362. /**
  26363. * Creates a {@link Feature<MultiLineString>} based on a
  26364. * coordinate array. Properties can be added optionally.
  26365. *
  26366. * @name multiLineString
  26367. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  26368. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26369. * @param {Object} [options={}] Optional Parameters
  26370. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26371. * @param {string|number} [options.id] Identifier associated with the Feature
  26372. * @returns {Feature<MultiLineString>} a MultiLineString feature
  26373. * @throws {Error} if no coordinates are passed
  26374. * @example
  26375. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  26376. *
  26377. * //=multiLine
  26378. */
  26379. function rhumb_destination_node_modules_turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  26380. if (!coordinates) throw new Error('coordinates is required');
  26381. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  26382. type: 'MultiLineString',
  26383. coordinates: coordinates
  26384. }, properties, options);
  26385. }
  26386. /**
  26387. * Creates a {@link Feature<MultiPoint>} based on a
  26388. * coordinate array. Properties can be added optionally.
  26389. *
  26390. * @name multiPoint
  26391. * @param {Array<Array<number>>} coordinates an array of Positions
  26392. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26393. * @param {Object} [options={}] Optional Parameters
  26394. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26395. * @param {string|number} [options.id] Identifier associated with the Feature
  26396. * @returns {Feature<MultiPoint>} a MultiPoint feature
  26397. * @throws {Error} if no coordinates are passed
  26398. * @example
  26399. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  26400. *
  26401. * //=multiPt
  26402. */
  26403. function rhumb_destination_node_modules_turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  26404. if (!coordinates) throw new Error('coordinates is required');
  26405. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  26406. type: 'MultiPoint',
  26407. coordinates: coordinates
  26408. }, properties, options);
  26409. }
  26410. /**
  26411. * Creates a {@link Feature<MultiPolygon>} based on a
  26412. * coordinate array. Properties can be added optionally.
  26413. *
  26414. * @name multiPolygon
  26415. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  26416. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26417. * @param {Object} [options={}] Optional Parameters
  26418. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26419. * @param {string|number} [options.id] Identifier associated with the Feature
  26420. * @returns {Feature<MultiPolygon>} a multipolygon feature
  26421. * @throws {Error} if no coordinates are passed
  26422. * @example
  26423. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  26424. *
  26425. * //=multiPoly
  26426. *
  26427. */
  26428. function rhumb_destination_node_modules_turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  26429. if (!coordinates) throw new Error('coordinates is required');
  26430. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  26431. type: 'MultiPolygon',
  26432. coordinates: coordinates
  26433. }, properties, options);
  26434. }
  26435. /**
  26436. * Creates a {@link Feature<GeometryCollection>} based on a
  26437. * coordinate array. Properties can be added optionally.
  26438. *
  26439. * @name geometryCollection
  26440. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  26441. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26442. * @param {Object} [options={}] Optional Parameters
  26443. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26444. * @param {string|number} [options.id] Identifier associated with the Feature
  26445. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  26446. * @example
  26447. * var pt = {
  26448. * "type": "Point",
  26449. * "coordinates": [100, 0]
  26450. * };
  26451. * var line = {
  26452. * "type": "LineString",
  26453. * "coordinates": [ [101, 0], [102, 1] ]
  26454. * };
  26455. * var collection = turf.geometryCollection([pt, line]);
  26456. *
  26457. * //=collection
  26458. */
  26459. function rhumb_destination_node_modules_turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  26460. if (!geometries) throw new Error('geometries is required');
  26461. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  26462. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  26463. type: 'GeometryCollection',
  26464. geometries: geometries
  26465. }, properties, options);
  26466. }
  26467. /**
  26468. * Round number to precision
  26469. *
  26470. * @param {number} num Number
  26471. * @param {number} [precision=0] Precision
  26472. * @returns {number} rounded number
  26473. * @example
  26474. * turf.round(120.4321)
  26475. * //=120
  26476. *
  26477. * turf.round(120.4321, 2)
  26478. * //=120.43
  26479. */
  26480. function rhumb_destination_node_modules_turf_helpers_main_es_round(num, precision) {
  26481. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  26482. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  26483. var multiplier = Math.pow(10, precision || 0);
  26484. return Math.round(num * multiplier) / multiplier;
  26485. }
  26486. /**
  26487. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  26488. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  26489. *
  26490. * @name radiansToLength
  26491. * @param {number} radians in radians across the sphere
  26492. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  26493. * @returns {number} distance
  26494. */
  26495. function rhumb_destination_node_modules_turf_helpers_main_es_radiansToLength(radians, units) {
  26496. if (radians === undefined || radians === null) throw new Error('radians is required');
  26497. if (units && typeof units !== 'string') throw new Error('units must be a string');
  26498. var factor = rhumb_destination_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  26499. if (!factor) throw new Error(units + ' units is invalid');
  26500. return radians * factor;
  26501. }
  26502. /**
  26503. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  26504. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  26505. *
  26506. * @name lengthToRadians
  26507. * @param {number} distance in real units
  26508. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  26509. * @returns {number} radians
  26510. */
  26511. function rhumb_destination_node_modules_turf_helpers_main_es_lengthToRadians(distance, units) {
  26512. if (distance === undefined || distance === null) throw new Error('distance is required');
  26513. if (units && typeof units !== 'string') throw new Error('units must be a string');
  26514. var factor = rhumb_destination_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  26515. if (!factor) throw new Error(units + ' units is invalid');
  26516. return distance / factor;
  26517. }
  26518. /**
  26519. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  26520. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  26521. *
  26522. * @name lengthToDegrees
  26523. * @param {number} distance in real units
  26524. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  26525. * @returns {number} degrees
  26526. */
  26527. function rhumb_destination_node_modules_turf_helpers_main_es_lengthToDegrees(distance, units) {
  26528. return rhumb_destination_node_modules_turf_helpers_main_es_radiansToDegrees(rhumb_destination_node_modules_turf_helpers_main_es_lengthToRadians(distance, units));
  26529. }
  26530. /**
  26531. * Converts any bearing angle from the north line direction (positive clockwise)
  26532. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  26533. *
  26534. * @name bearingToAzimuth
  26535. * @param {number} bearing angle, between -180 and +180 degrees
  26536. * @returns {number} angle between 0 and 360 degrees
  26537. */
  26538. function rhumb_destination_node_modules_turf_helpers_main_es_bearingToAzimuth(bearing) {
  26539. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  26540. var angle = bearing % 360;
  26541. if (angle < 0) angle += 360;
  26542. return angle;
  26543. }
  26544. /**
  26545. * Converts an angle in radians to degrees
  26546. *
  26547. * @name radiansToDegrees
  26548. * @param {number} radians angle in radians
  26549. * @returns {number} degrees between 0 and 360 degrees
  26550. */
  26551. function rhumb_destination_node_modules_turf_helpers_main_es_radiansToDegrees(radians) {
  26552. if (radians === null || radians === undefined) throw new Error('radians is required');
  26553. var degrees = radians % (2 * Math.PI);
  26554. return degrees * 180 / Math.PI;
  26555. }
  26556. /**
  26557. * Converts an angle in degrees to radians
  26558. *
  26559. * @name degreesToRadians
  26560. * @param {number} degrees angle between 0 and 360 degrees
  26561. * @returns {number} angle in radians
  26562. */
  26563. function rhumb_destination_node_modules_turf_helpers_main_es_degreesToRadians(degrees) {
  26564. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  26565. var radians = degrees % 360;
  26566. return radians * Math.PI / 180;
  26567. }
  26568. /**
  26569. * Converts a length to the requested unit.
  26570. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  26571. *
  26572. * @param {number} length to be converted
  26573. * @param {string} originalUnit of the length
  26574. * @param {string} [finalUnit='kilometers'] returned unit
  26575. * @returns {number} the converted length
  26576. */
  26577. function rhumb_destination_node_modules_turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  26578. if (length === null || length === undefined) throw new Error('length is required');
  26579. if (!(length >= 0)) throw new Error('length must be a positive number');
  26580. return rhumb_destination_node_modules_turf_helpers_main_es_radiansToLength(rhumb_destination_node_modules_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  26581. }
  26582. /**
  26583. * Converts a area to the requested unit.
  26584. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  26585. * @param {number} area to be converted
  26586. * @param {string} [originalUnit='meters'] of the distance
  26587. * @param {string} [finalUnit='kilometers'] returned unit
  26588. * @returns {number} the converted distance
  26589. */
  26590. function rhumb_destination_node_modules_turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  26591. if (area === null || area === undefined) throw new Error('area is required');
  26592. if (!(area >= 0)) throw new Error('area must be a positive number');
  26593. var startFactor = rhumb_destination_node_modules_turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  26594. if (!startFactor) throw new Error('invalid original units');
  26595. var finalFactor = rhumb_destination_node_modules_turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  26596. if (!finalFactor) throw new Error('invalid final units');
  26597. return (area / startFactor) * finalFactor;
  26598. }
  26599. /**
  26600. * isNumber
  26601. *
  26602. * @param {*} num Number to validate
  26603. * @returns {boolean} true/false
  26604. * @example
  26605. * turf.isNumber(123)
  26606. * //=true
  26607. * turf.isNumber('foo')
  26608. * //=false
  26609. */
  26610. function rhumb_destination_node_modules_turf_helpers_main_es_isNumber(num) {
  26611. return !isNaN(num) && num !== null && !Array.isArray(num);
  26612. }
  26613. /**
  26614. * isObject
  26615. *
  26616. * @param {*} input variable to validate
  26617. * @returns {boolean} true/false
  26618. * @example
  26619. * turf.isObject({elevation: 10})
  26620. * //=true
  26621. * turf.isObject('foo')
  26622. * //=false
  26623. */
  26624. function rhumb_destination_node_modules_turf_helpers_main_es_isObject(input) {
  26625. return (!!input) && (input.constructor === Object);
  26626. }
  26627. /**
  26628. * Validate BBox
  26629. *
  26630. * @private
  26631. * @param {Array<number>} bbox BBox to validate
  26632. * @returns {void}
  26633. * @throws Error if BBox is not valid
  26634. * @example
  26635. * validateBBox([-180, -40, 110, 50])
  26636. * //=OK
  26637. * validateBBox([-180, -40])
  26638. * //=Error
  26639. * validateBBox('Foo')
  26640. * //=Error
  26641. * validateBBox(5)
  26642. * //=Error
  26643. * validateBBox(null)
  26644. * //=Error
  26645. * validateBBox(undefined)
  26646. * //=Error
  26647. */
  26648. function rhumb_destination_node_modules_turf_helpers_main_es_validateBBox(bbox) {
  26649. if (!bbox) throw new Error('bbox is required');
  26650. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  26651. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  26652. bbox.forEach(function (num) {
  26653. if (!rhumb_destination_node_modules_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  26654. });
  26655. }
  26656. /**
  26657. * Validate Id
  26658. *
  26659. * @private
  26660. * @param {string|number} id Id to validate
  26661. * @returns {void}
  26662. * @throws Error if Id is not valid
  26663. * @example
  26664. * validateId([-180, -40, 110, 50])
  26665. * //=Error
  26666. * validateId([-180, -40])
  26667. * //=Error
  26668. * validateId('Foo')
  26669. * //=OK
  26670. * validateId(5)
  26671. * //=OK
  26672. * validateId(null)
  26673. * //=Error
  26674. * validateId(undefined)
  26675. * //=Error
  26676. */
  26677. function rhumb_destination_node_modules_turf_helpers_main_es_validateId(id) {
  26678. if (!id) throw new Error('id is required');
  26679. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  26680. }
  26681. // Deprecated methods
  26682. function rhumb_destination_node_modules_turf_helpers_main_es_radians2degrees() {
  26683. throw new Error('method has been renamed to `radiansToDegrees`');
  26684. }
  26685. function rhumb_destination_node_modules_turf_helpers_main_es_degrees2radians() {
  26686. throw new Error('method has been renamed to `degreesToRadians`');
  26687. }
  26688. function rhumb_destination_node_modules_turf_helpers_main_es_distanceToDegrees() {
  26689. throw new Error('method has been renamed to `lengthToDegrees`');
  26690. }
  26691. function rhumb_destination_node_modules_turf_helpers_main_es_distanceToRadians() {
  26692. throw new Error('method has been renamed to `lengthToRadians`');
  26693. }
  26694. function rhumb_destination_node_modules_turf_helpers_main_es_radiansToDistance() {
  26695. throw new Error('method has been renamed to `radiansToLength`');
  26696. }
  26697. function rhumb_destination_node_modules_turf_helpers_main_es_bearingToAngle() {
  26698. throw new Error('method has been renamed to `bearingToAzimuth`');
  26699. }
  26700. function rhumb_destination_node_modules_turf_helpers_main_es_convertDistance() {
  26701. throw new Error('method has been renamed to `convertLength`');
  26702. }
  26703. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-destination/main.es.js
  26704. // https://en.wikipedia.org/wiki/Rhumb_line
  26705. /**
  26706. * Returns the destination {@link Point} having travelled the given distance along a Rhumb line from the
  26707. * origin Point with the (varant) given bearing.
  26708. *
  26709. * @name rhumbDestination
  26710. * @param {Coord} origin starting point
  26711. * @param {number} distance distance from the starting point
  26712. * @param {number} bearing varant bearing angle ranging from -180 to 180 degrees from north
  26713. * @param {Object} [options={}] Optional parameters
  26714. * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers
  26715. * @param {Object} [options.properties={}] translate properties to destination point
  26716. * @returns {Feature<Point>} Destination point.
  26717. * @example
  26718. * var pt = turf.point([-75.343, 39.984], {"marker-color": "F00"});
  26719. * var distance = 50;
  26720. * var bearing = 90;
  26721. * var options = {units: 'miles'};
  26722. *
  26723. * var destination = turf.rhumbDestination(pt, distance, bearing, options);
  26724. *
  26725. * //addToMap
  26726. * var addToMap = [pt, destination]
  26727. * destination.properties['marker-color'] = '#00F';
  26728. */
  26729. function rhumbDestination(origin, distance, bearing, options) {
  26730. // Optional parameters
  26731. options = options || {};
  26732. if (!rhumb_destination_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  26733. var units = options.units;
  26734. var properties = options.properties;
  26735. // validation
  26736. if (!origin) throw new Error('origin is required');
  26737. if (distance === undefined || distance === null) throw new Error('distance is required');
  26738. if (bearing === undefined || bearing === null) throw new Error('bearing is required');
  26739. if (!(distance >= 0)) throw new Error('distance must be greater than 0');
  26740. var distanceInMeters = rhumb_destination_node_modules_turf_helpers_main_es_convertLength(distance, units, 'meters');
  26741. var coords = getCoord(origin);
  26742. var destination = calculateRhumbDestination(coords, distanceInMeters, bearing);
  26743. // compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
  26744. // solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
  26745. destination[0] += (destination[0] - coords[0] > 180) ? -360 : (coords[0] - destination[0] > 180) ? 360 : 0;
  26746. return rhumb_destination_node_modules_turf_helpers_main_es_point(destination, properties);
  26747. }
  26748. /**
  26749. * Returns the destination point having travelled along a rhumb line from origin point the given
  26750. * distance on the given bearing.
  26751. * Adapted from Geodesy: http://www.movable-type.co.uk/scripts/latlong.html#rhumblines
  26752. *
  26753. * @private
  26754. * @param {Array<number>} origin - point
  26755. * @param {number} distance - Distance travelled, in same units as earth radius (default: metres).
  26756. * @param {number} bearing - Bearing in degrees from north.
  26757. * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).
  26758. * @returns {Array<number>} Destination point.
  26759. */
  26760. function calculateRhumbDestination(origin, distance, bearing, radius) {
  26761. // φ => phi
  26762. // λ => lambda
  26763. // ψ => psi
  26764. // Δ => Delta
  26765. // δ => delta
  26766. // θ => theta
  26767. radius = (radius === undefined) ? rhumb_destination_node_modules_turf_helpers_main_es_earthRadius : Number(radius);
  26768. var delta = distance / radius; // angular distance in radians
  26769. var lambda1 = origin[0] * Math.PI / 180; // to radians, but without normalize to 𝜋
  26770. var phi1 = rhumb_destination_node_modules_turf_helpers_main_es_degreesToRadians(origin[1]);
  26771. var theta = rhumb_destination_node_modules_turf_helpers_main_es_degreesToRadians(bearing);
  26772. var DeltaPhi = delta * Math.cos(theta);
  26773. var phi2 = phi1 + DeltaPhi;
  26774. // check for some daft bugger going past the pole, normalise latitude if so
  26775. if (Math.abs(phi2) > Math.PI / 2) phi2 = phi2 > 0 ? Math.PI - phi2 : -Math.PI - phi2;
  26776. var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
  26777. var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1); // E-W course becomes ill-conditioned with 0/0
  26778. var DeltaLambda = delta * Math.sin(theta) / q;
  26779. var lambda2 = lambda1 + DeltaLambda;
  26780. return [((lambda2 * 180 / Math.PI) + 540) % 360 - 180, phi2 * 180 / Math.PI]; // normalise to −180..+180°
  26781. }
  26782. /* harmony default export */ var rhumb_destination_main_es = (rhumbDestination);
  26783. // CONCATENATED MODULE: ./node_modules/@turf/transform-scale/main.es.js
  26784. /**
  26785. * Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).
  26786. * If a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.
  26787. *
  26788. * @name transformScale
  26789. * @param {GeoJSON} geojson GeoJSON to be scaled
  26790. * @param {number} factor of scaling, positive or negative values greater than 0
  26791. * @param {Object} [options={}] Optional parameters
  26792. * @param {string|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
  26793. * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
  26794. * @returns {GeoJSON} scaled GeoJSON
  26795. * @example
  26796. * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
  26797. * var scaledPoly = turf.transformScale(poly, 3);
  26798. *
  26799. * //addToMap
  26800. * var addToMap = [poly, scaledPoly];
  26801. * scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};
  26802. */
  26803. function transformScale(geojson, factor, options) {
  26804. // Optional parameters
  26805. options = options || {};
  26806. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  26807. var origin = options.origin;
  26808. var mutate = options.mutate;
  26809. // Input validation
  26810. if (!geojson) throw new Error('geojson required');
  26811. if (typeof factor !== 'number' || factor === 0) throw new Error('invalid factor');
  26812. var originIsPoint = Array.isArray(origin) || typeof origin === 'object';
  26813. // Clone geojson to avoid side effects
  26814. if (mutate !== true) geojson = main_es(geojson);
  26815. // Scale each Feature separately
  26816. if (geojson.type === 'FeatureCollection' && !originIsPoint) {
  26817. meta_main_es_featureEach(geojson, function (feature, index) {
  26818. geojson.features[index] = scale(feature, factor, origin);
  26819. });
  26820. return geojson;
  26821. }
  26822. // Scale Feature/Geometry
  26823. return scale(geojson, factor, origin);
  26824. }
  26825. /**
  26826. * Scale Feature/Geometry
  26827. *
  26828. * @private
  26829. * @param {Feature|Geometry} feature GeoJSON Feature/Geometry
  26830. * @param {number} factor of scaling, positive or negative values greater than 0
  26831. * @param {string|Coord} [origin="centroid"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
  26832. * @returns {Feature|Geometry} scaled GeoJSON Feature/Geometry
  26833. */
  26834. function scale(feature, factor, origin) {
  26835. // Default params
  26836. var isPoint = getType(feature) === 'Point';
  26837. origin = defineOrigin(feature, origin);
  26838. // Shortcut no-scaling
  26839. if (factor === 1 || isPoint) return feature;
  26840. // Scale each coordinate
  26841. meta_main_es_coordEach(feature, function (coord) {
  26842. var originalDistance = rhumb_distance_main_es(origin, coord);
  26843. var bearing = rhumb_bearing_main_es(origin, coord);
  26844. var newDistance = originalDistance * factor;
  26845. var newCoord = getCoords(rhumb_destination_main_es(origin, newDistance, bearing));
  26846. coord[0] = newCoord[0];
  26847. coord[1] = newCoord[1];
  26848. if (coord.length === 3) coord[2] *= factor;
  26849. });
  26850. return feature;
  26851. }
  26852. /**
  26853. * Define Origin
  26854. *
  26855. * @private
  26856. * @param {GeoJSON} geojson GeoJSON
  26857. * @param {string|Coord} origin sw/se/nw/ne/center/centroid
  26858. * @returns {Feature<Point>} Point origin
  26859. */
  26860. function defineOrigin(geojson, origin) {
  26861. // Default params
  26862. if (origin === undefined || origin === null) origin = 'centroid';
  26863. // Input Coord
  26864. if (Array.isArray(origin) || typeof origin === 'object') return getCoord(origin);
  26865. // Define BBox
  26866. var bbox = (geojson.bbox) ? geojson.bbox : _turf_bbox_main_es(geojson);
  26867. var west = bbox[0];
  26868. var south = bbox[1];
  26869. var east = bbox[2];
  26870. var north = bbox[3];
  26871. switch (origin) {
  26872. case 'sw':
  26873. case 'southwest':
  26874. case 'westsouth':
  26875. case 'bottomleft':
  26876. return helpers_main_es_point([west, south]);
  26877. case 'se':
  26878. case 'southeast':
  26879. case 'eastsouth':
  26880. case 'bottomright':
  26881. return helpers_main_es_point([east, south]);
  26882. case 'nw':
  26883. case 'northwest':
  26884. case 'westnorth':
  26885. case 'topleft':
  26886. return helpers_main_es_point([west, north]);
  26887. case 'ne':
  26888. case 'northeast':
  26889. case 'eastnorth':
  26890. case 'topright':
  26891. return helpers_main_es_point([east, north]);
  26892. case 'center':
  26893. return center_main_es(geojson);
  26894. case undefined:
  26895. case null:
  26896. case 'centroid':
  26897. return centroid_main_es(geojson);
  26898. default:
  26899. throw new Error('invalid origin');
  26900. }
  26901. }
  26902. /* harmony default export */ var transform_scale_main_es = __webpack_exports__["default"] = (transformScale);
  26903. /***/ }),
  26904. /* 156 */
  26905. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  26906. "use strict";
  26907. __webpack_require__.r(__webpack_exports__);
  26908. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
  26909. function _arrayLikeToArray(arr, len) {
  26910. if (len == null || len > arr.length) len = arr.length;
  26911. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  26912. arr2[i] = arr[i];
  26913. }
  26914. return arr2;
  26915. }
  26916. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
  26917. function _arrayWithoutHoles(arr) {
  26918. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  26919. }
  26920. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
  26921. function _iterableToArray(iter) {
  26922. if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  26923. }
  26924. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
  26925. function _unsupportedIterableToArray(o, minLen) {
  26926. if (!o) return;
  26927. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  26928. var n = Object.prototype.toString.call(o).slice(8, -1);
  26929. if (n === "Object" && o.constructor) n = o.constructor.name;
  26930. if (n === "Map" || n === "Set") return Array.from(n);
  26931. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  26932. }
  26933. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
  26934. function _nonIterableSpread() {
  26935. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  26936. }
  26937. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
  26938. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _toConsumableArray; });
  26939. function _toConsumableArray(arr) {
  26940. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  26941. }
  26942. /***/ }),
  26943. /* 157 */
  26944. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  26945. "use strict";
  26946. __webpack_require__.r(__webpack_exports__);
  26947. // CONCATENATED MODULE: ./node_modules/@turf/envelope/node_modules/@turf/helpers/main.es.js
  26948. /**
  26949. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  26950. */
  26951. var earthRadius = 6371008.8;
  26952. /**
  26953. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  26954. */
  26955. var factors = {
  26956. meters: earthRadius,
  26957. metres: earthRadius,
  26958. millimeters: earthRadius * 1000,
  26959. millimetres: earthRadius * 1000,
  26960. centimeters: earthRadius * 100,
  26961. centimetres: earthRadius * 100,
  26962. kilometers: earthRadius / 1000,
  26963. kilometres: earthRadius / 1000,
  26964. miles: earthRadius / 1609.344,
  26965. nauticalmiles: earthRadius / 1852,
  26966. inches: earthRadius * 39.370,
  26967. yards: earthRadius / 1.0936,
  26968. feet: earthRadius * 3.28084,
  26969. radians: 1,
  26970. degrees: earthRadius / 111325,
  26971. };
  26972. /**
  26973. * Units of measurement factors based on 1 meter.
  26974. */
  26975. var unitsFactors = {
  26976. meters: 1,
  26977. metres: 1,
  26978. millimeters: 1000,
  26979. millimetres: 1000,
  26980. centimeters: 100,
  26981. centimetres: 100,
  26982. kilometers: 1 / 1000,
  26983. kilometres: 1 / 1000,
  26984. miles: 1 / 1609.344,
  26985. nauticalmiles: 1 / 1852,
  26986. inches: 39.370,
  26987. yards: 1 / 1.0936,
  26988. feet: 3.28084,
  26989. radians: 1 / earthRadius,
  26990. degrees: 1 / 111325,
  26991. };
  26992. /**
  26993. * Area of measurement factors based on 1 square meter.
  26994. */
  26995. var areaFactors = {
  26996. meters: 1,
  26997. metres: 1,
  26998. millimeters: 1000000,
  26999. millimetres: 1000000,
  27000. centimeters: 10000,
  27001. centimetres: 10000,
  27002. kilometers: 0.000001,
  27003. kilometres: 0.000001,
  27004. acres: 0.000247105,
  27005. miles: 3.86e-7,
  27006. yards: 1.195990046,
  27007. feet: 10.763910417,
  27008. inches: 1550.003100006
  27009. };
  27010. /**
  27011. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  27012. *
  27013. * @name feature
  27014. * @param {Geometry} geometry input geometry
  27015. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27016. * @param {Object} [options={}] Optional Parameters
  27017. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27018. * @param {string|number} [options.id] Identifier associated with the Feature
  27019. * @returns {Feature} a GeoJSON Feature
  27020. * @example
  27021. * var geometry = {
  27022. * "type": "Point",
  27023. * "coordinates": [110, 50]
  27024. * };
  27025. *
  27026. * var feature = turf.feature(geometry);
  27027. *
  27028. * //=feature
  27029. */
  27030. function feature(geometry, properties, options) {
  27031. // Optional Parameters
  27032. options = options || {};
  27033. if (!isObject(options)) throw new Error('options is invalid');
  27034. var bbox = options.bbox;
  27035. var id = options.id;
  27036. // Validation
  27037. if (geometry === undefined) throw new Error('geometry is required');
  27038. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  27039. if (bbox) validateBBox(bbox);
  27040. if (id) validateId(id);
  27041. // Main
  27042. var feat = {type: 'Feature'};
  27043. if (id) feat.id = id;
  27044. if (bbox) feat.bbox = bbox;
  27045. feat.properties = properties || {};
  27046. feat.geometry = geometry;
  27047. return feat;
  27048. }
  27049. /**
  27050. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  27051. * For GeometryCollection type use `helpers.geometryCollection`
  27052. *
  27053. * @name geometry
  27054. * @param {string} type Geometry Type
  27055. * @param {Array<number>} coordinates Coordinates
  27056. * @param {Object} [options={}] Optional Parameters
  27057. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  27058. * @returns {Geometry} a GeoJSON Geometry
  27059. * @example
  27060. * var type = 'Point';
  27061. * var coordinates = [110, 50];
  27062. *
  27063. * var geometry = turf.geometry(type, coordinates);
  27064. *
  27065. * //=geometry
  27066. */
  27067. function main_es_geometry(type, coordinates, options) {
  27068. // Optional Parameters
  27069. options = options || {};
  27070. if (!isObject(options)) throw new Error('options is invalid');
  27071. var bbox = options.bbox;
  27072. // Validation
  27073. if (!type) throw new Error('type is required');
  27074. if (!coordinates) throw new Error('coordinates is required');
  27075. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27076. if (bbox) validateBBox(bbox);
  27077. // Main
  27078. var geom;
  27079. switch (type) {
  27080. case 'Point': geom = point(coordinates).geometry; break;
  27081. case 'LineString': geom = lineString(coordinates).geometry; break;
  27082. case 'Polygon': geom = polygon(coordinates).geometry; break;
  27083. case 'MultiPoint': geom = multiPoint(coordinates).geometry; break;
  27084. case 'MultiLineString': geom = multiLineString(coordinates).geometry; break;
  27085. case 'MultiPolygon': geom = multiPolygon(coordinates).geometry; break;
  27086. default: throw new Error(type + ' is invalid');
  27087. }
  27088. if (bbox) geom.bbox = bbox;
  27089. return geom;
  27090. }
  27091. /**
  27092. * Creates a {@link Point} {@link Feature} from a Position.
  27093. *
  27094. * @name point
  27095. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  27096. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27097. * @param {Object} [options={}] Optional Parameters
  27098. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27099. * @param {string|number} [options.id] Identifier associated with the Feature
  27100. * @returns {Feature<Point>} a Point feature
  27101. * @example
  27102. * var point = turf.point([-75.343, 39.984]);
  27103. *
  27104. * //=point
  27105. */
  27106. function point(coordinates, properties, options) {
  27107. if (!coordinates) throw new Error('coordinates is required');
  27108. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27109. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  27110. if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  27111. return feature({
  27112. type: 'Point',
  27113. coordinates: coordinates
  27114. }, properties, options);
  27115. }
  27116. /**
  27117. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  27118. *
  27119. * @name points
  27120. * @param {Array<Array<number>>} coordinates an array of Points
  27121. * @param {Object} [properties={}] Translate these properties to each Feature
  27122. * @param {Object} [options={}] Optional Parameters
  27123. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  27124. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  27125. * @returns {FeatureCollection<Point>} Point Feature
  27126. * @example
  27127. * var points = turf.points([
  27128. * [-75, 39],
  27129. * [-80, 45],
  27130. * [-78, 50]
  27131. * ]);
  27132. *
  27133. * //=points
  27134. */
  27135. function points(coordinates, properties, options) {
  27136. if (!coordinates) throw new Error('coordinates is required');
  27137. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27138. return featureCollection(coordinates.map(function (coords) {
  27139. return point(coords, properties);
  27140. }), options);
  27141. }
  27142. /**
  27143. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  27144. *
  27145. * @name polygon
  27146. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  27147. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27148. * @param {Object} [options={}] Optional Parameters
  27149. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27150. * @param {string|number} [options.id] Identifier associated with the Feature
  27151. * @returns {Feature<Polygon>} Polygon Feature
  27152. * @example
  27153. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  27154. *
  27155. * //=polygon
  27156. */
  27157. function polygon(coordinates, properties, options) {
  27158. if (!coordinates) throw new Error('coordinates is required');
  27159. for (var i = 0; i < coordinates.length; i++) {
  27160. var ring = coordinates[i];
  27161. if (ring.length < 4) {
  27162. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  27163. }
  27164. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  27165. // Check if first point of Polygon contains two numbers
  27166. if (i === 0 && j === 0 && !isNumber(ring[0][0]) || !isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  27167. if (ring[ring.length - 1][j] !== ring[0][j]) {
  27168. throw new Error('First and last Position are not equivalent.');
  27169. }
  27170. }
  27171. }
  27172. return feature({
  27173. type: 'Polygon',
  27174. coordinates: coordinates
  27175. }, properties, options);
  27176. }
  27177. /**
  27178. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  27179. *
  27180. * @name polygons
  27181. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  27182. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27183. * @param {Object} [options={}] Optional Parameters
  27184. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27185. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  27186. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  27187. * @example
  27188. * var polygons = turf.polygons([
  27189. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  27190. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  27191. * ]);
  27192. *
  27193. * //=polygons
  27194. */
  27195. function polygons(coordinates, properties, options) {
  27196. if (!coordinates) throw new Error('coordinates is required');
  27197. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27198. return featureCollection(coordinates.map(function (coords) {
  27199. return polygon(coords, properties);
  27200. }), options);
  27201. }
  27202. /**
  27203. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  27204. *
  27205. * @name lineString
  27206. * @param {Array<Array<number>>} coordinates an array of Positions
  27207. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27208. * @param {Object} [options={}] Optional Parameters
  27209. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27210. * @param {string|number} [options.id] Identifier associated with the Feature
  27211. * @returns {Feature<LineString>} LineString Feature
  27212. * @example
  27213. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  27214. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  27215. *
  27216. * //=linestring1
  27217. * //=linestring2
  27218. */
  27219. function lineString(coordinates, properties, options) {
  27220. if (!coordinates) throw new Error('coordinates is required');
  27221. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  27222. // Check if first point of LineString contains two numbers
  27223. if (!isNumber(coordinates[0][1]) || !isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  27224. return feature({
  27225. type: 'LineString',
  27226. coordinates: coordinates
  27227. }, properties, options);
  27228. }
  27229. /**
  27230. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  27231. *
  27232. * @name lineStrings
  27233. * @param {Array<Array<number>>} coordinates an array of LinearRings
  27234. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27235. * @param {Object} [options={}] Optional Parameters
  27236. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  27237. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  27238. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  27239. * @example
  27240. * var linestrings = turf.lineStrings([
  27241. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  27242. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  27243. * ]);
  27244. *
  27245. * //=linestrings
  27246. */
  27247. function lineStrings(coordinates, properties, options) {
  27248. if (!coordinates) throw new Error('coordinates is required');
  27249. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27250. return featureCollection(coordinates.map(function (coords) {
  27251. return lineString(coords, properties);
  27252. }), options);
  27253. }
  27254. /**
  27255. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  27256. *
  27257. * @name featureCollection
  27258. * @param {Feature[]} features input features
  27259. * @param {Object} [options={}] Optional Parameters
  27260. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27261. * @param {string|number} [options.id] Identifier associated with the Feature
  27262. * @returns {FeatureCollection} FeatureCollection of Features
  27263. * @example
  27264. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  27265. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  27266. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  27267. *
  27268. * var collection = turf.featureCollection([
  27269. * locationA,
  27270. * locationB,
  27271. * locationC
  27272. * ]);
  27273. *
  27274. * //=collection
  27275. */
  27276. function featureCollection(features, options) {
  27277. // Optional Parameters
  27278. options = options || {};
  27279. if (!isObject(options)) throw new Error('options is invalid');
  27280. var bbox = options.bbox;
  27281. var id = options.id;
  27282. // Validation
  27283. if (!features) throw new Error('No features passed');
  27284. if (!Array.isArray(features)) throw new Error('features must be an Array');
  27285. if (bbox) validateBBox(bbox);
  27286. if (id) validateId(id);
  27287. // Main
  27288. var fc = {type: 'FeatureCollection'};
  27289. if (id) fc.id = id;
  27290. if (bbox) fc.bbox = bbox;
  27291. fc.features = features;
  27292. return fc;
  27293. }
  27294. /**
  27295. * Creates a {@link Feature<MultiLineString>} based on a
  27296. * coordinate array. Properties can be added optionally.
  27297. *
  27298. * @name multiLineString
  27299. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  27300. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27301. * @param {Object} [options={}] Optional Parameters
  27302. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27303. * @param {string|number} [options.id] Identifier associated with the Feature
  27304. * @returns {Feature<MultiLineString>} a MultiLineString feature
  27305. * @throws {Error} if no coordinates are passed
  27306. * @example
  27307. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  27308. *
  27309. * //=multiLine
  27310. */
  27311. function multiLineString(coordinates, properties, options) {
  27312. if (!coordinates) throw new Error('coordinates is required');
  27313. return feature({
  27314. type: 'MultiLineString',
  27315. coordinates: coordinates
  27316. }, properties, options);
  27317. }
  27318. /**
  27319. * Creates a {@link Feature<MultiPoint>} based on a
  27320. * coordinate array. Properties can be added optionally.
  27321. *
  27322. * @name multiPoint
  27323. * @param {Array<Array<number>>} coordinates an array of Positions
  27324. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27325. * @param {Object} [options={}] Optional Parameters
  27326. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27327. * @param {string|number} [options.id] Identifier associated with the Feature
  27328. * @returns {Feature<MultiPoint>} a MultiPoint feature
  27329. * @throws {Error} if no coordinates are passed
  27330. * @example
  27331. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  27332. *
  27333. * //=multiPt
  27334. */
  27335. function multiPoint(coordinates, properties, options) {
  27336. if (!coordinates) throw new Error('coordinates is required');
  27337. return feature({
  27338. type: 'MultiPoint',
  27339. coordinates: coordinates
  27340. }, properties, options);
  27341. }
  27342. /**
  27343. * Creates a {@link Feature<MultiPolygon>} based on a
  27344. * coordinate array. Properties can be added optionally.
  27345. *
  27346. * @name multiPolygon
  27347. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  27348. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27349. * @param {Object} [options={}] Optional Parameters
  27350. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27351. * @param {string|number} [options.id] Identifier associated with the Feature
  27352. * @returns {Feature<MultiPolygon>} a multipolygon feature
  27353. * @throws {Error} if no coordinates are passed
  27354. * @example
  27355. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  27356. *
  27357. * //=multiPoly
  27358. *
  27359. */
  27360. function multiPolygon(coordinates, properties, options) {
  27361. if (!coordinates) throw new Error('coordinates is required');
  27362. return feature({
  27363. type: 'MultiPolygon',
  27364. coordinates: coordinates
  27365. }, properties, options);
  27366. }
  27367. /**
  27368. * Creates a {@link Feature<GeometryCollection>} based on a
  27369. * coordinate array. Properties can be added optionally.
  27370. *
  27371. * @name geometryCollection
  27372. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  27373. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27374. * @param {Object} [options={}] Optional Parameters
  27375. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27376. * @param {string|number} [options.id] Identifier associated with the Feature
  27377. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  27378. * @example
  27379. * var pt = {
  27380. * "type": "Point",
  27381. * "coordinates": [100, 0]
  27382. * };
  27383. * var line = {
  27384. * "type": "LineString",
  27385. * "coordinates": [ [101, 0], [102, 1] ]
  27386. * };
  27387. * var collection = turf.geometryCollection([pt, line]);
  27388. *
  27389. * //=collection
  27390. */
  27391. function geometryCollection(geometries, properties, options) {
  27392. if (!geometries) throw new Error('geometries is required');
  27393. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  27394. return feature({
  27395. type: 'GeometryCollection',
  27396. geometries: geometries
  27397. }, properties, options);
  27398. }
  27399. /**
  27400. * Round number to precision
  27401. *
  27402. * @param {number} num Number
  27403. * @param {number} [precision=0] Precision
  27404. * @returns {number} rounded number
  27405. * @example
  27406. * turf.round(120.4321)
  27407. * //=120
  27408. *
  27409. * turf.round(120.4321, 2)
  27410. * //=120.43
  27411. */
  27412. function round(num, precision) {
  27413. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  27414. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  27415. var multiplier = Math.pow(10, precision || 0);
  27416. return Math.round(num * multiplier) / multiplier;
  27417. }
  27418. /**
  27419. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  27420. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  27421. *
  27422. * @name radiansToLength
  27423. * @param {number} radians in radians across the sphere
  27424. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  27425. * @returns {number} distance
  27426. */
  27427. function radiansToLength(radians, units) {
  27428. if (radians === undefined || radians === null) throw new Error('radians is required');
  27429. if (units && typeof units !== 'string') throw new Error('units must be a string');
  27430. var factor = factors[units || 'kilometers'];
  27431. if (!factor) throw new Error(units + ' units is invalid');
  27432. return radians * factor;
  27433. }
  27434. /**
  27435. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  27436. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  27437. *
  27438. * @name lengthToRadians
  27439. * @param {number} distance in real units
  27440. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  27441. * @returns {number} radians
  27442. */
  27443. function lengthToRadians(distance, units) {
  27444. if (distance === undefined || distance === null) throw new Error('distance is required');
  27445. if (units && typeof units !== 'string') throw new Error('units must be a string');
  27446. var factor = factors[units || 'kilometers'];
  27447. if (!factor) throw new Error(units + ' units is invalid');
  27448. return distance / factor;
  27449. }
  27450. /**
  27451. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  27452. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  27453. *
  27454. * @name lengthToDegrees
  27455. * @param {number} distance in real units
  27456. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  27457. * @returns {number} degrees
  27458. */
  27459. function lengthToDegrees(distance, units) {
  27460. return radiansToDegrees(lengthToRadians(distance, units));
  27461. }
  27462. /**
  27463. * Converts any bearing angle from the north line direction (positive clockwise)
  27464. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  27465. *
  27466. * @name bearingToAzimuth
  27467. * @param {number} bearing angle, between -180 and +180 degrees
  27468. * @returns {number} angle between 0 and 360 degrees
  27469. */
  27470. function bearingToAzimuth(bearing) {
  27471. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  27472. var angle = bearing % 360;
  27473. if (angle < 0) angle += 360;
  27474. return angle;
  27475. }
  27476. /**
  27477. * Converts an angle in radians to degrees
  27478. *
  27479. * @name radiansToDegrees
  27480. * @param {number} radians angle in radians
  27481. * @returns {number} degrees between 0 and 360 degrees
  27482. */
  27483. function radiansToDegrees(radians) {
  27484. if (radians === null || radians === undefined) throw new Error('radians is required');
  27485. var degrees = radians % (2 * Math.PI);
  27486. return degrees * 180 / Math.PI;
  27487. }
  27488. /**
  27489. * Converts an angle in degrees to radians
  27490. *
  27491. * @name degreesToRadians
  27492. * @param {number} degrees angle between 0 and 360 degrees
  27493. * @returns {number} angle in radians
  27494. */
  27495. function degreesToRadians(degrees) {
  27496. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  27497. var radians = degrees % 360;
  27498. return radians * Math.PI / 180;
  27499. }
  27500. /**
  27501. * Converts a length to the requested unit.
  27502. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  27503. *
  27504. * @param {number} length to be converted
  27505. * @param {string} originalUnit of the length
  27506. * @param {string} [finalUnit='kilometers'] returned unit
  27507. * @returns {number} the converted length
  27508. */
  27509. function convertLength(length, originalUnit, finalUnit) {
  27510. if (length === null || length === undefined) throw new Error('length is required');
  27511. if (!(length >= 0)) throw new Error('length must be a positive number');
  27512. return radiansToLength(lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  27513. }
  27514. /**
  27515. * Converts a area to the requested unit.
  27516. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  27517. * @param {number} area to be converted
  27518. * @param {string} [originalUnit='meters'] of the distance
  27519. * @param {string} [finalUnit='kilometers'] returned unit
  27520. * @returns {number} the converted distance
  27521. */
  27522. function convertArea(area, originalUnit, finalUnit) {
  27523. if (area === null || area === undefined) throw new Error('area is required');
  27524. if (!(area >= 0)) throw new Error('area must be a positive number');
  27525. var startFactor = areaFactors[originalUnit || 'meters'];
  27526. if (!startFactor) throw new Error('invalid original units');
  27527. var finalFactor = areaFactors[finalUnit || 'kilometers'];
  27528. if (!finalFactor) throw new Error('invalid final units');
  27529. return (area / startFactor) * finalFactor;
  27530. }
  27531. /**
  27532. * isNumber
  27533. *
  27534. * @param {*} num Number to validate
  27535. * @returns {boolean} true/false
  27536. * @example
  27537. * turf.isNumber(123)
  27538. * //=true
  27539. * turf.isNumber('foo')
  27540. * //=false
  27541. */
  27542. function isNumber(num) {
  27543. return !isNaN(num) && num !== null && !Array.isArray(num);
  27544. }
  27545. /**
  27546. * isObject
  27547. *
  27548. * @param {*} input variable to validate
  27549. * @returns {boolean} true/false
  27550. * @example
  27551. * turf.isObject({elevation: 10})
  27552. * //=true
  27553. * turf.isObject('foo')
  27554. * //=false
  27555. */
  27556. function isObject(input) {
  27557. return (!!input) && (input.constructor === Object);
  27558. }
  27559. /**
  27560. * Validate BBox
  27561. *
  27562. * @private
  27563. * @param {Array<number>} bbox BBox to validate
  27564. * @returns {void}
  27565. * @throws Error if BBox is not valid
  27566. * @example
  27567. * validateBBox([-180, -40, 110, 50])
  27568. * //=OK
  27569. * validateBBox([-180, -40])
  27570. * //=Error
  27571. * validateBBox('Foo')
  27572. * //=Error
  27573. * validateBBox(5)
  27574. * //=Error
  27575. * validateBBox(null)
  27576. * //=Error
  27577. * validateBBox(undefined)
  27578. * //=Error
  27579. */
  27580. function validateBBox(bbox) {
  27581. if (!bbox) throw new Error('bbox is required');
  27582. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  27583. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  27584. bbox.forEach(function (num) {
  27585. if (!isNumber(num)) throw new Error('bbox must only contain numbers');
  27586. });
  27587. }
  27588. /**
  27589. * Validate Id
  27590. *
  27591. * @private
  27592. * @param {string|number} id Id to validate
  27593. * @returns {void}
  27594. * @throws Error if Id is not valid
  27595. * @example
  27596. * validateId([-180, -40, 110, 50])
  27597. * //=Error
  27598. * validateId([-180, -40])
  27599. * //=Error
  27600. * validateId('Foo')
  27601. * //=OK
  27602. * validateId(5)
  27603. * //=OK
  27604. * validateId(null)
  27605. * //=Error
  27606. * validateId(undefined)
  27607. * //=Error
  27608. */
  27609. function validateId(id) {
  27610. if (!id) throw new Error('id is required');
  27611. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  27612. }
  27613. // Deprecated methods
  27614. function radians2degrees() {
  27615. throw new Error('method has been renamed to `radiansToDegrees`');
  27616. }
  27617. function degrees2radians() {
  27618. throw new Error('method has been renamed to `degreesToRadians`');
  27619. }
  27620. function distanceToDegrees() {
  27621. throw new Error('method has been renamed to `lengthToDegrees`');
  27622. }
  27623. function distanceToRadians() {
  27624. throw new Error('method has been renamed to `lengthToRadians`');
  27625. }
  27626. function radiansToDistance() {
  27627. throw new Error('method has been renamed to `radiansToLength`');
  27628. }
  27629. function bearingToAngle() {
  27630. throw new Error('method has been renamed to `bearingToAzimuth`');
  27631. }
  27632. function convertDistance() {
  27633. throw new Error('method has been renamed to `convertLength`');
  27634. }
  27635. // CONCATENATED MODULE: ./node_modules/@turf/envelope/node_modules/@turf/meta/main.es.js
  27636. /**
  27637. * Callback for coordEach
  27638. *
  27639. * @callback coordEachCallback
  27640. * @param {Array<number>} currentCoord The current coordinate being processed.
  27641. * @param {number} coordIndex The current index of the coordinate being processed.
  27642. * @param {number} featureIndex The current index of the Feature being processed.
  27643. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  27644. * @param {number} geometryIndex The current index of the Geometry being processed.
  27645. */
  27646. /**
  27647. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  27648. *
  27649. * @name coordEach
  27650. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  27651. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  27652. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  27653. * @returns {void}
  27654. * @example
  27655. * var features = turf.featureCollection([
  27656. * turf.point([26, 37], {"foo": "bar"}),
  27657. * turf.point([36, 53], {"hello": "world"})
  27658. * ]);
  27659. *
  27660. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  27661. * //=currentCoord
  27662. * //=coordIndex
  27663. * //=featureIndex
  27664. * //=multiFeatureIndex
  27665. * //=geometryIndex
  27666. * });
  27667. */
  27668. function coordEach(geojson, callback, excludeWrapCoord) {
  27669. // Handles null Geometry -- Skips this GeoJSON
  27670. if (geojson === null) return;
  27671. var j, k, l, geometry, stopG, coords,
  27672. geometryMaybeCollection,
  27673. wrapShrink = 0,
  27674. coordIndex = 0,
  27675. isGeometryCollection,
  27676. type = geojson.type,
  27677. isFeatureCollection = type === 'FeatureCollection',
  27678. isFeature = type === 'Feature',
  27679. stop = isFeatureCollection ? geojson.features.length : 1;
  27680. // This logic may look a little weird. The reason why it is that way
  27681. // is because it's trying to be fast. GeoJSON supports multiple kinds
  27682. // of objects at its root: FeatureCollection, Features, Geometries.
  27683. // This function has the responsibility of handling all of them, and that
  27684. // means that some of the `for` loops you see below actually just don't apply
  27685. // to certain inputs. For instance, if you give this just a
  27686. // Point geometry, then both loops are short-circuited and all we do
  27687. // is gradually rename the input until it's called 'geometry'.
  27688. //
  27689. // This also aims to allocate as few resources as possible: just a
  27690. // few numbers and booleans, rather than any temporary arrays as would
  27691. // be required with the normalization approach.
  27692. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  27693. geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :
  27694. (isFeature ? geojson.geometry : geojson));
  27695. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  27696. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  27697. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  27698. var multiFeatureIndex = 0;
  27699. var geometryIndex = 0;
  27700. geometry = isGeometryCollection ?
  27701. geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;
  27702. // Handles null Geometry -- Skips this geometry
  27703. if (geometry === null) continue;
  27704. coords = geometry.coordinates;
  27705. var geomType = geometry.type;
  27706. wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;
  27707. switch (geomType) {
  27708. case null:
  27709. break;
  27710. case 'Point':
  27711. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  27712. coordIndex++;
  27713. multiFeatureIndex++;
  27714. break;
  27715. case 'LineString':
  27716. case 'MultiPoint':
  27717. for (j = 0; j < coords.length; j++) {
  27718. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  27719. coordIndex++;
  27720. if (geomType === 'MultiPoint') multiFeatureIndex++;
  27721. }
  27722. if (geomType === 'LineString') multiFeatureIndex++;
  27723. break;
  27724. case 'Polygon':
  27725. case 'MultiLineString':
  27726. for (j = 0; j < coords.length; j++) {
  27727. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  27728. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  27729. coordIndex++;
  27730. }
  27731. if (geomType === 'MultiLineString') multiFeatureIndex++;
  27732. if (geomType === 'Polygon') geometryIndex++;
  27733. }
  27734. if (geomType === 'Polygon') multiFeatureIndex++;
  27735. break;
  27736. case 'MultiPolygon':
  27737. for (j = 0; j < coords.length; j++) {
  27738. if (geomType === 'MultiPolygon') geometryIndex = 0;
  27739. for (k = 0; k < coords[j].length; k++) {
  27740. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  27741. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  27742. coordIndex++;
  27743. }
  27744. geometryIndex++;
  27745. }
  27746. multiFeatureIndex++;
  27747. }
  27748. break;
  27749. case 'GeometryCollection':
  27750. for (j = 0; j < geometry.geometries.length; j++)
  27751. if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  27752. break;
  27753. default:
  27754. throw new Error('Unknown Geometry Type');
  27755. }
  27756. }
  27757. }
  27758. }
  27759. /**
  27760. * Callback for coordReduce
  27761. *
  27762. * The first time the callback function is called, the values provided as arguments depend
  27763. * on whether the reduce method has an initialValue argument.
  27764. *
  27765. * If an initialValue is provided to the reduce method:
  27766. * - The previousValue argument is initialValue.
  27767. * - The currentValue argument is the value of the first element present in the array.
  27768. *
  27769. * If an initialValue is not provided:
  27770. * - The previousValue argument is the value of the first element present in the array.
  27771. * - The currentValue argument is the value of the second element present in the array.
  27772. *
  27773. * @callback coordReduceCallback
  27774. * @param {*} previousValue The accumulated value previously returned in the last invocation
  27775. * of the callback, or initialValue, if supplied.
  27776. * @param {Array<number>} currentCoord The current coordinate being processed.
  27777. * @param {number} coordIndex The current index of the coordinate being processed.
  27778. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  27779. * @param {number} featureIndex The current index of the Feature being processed.
  27780. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  27781. * @param {number} geometryIndex The current index of the Geometry being processed.
  27782. */
  27783. /**
  27784. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  27785. *
  27786. * @name coordReduce
  27787. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  27788. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  27789. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  27790. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  27791. * @returns {*} The value that results from the reduction.
  27792. * @example
  27793. * var features = turf.featureCollection([
  27794. * turf.point([26, 37], {"foo": "bar"}),
  27795. * turf.point([36, 53], {"hello": "world"})
  27796. * ]);
  27797. *
  27798. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  27799. * //=previousValue
  27800. * //=currentCoord
  27801. * //=coordIndex
  27802. * //=featureIndex
  27803. * //=multiFeatureIndex
  27804. * //=geometryIndex
  27805. * return currentCoord;
  27806. * });
  27807. */
  27808. function coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  27809. var previousValue = initialValue;
  27810. coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  27811. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;
  27812. else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  27813. }, excludeWrapCoord);
  27814. return previousValue;
  27815. }
  27816. /**
  27817. * Callback for propEach
  27818. *
  27819. * @callback propEachCallback
  27820. * @param {Object} currentProperties The current Properties being processed.
  27821. * @param {number} featureIndex The current index of the Feature being processed.
  27822. */
  27823. /**
  27824. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  27825. *
  27826. * @name propEach
  27827. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  27828. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  27829. * @returns {void}
  27830. * @example
  27831. * var features = turf.featureCollection([
  27832. * turf.point([26, 37], {foo: 'bar'}),
  27833. * turf.point([36, 53], {hello: 'world'})
  27834. * ]);
  27835. *
  27836. * turf.propEach(features, function (currentProperties, featureIndex) {
  27837. * //=currentProperties
  27838. * //=featureIndex
  27839. * });
  27840. */
  27841. function propEach(geojson, callback) {
  27842. var i;
  27843. switch (geojson.type) {
  27844. case 'FeatureCollection':
  27845. for (i = 0; i < geojson.features.length; i++) {
  27846. if (callback(geojson.features[i].properties, i) === false) break;
  27847. }
  27848. break;
  27849. case 'Feature':
  27850. callback(geojson.properties, 0);
  27851. break;
  27852. }
  27853. }
  27854. /**
  27855. * Callback for propReduce
  27856. *
  27857. * The first time the callback function is called, the values provided as arguments depend
  27858. * on whether the reduce method has an initialValue argument.
  27859. *
  27860. * If an initialValue is provided to the reduce method:
  27861. * - The previousValue argument is initialValue.
  27862. * - The currentValue argument is the value of the first element present in the array.
  27863. *
  27864. * If an initialValue is not provided:
  27865. * - The previousValue argument is the value of the first element present in the array.
  27866. * - The currentValue argument is the value of the second element present in the array.
  27867. *
  27868. * @callback propReduceCallback
  27869. * @param {*} previousValue The accumulated value previously returned in the last invocation
  27870. * of the callback, or initialValue, if supplied.
  27871. * @param {*} currentProperties The current Properties being processed.
  27872. * @param {number} featureIndex The current index of the Feature being processed.
  27873. */
  27874. /**
  27875. * Reduce properties in any GeoJSON object into a single value,
  27876. * similar to how Array.reduce works. However, in this case we lazily run
  27877. * the reduction, so an array of all properties is unnecessary.
  27878. *
  27879. * @name propReduce
  27880. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  27881. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  27882. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  27883. * @returns {*} The value that results from the reduction.
  27884. * @example
  27885. * var features = turf.featureCollection([
  27886. * turf.point([26, 37], {foo: 'bar'}),
  27887. * turf.point([36, 53], {hello: 'world'})
  27888. * ]);
  27889. *
  27890. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  27891. * //=previousValue
  27892. * //=currentProperties
  27893. * //=featureIndex
  27894. * return currentProperties
  27895. * });
  27896. */
  27897. function propReduce(geojson, callback, initialValue) {
  27898. var previousValue = initialValue;
  27899. propEach(geojson, function (currentProperties, featureIndex) {
  27900. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;
  27901. else previousValue = callback(previousValue, currentProperties, featureIndex);
  27902. });
  27903. return previousValue;
  27904. }
  27905. /**
  27906. * Callback for featureEach
  27907. *
  27908. * @callback featureEachCallback
  27909. * @param {Feature<any>} currentFeature The current Feature being processed.
  27910. * @param {number} featureIndex The current index of the Feature being processed.
  27911. */
  27912. /**
  27913. * Iterate over features in any GeoJSON object, similar to
  27914. * Array.forEach.
  27915. *
  27916. * @name featureEach
  27917. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  27918. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  27919. * @returns {void}
  27920. * @example
  27921. * var features = turf.featureCollection([
  27922. * turf.point([26, 37], {foo: 'bar'}),
  27923. * turf.point([36, 53], {hello: 'world'})
  27924. * ]);
  27925. *
  27926. * turf.featureEach(features, function (currentFeature, featureIndex) {
  27927. * //=currentFeature
  27928. * //=featureIndex
  27929. * });
  27930. */
  27931. function featureEach(geojson, callback) {
  27932. if (geojson.type === 'Feature') {
  27933. callback(geojson, 0);
  27934. } else if (geojson.type === 'FeatureCollection') {
  27935. for (var i = 0; i < geojson.features.length; i++) {
  27936. if (callback(geojson.features[i], i) === false) break;
  27937. }
  27938. }
  27939. }
  27940. /**
  27941. * Callback for featureReduce
  27942. *
  27943. * The first time the callback function is called, the values provided as arguments depend
  27944. * on whether the reduce method has an initialValue argument.
  27945. *
  27946. * If an initialValue is provided to the reduce method:
  27947. * - The previousValue argument is initialValue.
  27948. * - The currentValue argument is the value of the first element present in the array.
  27949. *
  27950. * If an initialValue is not provided:
  27951. * - The previousValue argument is the value of the first element present in the array.
  27952. * - The currentValue argument is the value of the second element present in the array.
  27953. *
  27954. * @callback featureReduceCallback
  27955. * @param {*} previousValue The accumulated value previously returned in the last invocation
  27956. * of the callback, or initialValue, if supplied.
  27957. * @param {Feature} currentFeature The current Feature being processed.
  27958. * @param {number} featureIndex The current index of the Feature being processed.
  27959. */
  27960. /**
  27961. * Reduce features in any GeoJSON object, similar to Array.reduce().
  27962. *
  27963. * @name featureReduce
  27964. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  27965. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  27966. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  27967. * @returns {*} The value that results from the reduction.
  27968. * @example
  27969. * var features = turf.featureCollection([
  27970. * turf.point([26, 37], {"foo": "bar"}),
  27971. * turf.point([36, 53], {"hello": "world"})
  27972. * ]);
  27973. *
  27974. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  27975. * //=previousValue
  27976. * //=currentFeature
  27977. * //=featureIndex
  27978. * return currentFeature
  27979. * });
  27980. */
  27981. function featureReduce(geojson, callback, initialValue) {
  27982. var previousValue = initialValue;
  27983. featureEach(geojson, function (currentFeature, featureIndex) {
  27984. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  27985. else previousValue = callback(previousValue, currentFeature, featureIndex);
  27986. });
  27987. return previousValue;
  27988. }
  27989. /**
  27990. * Get all coordinates from any GeoJSON object.
  27991. *
  27992. * @name coordAll
  27993. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  27994. * @returns {Array<Array<number>>} coordinate position array
  27995. * @example
  27996. * var features = turf.featureCollection([
  27997. * turf.point([26, 37], {foo: 'bar'}),
  27998. * turf.point([36, 53], {hello: 'world'})
  27999. * ]);
  28000. *
  28001. * var coords = turf.coordAll(features);
  28002. * //= [[26, 37], [36, 53]]
  28003. */
  28004. function coordAll(geojson) {
  28005. var coords = [];
  28006. coordEach(geojson, function (coord) {
  28007. coords.push(coord);
  28008. });
  28009. return coords;
  28010. }
  28011. /**
  28012. * Callback for geomEach
  28013. *
  28014. * @callback geomEachCallback
  28015. * @param {Geometry} currentGeometry The current Geometry being processed.
  28016. * @param {number} featureIndex The current index of the Feature being processed.
  28017. * @param {Object} featureProperties The current Feature Properties being processed.
  28018. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  28019. * @param {number|string} featureId The current Feature Id being processed.
  28020. */
  28021. /**
  28022. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  28023. *
  28024. * @name geomEach
  28025. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  28026. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  28027. * @returns {void}
  28028. * @example
  28029. * var features = turf.featureCollection([
  28030. * turf.point([26, 37], {foo: 'bar'}),
  28031. * turf.point([36, 53], {hello: 'world'})
  28032. * ]);
  28033. *
  28034. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  28035. * //=currentGeometry
  28036. * //=featureIndex
  28037. * //=featureProperties
  28038. * //=featureBBox
  28039. * //=featureId
  28040. * });
  28041. */
  28042. function geomEach(geojson, callback) {
  28043. var i, j, g, geometry, stopG,
  28044. geometryMaybeCollection,
  28045. isGeometryCollection,
  28046. featureProperties,
  28047. featureBBox,
  28048. featureId,
  28049. featureIndex = 0,
  28050. isFeatureCollection = geojson.type === 'FeatureCollection',
  28051. isFeature = geojson.type === 'Feature',
  28052. stop = isFeatureCollection ? geojson.features.length : 1;
  28053. // This logic may look a little weird. The reason why it is that way
  28054. // is because it's trying to be fast. GeoJSON supports multiple kinds
  28055. // of objects at its root: FeatureCollection, Features, Geometries.
  28056. // This function has the responsibility of handling all of them, and that
  28057. // means that some of the `for` loops you see below actually just don't apply
  28058. // to certain inputs. For instance, if you give this just a
  28059. // Point geometry, then both loops are short-circuited and all we do
  28060. // is gradually rename the input until it's called 'geometry'.
  28061. //
  28062. // This also aims to allocate as few resources as possible: just a
  28063. // few numbers and booleans, rather than any temporary arrays as would
  28064. // be required with the normalization approach.
  28065. for (i = 0; i < stop; i++) {
  28066. geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :
  28067. (isFeature ? geojson.geometry : geojson));
  28068. featureProperties = (isFeatureCollection ? geojson.features[i].properties :
  28069. (isFeature ? geojson.properties : {}));
  28070. featureBBox = (isFeatureCollection ? geojson.features[i].bbox :
  28071. (isFeature ? geojson.bbox : undefined));
  28072. featureId = (isFeatureCollection ? geojson.features[i].id :
  28073. (isFeature ? geojson.id : undefined));
  28074. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  28075. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  28076. for (g = 0; g < stopG; g++) {
  28077. geometry = isGeometryCollection ?
  28078. geometryMaybeCollection.geometries[g] : geometryMaybeCollection;
  28079. // Handle null Geometry
  28080. if (geometry === null) {
  28081. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  28082. continue;
  28083. }
  28084. switch (geometry.type) {
  28085. case 'Point':
  28086. case 'LineString':
  28087. case 'MultiPoint':
  28088. case 'Polygon':
  28089. case 'MultiLineString':
  28090. case 'MultiPolygon': {
  28091. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  28092. break;
  28093. }
  28094. case 'GeometryCollection': {
  28095. for (j = 0; j < geometry.geometries.length; j++) {
  28096. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  28097. }
  28098. break;
  28099. }
  28100. default:
  28101. throw new Error('Unknown Geometry Type');
  28102. }
  28103. }
  28104. // Only increase `featureIndex` per each feature
  28105. featureIndex++;
  28106. }
  28107. }
  28108. /**
  28109. * Callback for geomReduce
  28110. *
  28111. * The first time the callback function is called, the values provided as arguments depend
  28112. * on whether the reduce method has an initialValue argument.
  28113. *
  28114. * If an initialValue is provided to the reduce method:
  28115. * - The previousValue argument is initialValue.
  28116. * - The currentValue argument is the value of the first element present in the array.
  28117. *
  28118. * If an initialValue is not provided:
  28119. * - The previousValue argument is the value of the first element present in the array.
  28120. * - The currentValue argument is the value of the second element present in the array.
  28121. *
  28122. * @callback geomReduceCallback
  28123. * @param {*} previousValue The accumulated value previously returned in the last invocation
  28124. * of the callback, or initialValue, if supplied.
  28125. * @param {Geometry} currentGeometry The current Geometry being processed.
  28126. * @param {number} featureIndex The current index of the Feature being processed.
  28127. * @param {Object} featureProperties The current Feature Properties being processed.
  28128. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  28129. * @param {number|string} featureId The current Feature Id being processed.
  28130. */
  28131. /**
  28132. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  28133. *
  28134. * @name geomReduce
  28135. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  28136. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  28137. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  28138. * @returns {*} The value that results from the reduction.
  28139. * @example
  28140. * var features = turf.featureCollection([
  28141. * turf.point([26, 37], {foo: 'bar'}),
  28142. * turf.point([36, 53], {hello: 'world'})
  28143. * ]);
  28144. *
  28145. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  28146. * //=previousValue
  28147. * //=currentGeometry
  28148. * //=featureIndex
  28149. * //=featureProperties
  28150. * //=featureBBox
  28151. * //=featureId
  28152. * return currentGeometry
  28153. * });
  28154. */
  28155. function geomReduce(geojson, callback, initialValue) {
  28156. var previousValue = initialValue;
  28157. geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  28158. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;
  28159. else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  28160. });
  28161. return previousValue;
  28162. }
  28163. /**
  28164. * Callback for flattenEach
  28165. *
  28166. * @callback flattenEachCallback
  28167. * @param {Feature} currentFeature The current flattened feature being processed.
  28168. * @param {number} featureIndex The current index of the Feature being processed.
  28169. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  28170. */
  28171. /**
  28172. * Iterate over flattened features in any GeoJSON object, similar to
  28173. * Array.forEach.
  28174. *
  28175. * @name flattenEach
  28176. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  28177. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  28178. * @example
  28179. * var features = turf.featureCollection([
  28180. * turf.point([26, 37], {foo: 'bar'}),
  28181. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  28182. * ]);
  28183. *
  28184. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  28185. * //=currentFeature
  28186. * //=featureIndex
  28187. * //=multiFeatureIndex
  28188. * });
  28189. */
  28190. function flattenEach(geojson, callback) {
  28191. geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  28192. // Callback for single geometry
  28193. var type = (geometry === null) ? null : geometry.type;
  28194. switch (type) {
  28195. case null:
  28196. case 'Point':
  28197. case 'LineString':
  28198. case 'Polygon':
  28199. if (callback(feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0) === false) return false;
  28200. return;
  28201. }
  28202. var geomType;
  28203. // Callback for multi-geometry
  28204. switch (type) {
  28205. case 'MultiPoint':
  28206. geomType = 'Point';
  28207. break;
  28208. case 'MultiLineString':
  28209. geomType = 'LineString';
  28210. break;
  28211. case 'MultiPolygon':
  28212. geomType = 'Polygon';
  28213. break;
  28214. }
  28215. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  28216. var coordinate = geometry.coordinates[multiFeatureIndex];
  28217. var geom = {
  28218. type: geomType,
  28219. coordinates: coordinate
  28220. };
  28221. if (callback(feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  28222. }
  28223. });
  28224. }
  28225. /**
  28226. * Callback for flattenReduce
  28227. *
  28228. * The first time the callback function is called, the values provided as arguments depend
  28229. * on whether the reduce method has an initialValue argument.
  28230. *
  28231. * If an initialValue is provided to the reduce method:
  28232. * - The previousValue argument is initialValue.
  28233. * - The currentValue argument is the value of the first element present in the array.
  28234. *
  28235. * If an initialValue is not provided:
  28236. * - The previousValue argument is the value of the first element present in the array.
  28237. * - The currentValue argument is the value of the second element present in the array.
  28238. *
  28239. * @callback flattenReduceCallback
  28240. * @param {*} previousValue The accumulated value previously returned in the last invocation
  28241. * of the callback, or initialValue, if supplied.
  28242. * @param {Feature} currentFeature The current Feature being processed.
  28243. * @param {number} featureIndex The current index of the Feature being processed.
  28244. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  28245. */
  28246. /**
  28247. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  28248. *
  28249. * @name flattenReduce
  28250. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  28251. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  28252. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  28253. * @returns {*} The value that results from the reduction.
  28254. * @example
  28255. * var features = turf.featureCollection([
  28256. * turf.point([26, 37], {foo: 'bar'}),
  28257. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  28258. * ]);
  28259. *
  28260. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  28261. * //=previousValue
  28262. * //=currentFeature
  28263. * //=featureIndex
  28264. * //=multiFeatureIndex
  28265. * return currentFeature
  28266. * });
  28267. */
  28268. function flattenReduce(geojson, callback, initialValue) {
  28269. var previousValue = initialValue;
  28270. flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  28271. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  28272. else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  28273. });
  28274. return previousValue;
  28275. }
  28276. /**
  28277. * Callback for segmentEach
  28278. *
  28279. * @callback segmentEachCallback
  28280. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  28281. * @param {number} featureIndex The current index of the Feature being processed.
  28282. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  28283. * @param {number} geometryIndex The current index of the Geometry being processed.
  28284. * @param {number} segmentIndex The current index of the Segment being processed.
  28285. * @returns {void}
  28286. */
  28287. /**
  28288. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  28289. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  28290. *
  28291. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  28292. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  28293. * @returns {void}
  28294. * @example
  28295. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  28296. *
  28297. * // Iterate over GeoJSON by 2-vertex segments
  28298. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  28299. * //=currentSegment
  28300. * //=featureIndex
  28301. * //=multiFeatureIndex
  28302. * //=geometryIndex
  28303. * //=segmentIndex
  28304. * });
  28305. *
  28306. * // Calculate the total number of segments
  28307. * var total = 0;
  28308. * turf.segmentEach(polygon, function () {
  28309. * total++;
  28310. * });
  28311. */
  28312. function segmentEach(geojson, callback) {
  28313. flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  28314. var segmentIndex = 0;
  28315. // Exclude null Geometries
  28316. if (!feature$$1.geometry) return;
  28317. // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  28318. var type = feature$$1.geometry.type;
  28319. if (type === 'Point' || type === 'MultiPoint') return;
  28320. // Generate 2-vertex line segments
  28321. var previousCoords;
  28322. if (coordEach(feature$$1, function (currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {
  28323. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  28324. if (previousCoords === undefined) {
  28325. previousCoords = currentCoord;
  28326. return;
  28327. }
  28328. var currentSegment = lineString([previousCoords, currentCoord], feature$$1.properties);
  28329. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  28330. segmentIndex++;
  28331. previousCoords = currentCoord;
  28332. }) === false) return false;
  28333. });
  28334. }
  28335. /**
  28336. * Callback for segmentReduce
  28337. *
  28338. * The first time the callback function is called, the values provided as arguments depend
  28339. * on whether the reduce method has an initialValue argument.
  28340. *
  28341. * If an initialValue is provided to the reduce method:
  28342. * - The previousValue argument is initialValue.
  28343. * - The currentValue argument is the value of the first element present in the array.
  28344. *
  28345. * If an initialValue is not provided:
  28346. * - The previousValue argument is the value of the first element present in the array.
  28347. * - The currentValue argument is the value of the second element present in the array.
  28348. *
  28349. * @callback segmentReduceCallback
  28350. * @param {*} previousValue The accumulated value previously returned in the last invocation
  28351. * of the callback, or initialValue, if supplied.
  28352. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  28353. * @param {number} featureIndex The current index of the Feature being processed.
  28354. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  28355. * @param {number} geometryIndex The current index of the Geometry being processed.
  28356. * @param {number} segmentIndex The current index of the Segment being processed.
  28357. */
  28358. /**
  28359. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  28360. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  28361. *
  28362. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  28363. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  28364. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  28365. * @returns {void}
  28366. * @example
  28367. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  28368. *
  28369. * // Iterate over GeoJSON by 2-vertex segments
  28370. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  28371. * //= previousSegment
  28372. * //= currentSegment
  28373. * //= featureIndex
  28374. * //= multiFeatureIndex
  28375. * //= geometryIndex
  28376. * //= segmentInex
  28377. * return currentSegment
  28378. * });
  28379. *
  28380. * // Calculate the total number of segments
  28381. * var initialValue = 0
  28382. * var total = turf.segmentReduce(polygon, function (previousValue) {
  28383. * previousValue++;
  28384. * return previousValue;
  28385. * }, initialValue);
  28386. */
  28387. function segmentReduce(geojson, callback, initialValue) {
  28388. var previousValue = initialValue;
  28389. var started = false;
  28390. segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  28391. if (started === false && initialValue === undefined) previousValue = currentSegment;
  28392. else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  28393. started = true;
  28394. });
  28395. return previousValue;
  28396. }
  28397. /**
  28398. * Callback for lineEach
  28399. *
  28400. * @callback lineEachCallback
  28401. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  28402. * @param {number} featureIndex The current index of the Feature being processed
  28403. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  28404. * @param {number} geometryIndex The current index of the Geometry being processed
  28405. */
  28406. /**
  28407. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  28408. * similar to Array.forEach.
  28409. *
  28410. * @name lineEach
  28411. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  28412. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  28413. * @example
  28414. * var multiLine = turf.multiLineString([
  28415. * [[26, 37], [35, 45]],
  28416. * [[36, 53], [38, 50], [41, 55]]
  28417. * ]);
  28418. *
  28419. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  28420. * //=currentLine
  28421. * //=featureIndex
  28422. * //=multiFeatureIndex
  28423. * //=geometryIndex
  28424. * });
  28425. */
  28426. function lineEach(geojson, callback) {
  28427. // validation
  28428. if (!geojson) throw new Error('geojson is required');
  28429. flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  28430. if (feature$$1.geometry === null) return;
  28431. var type = feature$$1.geometry.type;
  28432. var coords = feature$$1.geometry.coordinates;
  28433. switch (type) {
  28434. case 'LineString':
  28435. if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  28436. break;
  28437. case 'Polygon':
  28438. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  28439. if (callback(lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  28440. }
  28441. break;
  28442. }
  28443. });
  28444. }
  28445. /**
  28446. * Callback for lineReduce
  28447. *
  28448. * The first time the callback function is called, the values provided as arguments depend
  28449. * on whether the reduce method has an initialValue argument.
  28450. *
  28451. * If an initialValue is provided to the reduce method:
  28452. * - The previousValue argument is initialValue.
  28453. * - The currentValue argument is the value of the first element present in the array.
  28454. *
  28455. * If an initialValue is not provided:
  28456. * - The previousValue argument is the value of the first element present in the array.
  28457. * - The currentValue argument is the value of the second element present in the array.
  28458. *
  28459. * @callback lineReduceCallback
  28460. * @param {*} previousValue The accumulated value previously returned in the last invocation
  28461. * of the callback, or initialValue, if supplied.
  28462. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  28463. * @param {number} featureIndex The current index of the Feature being processed
  28464. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  28465. * @param {number} geometryIndex The current index of the Geometry being processed
  28466. */
  28467. /**
  28468. * Reduce features in any GeoJSON object, similar to Array.reduce().
  28469. *
  28470. * @name lineReduce
  28471. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  28472. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  28473. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  28474. * @returns {*} The value that results from the reduction.
  28475. * @example
  28476. * var multiPoly = turf.multiPolygon([
  28477. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  28478. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  28479. * ]);
  28480. *
  28481. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  28482. * //=previousValue
  28483. * //=currentLine
  28484. * //=featureIndex
  28485. * //=multiFeatureIndex
  28486. * //=geometryIndex
  28487. * return currentLine
  28488. * });
  28489. */
  28490. function lineReduce(geojson, callback, initialValue) {
  28491. var previousValue = initialValue;
  28492. lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  28493. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;
  28494. else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  28495. });
  28496. return previousValue;
  28497. }
  28498. /**
  28499. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  28500. *
  28501. * Negative indexes are permitted.
  28502. * Point & MultiPoint will always return null.
  28503. *
  28504. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  28505. * @param {Object} [options={}] Optional parameters
  28506. * @param {number} [options.featureIndex=0] Feature Index
  28507. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  28508. * @param {number} [options.geometryIndex=0] Geometry Index
  28509. * @param {number} [options.segmentIndex=0] Segment Index
  28510. * @param {Object} [options.properties={}] Translate Properties to output LineString
  28511. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  28512. * @param {number|string} [options.id={}] Translate Id to output LineString
  28513. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  28514. * @example
  28515. * var multiLine = turf.multiLineString([
  28516. * [[10, 10], [50, 30], [30, 40]],
  28517. * [[-10, -10], [-50, -30], [-30, -40]]
  28518. * ]);
  28519. *
  28520. * // First Segment (defaults are 0)
  28521. * turf.findSegment(multiLine);
  28522. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  28523. *
  28524. * // First Segment of 2nd Multi Feature
  28525. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  28526. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  28527. *
  28528. * // Last Segment of Last Multi Feature
  28529. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  28530. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  28531. */
  28532. function findSegment(geojson, options) {
  28533. // Optional Parameters
  28534. options = options || {};
  28535. if (!isObject(options)) throw new Error('options is invalid');
  28536. var featureIndex = options.featureIndex || 0;
  28537. var multiFeatureIndex = options.multiFeatureIndex || 0;
  28538. var geometryIndex = options.geometryIndex || 0;
  28539. var segmentIndex = options.segmentIndex || 0;
  28540. // Find FeatureIndex
  28541. var properties = options.properties;
  28542. var geometry;
  28543. switch (geojson.type) {
  28544. case 'FeatureCollection':
  28545. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  28546. properties = properties || geojson.features[featureIndex].properties;
  28547. geometry = geojson.features[featureIndex].geometry;
  28548. break;
  28549. case 'Feature':
  28550. properties = properties || geojson.properties;
  28551. geometry = geojson.geometry;
  28552. break;
  28553. case 'Point':
  28554. case 'MultiPoint':
  28555. return null;
  28556. case 'LineString':
  28557. case 'Polygon':
  28558. case 'MultiLineString':
  28559. case 'MultiPolygon':
  28560. geometry = geojson;
  28561. break;
  28562. default:
  28563. throw new Error('geojson is invalid');
  28564. }
  28565. // Find SegmentIndex
  28566. if (geometry === null) return null;
  28567. var coords = geometry.coordinates;
  28568. switch (geometry.type) {
  28569. case 'Point':
  28570. case 'MultiPoint':
  28571. return null;
  28572. case 'LineString':
  28573. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  28574. return lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  28575. case 'Polygon':
  28576. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  28577. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  28578. return lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  28579. case 'MultiLineString':
  28580. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  28581. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  28582. return lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  28583. case 'MultiPolygon':
  28584. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  28585. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  28586. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  28587. return lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  28588. }
  28589. throw new Error('geojson is invalid');
  28590. }
  28591. /**
  28592. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  28593. *
  28594. * Negative indexes are permitted.
  28595. *
  28596. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  28597. * @param {Object} [options={}] Optional parameters
  28598. * @param {number} [options.featureIndex=0] Feature Index
  28599. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  28600. * @param {number} [options.geometryIndex=0] Geometry Index
  28601. * @param {number} [options.coordIndex=0] Coord Index
  28602. * @param {Object} [options.properties={}] Translate Properties to output Point
  28603. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  28604. * @param {number|string} [options.id={}] Translate Id to output Point
  28605. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  28606. * @example
  28607. * var multiLine = turf.multiLineString([
  28608. * [[10, 10], [50, 30], [30, 40]],
  28609. * [[-10, -10], [-50, -30], [-30, -40]]
  28610. * ]);
  28611. *
  28612. * // First Segment (defaults are 0)
  28613. * turf.findPoint(multiLine);
  28614. * // => Feature<Point<[10, 10]>>
  28615. *
  28616. * // First Segment of the 2nd Multi-Feature
  28617. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  28618. * // => Feature<Point<[-10, -10]>>
  28619. *
  28620. * // Last Segment of last Multi-Feature
  28621. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  28622. * // => Feature<Point<[-30, -40]>>
  28623. */
  28624. function findPoint(geojson, options) {
  28625. // Optional Parameters
  28626. options = options || {};
  28627. if (!isObject(options)) throw new Error('options is invalid');
  28628. var featureIndex = options.featureIndex || 0;
  28629. var multiFeatureIndex = options.multiFeatureIndex || 0;
  28630. var geometryIndex = options.geometryIndex || 0;
  28631. var coordIndex = options.coordIndex || 0;
  28632. // Find FeatureIndex
  28633. var properties = options.properties;
  28634. var geometry;
  28635. switch (geojson.type) {
  28636. case 'FeatureCollection':
  28637. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  28638. properties = properties || geojson.features[featureIndex].properties;
  28639. geometry = geojson.features[featureIndex].geometry;
  28640. break;
  28641. case 'Feature':
  28642. properties = properties || geojson.properties;
  28643. geometry = geojson.geometry;
  28644. break;
  28645. case 'Point':
  28646. case 'MultiPoint':
  28647. return null;
  28648. case 'LineString':
  28649. case 'Polygon':
  28650. case 'MultiLineString':
  28651. case 'MultiPolygon':
  28652. geometry = geojson;
  28653. break;
  28654. default:
  28655. throw new Error('geojson is invalid');
  28656. }
  28657. // Find Coord Index
  28658. if (geometry === null) return null;
  28659. var coords = geometry.coordinates;
  28660. switch (geometry.type) {
  28661. case 'Point':
  28662. return point(coords, properties, options);
  28663. case 'MultiPoint':
  28664. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  28665. return point(coords[multiFeatureIndex], properties, options);
  28666. case 'LineString':
  28667. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  28668. return point(coords[coordIndex], properties, options);
  28669. case 'Polygon':
  28670. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  28671. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  28672. return point(coords[geometryIndex][coordIndex], properties, options);
  28673. case 'MultiLineString':
  28674. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  28675. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  28676. return point(coords[multiFeatureIndex][coordIndex], properties, options);
  28677. case 'MultiPolygon':
  28678. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  28679. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  28680. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  28681. return point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  28682. }
  28683. throw new Error('geojson is invalid');
  28684. }
  28685. // CONCATENATED MODULE: ./node_modules/@turf/envelope/node_modules/@turf/bbox/main.es.js
  28686. /**
  28687. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  28688. *
  28689. * @name bbox
  28690. * @param {GeoJSON} geojson any GeoJSON object
  28691. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  28692. * @example
  28693. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  28694. * var bbox = turf.bbox(line);
  28695. * var bboxPolygon = turf.bboxPolygon(bbox);
  28696. *
  28697. * //addToMap
  28698. * var addToMap = [line, bboxPolygon]
  28699. */
  28700. function main_es_bbox(geojson) {
  28701. var BBox = [Infinity, Infinity, -Infinity, -Infinity];
  28702. coordEach(geojson, function (coord) {
  28703. if (BBox[0] > coord[0]) BBox[0] = coord[0];
  28704. if (BBox[1] > coord[1]) BBox[1] = coord[1];
  28705. if (BBox[2] < coord[0]) BBox[2] = coord[0];
  28706. if (BBox[3] < coord[1]) BBox[3] = coord[1];
  28707. });
  28708. return BBox;
  28709. }
  28710. /* harmony default export */ var main_es = (main_es_bbox);
  28711. // CONCATENATED MODULE: ./node_modules/@turf/bbox-polygon/node_modules/@turf/helpers/main.es.js
  28712. /**
  28713. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  28714. */
  28715. var main_es_earthRadius = 6371008.8;
  28716. /**
  28717. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  28718. */
  28719. var main_es_factors = {
  28720. meters: main_es_earthRadius,
  28721. metres: main_es_earthRadius,
  28722. millimeters: main_es_earthRadius * 1000,
  28723. millimetres: main_es_earthRadius * 1000,
  28724. centimeters: main_es_earthRadius * 100,
  28725. centimetres: main_es_earthRadius * 100,
  28726. kilometers: main_es_earthRadius / 1000,
  28727. kilometres: main_es_earthRadius / 1000,
  28728. miles: main_es_earthRadius / 1609.344,
  28729. nauticalmiles: main_es_earthRadius / 1852,
  28730. inches: main_es_earthRadius * 39.370,
  28731. yards: main_es_earthRadius / 1.0936,
  28732. feet: main_es_earthRadius * 3.28084,
  28733. radians: 1,
  28734. degrees: main_es_earthRadius / 111325,
  28735. };
  28736. /**
  28737. * Units of measurement factors based on 1 meter.
  28738. */
  28739. var main_es_unitsFactors = {
  28740. meters: 1,
  28741. metres: 1,
  28742. millimeters: 1000,
  28743. millimetres: 1000,
  28744. centimeters: 100,
  28745. centimetres: 100,
  28746. kilometers: 1 / 1000,
  28747. kilometres: 1 / 1000,
  28748. miles: 1 / 1609.344,
  28749. nauticalmiles: 1 / 1852,
  28750. inches: 39.370,
  28751. yards: 1 / 1.0936,
  28752. feet: 3.28084,
  28753. radians: 1 / main_es_earthRadius,
  28754. degrees: 1 / 111325,
  28755. };
  28756. /**
  28757. * Area of measurement factors based on 1 square meter.
  28758. */
  28759. var main_es_areaFactors = {
  28760. meters: 1,
  28761. metres: 1,
  28762. millimeters: 1000000,
  28763. millimetres: 1000000,
  28764. centimeters: 10000,
  28765. centimetres: 10000,
  28766. kilometers: 0.000001,
  28767. kilometres: 0.000001,
  28768. acres: 0.000247105,
  28769. miles: 3.86e-7,
  28770. yards: 1.195990046,
  28771. feet: 10.763910417,
  28772. inches: 1550.003100006
  28773. };
  28774. /**
  28775. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  28776. *
  28777. * @name feature
  28778. * @param {Geometry} geometry input geometry
  28779. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28780. * @param {Object} [options={}] Optional Parameters
  28781. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28782. * @param {string|number} [options.id] Identifier associated with the Feature
  28783. * @returns {Feature} a GeoJSON Feature
  28784. * @example
  28785. * var geometry = {
  28786. * "type": "Point",
  28787. * "coordinates": [110, 50]
  28788. * };
  28789. *
  28790. * var feature = turf.feature(geometry);
  28791. *
  28792. * //=feature
  28793. */
  28794. function main_es_feature(geometry, properties, options) {
  28795. // Optional Parameters
  28796. options = options || {};
  28797. if (!main_es_isObject(options)) throw new Error('options is invalid');
  28798. var bbox = options.bbox;
  28799. var id = options.id;
  28800. // Validation
  28801. if (geometry === undefined) throw new Error('geometry is required');
  28802. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  28803. if (bbox) main_es_validateBBox(bbox);
  28804. if (id) main_es_validateId(id);
  28805. // Main
  28806. var feat = {type: 'Feature'};
  28807. if (id) feat.id = id;
  28808. if (bbox) feat.bbox = bbox;
  28809. feat.properties = properties || {};
  28810. feat.geometry = geometry;
  28811. return feat;
  28812. }
  28813. /**
  28814. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  28815. * For GeometryCollection type use `helpers.geometryCollection`
  28816. *
  28817. * @name geometry
  28818. * @param {string} type Geometry Type
  28819. * @param {Array<number>} coordinates Coordinates
  28820. * @param {Object} [options={}] Optional Parameters
  28821. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  28822. * @returns {Geometry} a GeoJSON Geometry
  28823. * @example
  28824. * var type = 'Point';
  28825. * var coordinates = [110, 50];
  28826. *
  28827. * var geometry = turf.geometry(type, coordinates);
  28828. *
  28829. * //=geometry
  28830. */
  28831. function helpers_main_es_geometry(type, coordinates, options) {
  28832. // Optional Parameters
  28833. options = options || {};
  28834. if (!main_es_isObject(options)) throw new Error('options is invalid');
  28835. var bbox = options.bbox;
  28836. // Validation
  28837. if (!type) throw new Error('type is required');
  28838. if (!coordinates) throw new Error('coordinates is required');
  28839. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28840. if (bbox) main_es_validateBBox(bbox);
  28841. // Main
  28842. var geom;
  28843. switch (type) {
  28844. case 'Point': geom = main_es_point(coordinates).geometry; break;
  28845. case 'LineString': geom = main_es_lineString(coordinates).geometry; break;
  28846. case 'Polygon': geom = main_es_polygon(coordinates).geometry; break;
  28847. case 'MultiPoint': geom = main_es_multiPoint(coordinates).geometry; break;
  28848. case 'MultiLineString': geom = main_es_multiLineString(coordinates).geometry; break;
  28849. case 'MultiPolygon': geom = main_es_multiPolygon(coordinates).geometry; break;
  28850. default: throw new Error(type + ' is invalid');
  28851. }
  28852. if (bbox) geom.bbox = bbox;
  28853. return geom;
  28854. }
  28855. /**
  28856. * Creates a {@link Point} {@link Feature} from a Position.
  28857. *
  28858. * @name point
  28859. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  28860. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28861. * @param {Object} [options={}] Optional Parameters
  28862. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28863. * @param {string|number} [options.id] Identifier associated with the Feature
  28864. * @returns {Feature<Point>} a Point feature
  28865. * @example
  28866. * var point = turf.point([-75.343, 39.984]);
  28867. *
  28868. * //=point
  28869. */
  28870. function main_es_point(coordinates, properties, options) {
  28871. if (!coordinates) throw new Error('coordinates is required');
  28872. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28873. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  28874. if (!main_es_isNumber(coordinates[0]) || !main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  28875. return main_es_feature({
  28876. type: 'Point',
  28877. coordinates: coordinates
  28878. }, properties, options);
  28879. }
  28880. /**
  28881. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  28882. *
  28883. * @name points
  28884. * @param {Array<Array<number>>} coordinates an array of Points
  28885. * @param {Object} [properties={}] Translate these properties to each Feature
  28886. * @param {Object} [options={}] Optional Parameters
  28887. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  28888. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  28889. * @returns {FeatureCollection<Point>} Point Feature
  28890. * @example
  28891. * var points = turf.points([
  28892. * [-75, 39],
  28893. * [-80, 45],
  28894. * [-78, 50]
  28895. * ]);
  28896. *
  28897. * //=points
  28898. */
  28899. function main_es_points(coordinates, properties, options) {
  28900. if (!coordinates) throw new Error('coordinates is required');
  28901. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28902. return main_es_featureCollection(coordinates.map(function (coords) {
  28903. return main_es_point(coords, properties);
  28904. }), options);
  28905. }
  28906. /**
  28907. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  28908. *
  28909. * @name polygon
  28910. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  28911. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28912. * @param {Object} [options={}] Optional Parameters
  28913. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28914. * @param {string|number} [options.id] Identifier associated with the Feature
  28915. * @returns {Feature<Polygon>} Polygon Feature
  28916. * @example
  28917. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  28918. *
  28919. * //=polygon
  28920. */
  28921. function main_es_polygon(coordinates, properties, options) {
  28922. if (!coordinates) throw new Error('coordinates is required');
  28923. for (var i = 0; i < coordinates.length; i++) {
  28924. var ring = coordinates[i];
  28925. if (ring.length < 4) {
  28926. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  28927. }
  28928. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  28929. // Check if first point of Polygon contains two numbers
  28930. if (i === 0 && j === 0 && !main_es_isNumber(ring[0][0]) || !main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  28931. if (ring[ring.length - 1][j] !== ring[0][j]) {
  28932. throw new Error('First and last Position are not equivalent.');
  28933. }
  28934. }
  28935. }
  28936. return main_es_feature({
  28937. type: 'Polygon',
  28938. coordinates: coordinates
  28939. }, properties, options);
  28940. }
  28941. /**
  28942. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  28943. *
  28944. * @name polygons
  28945. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  28946. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28947. * @param {Object} [options={}] Optional Parameters
  28948. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28949. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  28950. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  28951. * @example
  28952. * var polygons = turf.polygons([
  28953. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  28954. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  28955. * ]);
  28956. *
  28957. * //=polygons
  28958. */
  28959. function main_es_polygons(coordinates, properties, options) {
  28960. if (!coordinates) throw new Error('coordinates is required');
  28961. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28962. return main_es_featureCollection(coordinates.map(function (coords) {
  28963. return main_es_polygon(coords, properties);
  28964. }), options);
  28965. }
  28966. /**
  28967. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  28968. *
  28969. * @name lineString
  28970. * @param {Array<Array<number>>} coordinates an array of Positions
  28971. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28972. * @param {Object} [options={}] Optional Parameters
  28973. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28974. * @param {string|number} [options.id] Identifier associated with the Feature
  28975. * @returns {Feature<LineString>} LineString Feature
  28976. * @example
  28977. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  28978. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  28979. *
  28980. * //=linestring1
  28981. * //=linestring2
  28982. */
  28983. function main_es_lineString(coordinates, properties, options) {
  28984. if (!coordinates) throw new Error('coordinates is required');
  28985. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');
  28986. // Check if first point of LineString contains two numbers
  28987. if (!main_es_isNumber(coordinates[0][1]) || !main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  28988. return main_es_feature({
  28989. type: 'LineString',
  28990. coordinates: coordinates
  28991. }, properties, options);
  28992. }
  28993. /**
  28994. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  28995. *
  28996. * @name lineStrings
  28997. * @param {Array<Array<number>>} coordinates an array of LinearRings
  28998. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28999. * @param {Object} [options={}] Optional Parameters
  29000. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  29001. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  29002. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  29003. * @example
  29004. * var linestrings = turf.lineStrings([
  29005. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  29006. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  29007. * ]);
  29008. *
  29009. * //=linestrings
  29010. */
  29011. function main_es_lineStrings(coordinates, properties, options) {
  29012. if (!coordinates) throw new Error('coordinates is required');
  29013. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  29014. return main_es_featureCollection(coordinates.map(function (coords) {
  29015. return main_es_lineString(coords, properties);
  29016. }), options);
  29017. }
  29018. /**
  29019. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  29020. *
  29021. * @name featureCollection
  29022. * @param {Feature[]} features input features
  29023. * @param {Object} [options={}] Optional Parameters
  29024. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29025. * @param {string|number} [options.id] Identifier associated with the Feature
  29026. * @returns {FeatureCollection} FeatureCollection of Features
  29027. * @example
  29028. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  29029. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  29030. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  29031. *
  29032. * var collection = turf.featureCollection([
  29033. * locationA,
  29034. * locationB,
  29035. * locationC
  29036. * ]);
  29037. *
  29038. * //=collection
  29039. */
  29040. function main_es_featureCollection(features, options) {
  29041. // Optional Parameters
  29042. options = options || {};
  29043. if (!main_es_isObject(options)) throw new Error('options is invalid');
  29044. var bbox = options.bbox;
  29045. var id = options.id;
  29046. // Validation
  29047. if (!features) throw new Error('No features passed');
  29048. if (!Array.isArray(features)) throw new Error('features must be an Array');
  29049. if (bbox) main_es_validateBBox(bbox);
  29050. if (id) main_es_validateId(id);
  29051. // Main
  29052. var fc = {type: 'FeatureCollection'};
  29053. if (id) fc.id = id;
  29054. if (bbox) fc.bbox = bbox;
  29055. fc.features = features;
  29056. return fc;
  29057. }
  29058. /**
  29059. * Creates a {@link Feature<MultiLineString>} based on a
  29060. * coordinate array. Properties can be added optionally.
  29061. *
  29062. * @name multiLineString
  29063. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  29064. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29065. * @param {Object} [options={}] Optional Parameters
  29066. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29067. * @param {string|number} [options.id] Identifier associated with the Feature
  29068. * @returns {Feature<MultiLineString>} a MultiLineString feature
  29069. * @throws {Error} if no coordinates are passed
  29070. * @example
  29071. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  29072. *
  29073. * //=multiLine
  29074. */
  29075. function main_es_multiLineString(coordinates, properties, options) {
  29076. if (!coordinates) throw new Error('coordinates is required');
  29077. return main_es_feature({
  29078. type: 'MultiLineString',
  29079. coordinates: coordinates
  29080. }, properties, options);
  29081. }
  29082. /**
  29083. * Creates a {@link Feature<MultiPoint>} based on a
  29084. * coordinate array. Properties can be added optionally.
  29085. *
  29086. * @name multiPoint
  29087. * @param {Array<Array<number>>} coordinates an array of Positions
  29088. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29089. * @param {Object} [options={}] Optional Parameters
  29090. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29091. * @param {string|number} [options.id] Identifier associated with the Feature
  29092. * @returns {Feature<MultiPoint>} a MultiPoint feature
  29093. * @throws {Error} if no coordinates are passed
  29094. * @example
  29095. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  29096. *
  29097. * //=multiPt
  29098. */
  29099. function main_es_multiPoint(coordinates, properties, options) {
  29100. if (!coordinates) throw new Error('coordinates is required');
  29101. return main_es_feature({
  29102. type: 'MultiPoint',
  29103. coordinates: coordinates
  29104. }, properties, options);
  29105. }
  29106. /**
  29107. * Creates a {@link Feature<MultiPolygon>} based on a
  29108. * coordinate array. Properties can be added optionally.
  29109. *
  29110. * @name multiPolygon
  29111. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  29112. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29113. * @param {Object} [options={}] Optional Parameters
  29114. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29115. * @param {string|number} [options.id] Identifier associated with the Feature
  29116. * @returns {Feature<MultiPolygon>} a multipolygon feature
  29117. * @throws {Error} if no coordinates are passed
  29118. * @example
  29119. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  29120. *
  29121. * //=multiPoly
  29122. *
  29123. */
  29124. function main_es_multiPolygon(coordinates, properties, options) {
  29125. if (!coordinates) throw new Error('coordinates is required');
  29126. return main_es_feature({
  29127. type: 'MultiPolygon',
  29128. coordinates: coordinates
  29129. }, properties, options);
  29130. }
  29131. /**
  29132. * Creates a {@link Feature<GeometryCollection>} based on a
  29133. * coordinate array. Properties can be added optionally.
  29134. *
  29135. * @name geometryCollection
  29136. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  29137. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29138. * @param {Object} [options={}] Optional Parameters
  29139. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29140. * @param {string|number} [options.id] Identifier associated with the Feature
  29141. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  29142. * @example
  29143. * var pt = {
  29144. * "type": "Point",
  29145. * "coordinates": [100, 0]
  29146. * };
  29147. * var line = {
  29148. * "type": "LineString",
  29149. * "coordinates": [ [101, 0], [102, 1] ]
  29150. * };
  29151. * var collection = turf.geometryCollection([pt, line]);
  29152. *
  29153. * //=collection
  29154. */
  29155. function main_es_geometryCollection(geometries, properties, options) {
  29156. if (!geometries) throw new Error('geometries is required');
  29157. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  29158. return main_es_feature({
  29159. type: 'GeometryCollection',
  29160. geometries: geometries
  29161. }, properties, options);
  29162. }
  29163. /**
  29164. * Round number to precision
  29165. *
  29166. * @param {number} num Number
  29167. * @param {number} [precision=0] Precision
  29168. * @returns {number} rounded number
  29169. * @example
  29170. * turf.round(120.4321)
  29171. * //=120
  29172. *
  29173. * turf.round(120.4321, 2)
  29174. * //=120.43
  29175. */
  29176. function main_es_round(num, precision) {
  29177. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  29178. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  29179. var multiplier = Math.pow(10, precision || 0);
  29180. return Math.round(num * multiplier) / multiplier;
  29181. }
  29182. /**
  29183. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  29184. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  29185. *
  29186. * @name radiansToLength
  29187. * @param {number} radians in radians across the sphere
  29188. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  29189. * @returns {number} distance
  29190. */
  29191. function main_es_radiansToLength(radians, units) {
  29192. if (radians === undefined || radians === null) throw new Error('radians is required');
  29193. if (units && typeof units !== 'string') throw new Error('units must be a string');
  29194. var factor = main_es_factors[units || 'kilometers'];
  29195. if (!factor) throw new Error(units + ' units is invalid');
  29196. return radians * factor;
  29197. }
  29198. /**
  29199. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  29200. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  29201. *
  29202. * @name lengthToRadians
  29203. * @param {number} distance in real units
  29204. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  29205. * @returns {number} radians
  29206. */
  29207. function main_es_lengthToRadians(distance, units) {
  29208. if (distance === undefined || distance === null) throw new Error('distance is required');
  29209. if (units && typeof units !== 'string') throw new Error('units must be a string');
  29210. var factor = main_es_factors[units || 'kilometers'];
  29211. if (!factor) throw new Error(units + ' units is invalid');
  29212. return distance / factor;
  29213. }
  29214. /**
  29215. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  29216. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  29217. *
  29218. * @name lengthToDegrees
  29219. * @param {number} distance in real units
  29220. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  29221. * @returns {number} degrees
  29222. */
  29223. function main_es_lengthToDegrees(distance, units) {
  29224. return main_es_radiansToDegrees(main_es_lengthToRadians(distance, units));
  29225. }
  29226. /**
  29227. * Converts any bearing angle from the north line direction (positive clockwise)
  29228. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  29229. *
  29230. * @name bearingToAzimuth
  29231. * @param {number} bearing angle, between -180 and +180 degrees
  29232. * @returns {number} angle between 0 and 360 degrees
  29233. */
  29234. function main_es_bearingToAzimuth(bearing) {
  29235. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  29236. var angle = bearing % 360;
  29237. if (angle < 0) angle += 360;
  29238. return angle;
  29239. }
  29240. /**
  29241. * Converts an angle in radians to degrees
  29242. *
  29243. * @name radiansToDegrees
  29244. * @param {number} radians angle in radians
  29245. * @returns {number} degrees between 0 and 360 degrees
  29246. */
  29247. function main_es_radiansToDegrees(radians) {
  29248. if (radians === null || radians === undefined) throw new Error('radians is required');
  29249. var degrees = radians % (2 * Math.PI);
  29250. return degrees * 180 / Math.PI;
  29251. }
  29252. /**
  29253. * Converts an angle in degrees to radians
  29254. *
  29255. * @name degreesToRadians
  29256. * @param {number} degrees angle between 0 and 360 degrees
  29257. * @returns {number} angle in radians
  29258. */
  29259. function main_es_degreesToRadians(degrees) {
  29260. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  29261. var radians = degrees % 360;
  29262. return radians * Math.PI / 180;
  29263. }
  29264. /**
  29265. * Converts a length to the requested unit.
  29266. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  29267. *
  29268. * @param {number} length to be converted
  29269. * @param {string} originalUnit of the length
  29270. * @param {string} [finalUnit='kilometers'] returned unit
  29271. * @returns {number} the converted length
  29272. */
  29273. function main_es_convertLength(length, originalUnit, finalUnit) {
  29274. if (length === null || length === undefined) throw new Error('length is required');
  29275. if (!(length >= 0)) throw new Error('length must be a positive number');
  29276. return main_es_radiansToLength(main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  29277. }
  29278. /**
  29279. * Converts a area to the requested unit.
  29280. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  29281. * @param {number} area to be converted
  29282. * @param {string} [originalUnit='meters'] of the distance
  29283. * @param {string} [finalUnit='kilometers'] returned unit
  29284. * @returns {number} the converted distance
  29285. */
  29286. function main_es_convertArea(area, originalUnit, finalUnit) {
  29287. if (area === null || area === undefined) throw new Error('area is required');
  29288. if (!(area >= 0)) throw new Error('area must be a positive number');
  29289. var startFactor = main_es_areaFactors[originalUnit || 'meters'];
  29290. if (!startFactor) throw new Error('invalid original units');
  29291. var finalFactor = main_es_areaFactors[finalUnit || 'kilometers'];
  29292. if (!finalFactor) throw new Error('invalid final units');
  29293. return (area / startFactor) * finalFactor;
  29294. }
  29295. /**
  29296. * isNumber
  29297. *
  29298. * @param {*} num Number to validate
  29299. * @returns {boolean} true/false
  29300. * @example
  29301. * turf.isNumber(123)
  29302. * //=true
  29303. * turf.isNumber('foo')
  29304. * //=false
  29305. */
  29306. function main_es_isNumber(num) {
  29307. return !isNaN(num) && num !== null && !Array.isArray(num);
  29308. }
  29309. /**
  29310. * isObject
  29311. *
  29312. * @param {*} input variable to validate
  29313. * @returns {boolean} true/false
  29314. * @example
  29315. * turf.isObject({elevation: 10})
  29316. * //=true
  29317. * turf.isObject('foo')
  29318. * //=false
  29319. */
  29320. function main_es_isObject(input) {
  29321. return (!!input) && (input.constructor === Object);
  29322. }
  29323. /**
  29324. * Validate BBox
  29325. *
  29326. * @private
  29327. * @param {Array<number>} bbox BBox to validate
  29328. * @returns {void}
  29329. * @throws Error if BBox is not valid
  29330. * @example
  29331. * validateBBox([-180, -40, 110, 50])
  29332. * //=OK
  29333. * validateBBox([-180, -40])
  29334. * //=Error
  29335. * validateBBox('Foo')
  29336. * //=Error
  29337. * validateBBox(5)
  29338. * //=Error
  29339. * validateBBox(null)
  29340. * //=Error
  29341. * validateBBox(undefined)
  29342. * //=Error
  29343. */
  29344. function main_es_validateBBox(bbox) {
  29345. if (!bbox) throw new Error('bbox is required');
  29346. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  29347. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  29348. bbox.forEach(function (num) {
  29349. if (!main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  29350. });
  29351. }
  29352. /**
  29353. * Validate Id
  29354. *
  29355. * @private
  29356. * @param {string|number} id Id to validate
  29357. * @returns {void}
  29358. * @throws Error if Id is not valid
  29359. * @example
  29360. * validateId([-180, -40, 110, 50])
  29361. * //=Error
  29362. * validateId([-180, -40])
  29363. * //=Error
  29364. * validateId('Foo')
  29365. * //=OK
  29366. * validateId(5)
  29367. * //=OK
  29368. * validateId(null)
  29369. * //=Error
  29370. * validateId(undefined)
  29371. * //=Error
  29372. */
  29373. function main_es_validateId(id) {
  29374. if (!id) throw new Error('id is required');
  29375. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  29376. }
  29377. // Deprecated methods
  29378. function main_es_radians2degrees() {
  29379. throw new Error('method has been renamed to `radiansToDegrees`');
  29380. }
  29381. function main_es_degrees2radians() {
  29382. throw new Error('method has been renamed to `degreesToRadians`');
  29383. }
  29384. function main_es_distanceToDegrees() {
  29385. throw new Error('method has been renamed to `lengthToDegrees`');
  29386. }
  29387. function main_es_distanceToRadians() {
  29388. throw new Error('method has been renamed to `lengthToRadians`');
  29389. }
  29390. function main_es_radiansToDistance() {
  29391. throw new Error('method has been renamed to `radiansToLength`');
  29392. }
  29393. function main_es_bearingToAngle() {
  29394. throw new Error('method has been renamed to `bearingToAzimuth`');
  29395. }
  29396. function main_es_convertDistance() {
  29397. throw new Error('method has been renamed to `convertLength`');
  29398. }
  29399. // CONCATENATED MODULE: ./node_modules/@turf/bbox-polygon/main.es.js
  29400. /**
  29401. * Takes a bbox and returns an equivalent {@link Polygon|polygon}.
  29402. *
  29403. * @name bboxPolygon
  29404. * @param {BBox} bbox extent in [minX, minY, maxX, maxY] order
  29405. * @returns {Feature<Polygon>} a Polygon representation of the bounding box
  29406. * @example
  29407. * var bbox = [0, 0, 10, 10];
  29408. *
  29409. * var poly = turf.bboxPolygon(bbox);
  29410. *
  29411. * //addToMap
  29412. * var addToMap = [poly]
  29413. */
  29414. function bboxPolygon(bbox) {
  29415. main_es_validateBBox(bbox);
  29416. // Convert BBox positions to Numbers
  29417. // No performance loss for including Number()
  29418. // https://github.com/Turfjs/turf/issues/1119
  29419. var west = Number(bbox[0]);
  29420. var south = Number(bbox[1]);
  29421. var east = Number(bbox[2]);
  29422. var north = Number(bbox[3]);
  29423. if (bbox.length === 6) throw new Error('@turf/bbox-polygon does not support BBox with 6 positions');
  29424. var lowLeft = [west, south];
  29425. var topLeft = [west, north];
  29426. var topRight = [east, north];
  29427. var lowRight = [east, south];
  29428. return main_es_polygon([[
  29429. lowLeft,
  29430. lowRight,
  29431. topRight,
  29432. topLeft,
  29433. lowLeft
  29434. ]]);
  29435. }
  29436. /* harmony default export */ var bbox_polygon_main_es = (bboxPolygon);
  29437. // CONCATENATED MODULE: ./node_modules/@turf/envelope/main.es.js
  29438. /**
  29439. * Takes any number of features and returns a rectangular {@link Polygon} that encompasses all vertices.
  29440. *
  29441. * @name envelope
  29442. * @param {GeoJSON} geojson input features
  29443. * @returns {Feature<Polygon>} a rectangular Polygon feature that encompasses all vertices
  29444. * @example
  29445. * var features = turf.featureCollection([
  29446. * turf.point([-75.343, 39.984], {"name": "Location A"}),
  29447. * turf.point([-75.833, 39.284], {"name": "Location B"}),
  29448. * turf.point([-75.534, 39.123], {"name": "Location C"})
  29449. * ]);
  29450. *
  29451. * var enveloped = turf.envelope(features);
  29452. *
  29453. * //addToMap
  29454. * var addToMap = [features, enveloped];
  29455. */
  29456. function envelope(geojson) {
  29457. return bbox_polygon_main_es(main_es(geojson));
  29458. }
  29459. /* harmony default export */ var envelope_main_es = __webpack_exports__["default"] = (envelope);
  29460. /***/ }),
  29461. /* 158 */
  29462. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29463. "use strict";
  29464. __webpack_require__.r(__webpack_exports__);
  29465. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
  29466. function _objectWithoutPropertiesLoose(source, excluded) {
  29467. if (source == null) return {};
  29468. var target = {};
  29469. var sourceKeys = Object.keys(source);
  29470. var key, i;
  29471. for (i = 0; i < sourceKeys.length; i++) {
  29472. key = sourceKeys[i];
  29473. if (excluded.indexOf(key) >= 0) continue;
  29474. target[key] = source[key];
  29475. }
  29476. return target;
  29477. }
  29478. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
  29479. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectWithoutProperties; });
  29480. function _objectWithoutProperties(source, excluded) {
  29481. if (source == null) return {};
  29482. var target = _objectWithoutPropertiesLoose(source, excluded);
  29483. var key, i;
  29484. if (Object.getOwnPropertySymbols) {
  29485. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  29486. for (i = 0; i < sourceSymbolKeys.length; i++) {
  29487. key = sourceSymbolKeys[i];
  29488. if (excluded.indexOf(key) >= 0) continue;
  29489. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  29490. target[key] = source[key];
  29491. }
  29492. }
  29493. return target;
  29494. }
  29495. /***/ })
  29496. /******/ ])["default"];
  29497. });