viewerCesiumNavigationMixin.min.js 682 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920
  1. (function (root, factory) {
  2. "use strict";
  3. if (typeof define === "function" && define.amd) {
  4. define([], factory)
  5. }
  6. Cesium["viewerCesiumNavigationMixin"] = factory()
  7. })(typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : this, function () {
  8. var requirejs, require, define;
  9. (function (undef) {
  10. var main, req, makeMap, handlers, defined = {},
  11. waiting = {},
  12. config = {},
  13. defining = {},
  14. hasOwn = Object.prototype.hasOwnProperty,
  15. aps = [].slice,
  16. jsSuffixRegExp = /\.js$/;
  17. function hasProp(obj, prop) {
  18. return hasOwn.call(obj, prop)
  19. }
  20. function normalize(name, baseName) {
  21. var nameParts, nameSegment, mapValue, foundMap, lastIndex, foundI, foundStarMap, starI, i, j, part, normalizedBaseParts, baseParts = baseName && baseName.split("/"),
  22. map = config.map,
  23. starMap = map && map["*"] || {};
  24. if (name) {
  25. name = name.split("/");
  26. lastIndex = name.length - 1;
  27. if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
  28. name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, "")
  29. }
  30. if (name[0].charAt(0) === "." && baseParts) {
  31. normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
  32. name = normalizedBaseParts.concat(name)
  33. }
  34. for (i = 0; i < name.length; i++) {
  35. part = name[i];
  36. if (part === ".") {
  37. name.splice(i, 1);
  38. i -= 1
  39. } else if (part === "..") {
  40. if (i === 0 || i === 1 && name[2] === ".." || name[i - 1] === "..") {
  41. continue
  42. } else if (i > 0) {
  43. name.splice(i - 1, 2);
  44. i -= 2
  45. }
  46. }
  47. }
  48. name = name.join("/")
  49. }
  50. if ((baseParts || starMap) && map) {
  51. nameParts = name.split("/");
  52. for (i = nameParts.length; i > 0; i -= 1) {
  53. nameSegment = nameParts.slice(0, i).join("/");
  54. if (baseParts) {
  55. for (j = baseParts.length; j > 0; j -= 1) {
  56. mapValue = map[baseParts.slice(0, j).join("/")];
  57. if (mapValue) {
  58. mapValue = mapValue[nameSegment];
  59. if (mapValue) {
  60. foundMap = mapValue;
  61. foundI = i;
  62. break
  63. }
  64. }
  65. }
  66. }
  67. if (foundMap) {
  68. break
  69. }
  70. if (!foundStarMap && starMap && starMap[nameSegment]) {
  71. foundStarMap = starMap[nameSegment];
  72. starI = i
  73. }
  74. }
  75. if (!foundMap && foundStarMap) {
  76. foundMap = foundStarMap;
  77. foundI = starI
  78. }
  79. if (foundMap) {
  80. nameParts.splice(0, foundI, foundMap);
  81. name = nameParts.join("/")
  82. }
  83. }
  84. return name
  85. }
  86. function makeRequire(relName, forceSync) {
  87. return function () {
  88. var args = aps.call(arguments, 0);
  89. if (typeof args[0] !== "string" && args.length === 1) {
  90. args.push(null)
  91. }
  92. return req.apply(undef, args.concat([relName, forceSync]))
  93. }
  94. }
  95. function makeNormalize(relName) {
  96. return function (name) {
  97. return normalize(name, relName)
  98. }
  99. }
  100. function makeLoad(depName) {
  101. return function (value) {
  102. defined[depName] = value
  103. }
  104. }
  105. function callDep(name) {
  106. if (hasProp(waiting, name)) {
  107. var args = waiting[name];
  108. delete waiting[name];
  109. defining[name] = true;
  110. main.apply(undef, args)
  111. }
  112. if (!hasProp(defined, name) && !hasProp(defining, name)) {
  113. throw new Error("No " + name)
  114. }
  115. return defined[name]
  116. }
  117. function splitPrefix(name) {
  118. var prefix, index = name ? name.indexOf("!") : -1;
  119. if (index > -1) {
  120. prefix = name.substring(0, index);
  121. name = name.substring(index + 1, name.length)
  122. }
  123. return [prefix, name]
  124. }
  125. makeMap = function (name, relName) {
  126. var plugin, parts = splitPrefix(name),
  127. prefix = parts[0];
  128. name = parts[1];
  129. if (prefix) {
  130. prefix = normalize(prefix, relName);
  131. plugin = callDep(prefix)
  132. }
  133. if (prefix) {
  134. if (plugin && plugin.normalize) {
  135. name = plugin.normalize(name, makeNormalize(relName))
  136. } else {
  137. name = normalize(name, relName)
  138. }
  139. } else {
  140. name = normalize(name, relName);
  141. parts = splitPrefix(name);
  142. prefix = parts[0];
  143. name = parts[1];
  144. if (prefix) {
  145. plugin = callDep(prefix)
  146. }
  147. }
  148. return {
  149. f: prefix ? prefix + "!" + name : name,
  150. n: name,
  151. pr: prefix,
  152. p: plugin
  153. }
  154. };
  155. function makeConfig(name) {
  156. return function () {
  157. return config && config.config && config.config[name] || {}
  158. }
  159. }
  160. handlers = {
  161. require: function (name) {
  162. return makeRequire(name)
  163. },
  164. exports: function (name) {
  165. var e = defined[name];
  166. if (typeof e !== "undefined") {
  167. return e
  168. } else {
  169. return defined[name] = {}
  170. }
  171. },
  172. module: function (name) {
  173. return {
  174. id: name,
  175. uri: "",
  176. exports: defined[name],
  177. config: makeConfig(name)
  178. }
  179. }
  180. };
  181. main = function (name, deps, callback, relName) {
  182. var cjsModule, depName, ret, map, i, args = [],
  183. callbackType = typeof callback,
  184. usingExports;
  185. relName = relName || name;
  186. if (callbackType === "undefined" || callbackType === "function") {
  187. deps = !deps.length && callback.length ? ["require", "exports", "module"] : deps;
  188. for (i = 0; i < deps.length; i += 1) {
  189. map = makeMap(deps[i], relName);
  190. depName = map.f;
  191. if (depName === "require") {
  192. args[i] = handlers.require(name)
  193. } else if (depName === "exports") {
  194. args[i] = handlers.exports(name);
  195. usingExports = true
  196. } else if (depName === "module") {
  197. cjsModule = args[i] = handlers.module(name)
  198. } else if (hasProp(defined, depName) || hasProp(waiting, depName) || hasProp(defining, depName)) {
  199. args[i] = callDep(depName)
  200. } else if (map.p) {
  201. map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
  202. args[i] = defined[depName]
  203. } else {
  204. throw new Error(name + " missing " + depName)
  205. }
  206. }
  207. ret = callback ? callback.apply(defined[name], args) : undefined;
  208. if (name) {
  209. if (cjsModule && cjsModule.exports !== undef && cjsModule.exports !== defined[name]) {
  210. defined[name] = cjsModule.exports
  211. } else if (ret !== undef || !usingExports) {
  212. defined[name] = ret
  213. }
  214. }
  215. } else if (name) {
  216. defined[name] = callback
  217. }
  218. };
  219. requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
  220. if (typeof deps === "string") {
  221. if (handlers[deps]) {
  222. return handlers[deps](callback)
  223. }
  224. return callDep(makeMap(deps, callback).f)
  225. } else if (!deps.splice) {
  226. config = deps;
  227. if (config.deps) {
  228. req(config.deps, config.callback)
  229. }
  230. if (!callback) {
  231. return
  232. }
  233. if (callback.splice) {
  234. deps = callback;
  235. callback = relName;
  236. relName = null
  237. } else {
  238. deps = undef
  239. }
  240. }
  241. callback = callback || function () {};
  242. if (typeof relName === "function") {
  243. relName = forceSync;
  244. forceSync = alt
  245. }
  246. if (forceSync) {
  247. main(undef, deps, callback, relName)
  248. } else {
  249. setTimeout(function () {
  250. main(undef, deps, callback, relName)
  251. }, 4)
  252. }
  253. return req
  254. };
  255. req.config = function (cfg) {
  256. return req(cfg)
  257. };
  258. requirejs._defined = defined;
  259. define = function (name, deps, callback) {
  260. if (typeof name !== "string") {
  261. throw new Error("See almond README: incorrect module build, no module name")
  262. }
  263. if (!deps.splice) {
  264. callback = deps;
  265. deps = []
  266. }
  267. if (!hasProp(defined, name) && !hasProp(waiting, name)) {
  268. waiting[name] = [name, deps, callback]
  269. }
  270. };
  271. define.amd = {
  272. jQuery: true
  273. }
  274. })();
  275. define("almond", function () {});
  276. (function () {
  277. (function (n) {
  278. var x = this || (0, eval)("this"),
  279. u = x.document,
  280. M = x.navigator,
  281. v = x.jQuery,
  282. F = x.JSON;
  283. (function (n) {
  284. "function" === typeof define && define.amd ? define("knockout", ["exports", "require"], n) : "object" === typeof exports && "object" === typeof module ? n(module.exports || exports) : n(x.ko = {})
  285. })(function (N, O) {
  286. function J(a, c) {
  287. return null === a || typeof a in T ? a === c : !1
  288. }
  289. function U(b, c) {
  290. var d;
  291. return function () {
  292. d || (d = a.a.setTimeout(function () {
  293. d = n;
  294. b()
  295. }, c))
  296. }
  297. }
  298. function V(b, c) {
  299. var d;
  300. return function () {
  301. clearTimeout(d);
  302. d = a.a.setTimeout(b, c)
  303. }
  304. }
  305. function W(a, c) {
  306. c && c !== I ? "beforeChange" === c ? this.Kb(a) : this.Ha(a, c) : this.Lb(a)
  307. }
  308. function X(a, c) {
  309. null !== c && c.k && c.k()
  310. }
  311. function Y(a, c) {
  312. var d = this.Hc,
  313. e = d[s];
  314. e.R || (this.lb && this.Ma[c] ? (d.Pb(c, a, this.Ma[c]), this.Ma[c] = null, --this.lb) : e.r[c] || d.Pb(c, a, e.s ? {
  315. ia: a
  316. } : d.uc(a)))
  317. }
  318. function K(b, c, d, e) {
  319. a.d[b] = {
  320. init: function (b, g, k, l, m) {
  321. var h, r;
  322. a.m(function () {
  323. var q = a.a.c(g()),
  324. p = !d !== !q,
  325. A = !r;
  326. if (A || c || p !== h) A && a.va.Aa() && (r = a.a.ua(a.f.childNodes(b), !0)), p ? (A || a.f.da(b, a.a.ua(r)), a.eb(e ? e(m, q) : m, b)) : a.f.xa(b), h = p
  327. }, null, {
  328. i: b
  329. });
  330. return {
  331. controlsDescendantBindings: !0
  332. }
  333. }
  334. };
  335. a.h.ta[b] = !1;
  336. a.f.Z[b] = !0
  337. }
  338. var a = "undefined" !== typeof N ? N : {};
  339. a.b = function (b, c) {
  340. for (var d = b.split("."), e = a, f = 0; f < d.length - 1; f++) e = e[d[f]];
  341. e[d[d.length - 1]] = c
  342. };
  343. a.G = function (a, c, d) {
  344. a[c] = d
  345. };
  346. a.version = "3.4.0";
  347. a.b("version", a.version);
  348. a.options = {
  349. deferUpdates: !1,
  350. useOnlyNativeEvents: !1
  351. };
  352. a.a = function () {
  353. function b(a, b) {
  354. for (var c in a) a.hasOwnProperty(c) && b(c, a[c])
  355. }
  356. function c(a, b) {
  357. if (b)
  358. for (var c in b) b.hasOwnProperty(c) && (a[c] = b[c]);
  359. return a
  360. }
  361. function d(a, b) {
  362. a.__proto__ = b;
  363. return a
  364. }
  365. function e(b, c, d, e) {
  366. var h = b[c].match(r) || [];
  367. a.a.q(d.match(r), function (b) {
  368. a.a.pa(h, b, e)
  369. });
  370. b[c] = h.join(" ")
  371. }
  372. var f = {
  373. __proto__: []
  374. }
  375. instanceof Array, g = "function" === typeof Symbol, k = {}, l = {};
  376. k[M && /Firefox\/2/i.test(M.userAgent) ? "KeyboardEvent" : "UIEvents"] = ["keyup", "keydown", "keypress"];
  377. k.MouseEvents = "click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");
  378. b(k, function (a, b) {
  379. if (b.length)
  380. for (var c = 0, d = b.length; c < d; c++) l[b[c]] = a
  381. });
  382. var m = {
  383. propertychange: !0
  384. },
  385. h = u && function () {
  386. for (var a = 3, b = u.createElement("div"), c = b.getElementsByTagName("i"); b.innerHTML = "<!--[if gt IE " + ++a + "]><i></i><![endif]-->", c[0];);
  387. return 4 < a ? a : n
  388. }(),
  389. r = /\S+/g;
  390. return {
  391. cc: ["authenticity_token", /^__RequestVerificationToken(_.*)?$/],
  392. q: function (a, b) {
  393. for (var c = 0, d = a.length; c < d; c++) b(a[c], c)
  394. },
  395. o: function (a, b) {
  396. if ("function" == typeof Array.prototype.indexOf) return Array.prototype.indexOf.call(a, b);
  397. for (var c = 0, d = a.length; c < d; c++)
  398. if (a[c] === b) return c;
  399. return -1
  400. },
  401. Sb: function (a, b, c) {
  402. for (var d = 0, e = a.length; d < e; d++)
  403. if (b.call(c, a[d], d)) return a[d];
  404. return null
  405. },
  406. La: function (b, c) {
  407. var d = a.a.o(b, c);
  408. 0 < d ? b.splice(d, 1) : 0 === d && b.shift()
  409. },
  410. Tb: function (b) {
  411. b = b || [];
  412. for (var c = [], d = 0, e = b.length; d < e; d++) 0 > a.a.o(c, b[d]) && c.push(b[d]);
  413. return c
  414. },
  415. fb: function (a, b) {
  416. a = a || [];
  417. for (var c = [], d = 0, e = a.length; d < e; d++) c.push(b(a[d], d));
  418. return c
  419. },
  420. Ka: function (a, b) {
  421. a = a || [];
  422. for (var c = [], d = 0, e = a.length; d < e; d++) b(a[d], d) && c.push(a[d]);
  423. return c
  424. },
  425. ra: function (a, b) {
  426. if (b instanceof Array) a.push.apply(a, b);
  427. else
  428. for (var c = 0, d = b.length; c < d; c++) a.push(b[c]);
  429. return a
  430. },
  431. pa: function (b, c, d) {
  432. var e = a.a.o(a.a.zb(b), c);
  433. 0 > e ? d && b.push(c) : d || b.splice(e, 1)
  434. },
  435. ka: f,
  436. extend: c,
  437. Xa: d,
  438. Ya: f ? d : c,
  439. D: b,
  440. Ca: function (a, b) {
  441. if (!a) return a;
  442. var c = {},
  443. d;
  444. for (d in a) a.hasOwnProperty(d) && (c[d] = b(a[d], d, a));
  445. return c
  446. },
  447. ob: function (b) {
  448. for (; b.firstChild;) a.removeNode(b.firstChild)
  449. },
  450. jc: function (b) {
  451. b = a.a.V(b);
  452. for (var c = (b[0] && b[0].ownerDocument || u).createElement("div"), d = 0, e = b.length; d < e; d++) c.appendChild(a.$(b[d]));
  453. return c
  454. },
  455. ua: function (b, c) {
  456. for (var d = 0, e = b.length, h = []; d < e; d++) {
  457. var m = b[d].cloneNode(!0);
  458. h.push(c ? a.$(m) : m)
  459. }
  460. return h
  461. },
  462. da: function (b, c) {
  463. a.a.ob(b);
  464. if (c)
  465. for (var d = 0, e = c.length; d < e; d++) b.appendChild(c[d])
  466. },
  467. qc: function (b, c) {
  468. var d = b.nodeType ? [b] : b;
  469. if (0 < d.length) {
  470. for (var e = d[0], h = e.parentNode, m = 0, l = c.length; m < l; m++) h.insertBefore(c[m], e);
  471. m = 0;
  472. for (l = d.length; m < l; m++) a.removeNode(d[m])
  473. }
  474. },
  475. za: function (a, b) {
  476. if (a.length) {
  477. for (b = 8 === b.nodeType && b.parentNode || b; a.length && a[0].parentNode !== b;) a.splice(0, 1);
  478. for (; 1 < a.length && a[a.length - 1].parentNode !== b;) a.length--;
  479. if (1 < a.length) {
  480. var c = a[0],
  481. d = a[a.length - 1];
  482. for (a.length = 0; c !== d;) a.push(c), c = c.nextSibling;
  483. a.push(d)
  484. }
  485. }
  486. return a
  487. },
  488. sc: function (a, b) {
  489. 7 > h ? a.setAttribute("selected", b) : a.selected = b
  490. },
  491. $a: function (a) {
  492. return null === a || a === n ? "" : a.trim ? a.trim() : a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g, "")
  493. },
  494. nd: function (a, b) {
  495. a = a || "";
  496. return b.length > a.length ? !1 : a.substring(0, b.length) === b
  497. },
  498. Mc: function (a, b) {
  499. if (a === b) return !0;
  500. if (11 === a.nodeType) return !1;
  501. if (b.contains) return b.contains(3 === a.nodeType ? a.parentNode : a);
  502. if (b.compareDocumentPosition) return 16 == (b.compareDocumentPosition(a) & 16);
  503. for (; a && a != b;) a = a.parentNode;
  504. return !!a
  505. },
  506. nb: function (b) {
  507. return a.a.Mc(b, b.ownerDocument.documentElement)
  508. },
  509. Qb: function (b) {
  510. return !!a.a.Sb(b, a.a.nb)
  511. },
  512. A: function (a) {
  513. return a && a.tagName && a.tagName.toLowerCase()
  514. },
  515. Wb: function (b) {
  516. return a.onError ? function () {
  517. try {
  518. return b.apply(this, arguments)
  519. } catch (c) {
  520. throw a.onError && a.onError(c), c
  521. }
  522. } : b
  523. },
  524. setTimeout: function (b, c) {
  525. return setTimeout(a.a.Wb(b), c)
  526. },
  527. $b: function (b) {
  528. setTimeout(function () {
  529. a.onError && a.onError(b);
  530. throw b
  531. }, 0)
  532. },
  533. p: function (b, c, d) {
  534. var e = a.a.Wb(d);
  535. d = h && m[c];
  536. if (a.options.useOnlyNativeEvents || d || !v)
  537. if (d || "function" != typeof b.addEventListener)
  538. if ("undefined" != typeof b.attachEvent) {
  539. var l = function (a) {
  540. e.call(b, a)
  541. },
  542. f = "on" + c;
  543. b.attachEvent(f, l);
  544. a.a.F.oa(b, function () {
  545. b.detachEvent(f, l)
  546. })
  547. } else throw Error("Browser doesn't support addEventListener or attachEvent");
  548. else b.addEventListener(c, e, !1);
  549. else v(b).bind(c, e)
  550. },
  551. Da: function (b, c) {
  552. if (!b || !b.nodeType) throw Error("element must be a DOM node when calling triggerEvent");
  553. var d;
  554. "input" === a.a.A(b) && b.type && "click" == c.toLowerCase() ? (d = b.type, d = "checkbox" == d || "radio" == d) : d = !1;
  555. if (a.options.useOnlyNativeEvents || !v || d)
  556. if ("function" == typeof u.createEvent)
  557. if ("function" == typeof b.dispatchEvent) d = u.createEvent(l[c] || "HTMLEvents"), d.initEvent(c, !0, !0, x, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, b), b.dispatchEvent(d);
  558. else throw Error("The supplied element doesn't support dispatchEvent");
  559. else if (d && b.click) b.click();
  560. else if ("undefined" != typeof b.fireEvent) b.fireEvent("on" + c);
  561. else throw Error("Browser doesn't support triggering events");
  562. else v(b).trigger(c)
  563. },
  564. c: function (b) {
  565. return a.H(b) ? b() : b
  566. },
  567. zb: function (b) {
  568. return a.H(b) ? b.t() : b
  569. },
  570. bb: function (b, c, d) {
  571. var h;
  572. c && ("object" === typeof b.classList ? (h = b.classList[d ? "add" : "remove"], a.a.q(c.match(r), function (a) {
  573. h.call(b.classList, a)
  574. })) : "string" === typeof b.className.baseVal ? e(b.className, "baseVal", c, d) : e(b, "className", c, d))
  575. },
  576. Za: function (b, c) {
  577. var d = a.a.c(c);
  578. if (null === d || d === n) d = "";
  579. var e = a.f.firstChild(b);
  580. !e || 3 != e.nodeType || a.f.nextSibling(e) ? a.f.da(b, [b.ownerDocument.createTextNode(d)]) : e.data = d;
  581. a.a.Rc(b)
  582. },
  583. rc: function (a, b) {
  584. a.name = b;
  585. if (7 >= h) try {
  586. a.mergeAttributes(u.createElement("<input name='" + a.name + "'/>"), !1)
  587. } catch (c) {}
  588. },
  589. Rc: function (a) {
  590. 9 <= h && (a = 1 == a.nodeType ? a : a.parentNode, a.style && (a.style.zoom = a.style.zoom))
  591. },
  592. Nc: function (a) {
  593. if (h) {
  594. var b = a.style.width;
  595. a.style.width = 0;
  596. a.style.width = b
  597. }
  598. },
  599. hd: function (b, c) {
  600. b = a.a.c(b);
  601. c = a.a.c(c);
  602. for (var d = [], e = b; e <= c; e++) d.push(e);
  603. return d
  604. },
  605. V: function (a) {
  606. for (var b = [], c = 0, d = a.length; c < d; c++) b.push(a[c]);
  607. return b
  608. },
  609. Yb: function (a) {
  610. return g ? Symbol(a) : a
  611. },
  612. rd: 6 === h,
  613. sd: 7 === h,
  614. C: h,
  615. ec: function (b, c) {
  616. for (var d = a.a.V(b.getElementsByTagName("input")).concat(a.a.V(b.getElementsByTagName("textarea"))), e = "string" == typeof c ? function (a) {
  617. return a.name === c
  618. } : function (a) {
  619. return c.test(a.name)
  620. }, h = [], m = d.length - 1; 0 <= m; m--) e(d[m]) && h.push(d[m]);
  621. return h
  622. },
  623. ed: function (b) {
  624. return "string" == typeof b && (b = a.a.$a(b)) ? F && F.parse ? F.parse(b) : new Function("return " + b)() : null
  625. },
  626. Eb: function (b, c, d) {
  627. if (!F || !F.stringify) throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");
  628. return F.stringify(a.a.c(b), c, d)
  629. },
  630. fd: function (c, d, e) {
  631. e = e || {};
  632. var h = e.params || {},
  633. m = e.includeFields || this.cc,
  634. l = c;
  635. if ("object" == typeof c && "form" === a.a.A(c))
  636. for (var l = c.action, f = m.length - 1; 0 <= f; f--)
  637. for (var g = a.a.ec(c, m[f]), k = g.length - 1; 0 <= k; k--) h[g[k].name] = g[k].value;
  638. d = a.a.c(d);
  639. var r = u.createElement("form");
  640. r.style.display = "none";
  641. r.action = l;
  642. r.method = "post";
  643. for (var n in d) c = u.createElement("input"), c.type = "hidden", c.name = n, c.value = a.a.Eb(a.a.c(d[n])), r.appendChild(c);
  644. b(h, function (a, b) {
  645. var c = u.createElement("input");
  646. c.type = "hidden";
  647. c.name = a;
  648. c.value = b;
  649. r.appendChild(c)
  650. });
  651. u.body.appendChild(r);
  652. e.submitter ? e.submitter(r) : r.submit();
  653. setTimeout(function () {
  654. r.parentNode.removeChild(r)
  655. }, 0)
  656. }
  657. }
  658. }();
  659. a.b("utils", a.a);
  660. a.b("utils.arrayForEach", a.a.q);
  661. a.b("utils.arrayFirst", a.a.Sb);
  662. a.b("utils.arrayFilter", a.a.Ka);
  663. a.b("utils.arrayGetDistinctValues", a.a.Tb);
  664. a.b("utils.arrayIndexOf", a.a.o);
  665. a.b("utils.arrayMap", a.a.fb);
  666. a.b("utils.arrayPushAll", a.a.ra);
  667. a.b("utils.arrayRemoveItem", a.a.La);
  668. a.b("utils.extend", a.a.extend);
  669. a.b("utils.fieldsIncludedWithJsonPost", a.a.cc);
  670. a.b("utils.getFormFields", a.a.ec);
  671. a.b("utils.peekObservable", a.a.zb);
  672. a.b("utils.postJson", a.a.fd);
  673. a.b("utils.parseJson", a.a.ed);
  674. a.b("utils.registerEventHandler", a.a.p);
  675. a.b("utils.stringifyJson", a.a.Eb);
  676. a.b("utils.range", a.a.hd);
  677. a.b("utils.toggleDomNodeCssClass", a.a.bb);
  678. a.b("utils.triggerEvent", a.a.Da);
  679. a.b("utils.unwrapObservable", a.a.c);
  680. a.b("utils.objectForEach", a.a.D);
  681. a.b("utils.addOrRemoveItem", a.a.pa);
  682. a.b("utils.setTextContent", a.a.Za);
  683. a.b("unwrap", a.a.c);
  684. Function.prototype.bind || (Function.prototype.bind = function (a) {
  685. var c = this;
  686. if (1 === arguments.length) return function () {
  687. return c.apply(a, arguments)
  688. };
  689. var d = Array.prototype.slice.call(arguments, 1);
  690. return function () {
  691. var e = d.slice(0);
  692. e.push.apply(e, arguments);
  693. return c.apply(a, e)
  694. }
  695. });
  696. a.a.e = new function () {
  697. function a(b, g) {
  698. var k = b[d];
  699. if (!k || "null" === k || !e[k]) {
  700. if (!g) return n;
  701. k = b[d] = "ko" + c++;
  702. e[k] = {}
  703. }
  704. return e[k]
  705. }
  706. var c = 0,
  707. d = "__ko__" + (new Date).getTime(),
  708. e = {};
  709. return {
  710. get: function (c, d) {
  711. var e = a(c, !1);
  712. return e === n ? n : e[d]
  713. },
  714. set: function (c, d, e) {
  715. if (e !== n || a(c, !1) !== n) a(c, !0)[d] = e
  716. },
  717. clear: function (a) {
  718. var b = a[d];
  719. return b ? (delete e[b], a[d] = null, !0) : !1
  720. },
  721. I: function () {
  722. return c++ + d
  723. }
  724. }
  725. };
  726. a.b("utils.domData", a.a.e);
  727. a.b("utils.domData.clear", a.a.e.clear);
  728. a.a.F = new function () {
  729. function b(b, c) {
  730. var e = a.a.e.get(b, d);
  731. e === n && c && (e = [], a.a.e.set(b, d, e));
  732. return e
  733. }
  734. function c(d) {
  735. var e = b(d, !1);
  736. if (e)
  737. for (var e = e.slice(0), l = 0; l < e.length; l++) e[l](d);
  738. a.a.e.clear(d);
  739. a.a.F.cleanExternalData(d);
  740. if (f[d.nodeType])
  741. for (e = d.firstChild; d = e;) e = d.nextSibling, 8 === d.nodeType && c(d)
  742. }
  743. var d = a.a.e.I(),
  744. e = {
  745. 1: !0,
  746. 8: !0,
  747. 9: !0
  748. },
  749. f = {
  750. 1: !0,
  751. 9: !0
  752. };
  753. return {
  754. oa: function (a, c) {
  755. if ("function" != typeof c) throw Error("Callback must be a function");
  756. b(a, !0).push(c)
  757. },
  758. pc: function (c, e) {
  759. var l = b(c, !1);
  760. l && (a.a.La(l, e), 0 == l.length && a.a.e.set(c, d, n))
  761. },
  762. $: function (b) {
  763. if (e[b.nodeType] && (c(b), f[b.nodeType])) {
  764. var d = [];
  765. a.a.ra(d, b.getElementsByTagName("*"));
  766. for (var l = 0, m = d.length; l < m; l++) c(d[l])
  767. }
  768. return b
  769. },
  770. removeNode: function (b) {
  771. a.$(b);
  772. b.parentNode && b.parentNode.removeChild(b)
  773. },
  774. cleanExternalData: function (a) {
  775. v && "function" == typeof v.cleanData && v.cleanData([a])
  776. }
  777. }
  778. };
  779. a.$ = a.a.F.$;
  780. a.removeNode = a.a.F.removeNode;
  781. a.b("cleanNode", a.$);
  782. a.b("removeNode", a.removeNode);
  783. a.b("utils.domNodeDisposal", a.a.F);
  784. a.b("utils.domNodeDisposal.addDisposeCallback", a.a.F.oa);
  785. a.b("utils.domNodeDisposal.removeDisposeCallback", a.a.F.pc);
  786. (function () {
  787. var b = [0, "", ""],
  788. c = [1, "<table>", "</table>"],
  789. d = [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  790. e = [1, "<select multiple='multiple'>", "</select>"],
  791. f = {
  792. thead: c,
  793. tbody: c,
  794. tfoot: c,
  795. tr: [2, "<table><tbody>", "</tbody></table>"],
  796. td: d,
  797. th: d,
  798. option: e,
  799. optgroup: e
  800. },
  801. g = 8 >= a.a.C;
  802. a.a.ma = function (c, d) {
  803. var e;
  804. if (v)
  805. if (v.parseHTML) e = v.parseHTML(c, d) || [];
  806. else {
  807. if ((e = v.clean([c], d)) && e[0]) {
  808. for (var h = e[0]; h.parentNode && 11 !== h.parentNode.nodeType;) h = h.parentNode;
  809. h.parentNode && h.parentNode.removeChild(h)
  810. }
  811. }
  812. else {
  813. (e = d) || (e = u);
  814. var h = e.parentWindow || e.defaultView || x,
  815. r = a.a.$a(c).toLowerCase(),
  816. q = e.createElement("div"),
  817. p;
  818. p = (r = r.match(/^<([a-z]+)[ >]/)) && f[r[1]] || b;
  819. r = p[0];
  820. p = "ignored<div>" + p[1] + c + p[2] + "</div>";
  821. "function" == typeof h.innerShiv ? q.appendChild(h.innerShiv(p)) : (g && e.appendChild(q), q.innerHTML = p, g && q.parentNode.removeChild(q));
  822. for (; r--;) q = q.lastChild;
  823. e = a.a.V(q.lastChild.childNodes)
  824. }
  825. return e
  826. };
  827. a.a.Cb = function (b, c) {
  828. a.a.ob(b);
  829. c = a.a.c(c);
  830. if (null !== c && c !== n)
  831. if ("string" != typeof c && (c = c.toString()), v) v(b).html(c);
  832. else
  833. for (var d = a.a.ma(c, b.ownerDocument), e = 0; e < d.length; e++) b.appendChild(d[e])
  834. }
  835. })();
  836. a.b("utils.parseHtmlFragment", a.a.ma);
  837. a.b("utils.setHtml", a.a.Cb);
  838. a.M = function () {
  839. function b(c, e) {
  840. if (c)
  841. if (8 == c.nodeType) {
  842. var f = a.M.lc(c.nodeValue);
  843. null != f && e.push({
  844. Lc: c,
  845. cd: f
  846. })
  847. } else if (1 == c.nodeType)
  848. for (var f = 0, g = c.childNodes, k = g.length; f < k; f++) b(g[f], e)
  849. }
  850. var c = {};
  851. return {
  852. wb: function (a) {
  853. if ("function" != typeof a) throw Error("You can only pass a function to ko.memoization.memoize()");
  854. var b = (4294967296 * (1 + Math.random()) | 0).toString(16).substring(1) + (4294967296 * (1 + Math.random()) | 0).toString(16).substring(1);
  855. c[b] = a;
  856. return "<!--[ko_memo:" + b + "]-->"
  857. },
  858. xc: function (a, b) {
  859. var f = c[a];
  860. if (f === n) throw Error("Couldn't find any memo with ID " + a + ". Perhaps it's already been unmemoized.");
  861. try {
  862. return f.apply(null, b || []), !0
  863. } finally {
  864. delete c[a]
  865. }
  866. },
  867. yc: function (c, e) {
  868. var f = [];
  869. b(c, f);
  870. for (var g = 0, k = f.length; g < k; g++) {
  871. var l = f[g].Lc,
  872. m = [l];
  873. e && a.a.ra(m, e);
  874. a.M.xc(f[g].cd, m);
  875. l.nodeValue = "";
  876. l.parentNode && l.parentNode.removeChild(l)
  877. }
  878. },
  879. lc: function (a) {
  880. return (a = a.match(/^\[ko_memo\:(.*?)\]$/)) ? a[1] : null
  881. }
  882. }
  883. }();
  884. a.b("memoization", a.M);
  885. a.b("memoization.memoize", a.M.wb);
  886. a.b("memoization.unmemoize", a.M.xc);
  887. a.b("memoization.parseMemoText", a.M.lc);
  888. a.b("memoization.unmemoizeDomNodeAndDescendants", a.M.yc);
  889. a.Y = function () {
  890. function b() {
  891. if (e)
  892. for (var b = e, c = 0, m; g < e;)
  893. if (m = d[g++]) {
  894. if (g > b) {
  895. if (5e3 <= ++c) {
  896. g = e;
  897. a.a.$b(Error("'Too much recursion' after processing " + c + " task groups."));
  898. break
  899. }
  900. b = e
  901. }
  902. try {
  903. m()
  904. } catch (h) {
  905. a.a.$b(h)
  906. }
  907. }
  908. }
  909. function c() {
  910. b();
  911. g = e = d.length = 0
  912. }
  913. var d = [],
  914. e = 0,
  915. f = 1,
  916. g = 0;
  917. return {
  918. scheduler: x.MutationObserver ? function (a) {
  919. var b = u.createElement("div");
  920. new MutationObserver(a).observe(b, {
  921. attributes: !0
  922. });
  923. return function () {
  924. b.classList.toggle("foo")
  925. }
  926. }(c) : u && "onreadystatechange" in u.createElement("script") ? function (a) {
  927. var b = u.createElement("script");
  928. b.onreadystatechange = function () {
  929. b.onreadystatechange = null;
  930. u.documentElement.removeChild(b);
  931. b = null;
  932. a()
  933. };
  934. u.documentElement.appendChild(b)
  935. } : function (a) {
  936. setTimeout(a, 0)
  937. },
  938. Wa: function (b) {
  939. e || a.Y.scheduler(c);
  940. d[e++] = b;
  941. return f++
  942. },
  943. cancel: function (a) {
  944. a -= f - e;
  945. a >= g && a < e && (d[a] = null)
  946. },
  947. resetForTesting: function () {
  948. var a = e - g;
  949. g = e = d.length = 0;
  950. return a
  951. },
  952. md: b
  953. }
  954. }();
  955. a.b("tasks", a.Y);
  956. a.b("tasks.schedule", a.Y.Wa);
  957. a.b("tasks.runEarly", a.Y.md);
  958. a.ya = {
  959. throttle: function (b, c) {
  960. b.throttleEvaluation = c;
  961. var d = null;
  962. return a.B({
  963. read: b,
  964. write: function (e) {
  965. clearTimeout(d);
  966. d = a.a.setTimeout(function () {
  967. b(e)
  968. }, c)
  969. }
  970. })
  971. },
  972. rateLimit: function (a, c) {
  973. var d, e, f;
  974. "number" == typeof c ? d = c : (d = c.timeout, e = c.method);
  975. a.cb = !1;
  976. f = "notifyWhenChangesStop" == e ? V : U;
  977. a.Ta(function (a) {
  978. return f(a, d)
  979. })
  980. },
  981. deferred: function (b, c) {
  982. if (!0 !== c) throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");
  983. b.cb || (b.cb = !0, b.Ta(function (c) {
  984. var e;
  985. return function () {
  986. a.Y.cancel(e);
  987. e = a.Y.Wa(c);
  988. b.notifySubscribers(n, "dirty")
  989. }
  990. }))
  991. },
  992. notify: function (a, c) {
  993. a.equalityComparer = "always" == c ? null : J
  994. }
  995. };
  996. var T = {
  997. undefined: 1,
  998. "boolean": 1,
  999. number: 1,
  1000. string: 1
  1001. };
  1002. a.b("extenders", a.ya);
  1003. a.vc = function (b, c, d) {
  1004. this.ia = b;
  1005. this.gb = c;
  1006. this.Kc = d;
  1007. this.R = !1;
  1008. a.G(this, "dispose", this.k)
  1009. };
  1010. a.vc.prototype.k = function () {
  1011. this.R = !0;
  1012. this.Kc()
  1013. };
  1014. a.J = function () {
  1015. a.a.Ya(this, D);
  1016. D.rb(this)
  1017. };
  1018. var I = "change",
  1019. D = {
  1020. rb: function (a) {
  1021. a.K = {};
  1022. a.Nb = 1
  1023. },
  1024. X: function (b, c, d) {
  1025. var e = this;
  1026. d = d || I;
  1027. var f = new a.vc(e, c ? b.bind(c) : b, function () {
  1028. a.a.La(e.K[d], f);
  1029. e.Ia && e.Ia(d)
  1030. });
  1031. e.sa && e.sa(d);
  1032. e.K[d] || (e.K[d] = []);
  1033. e.K[d].push(f);
  1034. return f
  1035. },
  1036. notifySubscribers: function (b, c) {
  1037. c = c || I;
  1038. c === I && this.zc();
  1039. if (this.Pa(c)) try {
  1040. a.l.Ub();
  1041. for (var d = this.K[c].slice(0), e = 0, f; f = d[e]; ++e) f.R || f.gb(b)
  1042. } finally {
  1043. a.l.end()
  1044. }
  1045. },
  1046. Na: function () {
  1047. return this.Nb
  1048. },
  1049. Uc: function (a) {
  1050. return this.Na() !== a
  1051. },
  1052. zc: function () {
  1053. ++this.Nb
  1054. },
  1055. Ta: function (b) {
  1056. var c = this,
  1057. d = a.H(c),
  1058. e, f, g;
  1059. c.Ha || (c.Ha = c.notifySubscribers, c.notifySubscribers = W);
  1060. var k = b(function () {
  1061. c.Mb = !1;
  1062. d && g === c && (g = c());
  1063. e = !1;
  1064. c.tb(f, g) && c.Ha(f = g)
  1065. });
  1066. c.Lb = function (a) {
  1067. c.Mb = e = !0;
  1068. g = a;
  1069. k()
  1070. };
  1071. c.Kb = function (a) {
  1072. e || (f = a, c.Ha(a, "beforeChange"))
  1073. }
  1074. },
  1075. Pa: function (a) {
  1076. return this.K[a] && this.K[a].length
  1077. },
  1078. Sc: function (b) {
  1079. if (b) return this.K[b] && this.K[b].length || 0;
  1080. var c = 0;
  1081. a.a.D(this.K, function (a, b) {
  1082. "dirty" !== a && (c += b.length)
  1083. });
  1084. return c
  1085. },
  1086. tb: function (a, c) {
  1087. return !this.equalityComparer || !this.equalityComparer(a, c)
  1088. },
  1089. extend: function (b) {
  1090. var c = this;
  1091. b && a.a.D(b, function (b, e) {
  1092. var f = a.ya[b];
  1093. "function" == typeof f && (c = f(c, e) || c)
  1094. });
  1095. return c
  1096. }
  1097. };
  1098. a.G(D, "subscribe", D.X);
  1099. a.G(D, "extend", D.extend);
  1100. a.G(D, "getSubscriptionsCount", D.Sc);
  1101. a.a.ka && a.a.Xa(D, Function.prototype);
  1102. a.J.fn = D;
  1103. a.hc = function (a) {
  1104. return null != a && "function" == typeof a.X && "function" == typeof a.notifySubscribers
  1105. };
  1106. a.b("subscribable", a.J);
  1107. a.b("isSubscribable", a.hc);
  1108. a.va = a.l = function () {
  1109. function b(a) {
  1110. d.push(e);
  1111. e = a
  1112. }
  1113. function c() {
  1114. e = d.pop()
  1115. }
  1116. var d = [],
  1117. e, f = 0;
  1118. return {
  1119. Ub: b,
  1120. end: c,
  1121. oc: function (b) {
  1122. if (e) {
  1123. if (!a.hc(b)) throw Error("Only subscribable things can act as dependencies");
  1124. e.gb.call(e.Gc, b, b.Cc || (b.Cc = ++f))
  1125. }
  1126. },
  1127. w: function (a, d, e) {
  1128. try {
  1129. return b(), a.apply(d, e || [])
  1130. } finally {
  1131. c()
  1132. }
  1133. },
  1134. Aa: function () {
  1135. if (e) return e.m.Aa()
  1136. },
  1137. Sa: function () {
  1138. if (e) return e.Sa
  1139. }
  1140. }
  1141. }();
  1142. a.b("computedContext", a.va);
  1143. a.b("computedContext.getDependenciesCount", a.va.Aa);
  1144. a.b("computedContext.isInitial", a.va.Sa);
  1145. a.b("ignoreDependencies", a.qd = a.l.w);
  1146. var E = a.a.Yb("_latestValue");
  1147. a.N = function (b) {
  1148. function c() {
  1149. if (0 < arguments.length) return c.tb(c[E], arguments[0]) && (c.ga(), c[E] = arguments[0], c.fa()), this;
  1150. a.l.oc(c);
  1151. return c[E]
  1152. }
  1153. c[E] = b;
  1154. a.a.ka || a.a.extend(c, a.J.fn);
  1155. a.J.fn.rb(c);
  1156. a.a.Ya(c, B);
  1157. a.options.deferUpdates && a.ya.deferred(c, !0);
  1158. return c
  1159. };
  1160. var B = {
  1161. equalityComparer: J,
  1162. t: function () {
  1163. return this[E]
  1164. },
  1165. fa: function () {
  1166. this.notifySubscribers(this[E])
  1167. },
  1168. ga: function () {
  1169. this.notifySubscribers(this[E], "beforeChange")
  1170. }
  1171. };
  1172. a.a.ka && a.a.Xa(B, a.J.fn);
  1173. var H = a.N.gd = "__ko_proto__";
  1174. B[H] = a.N;
  1175. a.Oa = function (b, c) {
  1176. return null === b || b === n || b[H] === n ? !1 : b[H] === c ? !0 : a.Oa(b[H], c)
  1177. };
  1178. a.H = function (b) {
  1179. return a.Oa(b, a.N)
  1180. };
  1181. a.Ba = function (b) {
  1182. return "function" == typeof b && b[H] === a.N || "function" == typeof b && b[H] === a.B && b.Vc ? !0 : !1
  1183. };
  1184. a.b("observable", a.N);
  1185. a.b("isObservable", a.H);
  1186. a.b("isWriteableObservable", a.Ba);
  1187. a.b("isWritableObservable", a.Ba);
  1188. a.b("observable.fn", B);
  1189. a.G(B, "peek", B.t);
  1190. a.G(B, "valueHasMutated", B.fa);
  1191. a.G(B, "valueWillMutate", B.ga);
  1192. a.la = function (b) {
  1193. b = b || [];
  1194. if ("object" != typeof b || !("length" in b)) throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");
  1195. b = a.N(b);
  1196. a.a.Ya(b, a.la.fn);
  1197. return b.extend({
  1198. trackArrayChanges: !0
  1199. })
  1200. };
  1201. a.la.fn = {
  1202. remove: function (b) {
  1203. for (var c = this.t(), d = [], e = "function" != typeof b || a.H(b) ? function (a) {
  1204. return a === b
  1205. } : b, f = 0; f < c.length; f++) {
  1206. var g = c[f];
  1207. e(g) && (0 === d.length && this.ga(), d.push(g), c.splice(f, 1), f--)
  1208. }
  1209. d.length && this.fa();
  1210. return d
  1211. },
  1212. removeAll: function (b) {
  1213. if (b === n) {
  1214. var c = this.t(),
  1215. d = c.slice(0);
  1216. this.ga();
  1217. c.splice(0, c.length);
  1218. this.fa();
  1219. return d
  1220. }
  1221. return b ? this.remove(function (c) {
  1222. return 0 <= a.a.o(b, c)
  1223. }) : []
  1224. },
  1225. destroy: function (b) {
  1226. var c = this.t(),
  1227. d = "function" != typeof b || a.H(b) ? function (a) {
  1228. return a === b
  1229. } : b;
  1230. this.ga();
  1231. for (var e = c.length - 1; 0 <= e; e--) d(c[e]) && (c[e]._destroy = !0);
  1232. this.fa()
  1233. },
  1234. destroyAll: function (b) {
  1235. return b === n ? this.destroy(function () {
  1236. return !0
  1237. }) : b ? this.destroy(function (c) {
  1238. return 0 <= a.a.o(b, c)
  1239. }) : []
  1240. },
  1241. indexOf: function (b) {
  1242. var c = this();
  1243. return a.a.o(c, b)
  1244. },
  1245. replace: function (a, c) {
  1246. var d = this.indexOf(a);
  1247. 0 <= d && (this.ga(), this.t()[d] = c, this.fa())
  1248. }
  1249. };
  1250. a.a.ka && a.a.Xa(a.la.fn, a.N.fn);
  1251. a.a.q("pop push reverse shift sort splice unshift".split(" "), function (b) {
  1252. a.la.fn[b] = function () {
  1253. var a = this.t();
  1254. this.ga();
  1255. this.Vb(a, b, arguments);
  1256. var d = a[b].apply(a, arguments);
  1257. this.fa();
  1258. return d === a ? this : d
  1259. }
  1260. });
  1261. a.a.q(["slice"], function (b) {
  1262. a.la.fn[b] = function () {
  1263. var a = this();
  1264. return a[b].apply(a, arguments)
  1265. }
  1266. });
  1267. a.b("observableArray", a.la);
  1268. a.ya.trackArrayChanges = function (b, c) {
  1269. function d() {
  1270. if (!e) {
  1271. e = !0;
  1272. var c = b.notifySubscribers;
  1273. b.notifySubscribers = function (a, b) {
  1274. b && b !== I || ++k;
  1275. return c.apply(this, arguments)
  1276. };
  1277. var d = [].concat(b.t() || []);
  1278. f = null;
  1279. g = b.X(function (c) {
  1280. c = [].concat(c || []);
  1281. if (b.Pa("arrayChange")) {
  1282. var e;
  1283. if (!f || 1 < k) f = a.a.ib(d, c, b.hb);
  1284. e = f
  1285. }
  1286. d = c;
  1287. f = null;
  1288. k = 0;
  1289. e && e.length && b.notifySubscribers(e, "arrayChange")
  1290. })
  1291. }
  1292. }
  1293. b.hb = {};
  1294. c && "object" == typeof c && a.a.extend(b.hb, c);
  1295. b.hb.sparse = !0;
  1296. if (!b.Vb) {
  1297. var e = !1,
  1298. f = null,
  1299. g, k = 0,
  1300. l = b.sa,
  1301. m = b.Ia;
  1302. b.sa = function (a) {
  1303. l && l.call(b, a);
  1304. "arrayChange" === a && d()
  1305. };
  1306. b.Ia = function (a) {
  1307. m && m.call(b, a);
  1308. "arrayChange" !== a || b.Pa("arrayChange") || (g.k(), e = !1)
  1309. };
  1310. b.Vb = function (b, c, d) {
  1311. function m(a, b, c) {
  1312. return l[l.length] = {
  1313. status: a,
  1314. value: b,
  1315. index: c
  1316. }
  1317. }
  1318. if (e && !k) {
  1319. var l = [],
  1320. g = b.length,
  1321. t = d.length,
  1322. G = 0;
  1323. switch (c) {
  1324. case "push":
  1325. G = g;
  1326. case "unshift":
  1327. for (c = 0; c < t; c++) m("added", d[c], G + c);
  1328. break;
  1329. case "pop":
  1330. G = g - 1;
  1331. case "shift":
  1332. g && m("deleted", b[G], G);
  1333. break;
  1334. case "splice":
  1335. c = Math.min(Math.max(0, 0 > d[0] ? g + d[0] : d[0]), g);
  1336. for (var g = 1 === t ? g : Math.min(c + (d[1] || 0), g), t = c + t - 2, G = Math.max(g, t), P = [], n = [], Q = 2; c < G; ++c, ++Q) c < g && n.push(m("deleted", b[c], c)), c < t && P.push(m("added", d[Q], c));
  1337. a.a.dc(n, P);
  1338. break;
  1339. default:
  1340. return
  1341. }
  1342. f = l
  1343. }
  1344. }
  1345. }
  1346. };
  1347. var s = a.a.Yb("_state");
  1348. a.m = a.B = function (b, c, d) {
  1349. function e() {
  1350. if (0 < arguments.length) {
  1351. if ("function" === typeof f) f.apply(g.pb, arguments);
  1352. else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");
  1353. return this
  1354. }
  1355. a.l.oc(e);
  1356. (g.S || g.s && e.Qa()) && e.aa();
  1357. return g.T
  1358. }
  1359. "object" === typeof b ? d = b : (d = d || {}, b && (d.read = b));
  1360. if ("function" != typeof d.read) throw Error("Pass a function that returns the value of the ko.computed");
  1361. var f = d.write,
  1362. g = {
  1363. T: n,
  1364. S: !0,
  1365. Ra: !1,
  1366. Fb: !1,
  1367. R: !1,
  1368. Va: !1,
  1369. s: !1,
  1370. jd: d.read,
  1371. pb: c || d.owner,
  1372. i: d.disposeWhenNodeIsRemoved || d.i || null,
  1373. wa: d.disposeWhen || d.wa,
  1374. mb: null,
  1375. r: {},
  1376. L: 0,
  1377. bc: null
  1378. };
  1379. e[s] = g;
  1380. e.Vc = "function" === typeof f;
  1381. a.a.ka || a.a.extend(e, a.J.fn);
  1382. a.J.fn.rb(e);
  1383. a.a.Ya(e, z);
  1384. d.pure ? (g.Va = !0, g.s = !0, a.a.extend(e, $)) : d.deferEvaluation && a.a.extend(e, aa);
  1385. a.options.deferUpdates && a.ya.deferred(e, !0);
  1386. g.i && (g.Fb = !0, g.i.nodeType || (g.i = null));
  1387. g.s || d.deferEvaluation || e.aa();
  1388. g.i && e.ba() && a.a.F.oa(g.i, g.mb = function () {
  1389. e.k()
  1390. });
  1391. return e
  1392. };
  1393. var z = {
  1394. equalityComparer: J,
  1395. Aa: function () {
  1396. return this[s].L
  1397. },
  1398. Pb: function (a, c, d) {
  1399. if (this[s].Va && c === this) throw Error("A 'pure' computed must not be called recursively");
  1400. this[s].r[a] = d;
  1401. d.Ga = this[s].L++;
  1402. d.na = c.Na()
  1403. },
  1404. Qa: function () {
  1405. var a, c, d = this[s].r;
  1406. for (a in d)
  1407. if (d.hasOwnProperty(a) && (c = d[a], c.ia.Uc(c.na))) return !0
  1408. },
  1409. bd: function () {
  1410. this.Fa && !this[s].Ra && this.Fa()
  1411. },
  1412. ba: function () {
  1413. return this[s].S || 0 < this[s].L
  1414. },
  1415. ld: function () {
  1416. this.Mb || this.ac()
  1417. },
  1418. uc: function (a) {
  1419. if (a.cb && !this[s].i) {
  1420. var c = a.X(this.bd, this, "dirty"),
  1421. d = a.X(this.ld, this);
  1422. return {
  1423. ia: a,
  1424. k: function () {
  1425. c.k();
  1426. d.k()
  1427. }
  1428. }
  1429. }
  1430. return a.X(this.ac, this)
  1431. },
  1432. ac: function () {
  1433. var b = this,
  1434. c = b.throttleEvaluation;
  1435. c && 0 <= c ? (clearTimeout(this[s].bc), this[s].bc = a.a.setTimeout(function () {
  1436. b.aa(!0)
  1437. }, c)) : b.Fa ? b.Fa() : b.aa(!0)
  1438. },
  1439. aa: function (b) {
  1440. var c = this[s],
  1441. d = c.wa;
  1442. if (!c.Ra && !c.R) {
  1443. if (c.i && !a.a.nb(c.i) || d && d()) {
  1444. if (!c.Fb) {
  1445. this.k();
  1446. return
  1447. }
  1448. } else c.Fb = !1;
  1449. c.Ra = !0;
  1450. try {
  1451. this.Qc(b)
  1452. } finally {
  1453. c.Ra = !1
  1454. }
  1455. c.L || this.k()
  1456. }
  1457. },
  1458. Qc: function (b) {
  1459. var c = this[s],
  1460. d = c.Va ? n : !c.L,
  1461. e = {
  1462. Hc: this,
  1463. Ma: c.r,
  1464. lb: c.L
  1465. };
  1466. a.l.Ub({
  1467. Gc: e,
  1468. gb: Y,
  1469. m: this,
  1470. Sa: d
  1471. });
  1472. c.r = {};
  1473. c.L = 0;
  1474. e = this.Pc(c, e);
  1475. this.tb(c.T, e) && (c.s || this.notifySubscribers(c.T, "beforeChange"), c.T = e, c.s ? this.zc() : b && this.notifySubscribers(c.T));
  1476. d && this.notifySubscribers(c.T, "awake")
  1477. },
  1478. Pc: function (b, c) {
  1479. try {
  1480. var d = b.jd;
  1481. return b.pb ? d.call(b.pb) : d()
  1482. } finally {
  1483. a.l.end(), c.lb && !b.s && a.a.D(c.Ma, X), b.S = !1
  1484. }
  1485. },
  1486. t: function () {
  1487. var a = this[s];
  1488. (a.S && !a.L || a.s && this.Qa()) && this.aa();
  1489. return a.T
  1490. },
  1491. Ta: function (b) {
  1492. a.J.fn.Ta.call(this, b);
  1493. this.Fa = function () {
  1494. this.Kb(this[s].T);
  1495. this[s].S = !0;
  1496. this.Lb(this)
  1497. }
  1498. },
  1499. k: function () {
  1500. var b = this[s];
  1501. !b.s && b.r && a.a.D(b.r, function (a, b) {
  1502. b.k && b.k()
  1503. });
  1504. b.i && b.mb && a.a.F.pc(b.i, b.mb);
  1505. b.r = null;
  1506. b.L = 0;
  1507. b.R = !0;
  1508. b.S = !1;
  1509. b.s = !1;
  1510. b.i = null
  1511. }
  1512. },
  1513. $ = {
  1514. sa: function (b) {
  1515. var c = this,
  1516. d = c[s];
  1517. if (!d.R && d.s && "change" == b) {
  1518. d.s = !1;
  1519. if (d.S || c.Qa()) d.r = null, d.L = 0, d.S = !0, c.aa();
  1520. else {
  1521. var e = [];
  1522. a.a.D(d.r, function (a, b) {
  1523. e[b.Ga] = a
  1524. });
  1525. a.a.q(e, function (a, b) {
  1526. var e = d.r[a],
  1527. l = c.uc(e.ia);
  1528. l.Ga = b;
  1529. l.na = e.na;
  1530. d.r[a] = l
  1531. })
  1532. }
  1533. d.R || c.notifySubscribers(d.T, "awake")
  1534. }
  1535. },
  1536. Ia: function (b) {
  1537. var c = this[s];
  1538. c.R || "change" != b || this.Pa("change") || (a.a.D(c.r, function (a, b) {
  1539. b.k && (c.r[a] = {
  1540. ia: b.ia,
  1541. Ga: b.Ga,
  1542. na: b.na
  1543. }, b.k())
  1544. }), c.s = !0, this.notifySubscribers(n, "asleep"))
  1545. },
  1546. Na: function () {
  1547. var b = this[s];
  1548. b.s && (b.S || this.Qa()) && this.aa();
  1549. return a.J.fn.Na.call(this)
  1550. }
  1551. },
  1552. aa = {
  1553. sa: function (a) {
  1554. "change" != a && "beforeChange" != a || this.t()
  1555. }
  1556. };
  1557. a.a.ka && a.a.Xa(z, a.J.fn);
  1558. var R = a.N.gd;
  1559. a.m[R] = a.N;
  1560. z[R] = a.m;
  1561. a.Xc = function (b) {
  1562. return a.Oa(b, a.m)
  1563. };
  1564. a.Yc = function (b) {
  1565. return a.Oa(b, a.m) && b[s] && b[s].Va
  1566. };
  1567. a.b("computed", a.m);
  1568. a.b("dependentObservable", a.m);
  1569. a.b("isComputed", a.Xc);
  1570. a.b("isPureComputed", a.Yc);
  1571. a.b("computed.fn", z);
  1572. a.G(z, "peek", z.t);
  1573. a.G(z, "dispose", z.k);
  1574. a.G(z, "isActive", z.ba);
  1575. a.G(z, "getDependenciesCount", z.Aa);
  1576. a.nc = function (b, c) {
  1577. if ("function" === typeof b) return a.m(b, c, {
  1578. pure: !0
  1579. });
  1580. b = a.a.extend({}, b);
  1581. b.pure = !0;
  1582. return a.m(b, c)
  1583. };
  1584. a.b("pureComputed", a.nc);
  1585. (function () {
  1586. function b(a, f, g) {
  1587. g = g || new d;
  1588. a = f(a);
  1589. if ("object" != typeof a || null === a || a === n || a instanceof RegExp || a instanceof Date || a instanceof String || a instanceof Number || a instanceof Boolean) return a;
  1590. var k = a instanceof Array ? [] : {};
  1591. g.save(a, k);
  1592. c(a, function (c) {
  1593. var d = f(a[c]);
  1594. switch (typeof d) {
  1595. case "boolean":
  1596. case "number":
  1597. case "string":
  1598. case "function":
  1599. k[c] = d;
  1600. break;
  1601. case "object":
  1602. case "undefined":
  1603. var h = g.get(d);
  1604. k[c] = h !== n ? h : b(d, f, g)
  1605. }
  1606. });
  1607. return k
  1608. }
  1609. function c(a, b) {
  1610. if (a instanceof Array) {
  1611. for (var c = 0; c < a.length; c++) b(c);
  1612. "function" == typeof a.toJSON && b("toJSON")
  1613. } else
  1614. for (c in a) b(c)
  1615. }
  1616. function d() {
  1617. this.keys = [];
  1618. this.Ib = []
  1619. }
  1620. a.wc = function (c) {
  1621. if (0 == arguments.length) throw Error("When calling ko.toJS, pass the object you want to convert.");
  1622. return b(c, function (b) {
  1623. for (var c = 0; a.H(b) && 10 > c; c++) b = b();
  1624. return b
  1625. })
  1626. };
  1627. a.toJSON = function (b, c, d) {
  1628. b = a.wc(b);
  1629. return a.a.Eb(b, c, d)
  1630. };
  1631. d.prototype = {
  1632. save: function (b, c) {
  1633. var d = a.a.o(this.keys, b);
  1634. 0 <= d ? this.Ib[d] = c : (this.keys.push(b), this.Ib.push(c))
  1635. },
  1636. get: function (b) {
  1637. b = a.a.o(this.keys, b);
  1638. return 0 <= b ? this.Ib[b] : n
  1639. }
  1640. }
  1641. })();
  1642. a.b("toJS", a.wc);
  1643. a.b("toJSON", a.toJSON);
  1644. (function () {
  1645. a.j = {
  1646. u: function (b) {
  1647. switch (a.a.A(b)) {
  1648. case "option":
  1649. return !0 === b.__ko__hasDomDataOptionValue__ ? a.a.e.get(b, a.d.options.xb) : 7 >= a.a.C ? b.getAttributeNode("value") && b.getAttributeNode("value").specified ? b.value : b.text : b.value;
  1650. case "select":
  1651. return 0 <= b.selectedIndex ? a.j.u(b.options[b.selectedIndex]) : n;
  1652. default:
  1653. return b.value
  1654. }
  1655. },
  1656. ha: function (b, c, d) {
  1657. switch (a.a.A(b)) {
  1658. case "option":
  1659. switch (typeof c) {
  1660. case "string":
  1661. a.a.e.set(b, a.d.options.xb, n);
  1662. "__ko__hasDomDataOptionValue__" in b && delete b.__ko__hasDomDataOptionValue__;
  1663. b.value = c;
  1664. break;
  1665. default:
  1666. a.a.e.set(b, a.d.options.xb, c), b.__ko__hasDomDataOptionValue__ = !0, b.value = "number" === typeof c ? c : ""
  1667. }
  1668. break;
  1669. case "select":
  1670. if ("" === c || null === c) c = n;
  1671. for (var e = -1, f = 0, g = b.options.length, k; f < g; ++f)
  1672. if (k = a.j.u(b.options[f]), k == c || "" == k && c === n) {
  1673. e = f;
  1674. break
  1675. }
  1676. if (d || 0 <= e || c === n && 1 < b.size) b.selectedIndex = e;
  1677. break;
  1678. default:
  1679. if (null === c || c === n) c = "";
  1680. b.value = c
  1681. }
  1682. }
  1683. }
  1684. })();
  1685. a.b("selectExtensions", a.j);
  1686. a.b("selectExtensions.readValue", a.j.u);
  1687. a.b("selectExtensions.writeValue", a.j.ha);
  1688. a.h = function () {
  1689. function b(b) {
  1690. b = a.a.$a(b);
  1691. 123 === b.charCodeAt(0) && (b = b.slice(1, -1));
  1692. var c = [],
  1693. d = b.match(e),
  1694. r, k = [],
  1695. p = 0;
  1696. if (d) {
  1697. d.push(",");
  1698. for (var A = 0, y; y = d[A]; ++A) {
  1699. var t = y.charCodeAt(0);
  1700. if (44 === t) {
  1701. if (0 >= p) {
  1702. c.push(r && k.length ? {
  1703. key: r,
  1704. value: k.join("")
  1705. } : {
  1706. unknown: r || k.join("")
  1707. });
  1708. r = p = 0;
  1709. k = [];
  1710. continue
  1711. }
  1712. } else if (58 === t) {
  1713. if (!p && !r && 1 === k.length) {
  1714. r = k.pop();
  1715. continue
  1716. }
  1717. } else 47 === t && A && 1 < y.length ? (t = d[A - 1].match(f)) && !g[t[0]] && (b = b.substr(b.indexOf(y) + 1), d = b.match(e), d.push(","), A = -1, y = "/") : 40 === t || 123 === t || 91 === t ? ++p : 41 === t || 125 === t || 93 === t ? --p : r || k.length || 34 !== t && 39 !== t || (y = y.slice(1, -1));
  1718. k.push(y)
  1719. }
  1720. }
  1721. return c
  1722. }
  1723. var c = ["true", "false", "null", "undefined"],
  1724. d = /^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,
  1725. e = RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]", "g"),
  1726. f = /[\])"'A-Za-z0-9_$]+$/,
  1727. g = {
  1728. "in": 1,
  1729. "return": 1,
  1730. "typeof": 1
  1731. },
  1732. k = {};
  1733. return {
  1734. ta: [],
  1735. ea: k,
  1736. yb: b,
  1737. Ua: function (e, m) {
  1738. function h(b, e) {
  1739. var m;
  1740. if (!A) {
  1741. var l = a.getBindingHandler(b);
  1742. if (l && l.preprocess && !(e = l.preprocess(e, b, h))) return;
  1743. if (l = k[b]) m = e, 0 <= a.a.o(c, m) ? m = !1 : (l = m.match(d), m = null === l ? !1 : l[1] ? "Object(" + l[1] + ")" + l[2] : m), l = m;
  1744. l && g.push("'" + b + "':function(_z){" + m + "=_z}")
  1745. }
  1746. p && (e = "function(){return " + e + " }");
  1747. f.push("'" + b + "':" + e)
  1748. }
  1749. m = m || {};
  1750. var f = [],
  1751. g = [],
  1752. p = m.valueAccessors,
  1753. A = m.bindingParams,
  1754. y = "string" === typeof e ? b(e) : e;
  1755. a.a.q(y, function (a) {
  1756. h(a.key || a.unknown, a.value)
  1757. });
  1758. g.length && h("_ko_property_writers", "{" + g.join(",") + " }");
  1759. return f.join(",")
  1760. },
  1761. ad: function (a, b) {
  1762. for (var c = 0; c < a.length; c++)
  1763. if (a[c].key == b) return !0;
  1764. return !1
  1765. },
  1766. Ea: function (b, c, d, e, f) {
  1767. if (b && a.H(b)) !a.Ba(b) || f && b.t() === e || b(e);
  1768. else if ((b = c.get("_ko_property_writers")) && b[d]) b[d](e)
  1769. }
  1770. }
  1771. }();
  1772. a.b("expressionRewriting", a.h);
  1773. a.b("expressionRewriting.bindingRewriteValidators", a.h.ta);
  1774. a.b("expressionRewriting.parseObjectLiteral", a.h.yb);
  1775. a.b("expressionRewriting.preProcessBindings", a.h.Ua);
  1776. a.b("expressionRewriting._twoWayBindings", a.h.ea);
  1777. a.b("jsonExpressionRewriting", a.h);
  1778. a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson", a.h.Ua);
  1779. (function () {
  1780. function b(a) {
  1781. return 8 == a.nodeType && g.test(f ? a.text : a.nodeValue)
  1782. }
  1783. function c(a) {
  1784. return 8 == a.nodeType && k.test(f ? a.text : a.nodeValue)
  1785. }
  1786. function d(a, d) {
  1787. for (var e = a, f = 1, l = []; e = e.nextSibling;) {
  1788. if (c(e) && (f--, 0 === f)) return l;
  1789. l.push(e);
  1790. b(e) && f++
  1791. }
  1792. if (!d) throw Error("Cannot find closing comment tag to match: " + a.nodeValue);
  1793. return null
  1794. }
  1795. function e(a, b) {
  1796. var c = d(a, b);
  1797. return c ? 0 < c.length ? c[c.length - 1].nextSibling : a.nextSibling : null
  1798. }
  1799. var f = u && "<!--test-->" === u.createComment("test").text,
  1800. g = f ? /^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/ : /^\s*ko(?:\s+([\s\S]+))?\s*$/,
  1801. k = f ? /^\x3c!--\s*\/ko\s*--\x3e$/ : /^\s*\/ko\s*$/,
  1802. l = {
  1803. ul: !0,
  1804. ol: !0
  1805. };
  1806. a.f = {
  1807. Z: {},
  1808. childNodes: function (a) {
  1809. return b(a) ? d(a) : a.childNodes
  1810. },
  1811. xa: function (c) {
  1812. if (b(c)) {
  1813. c = a.f.childNodes(c);
  1814. for (var d = 0, e = c.length; d < e; d++) a.removeNode(c[d])
  1815. } else a.a.ob(c)
  1816. },
  1817. da: function (c, d) {
  1818. if (b(c)) {
  1819. a.f.xa(c);
  1820. for (var e = c.nextSibling, f = 0, l = d.length; f < l; f++) e.parentNode.insertBefore(d[f], e)
  1821. } else a.a.da(c, d)
  1822. },
  1823. mc: function (a, c) {
  1824. b(a) ? a.parentNode.insertBefore(c, a.nextSibling) : a.firstChild ? a.insertBefore(c, a.firstChild) : a.appendChild(c)
  1825. },
  1826. gc: function (c, d, e) {
  1827. e ? b(c) ? c.parentNode.insertBefore(d, e.nextSibling) : e.nextSibling ? c.insertBefore(d, e.nextSibling) : c.appendChild(d) : a.f.mc(c, d)
  1828. },
  1829. firstChild: function (a) {
  1830. return b(a) ? !a.nextSibling || c(a.nextSibling) ? null : a.nextSibling : a.firstChild
  1831. },
  1832. nextSibling: function (a) {
  1833. b(a) && (a = e(a));
  1834. return a.nextSibling && c(a.nextSibling) ? null : a.nextSibling
  1835. },
  1836. Tc: b,
  1837. pd: function (a) {
  1838. return (a = (f ? a.text : a.nodeValue).match(g)) ? a[1] : null
  1839. },
  1840. kc: function (d) {
  1841. if (l[a.a.A(d)]) {
  1842. var h = d.firstChild;
  1843. if (h) {
  1844. do
  1845. if (1 === h.nodeType) {
  1846. var f;
  1847. f = h.firstChild;
  1848. var g = null;
  1849. if (f) {
  1850. do
  1851. if (g) g.push(f);
  1852. else if (b(f)) {
  1853. var k = e(f, !0);
  1854. k ? f = k : g = [f]
  1855. } else c(f) && (g = [f]);
  1856. while (f = f.nextSibling)
  1857. }
  1858. if (f = g)
  1859. for (g = h.nextSibling, k = 0; k < f.length; k++) g ? d.insertBefore(f[k], g) : d.appendChild(f[k])
  1860. }
  1861. while (h = h.nextSibling)
  1862. }
  1863. }
  1864. }
  1865. }
  1866. })();
  1867. a.b("virtualElements", a.f);
  1868. a.b("virtualElements.allowedBindings", a.f.Z);
  1869. a.b("virtualElements.emptyNode", a.f.xa);
  1870. a.b("virtualElements.insertAfter", a.f.gc);
  1871. a.b("virtualElements.prepend", a.f.mc);
  1872. a.b("virtualElements.setDomNodeChildren", a.f.da);
  1873. (function () {
  1874. a.Q = function () {
  1875. this.Fc = {}
  1876. };
  1877. a.a.extend(a.Q.prototype, {
  1878. nodeHasBindings: function (b) {
  1879. switch (b.nodeType) {
  1880. case 1:
  1881. return null != b.getAttribute("data-bind") || a.g.getComponentNameForNode(b);
  1882. case 8:
  1883. return a.f.Tc(b);
  1884. default:
  1885. return !1
  1886. }
  1887. },
  1888. getBindings: function (b, c) {
  1889. var d = this.getBindingsString(b, c),
  1890. d = d ? this.parseBindingsString(d, c, b) : null;
  1891. return a.g.Ob(d, b, c, !1)
  1892. },
  1893. getBindingAccessors: function (b, c) {
  1894. var d = this.getBindingsString(b, c),
  1895. d = d ? this.parseBindingsString(d, c, b, {
  1896. valueAccessors: !0
  1897. }) : null;
  1898. return a.g.Ob(d, b, c, !0)
  1899. },
  1900. getBindingsString: function (b) {
  1901. switch (b.nodeType) {
  1902. case 1:
  1903. return b.getAttribute("data-bind");
  1904. case 8:
  1905. return a.f.pd(b);
  1906. default:
  1907. return null
  1908. }
  1909. },
  1910. parseBindingsString: function (b, c, d, e) {
  1911. try {
  1912. var f = this.Fc,
  1913. g = b + (e && e.valueAccessors || ""),
  1914. k;
  1915. if (!(k = f[g])) {
  1916. var l, m = "with($context){with($data||{}){return{" + a.h.Ua(b, e) + "}}}";
  1917. l = new Function("$context", "$element", m);
  1918. k = f[g] = l
  1919. }
  1920. return k(c, d)
  1921. } catch (h) {
  1922. throw h.message = "Unable to parse bindings.\nBindings value: " + b + "\nMessage: " + h.message, h
  1923. }
  1924. }
  1925. });
  1926. a.Q.instance = new a.Q
  1927. })();
  1928. a.b("bindingProvider", a.Q);
  1929. (function () {
  1930. function b(a) {
  1931. return function () {
  1932. return a
  1933. }
  1934. }
  1935. function c(a) {
  1936. return a()
  1937. }
  1938. function d(b) {
  1939. return a.a.Ca(a.l.w(b), function (a, c) {
  1940. return function () {
  1941. return b()[c]
  1942. }
  1943. })
  1944. }
  1945. function e(c, e, h) {
  1946. return "function" === typeof c ? d(c.bind(null, e, h)) : a.a.Ca(c, b)
  1947. }
  1948. function f(a, b) {
  1949. return d(this.getBindings.bind(this, a, b))
  1950. }
  1951. function g(b, c, d) {
  1952. var e, h = a.f.firstChild(c),
  1953. f = a.Q.instance,
  1954. m = f.preprocessNode;
  1955. if (m) {
  1956. for (; e = h;) h = a.f.nextSibling(e), m.call(f, e);
  1957. h = a.f.firstChild(c)
  1958. }
  1959. for (; e = h;) h = a.f.nextSibling(e), k(b, e, d)
  1960. }
  1961. function k(b, c, d) {
  1962. var e = !0,
  1963. h = 1 === c.nodeType;
  1964. h && a.f.kc(c);
  1965. if (h && d || a.Q.instance.nodeHasBindings(c)) e = m(c, null, b, d).shouldBindDescendants;
  1966. e && !r[a.a.A(c)] && g(b, c, !h)
  1967. }
  1968. function l(b) {
  1969. var c = [],
  1970. d = {},
  1971. e = [];
  1972. a.a.D(b, function Z(h) {
  1973. if (!d[h]) {
  1974. var f = a.getBindingHandler(h);
  1975. f && (f.after && (e.push(h), a.a.q(f.after, function (c) {
  1976. if (b[c]) {
  1977. if (-1 !== a.a.o(e, c)) throw Error("Cannot combine the following bindings, because they have a cyclic dependency: " + e.join(", "));
  1978. Z(c)
  1979. }
  1980. }), e.length--), c.push({
  1981. key: h,
  1982. fc: f
  1983. }));
  1984. d[h] = !0
  1985. }
  1986. });
  1987. return c
  1988. }
  1989. function m(b, d, e, h) {
  1990. var m = a.a.e.get(b, q);
  1991. if (!d) {
  1992. if (m) throw Error("You cannot apply bindings multiple times to the same element.");
  1993. a.a.e.set(b, q, !0)
  1994. }!m && h && a.tc(b, e);
  1995. var g;
  1996. if (d && "function" !== typeof d) g = d;
  1997. else {
  1998. var k = a.Q.instance,
  1999. r = k.getBindingAccessors || f,
  2000. p = a.B(function () {
  2001. (g = d ? d(e, b) : r.call(k, b, e)) && e.P && e.P();
  2002. return g
  2003. }, null, {
  2004. i: b
  2005. });
  2006. g && p.ba() || (p = null)
  2007. }
  2008. var u;
  2009. if (g) {
  2010. var v = p ? function (a) {
  2011. return function () {
  2012. return c(p()[a])
  2013. }
  2014. } : function (a) {
  2015. return g[a]
  2016. },
  2017. s = function () {
  2018. return a.a.Ca(p ? p() : g, c)
  2019. };
  2020. s.get = function (a) {
  2021. return g[a] && c(v(a))
  2022. };
  2023. s.has = function (a) {
  2024. return a in g
  2025. };
  2026. h = l(g);
  2027. a.a.q(h, function (c) {
  2028. var d = c.fc.init,
  2029. h = c.fc.update,
  2030. f = c.key;
  2031. if (8 === b.nodeType && !a.f.Z[f]) throw Error("The binding '" + f + "' cannot be used with virtual elements");
  2032. try {
  2033. "function" == typeof d && a.l.w(function () {
  2034. var a = d(b, v(f), s, e.$data, e);
  2035. if (a && a.controlsDescendantBindings) {
  2036. if (u !== n) throw Error("Multiple bindings (" + u + " and " + f + ") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");
  2037. u = f
  2038. }
  2039. }), "function" == typeof h && a.B(function () {
  2040. h(b, v(f), s, e.$data, e)
  2041. }, null, {
  2042. i: b
  2043. })
  2044. } catch (m) {
  2045. throw m.message = 'Unable to process binding "' + f + ": " + g[f] + '"\nMessage: ' + m.message, m
  2046. }
  2047. })
  2048. }
  2049. return {
  2050. shouldBindDescendants: u === n
  2051. }
  2052. }
  2053. function h(b) {
  2054. return b && b instanceof a.U ? b : new a.U(b)
  2055. }
  2056. a.d = {};
  2057. var r = {
  2058. script: !0,
  2059. textarea: !0,
  2060. template: !0
  2061. };
  2062. a.getBindingHandler = function (b) {
  2063. return a.d[b]
  2064. };
  2065. a.U = function (b, c, d, e) {
  2066. var h = this,
  2067. f = "function" == typeof b && !a.H(b),
  2068. m, g = a.B(function () {
  2069. var m = f ? b() : b,
  2070. l = a.a.c(m);
  2071. c ? (c.P && c.P(), a.a.extend(h, c), g && (h.P = g)) : (h.$parents = [], h.$root = l, h.ko = a);
  2072. h.$rawData = m;
  2073. h.$data = l;
  2074. d && (h[d] = l);
  2075. e && e(h, c, l);
  2076. return h.$data
  2077. }, null, {
  2078. wa: function () {
  2079. return m && !a.a.Qb(m)
  2080. },
  2081. i: !0
  2082. });
  2083. g.ba() && (h.P = g, g.equalityComparer = null, m = [], g.Ac = function (b) {
  2084. m.push(b);
  2085. a.a.F.oa(b, function (b) {
  2086. a.a.La(m, b);
  2087. m.length || (g.k(), h.P = g = n)
  2088. })
  2089. })
  2090. };
  2091. a.U.prototype.createChildContext = function (b, c, d) {
  2092. return new a.U(b, this, c, function (a, b) {
  2093. a.$parentContext = b;
  2094. a.$parent = b.$data;
  2095. a.$parents = (b.$parents || []).slice(0);
  2096. a.$parents.unshift(a.$parent);
  2097. d && d(a)
  2098. })
  2099. };
  2100. a.U.prototype.extend = function (b) {
  2101. return new a.U(this.P || this.$data, this, null, function (c, d) {
  2102. c.$rawData = d.$rawData;
  2103. a.a.extend(c, "function" == typeof b ? b() : b)
  2104. })
  2105. };
  2106. var q = a.a.e.I(),
  2107. p = a.a.e.I();
  2108. a.tc = function (b, c) {
  2109. if (2 == arguments.length) a.a.e.set(b, p, c), c.P && c.P.Ac(b);
  2110. else return a.a.e.get(b, p)
  2111. };
  2112. a.Ja = function (b, c, d) {
  2113. 1 === b.nodeType && a.f.kc(b);
  2114. return m(b, c, h(d), !0)
  2115. };
  2116. a.Dc = function (b, c, d) {
  2117. d = h(d);
  2118. return a.Ja(b, e(c, d, b), d)
  2119. };
  2120. a.eb = function (a, b) {
  2121. 1 !== b.nodeType && 8 !== b.nodeType || g(h(a), b, !0)
  2122. };
  2123. a.Rb = function (a, b) {
  2124. !v && x.jQuery && (v = x.jQuery);
  2125. if (b && 1 !== b.nodeType && 8 !== b.nodeType) throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");
  2126. b = b || x.document.body;
  2127. k(h(a), b, !0)
  2128. };
  2129. a.kb = function (b) {
  2130. switch (b.nodeType) {
  2131. case 1:
  2132. case 8:
  2133. var c = a.tc(b);
  2134. if (c) return c;
  2135. if (b.parentNode) return a.kb(b.parentNode)
  2136. }
  2137. return n
  2138. };
  2139. a.Jc = function (b) {
  2140. return (b = a.kb(b)) ? b.$data : n
  2141. };
  2142. a.b("bindingHandlers", a.d);
  2143. a.b("applyBindings", a.Rb);
  2144. a.b("applyBindingsToDescendants", a.eb);
  2145. a.b("applyBindingAccessorsToNode", a.Ja);
  2146. a.b("applyBindingsToNode", a.Dc);
  2147. a.b("contextFor", a.kb);
  2148. a.b("dataFor", a.Jc)
  2149. })();
  2150. (function (b) {
  2151. function c(c, e) {
  2152. var m = f.hasOwnProperty(c) ? f[c] : b,
  2153. h;
  2154. m ? m.X(e) : (m = f[c] = new a.J, m.X(e), d(c, function (b, d) {
  2155. var e = !(!d || !d.synchronous);
  2156. g[c] = {
  2157. definition: b,
  2158. Zc: e
  2159. };
  2160. delete f[c];
  2161. h || e ? m.notifySubscribers(b) : a.Y.Wa(function () {
  2162. m.notifySubscribers(b)
  2163. })
  2164. }), h = !0)
  2165. }
  2166. function d(a, b) {
  2167. e("getConfig", [a], function (c) {
  2168. c ? e("loadComponent", [a, c], function (a) {
  2169. b(a, c)
  2170. }) : b(null, null)
  2171. })
  2172. }
  2173. function e(c, d, f, h) {
  2174. h || (h = a.g.loaders.slice(0));
  2175. var g = h.shift();
  2176. if (g) {
  2177. var q = g[c];
  2178. if (q) {
  2179. var p = !1;
  2180. if (q.apply(g, d.concat(function (a) {
  2181. p ? f(null) : null !== a ? f(a) : e(c, d, f, h)
  2182. })) !== b && (p = !0, !g.suppressLoaderExceptions)) throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")
  2183. } else e(c, d, f, h)
  2184. } else f(null)
  2185. }
  2186. var f = {},
  2187. g = {};
  2188. a.g = {
  2189. get: function (d, e) {
  2190. var f = g.hasOwnProperty(d) ? g[d] : b;
  2191. f ? f.Zc ? a.l.w(function () {
  2192. e(f.definition)
  2193. }) : a.Y.Wa(function () {
  2194. e(f.definition)
  2195. }) : c(d, e)
  2196. },
  2197. Xb: function (a) {
  2198. delete g[a]
  2199. },
  2200. Jb: e
  2201. };
  2202. a.g.loaders = [];
  2203. a.b("components", a.g);
  2204. a.b("components.get", a.g.get);
  2205. a.b("components.clearCachedDefinition", a.g.Xb)
  2206. })();
  2207. (function () {
  2208. function b(b, c, d, e) {
  2209. function g() {
  2210. 0 === --y && e(k)
  2211. }
  2212. var k = {},
  2213. y = 2,
  2214. t = d.template;
  2215. d = d.viewModel;
  2216. t ? f(c, t, function (c) {
  2217. a.g.Jb("loadTemplate", [b, c], function (a) {
  2218. k.template = a;
  2219. g()
  2220. })
  2221. }) : g();
  2222. d ? f(c, d, function (c) {
  2223. a.g.Jb("loadViewModel", [b, c], function (a) {
  2224. k[l] = a;
  2225. g()
  2226. })
  2227. }) : g()
  2228. }
  2229. function c(a, b, d) {
  2230. if ("function" === typeof b) d(function (a) {
  2231. return new b(a)
  2232. });
  2233. else if ("function" === typeof b[l]) d(b[l]);
  2234. else if ("instance" in b) {
  2235. var e = b.instance;
  2236. d(function () {
  2237. return e
  2238. })
  2239. } else "viewModel" in b ? c(a, b.viewModel, d) : a("Unknown viewModel value: " + b)
  2240. }
  2241. function d(b) {
  2242. switch (a.a.A(b)) {
  2243. case "script":
  2244. return a.a.ma(b.text);
  2245. case "textarea":
  2246. return a.a.ma(b.value);
  2247. case "template":
  2248. if (e(b.content)) return a.a.ua(b.content.childNodes)
  2249. }
  2250. return a.a.ua(b.childNodes)
  2251. }
  2252. function e(a) {
  2253. return x.DocumentFragment ? a instanceof DocumentFragment : a && 11 === a.nodeType
  2254. }
  2255. function f(a, b, c) {
  2256. "string" === typeof b.require ? O || x.require ? (O || x.require)([b.require], c) : a("Uses require, but no AMD loader is present") : c(b)
  2257. }
  2258. function g(a) {
  2259. return function (b) {
  2260. throw Error("Component '" + a + "': " + b)
  2261. }
  2262. }
  2263. var k = {};
  2264. a.g.register = function (b, c) {
  2265. if (!c) throw Error("Invalid configuration for " + b);
  2266. if (a.g.ub(b)) throw Error("Component " + b + " is already registered");
  2267. k[b] = c
  2268. };
  2269. a.g.ub = function (a) {
  2270. return k.hasOwnProperty(a)
  2271. };
  2272. a.g.od = function (b) {
  2273. delete k[b];
  2274. a.g.Xb(b)
  2275. };
  2276. a.g.Zb = {
  2277. getConfig: function (a, b) {
  2278. b(k.hasOwnProperty(a) ? k[a] : null)
  2279. },
  2280. loadComponent: function (a, c, d) {
  2281. var e = g(a);
  2282. f(e, c, function (c) {
  2283. b(a, e, c, d)
  2284. })
  2285. },
  2286. loadTemplate: function (b, c, f) {
  2287. b = g(b);
  2288. if ("string" === typeof c) f(a.a.ma(c));
  2289. else if (c instanceof Array) f(c);
  2290. else if (e(c)) f(a.a.V(c.childNodes));
  2291. else if (c.element)
  2292. if (c = c.element, x.HTMLElement ? c instanceof HTMLElement : c && c.tagName && 1 === c.nodeType) f(d(c));
  2293. else if ("string" === typeof c) {
  2294. var l = u.getElementById(c);
  2295. l ? f(d(l)) : b("Cannot find element with ID " + c)
  2296. } else b("Unknown element type: " + c);
  2297. else b("Unknown template value: " + c)
  2298. },
  2299. loadViewModel: function (a, b, d) {
  2300. c(g(a), b, d)
  2301. }
  2302. };
  2303. var l = "createViewModel";
  2304. a.b("components.register", a.g.register);
  2305. a.b("components.isRegistered", a.g.ub);
  2306. a.b("components.unregister", a.g.od);
  2307. a.b("components.defaultLoader", a.g.Zb);
  2308. a.g.loaders.push(a.g.Zb);
  2309. a.g.Bc = k
  2310. })();
  2311. (function () {
  2312. function b(b, e) {
  2313. var f = b.getAttribute("params");
  2314. if (f) {
  2315. var f = c.parseBindingsString(f, e, b, {
  2316. valueAccessors: !0,
  2317. bindingParams: !0
  2318. }),
  2319. f = a.a.Ca(f, function (c) {
  2320. return a.m(c, null, {
  2321. i: b
  2322. })
  2323. }),
  2324. g = a.a.Ca(f, function (c) {
  2325. var e = c.t();
  2326. return c.ba() ? a.m({
  2327. read: function () {
  2328. return a.a.c(c())
  2329. },
  2330. write: a.Ba(e) && function (a) {
  2331. c()(a)
  2332. },
  2333. i: b
  2334. }) : e
  2335. });
  2336. g.hasOwnProperty("$raw") || (g.$raw = f);
  2337. return g
  2338. }
  2339. return {
  2340. $raw: {}
  2341. }
  2342. }
  2343. a.g.getComponentNameForNode = function (b) {
  2344. var c = a.a.A(b);
  2345. if (a.g.ub(c) && (-1 != c.indexOf("-") || "[object HTMLUnknownElement]" == "" + b || 8 >= a.a.C && b.tagName === c)) return c
  2346. };
  2347. a.g.Ob = function (c, e, f, g) {
  2348. if (1 === e.nodeType) {
  2349. var k = a.g.getComponentNameForNode(e);
  2350. if (k) {
  2351. c = c || {};
  2352. if (c.component) throw Error('Cannot use the "component" binding on a custom element matching a component');
  2353. var l = {
  2354. name: k,
  2355. params: b(e, f)
  2356. };
  2357. c.component = g ? function () {
  2358. return l
  2359. } : l
  2360. }
  2361. }
  2362. return c
  2363. };
  2364. var c = new a.Q;
  2365. 9 > a.a.C && (a.g.register = function (a) {
  2366. return function (b) {
  2367. u.createElement(b);
  2368. return a.apply(this, arguments)
  2369. }
  2370. }(a.g.register), u.createDocumentFragment = function (b) {
  2371. return function () {
  2372. var c = b(),
  2373. f = a.g.Bc,
  2374. g;
  2375. for (g in f) f.hasOwnProperty(g) && c.createElement(g);
  2376. return c
  2377. }
  2378. }(u.createDocumentFragment))
  2379. })();
  2380. (function (b) {
  2381. function c(b, c, d) {
  2382. c = c.template;
  2383. if (!c) throw Error("Component '" + b + "' has no template");
  2384. b = a.a.ua(c);
  2385. a.f.da(d, b)
  2386. }
  2387. function d(a, b, c, d) {
  2388. var e = a.createViewModel;
  2389. return e ? e.call(a, d, {
  2390. element: b,
  2391. templateNodes: c
  2392. }) : d
  2393. }
  2394. var e = 0;
  2395. a.d.component = {
  2396. init: function (f, g, k, l, m) {
  2397. function h() {
  2398. var a = r && r.dispose;
  2399. "function" === typeof a && a.call(r);
  2400. q = r = null
  2401. }
  2402. var r, q, p = a.a.V(a.f.childNodes(f));
  2403. a.a.F.oa(f, h);
  2404. a.m(function () {
  2405. var l = a.a.c(g()),
  2406. k, t;
  2407. "string" === typeof l ? k = l : (k = a.a.c(l.name), t = a.a.c(l.params));
  2408. if (!k) throw Error("No component name specified");
  2409. var n = q = ++e;
  2410. a.g.get(k, function (e) {
  2411. if (q === n) {
  2412. h();
  2413. if (!e) throw Error("Unknown component '" + k + "'");
  2414. c(k, e, f);
  2415. var g = d(e, f, p, t);
  2416. e = m.createChildContext(g, b, function (a) {
  2417. a.$component = g;
  2418. a.$componentTemplateNodes = p
  2419. });
  2420. r = g;
  2421. a.eb(e, f)
  2422. }
  2423. })
  2424. }, null, {
  2425. i: f
  2426. });
  2427. return {
  2428. controlsDescendantBindings: !0
  2429. }
  2430. }
  2431. };
  2432. a.f.Z.component = !0
  2433. })();
  2434. var S = {
  2435. "class": "className",
  2436. "for": "htmlFor"
  2437. };
  2438. a.d.attr = {
  2439. update: function (b, c) {
  2440. var d = a.a.c(c()) || {};
  2441. a.a.D(d, function (c, d) {
  2442. d = a.a.c(d);
  2443. var g = !1 === d || null === d || d === n;
  2444. g && b.removeAttribute(c);
  2445. 8 >= a.a.C && c in S ? (c = S[c], g ? b.removeAttribute(c) : b[c] = d) : g || b.setAttribute(c, d.toString());
  2446. "name" === c && a.a.rc(b, g ? "" : d.toString())
  2447. })
  2448. }
  2449. };
  2450. (function () {
  2451. a.d.checked = {
  2452. after: ["value", "attr"],
  2453. init: function (b, c, d) {
  2454. function e() {
  2455. var e = b.checked,
  2456. f = p ? g() : e;
  2457. if (!a.va.Sa() && (!l || e)) {
  2458. var m = a.l.w(c);
  2459. if (h) {
  2460. var k = r ? m.t() : m;
  2461. q !== f ? (e && (a.a.pa(k, f, !0), a.a.pa(k, q, !1)), q = f) : a.a.pa(k, f, e);
  2462. r && a.Ba(m) && m(k)
  2463. } else a.h.Ea(m, d, "checked", f, !0)
  2464. }
  2465. }
  2466. function f() {
  2467. var d = a.a.c(c());
  2468. b.checked = h ? 0 <= a.a.o(d, g()) : k ? d : g() === d
  2469. }
  2470. var g = a.nc(function () {
  2471. return d.has("checkedValue") ? a.a.c(d.get("checkedValue")) : d.has("value") ? a.a.c(d.get("value")) : b.value
  2472. }),
  2473. k = "checkbox" == b.type,
  2474. l = "radio" == b.type;
  2475. if (k || l) {
  2476. var m = c(),
  2477. h = k && a.a.c(m) instanceof Array,
  2478. r = !(h && m.push && m.splice),
  2479. q = h ? g() : n,
  2480. p = l || h;
  2481. l && !b.name && a.d.uniqueName.init(b, function () {
  2482. return !0
  2483. });
  2484. a.m(e, null, {
  2485. i: b
  2486. });
  2487. a.a.p(b, "click", e);
  2488. a.m(f, null, {
  2489. i: b
  2490. });
  2491. m = n
  2492. }
  2493. }
  2494. };
  2495. a.h.ea.checked = !0;
  2496. a.d.checkedValue = {
  2497. update: function (b, c) {
  2498. b.value = a.a.c(c())
  2499. }
  2500. }
  2501. })();
  2502. a.d.css = {
  2503. update: function (b, c) {
  2504. var d = a.a.c(c());
  2505. null !== d && "object" == typeof d ? a.a.D(d, function (c, d) {
  2506. d = a.a.c(d);
  2507. a.a.bb(b, c, d)
  2508. }) : (d = a.a.$a(String(d || "")), a.a.bb(b, b.__ko__cssValue, !1), b.__ko__cssValue = d, a.a.bb(b, d, !0))
  2509. }
  2510. };
  2511. a.d.enable = {
  2512. update: function (b, c) {
  2513. var d = a.a.c(c());
  2514. d && b.disabled ? b.removeAttribute("disabled") : d || b.disabled || (b.disabled = !0)
  2515. }
  2516. };
  2517. a.d.disable = {
  2518. update: function (b, c) {
  2519. a.d.enable.update(b, function () {
  2520. return !a.a.c(c())
  2521. })
  2522. }
  2523. };
  2524. a.d.event = {
  2525. init: function (b, c, d, e, f) {
  2526. var g = c() || {};
  2527. a.a.D(g, function (g) {
  2528. "string" == typeof g && a.a.p(b, g, function (b) {
  2529. var m, h = c()[g];
  2530. if (h) {
  2531. try {
  2532. var r = a.a.V(arguments);
  2533. e = f.$data;
  2534. r.unshift(e);
  2535. m = h.apply(e, r)
  2536. } finally {
  2537. !0 !== m && (b.preventDefault ? b.preventDefault() : b.returnValue = !1)
  2538. }!1 === d.get(g + "Bubble") && (b.cancelBubble = !0, b.stopPropagation && b.stopPropagation())
  2539. }
  2540. })
  2541. })
  2542. }
  2543. };
  2544. a.d.foreach = {
  2545. ic: function (b) {
  2546. return function () {
  2547. var c = b(),
  2548. d = a.a.zb(c);
  2549. if (!d || "number" == typeof d.length) return {
  2550. foreach: c,
  2551. templateEngine: a.W.sb
  2552. };
  2553. a.a.c(c);
  2554. return {
  2555. foreach: d.data,
  2556. as: d.as,
  2557. includeDestroyed: d.includeDestroyed,
  2558. afterAdd: d.afterAdd,
  2559. beforeRemove: d.beforeRemove,
  2560. afterRender: d.afterRender,
  2561. beforeMove: d.beforeMove,
  2562. afterMove: d.afterMove,
  2563. templateEngine: a.W.sb
  2564. }
  2565. }
  2566. },
  2567. init: function (b, c) {
  2568. return a.d.template.init(b, a.d.foreach.ic(c))
  2569. },
  2570. update: function (b, c, d, e, f) {
  2571. return a.d.template.update(b, a.d.foreach.ic(c), d, e, f)
  2572. }
  2573. };
  2574. a.h.ta.foreach = !1;
  2575. a.f.Z.foreach = !0;
  2576. a.d.hasfocus = {
  2577. init: function (b, c, d) {
  2578. function e(e) {
  2579. b.__ko_hasfocusUpdating = !0;
  2580. var f = b.ownerDocument;
  2581. if ("activeElement" in f) {
  2582. var g;
  2583. try {
  2584. g = f.activeElement
  2585. } catch (h) {
  2586. g = f.body
  2587. }
  2588. e = g === b
  2589. }
  2590. f = c();
  2591. a.h.Ea(f, d, "hasfocus", e, !0);
  2592. b.__ko_hasfocusLastValue = e;
  2593. b.__ko_hasfocusUpdating = !1
  2594. }
  2595. var f = e.bind(null, !0),
  2596. g = e.bind(null, !1);
  2597. a.a.p(b, "focus", f);
  2598. a.a.p(b, "focusin", f);
  2599. a.a.p(b, "blur", g);
  2600. a.a.p(b, "focusout", g)
  2601. },
  2602. update: function (b, c) {
  2603. var d = !!a.a.c(c());
  2604. b.__ko_hasfocusUpdating || b.__ko_hasfocusLastValue === d || (d ? b.focus() : b.blur(), !d && b.__ko_hasfocusLastValue && b.ownerDocument.body.focus(), a.l.w(a.a.Da, null, [b, d ? "focusin" : "focusout"]))
  2605. }
  2606. };
  2607. a.h.ea.hasfocus = !0;
  2608. a.d.hasFocus = a.d.hasfocus;
  2609. a.h.ea.hasFocus = !0;
  2610. a.d.html = {
  2611. init: function () {
  2612. return {
  2613. controlsDescendantBindings: !0
  2614. }
  2615. },
  2616. update: function (b, c) {
  2617. a.a.Cb(b, c())
  2618. }
  2619. };
  2620. K("if");
  2621. K("ifnot", !1, !0);
  2622. K("with", !0, !1, function (a, c) {
  2623. return a.createChildContext(c)
  2624. });
  2625. var L = {};
  2626. a.d.options = {
  2627. init: function (b) {
  2628. if ("select" !== a.a.A(b)) throw Error("options binding applies only to SELECT elements");
  2629. for (; 0 < b.length;) b.remove(0);
  2630. return {
  2631. controlsDescendantBindings: !0
  2632. }
  2633. },
  2634. update: function (b, c, d) {
  2635. function e() {
  2636. return a.a.Ka(b.options, function (a) {
  2637. return a.selected
  2638. })
  2639. }
  2640. function f(a, b, c) {
  2641. var d = typeof b;
  2642. return "function" == d ? b(a) : "string" == d ? a[b] : c
  2643. }
  2644. function g(c, e) {
  2645. if (A && h) a.j.ha(b, a.a.c(d.get("value")), !0);
  2646. else if (p.length) {
  2647. var f = 0 <= a.a.o(p, a.j.u(e[0]));
  2648. a.a.sc(e[0], f);
  2649. A && !f && a.l.w(a.a.Da, null, [b, "change"])
  2650. }
  2651. }
  2652. var k = b.multiple,
  2653. l = 0 != b.length && k ? b.scrollTop : null,
  2654. m = a.a.c(c()),
  2655. h = d.get("valueAllowUnset") && d.has("value"),
  2656. r = d.get("optionsIncludeDestroyed");
  2657. c = {};
  2658. var q, p = [];
  2659. h || (k ? p = a.a.fb(e(), a.j.u) : 0 <= b.selectedIndex && p.push(a.j.u(b.options[b.selectedIndex])));
  2660. m && ("undefined" == typeof m.length && (m = [m]), q = a.a.Ka(m, function (b) {
  2661. return r || b === n || null === b || !a.a.c(b._destroy)
  2662. }), d.has("optionsCaption") && (m = a.a.c(d.get("optionsCaption")), null !== m && m !== n && q.unshift(L)));
  2663. var A = !1;
  2664. c.beforeRemove = function (a) {
  2665. b.removeChild(a)
  2666. };
  2667. m = g;
  2668. d.has("optionsAfterRender") && "function" == typeof d.get("optionsAfterRender") && (m = function (b, c) {
  2669. g(0, c);
  2670. a.l.w(d.get("optionsAfterRender"), null, [c[0], b !== L ? b : n])
  2671. });
  2672. a.a.Bb(b, q, function (c, e, g) {
  2673. g.length && (p = !h && g[0].selected ? [a.j.u(g[0])] : [], A = !0);
  2674. e = b.ownerDocument.createElement("option");
  2675. c === L ? (a.a.Za(e, d.get("optionsCaption")), a.j.ha(e, n)) : (g = f(c, d.get("optionsValue"), c), a.j.ha(e, a.a.c(g)), c = f(c, d.get("optionsText"), g), a.a.Za(e, c));
  2676. return [e]
  2677. }, c, m);
  2678. a.l.w(function () {
  2679. h ? a.j.ha(b, a.a.c(d.get("value")), !0) : (k ? p.length && e().length < p.length : p.length && 0 <= b.selectedIndex ? a.j.u(b.options[b.selectedIndex]) !== p[0] : p.length || 0 <= b.selectedIndex) && a.a.Da(b, "change")
  2680. });
  2681. a.a.Nc(b);
  2682. l && 20 < Math.abs(l - b.scrollTop) && (b.scrollTop = l)
  2683. }
  2684. };
  2685. a.d.options.xb = a.a.e.I();
  2686. a.d.selectedOptions = {
  2687. after: ["options", "foreach"],
  2688. init: function (b, c, d) {
  2689. a.a.p(b, "change", function () {
  2690. var e = c(),
  2691. f = [];
  2692. a.a.q(b.getElementsByTagName("option"), function (b) {
  2693. b.selected && f.push(a.j.u(b))
  2694. });
  2695. a.h.Ea(e, d, "selectedOptions", f)
  2696. })
  2697. },
  2698. update: function (b, c) {
  2699. if ("select" != a.a.A(b)) throw Error("values binding applies only to SELECT elements");
  2700. var d = a.a.c(c()),
  2701. e = b.scrollTop;
  2702. d && "number" == typeof d.length && a.a.q(b.getElementsByTagName("option"), function (b) {
  2703. var c = 0 <= a.a.o(d, a.j.u(b));
  2704. b.selected != c && a.a.sc(b, c)
  2705. });
  2706. b.scrollTop = e
  2707. }
  2708. };
  2709. a.h.ea.selectedOptions = !0;
  2710. a.d.style = {
  2711. update: function (b, c) {
  2712. var d = a.a.c(c() || {});
  2713. a.a.D(d, function (c, d) {
  2714. d = a.a.c(d);
  2715. if (null === d || d === n || !1 === d) d = "";
  2716. b.style[c] = d
  2717. })
  2718. }
  2719. };
  2720. a.d.submit = {
  2721. init: function (b, c, d, e, f) {
  2722. if ("function" != typeof c()) throw Error("The value for a submit binding must be a function");
  2723. a.a.p(b, "submit", function (a) {
  2724. var d, e = c();
  2725. try {
  2726. d = e.call(f.$data, b)
  2727. } finally {
  2728. !0 !== d && (a.preventDefault ? a.preventDefault() : a.returnValue = !1)
  2729. }
  2730. })
  2731. }
  2732. };
  2733. a.d.text = {
  2734. init: function () {
  2735. return {
  2736. controlsDescendantBindings: !0
  2737. }
  2738. },
  2739. update: function (b, c) {
  2740. a.a.Za(b, c())
  2741. }
  2742. };
  2743. a.f.Z.text = !0;
  2744. (function () {
  2745. if (x && x.navigator) var b = function (a) {
  2746. if (a) return parseFloat(a[1])
  2747. },
  2748. c = x.opera && x.opera.version && parseInt(x.opera.version()),
  2749. d = x.navigator.userAgent,
  2750. e = b(d.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),
  2751. f = b(d.match(/Firefox\/([^ ]*)/));
  2752. if (10 > a.a.C) var g = a.a.e.I(),
  2753. k = a.a.e.I(),
  2754. l = function (b) {
  2755. var c = this.activeElement;
  2756. (c = c && a.a.e.get(c, k)) && c(b)
  2757. },
  2758. m = function (b, c) {
  2759. var d = b.ownerDocument;
  2760. a.a.e.get(d, g) || (a.a.e.set(d, g, !0), a.a.p(d, "selectionchange", l));
  2761. a.a.e.set(b, k, c)
  2762. };
  2763. a.d.textInput = {
  2764. init: function (b, d, g) {
  2765. function l(c, d) {
  2766. a.a.p(b, c, d)
  2767. }
  2768. function k() {
  2769. var c = a.a.c(d());
  2770. if (null === c || c === n) c = "";
  2771. v !== n && c === v ? a.a.setTimeout(k, 4) : b.value !== c && (u = c, b.value = c)
  2772. }
  2773. function y() {
  2774. s || (v = b.value, s = a.a.setTimeout(t, 4))
  2775. }
  2776. function t() {
  2777. clearTimeout(s);
  2778. v = s = n;
  2779. var c = b.value;
  2780. u !== c && (u = c, a.h.Ea(d(), g, "textInput", c))
  2781. }
  2782. var u = b.value,
  2783. s, v, x = 9 == a.a.C ? y : t;
  2784. 10 > a.a.C ? (l("propertychange", function (a) {
  2785. "value" === a.propertyName && x(a)
  2786. }), 8 == a.a.C && (l("keyup", t), l("keydown", t)), 8 <= a.a.C && (m(b, x), l("dragend", y))) : (l("input", t), 5 > e && "textarea" === a.a.A(b) ? (l("keydown", y), l("paste", y), l("cut", y)) : 11 > c ? l("keydown", y) : 4 > f && (l("DOMAutoComplete", t), l("dragdrop", t), l("drop", t)));
  2787. l("change", t);
  2788. a.m(k, null, {
  2789. i: b
  2790. })
  2791. }
  2792. };
  2793. a.h.ea.textInput = !0;
  2794. a.d.textinput = {
  2795. preprocess: function (a, b, c) {
  2796. c("textInput", a)
  2797. }
  2798. }
  2799. })();
  2800. a.d.uniqueName = {
  2801. init: function (b, c) {
  2802. if (c()) {
  2803. var d = "ko_unique_" + ++a.d.uniqueName.Ic;
  2804. a.a.rc(b, d)
  2805. }
  2806. }
  2807. };
  2808. a.d.uniqueName.Ic = 0;
  2809. a.d.value = {
  2810. after: ["options", "foreach"],
  2811. init: function (b, c, d) {
  2812. if ("input" != b.tagName.toLowerCase() || "checkbox" != b.type && "radio" != b.type) {
  2813. var e = ["change"],
  2814. f = d.get("valueUpdate"),
  2815. g = !1,
  2816. k = null;
  2817. f && ("string" == typeof f && (f = [f]), a.a.ra(e, f), e = a.a.Tb(e));
  2818. var l = function () {
  2819. k = null;
  2820. g = !1;
  2821. var e = c(),
  2822. f = a.j.u(b);
  2823. a.h.Ea(e, d, "value", f)
  2824. };
  2825. !a.a.C || "input" != b.tagName.toLowerCase() || "text" != b.type || "off" == b.autocomplete || b.form && "off" == b.form.autocomplete || -1 != a.a.o(e, "propertychange") || (a.a.p(b, "propertychange", function () {
  2826. g = !0
  2827. }), a.a.p(b, "focus", function () {
  2828. g = !1
  2829. }), a.a.p(b, "blur", function () {
  2830. g && l()
  2831. }));
  2832. a.a.q(e, function (c) {
  2833. var d = l;
  2834. a.a.nd(c, "after") && (d = function () {
  2835. k = a.j.u(b);
  2836. a.a.setTimeout(l, 0)
  2837. }, c = c.substring(5));
  2838. a.a.p(b, c, d)
  2839. });
  2840. var m = function () {
  2841. var e = a.a.c(c()),
  2842. f = a.j.u(b);
  2843. if (null !== k && e === k) a.a.setTimeout(m, 0);
  2844. else if (e !== f)
  2845. if ("select" === a.a.A(b)) {
  2846. var g = d.get("valueAllowUnset"),
  2847. f = function () {
  2848. a.j.ha(b, e, g)
  2849. };
  2850. f();
  2851. g || e === a.j.u(b) ? a.a.setTimeout(f, 0) : a.l.w(a.a.Da, null, [b, "change"])
  2852. } else a.j.ha(b, e)
  2853. };
  2854. a.m(m, null, {
  2855. i: b
  2856. })
  2857. } else a.Ja(b, {
  2858. checkedValue: c
  2859. })
  2860. },
  2861. update: function () {}
  2862. };
  2863. a.h.ea.value = !0;
  2864. a.d.visible = {
  2865. update: function (b, c) {
  2866. var d = a.a.c(c()),
  2867. e = "none" != b.style.display;
  2868. d && !e ? b.style.display = "" : !d && e && (b.style.display = "none")
  2869. }
  2870. };
  2871. (function (b) {
  2872. a.d[b] = {
  2873. init: function (c, d, e, f, g) {
  2874. return a.d.event.init.call(this, c, function () {
  2875. var a = {};
  2876. a[b] = d();
  2877. return a
  2878. }, e, f, g)
  2879. }
  2880. }
  2881. })("click");
  2882. a.O = function () {};
  2883. a.O.prototype.renderTemplateSource = function () {
  2884. throw Error("Override renderTemplateSource")
  2885. };
  2886. a.O.prototype.createJavaScriptEvaluatorBlock = function () {
  2887. throw Error("Override createJavaScriptEvaluatorBlock")
  2888. };
  2889. a.O.prototype.makeTemplateSource = function (b, c) {
  2890. if ("string" == typeof b) {
  2891. c = c || u;
  2892. var d = c.getElementById(b);
  2893. if (!d) throw Error("Cannot find template with ID " + b);
  2894. return new a.v.n(d)
  2895. }
  2896. if (1 == b.nodeType || 8 == b.nodeType) return new a.v.qa(b);
  2897. throw Error("Unknown template type: " + b)
  2898. };
  2899. a.O.prototype.renderTemplate = function (a, c, d, e) {
  2900. a = this.makeTemplateSource(a, e);
  2901. return this.renderTemplateSource(a, c, d, e)
  2902. };
  2903. a.O.prototype.isTemplateRewritten = function (a, c) {
  2904. return !1 === this.allowTemplateRewriting ? !0 : this.makeTemplateSource(a, c).data("isRewritten")
  2905. };
  2906. a.O.prototype.rewriteTemplate = function (a, c, d) {
  2907. a = this.makeTemplateSource(a, d);
  2908. c = c(a.text());
  2909. a.text(c);
  2910. a.data("isRewritten", !0)
  2911. };
  2912. a.b("templateEngine", a.O);
  2913. a.Gb = function () {
  2914. function b(b, c, d, k) {
  2915. b = a.h.yb(b);
  2916. for (var l = a.h.ta, m = 0; m < b.length; m++) {
  2917. var h = b[m].key;
  2918. if (l.hasOwnProperty(h)) {
  2919. var r = l[h];
  2920. if ("function" === typeof r) {
  2921. if (h = r(b[m].value)) throw Error(h)
  2922. } else if (!r) throw Error("This template engine does not support the '" + h + "' binding within its templates")
  2923. }
  2924. }
  2925. d = "ko.__tr_ambtns(function($context,$element){return(function(){return{ " + a.h.Ua(b, {
  2926. valueAccessors: !0
  2927. }) + " } })()},'" + d.toLowerCase() + "')";
  2928. return k.createJavaScriptEvaluatorBlock(d) + c
  2929. }
  2930. var c = /(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,
  2931. d = /\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;
  2932. return {
  2933. Oc: function (b, c, d) {
  2934. c.isTemplateRewritten(b, d) || c.rewriteTemplate(b, function (b) {
  2935. return a.Gb.dd(b, c)
  2936. }, d)
  2937. },
  2938. dd: function (a, f) {
  2939. return a.replace(c, function (a, c, d, e, h) {
  2940. return b(h, c, d, f)
  2941. }).replace(d, function (a, c) {
  2942. return b(c, "<!-- ko -->", "#comment", f)
  2943. })
  2944. },
  2945. Ec: function (b, c) {
  2946. return a.M.wb(function (d, k) {
  2947. var l = d.nextSibling;
  2948. l && l.nodeName.toLowerCase() === c && a.Ja(l, b, k)
  2949. })
  2950. }
  2951. }
  2952. }();
  2953. a.b("__tr_ambtns", a.Gb.Ec);
  2954. (function () {
  2955. a.v = {};
  2956. a.v.n = function (b) {
  2957. if (this.n = b) {
  2958. var c = a.a.A(b);
  2959. this.ab = "script" === c ? 1 : "textarea" === c ? 2 : "template" == c && b.content && 11 === b.content.nodeType ? 3 : 4
  2960. }
  2961. };
  2962. a.v.n.prototype.text = function () {
  2963. var b = 1 === this.ab ? "text" : 2 === this.ab ? "value" : "innerHTML";
  2964. if (0 == arguments.length) return this.n[b];
  2965. var c = arguments[0];
  2966. "innerHTML" === b ? a.a.Cb(this.n, c) : this.n[b] = c
  2967. };
  2968. var b = a.a.e.I() + "_";
  2969. a.v.n.prototype.data = function (c) {
  2970. if (1 === arguments.length) return a.a.e.get(this.n, b + c);
  2971. a.a.e.set(this.n, b + c, arguments[1])
  2972. };
  2973. var c = a.a.e.I();
  2974. a.v.n.prototype.nodes = function () {
  2975. var b = this.n;
  2976. if (0 == arguments.length) return (a.a.e.get(b, c) || {}).jb || (3 === this.ab ? b.content : 4 === this.ab ? b : n);
  2977. a.a.e.set(b, c, {
  2978. jb: arguments[0]
  2979. })
  2980. };
  2981. a.v.qa = function (a) {
  2982. this.n = a
  2983. };
  2984. a.v.qa.prototype = new a.v.n;
  2985. a.v.qa.prototype.text = function () {
  2986. if (0 == arguments.length) {
  2987. var b = a.a.e.get(this.n, c) || {};
  2988. b.Hb === n && b.jb && (b.Hb = b.jb.innerHTML);
  2989. return b.Hb
  2990. }
  2991. a.a.e.set(this.n, c, {
  2992. Hb: arguments[0]
  2993. })
  2994. };
  2995. a.b("templateSources", a.v);
  2996. a.b("templateSources.domElement", a.v.n);
  2997. a.b("templateSources.anonymousTemplate", a.v.qa)
  2998. })();
  2999. (function () {
  3000. function b(b, c, d) {
  3001. var e;
  3002. for (c = a.f.nextSibling(c); b && (e = b) !== c;) b = a.f.nextSibling(e), d(e, b)
  3003. }
  3004. function c(c, d) {
  3005. if (c.length) {
  3006. var e = c[0],
  3007. f = c[c.length - 1],
  3008. g = e.parentNode,
  3009. k = a.Q.instance,
  3010. n = k.preprocessNode;
  3011. if (n) {
  3012. b(e, f, function (a, b) {
  3013. var c = a.previousSibling,
  3014. d = n.call(k, a);
  3015. d && (a === e && (e = d[0] || b), a === f && (f = d[d.length - 1] || c))
  3016. });
  3017. c.length = 0;
  3018. if (!e) return;
  3019. e === f ? c.push(e) : (c.push(e, f), a.a.za(c, g))
  3020. }
  3021. b(e, f, function (b) {
  3022. 1 !== b.nodeType && 8 !== b.nodeType || a.Rb(d, b)
  3023. });
  3024. b(e, f, function (b) {
  3025. 1 !== b.nodeType && 8 !== b.nodeType || a.M.yc(b, [d])
  3026. });
  3027. a.a.za(c, g)
  3028. }
  3029. }
  3030. function d(a) {
  3031. return a.nodeType ? a : 0 < a.length ? a[0] : null
  3032. }
  3033. function e(b, e, f, k, q) {
  3034. q = q || {};
  3035. var p = (b && d(b) || f || {}).ownerDocument,
  3036. n = q.templateEngine || g;
  3037. a.Gb.Oc(f, n, p);
  3038. f = n.renderTemplate(f, k, q, p);
  3039. if ("number" != typeof f.length || 0 < f.length && "number" != typeof f[0].nodeType) throw Error("Template engine must return an array of DOM nodes");
  3040. p = !1;
  3041. switch (e) {
  3042. case "replaceChildren":
  3043. a.f.da(b, f);
  3044. p = !0;
  3045. break;
  3046. case "replaceNode":
  3047. a.a.qc(b, f);
  3048. p = !0;
  3049. break;
  3050. case "ignoreTargetNode":
  3051. break;
  3052. default:
  3053. throw Error("Unknown renderMode: " + e)
  3054. }
  3055. p && (c(f, k), q.afterRender && a.l.w(q.afterRender, null, [f, k.$data]));
  3056. return f
  3057. }
  3058. function f(b, c, d) {
  3059. return a.H(b) ? b() : "function" === typeof b ? b(c, d) : b
  3060. }
  3061. var g;
  3062. a.Db = function (b) {
  3063. if (b != n && !(b instanceof a.O)) throw Error("templateEngine must inherit from ko.templateEngine");
  3064. g = b
  3065. };
  3066. a.Ab = function (b, c, h, k, q) {
  3067. h = h || {};
  3068. if ((h.templateEngine || g) == n) throw Error("Set a template engine before calling renderTemplate");
  3069. q = q || "replaceChildren";
  3070. if (k) {
  3071. var p = d(k);
  3072. return a.B(function () {
  3073. var g = c && c instanceof a.U ? c : new a.U(a.a.c(c)),
  3074. n = f(b, g.$data, g),
  3075. g = e(k, q, n, g, h);
  3076. "replaceNode" == q && (k = g, p = d(k))
  3077. }, null, {
  3078. wa: function () {
  3079. return !p || !a.a.nb(p)
  3080. },
  3081. i: p && "replaceNode" == q ? p.parentNode : p
  3082. })
  3083. }
  3084. return a.M.wb(function (d) {
  3085. a.Ab(b, c, h, d, "replaceNode")
  3086. })
  3087. };
  3088. a.kd = function (b, d, g, k, q) {
  3089. function p(a, b) {
  3090. c(b, s);
  3091. g.afterRender && g.afterRender(b, a);
  3092. s = null
  3093. }
  3094. function u(a, c) {
  3095. s = q.createChildContext(a, g.as, function (a) {
  3096. a.$index = c
  3097. });
  3098. var d = f(b, a, s);
  3099. return e(null, "ignoreTargetNode", d, s, g)
  3100. }
  3101. var s;
  3102. return a.B(function () {
  3103. var b = a.a.c(d) || [];
  3104. "undefined" == typeof b.length && (b = [b]);
  3105. b = a.a.Ka(b, function (b) {
  3106. return g.includeDestroyed || b === n || null === b || !a.a.c(b._destroy)
  3107. });
  3108. a.l.w(a.a.Bb, null, [k, b, u, g, p])
  3109. }, null, {
  3110. i: k
  3111. })
  3112. };
  3113. var k = a.a.e.I();
  3114. a.d.template = {
  3115. init: function (b, c) {
  3116. var d = a.a.c(c());
  3117. if ("string" == typeof d || d.name) a.f.xa(b);
  3118. else {
  3119. if ("nodes" in d) {
  3120. if (d = d.nodes || [], a.H(d)) throw Error('The "nodes" option must be a plain, non-observable array.')
  3121. } else d = a.f.childNodes(b);
  3122. d = a.a.jc(d);
  3123. new a.v.qa(b).nodes(d)
  3124. }
  3125. return {
  3126. controlsDescendantBindings: !0
  3127. }
  3128. },
  3129. update: function (b, c, d, e, f) {
  3130. var g = c(),
  3131. s;
  3132. c = a.a.c(g);
  3133. d = !0;
  3134. e = null;
  3135. "string" == typeof c ? c = {} : (g = c.name, "if" in c && (d = a.a.c(c["if"])), d && "ifnot" in c && (d = !a.a.c(c.ifnot)), s = a.a.c(c.data));
  3136. "foreach" in c ? e = a.kd(g || b, d && c.foreach || [], c, b, f) : d ? (f = "data" in c ? f.createChildContext(s, c.as) : f, e = a.Ab(g || b, f, c, b)) : a.f.xa(b);
  3137. f = e;
  3138. (s = a.a.e.get(b, k)) && "function" == typeof s.k && s.k();
  3139. a.a.e.set(b, k, f && f.ba() ? f : n)
  3140. }
  3141. };
  3142. a.h.ta.template = function (b) {
  3143. b = a.h.yb(b);
  3144. return 1 == b.length && b[0].unknown || a.h.ad(b, "name") ? null : "This template engine does not support anonymous templates nested within its templates"
  3145. };
  3146. a.f.Z.template = !0
  3147. })();
  3148. a.b("setTemplateEngine", a.Db);
  3149. a.b("renderTemplate", a.Ab);
  3150. a.a.dc = function (a, c, d) {
  3151. if (a.length && c.length) {
  3152. var e, f, g, k, l;
  3153. for (e = f = 0;
  3154. (!d || e < d) && (k = a[f]); ++f) {
  3155. for (g = 0; l = c[g]; ++g)
  3156. if (k.value === l.value) {
  3157. k.moved = l.index;
  3158. l.moved = k.index;
  3159. c.splice(g, 1);
  3160. e = g = 0;
  3161. break
  3162. }
  3163. e += g
  3164. }
  3165. }
  3166. };
  3167. a.a.ib = function () {
  3168. function b(b, d, e, f, g) {
  3169. var k = Math.min,
  3170. l = Math.max,
  3171. m = [],
  3172. h, n = b.length,
  3173. q, p = d.length,
  3174. s = p - n || 1,
  3175. u = n + p + 1,
  3176. t, v, x;
  3177. for (h = 0; h <= n; h++)
  3178. for (v = t, m.push(t = []), x = k(p, h + s), q = l(0, h - 1); q <= x; q++) t[q] = q ? h ? b[h - 1] === d[q - 1] ? v[q - 1] : k(v[q] || u, t[q - 1] || u) + 1 : q + 1 : h + 1;
  3179. k = [];
  3180. l = [];
  3181. s = [];
  3182. h = n;
  3183. for (q = p; h || q;) p = m[h][q] - 1, q && p === m[h][q - 1] ? l.push(k[k.length] = {
  3184. status: e,
  3185. value: d[--q],
  3186. index: q
  3187. }) : h && p === m[h - 1][q] ? s.push(k[k.length] = {
  3188. status: f,
  3189. value: b[--h],
  3190. index: h
  3191. }) : (--q, --h, g.sparse || k.push({
  3192. status: "retained",
  3193. value: d[q]
  3194. }));
  3195. a.a.dc(s, l, !g.dontLimitMoves && 10 * n);
  3196. return k.reverse()
  3197. }
  3198. return function (a, d, e) {
  3199. e = "boolean" === typeof e ? {
  3200. dontLimitMoves: e
  3201. } : e || {};
  3202. a = a || [];
  3203. d = d || [];
  3204. return a.length < d.length ? b(a, d, "added", "deleted", e) : b(d, a, "deleted", "added", e)
  3205. }
  3206. }();
  3207. a.b("utils.compareArrays", a.a.ib);
  3208. (function () {
  3209. function b(b, c, d, k, l) {
  3210. var m = [],
  3211. h = a.B(function () {
  3212. var h = c(d, l, a.a.za(m, b)) || [];
  3213. 0 < m.length && (a.a.qc(m, h), k && a.l.w(k, null, [d, h, l]));
  3214. m.length = 0;
  3215. a.a.ra(m, h)
  3216. }, null, {
  3217. i: b,
  3218. wa: function () {
  3219. return !a.a.Qb(m)
  3220. }
  3221. });
  3222. return {
  3223. ca: m,
  3224. B: h.ba() ? h : n
  3225. }
  3226. }
  3227. var c = a.a.e.I(),
  3228. d = a.a.e.I();
  3229. a.a.Bb = function (e, f, g, k, l) {
  3230. function m(b, c) {
  3231. w = q[c];
  3232. v !== c && (D[b] = w);
  3233. w.qb(v++);
  3234. a.a.za(w.ca, e);
  3235. u.push(w);
  3236. z.push(w)
  3237. }
  3238. function h(b, c) {
  3239. if (b)
  3240. for (var d = 0, e = c.length; d < e; d++) c[d] && a.a.q(c[d].ca, function (a) {
  3241. b(a, d, c[d].ja)
  3242. })
  3243. }
  3244. f = f || [];
  3245. k = k || {};
  3246. var r = a.a.e.get(e, c) === n,
  3247. q = a.a.e.get(e, c) || [],
  3248. p = a.a.fb(q, function (a) {
  3249. return a.ja
  3250. }),
  3251. s = a.a.ib(p, f, k.dontLimitMoves),
  3252. u = [],
  3253. t = 0,
  3254. v = 0,
  3255. x = [],
  3256. z = [];
  3257. f = [];
  3258. for (var D = [], p = [], w, C = 0, B, E; B = s[C]; C++) switch (E = B.moved, B.status) {
  3259. case "deleted":
  3260. E === n && (w = q[t], w.B && (w.B.k(), w.B = n), a.a.za(w.ca, e).length && (k.beforeRemove && (u.push(w), z.push(w), w.ja === d ? w = null : f[C] = w), w && x.push.apply(x, w.ca)));
  3261. t++;
  3262. break;
  3263. case "retained":
  3264. m(C, t++);
  3265. break;
  3266. case "added":
  3267. E !== n ? m(C, E) : (w = {
  3268. ja: B.value,
  3269. qb: a.N(v++)
  3270. }, u.push(w), z.push(w), r || (p[C] = w))
  3271. }
  3272. a.a.e.set(e, c, u);
  3273. h(k.beforeMove, D);
  3274. a.a.q(x, k.beforeRemove ? a.$ : a.removeNode);
  3275. for (var C = 0, r = a.f.firstChild(e), F; w = z[C]; C++) {
  3276. w.ca || a.a.extend(w, b(e, g, w.ja, l, w.qb));
  3277. for (t = 0; s = w.ca[t]; r = s.nextSibling, F = s, t++) s !== r && a.f.gc(e, s, F);
  3278. !w.Wc && l && (l(w.ja, w.ca, w.qb), w.Wc = !0)
  3279. }
  3280. h(k.beforeRemove, f);
  3281. for (C = 0; C < f.length; ++C) f[C] && (f[C].ja = d);
  3282. h(k.afterMove, D);
  3283. h(k.afterAdd, p)
  3284. }
  3285. })();
  3286. a.b("utils.setDomNodeChildrenFromArrayMapping", a.a.Bb);
  3287. a.W = function () {
  3288. this.allowTemplateRewriting = !1
  3289. };
  3290. a.W.prototype = new a.O;
  3291. a.W.prototype.renderTemplateSource = function (b, c, d, e) {
  3292. if (c = (9 > a.a.C ? 0 : b.nodes) ? b.nodes() : null) return a.a.V(c.cloneNode(!0).childNodes);
  3293. b = b.text();
  3294. return a.a.ma(b, e)
  3295. };
  3296. a.W.sb = new a.W;
  3297. a.Db(a.W.sb);
  3298. a.b("nativeTemplateEngine", a.W);
  3299. (function () {
  3300. a.vb = function () {
  3301. var a = this.$c = function () {
  3302. if (!v || !v.tmpl) return 0;
  3303. try {
  3304. if (0 <= v.tmpl.tag.tmpl.open.toString().indexOf("__")) return 2
  3305. } catch (a) {}
  3306. return 1
  3307. }();
  3308. this.renderTemplateSource = function (b, e, f, g) {
  3309. g = g || u;
  3310. f = f || {};
  3311. if (2 > a) throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");
  3312. var k = b.data("precompiled");
  3313. k || (k = b.text() || "", k = v.template(null, "{{ko_with $item.koBindingContext}}" + k + "{{/ko_with}}"), b.data("precompiled", k));
  3314. b = [e.$data];
  3315. e = v.extend({
  3316. koBindingContext: e
  3317. }, f.templateOptions);
  3318. e = v.tmpl(k, b, e);
  3319. e.appendTo(g.createElement("div"));
  3320. v.fragments = {};
  3321. return e
  3322. };
  3323. this.createJavaScriptEvaluatorBlock = function (a) {
  3324. return "{{ko_code ((function() { return " + a + " })()) }}"
  3325. };
  3326. this.addTemplate = function (a, b) {
  3327. u.write("<script type='text/html' id='" + a + "'>" + b + "</script>")
  3328. };
  3329. 0 < a && (v.tmpl.tag.ko_code = {
  3330. open: "__.push($1 || '');"
  3331. }, v.tmpl.tag.ko_with = {
  3332. open: "with($1) {",
  3333. close: "} "
  3334. })
  3335. };
  3336. a.vb.prototype = new a.O;
  3337. var b = new a.vb;
  3338. 0 < b.$c && a.Db(b);
  3339. a.b("jqueryTmplTemplateEngine", a.vb)
  3340. })()
  3341. })
  3342. })()
  3343. })();
  3344. ! function (a, b) {
  3345. "use strict";
  3346. function c(a, b) {
  3347. if (!a || "object" != typeof a) throw new Error("When calling ko.track, you must pass an object as the first parameter.");
  3348. var c;
  3349. return i(b) ? (b.deep = b.deep || !1, b.fields = b.fields || Object.getOwnPropertyNames(a), b.lazy = b.lazy || !1, h(a, b.fields, b)) : (c = b || Object.getOwnPropertyNames(a), h(a, c, {})), a
  3350. }
  3351. function d(a) {
  3352. return a.name ? a.name : (a.toString().trim().match(A) || [])[1]
  3353. }
  3354. function e(a) {
  3355. return a && "object" == typeof a && "Object" === d(a.constructor)
  3356. }
  3357. function f(a, c, d) {
  3358. var e = w.isObservable(a),
  3359. f = !e && Array.isArray(a),
  3360. g = e ? a : f ? w.observableArray(a) : w.observable(a);
  3361. return d[c] = function () {
  3362. return g
  3363. }, (f || e && "push" in g) && m(w, g), {
  3364. configurable: !0,
  3365. enumerable: !0,
  3366. get: g,
  3367. set: w.isWriteableObservable(g) ? g : b
  3368. }
  3369. }
  3370. function g(a, b, c) {
  3371. function d(a, b) {
  3372. return e ? b ? e(a) : e : Array.isArray(a) ? (e = w.observableArray(a), m(w, e), e) : e = w.observable(a)
  3373. }
  3374. if (w.isObservable(a)) return f(a, b, c);
  3375. var e;
  3376. return c[b] = function () {
  3377. return d(a)
  3378. }, {
  3379. configurable: !0,
  3380. enumerable: !0,
  3381. get: function () {
  3382. return d(a)()
  3383. },
  3384. set: function (a) {
  3385. d(a, !0)
  3386. }
  3387. }
  3388. }
  3389. function h(a, b, c) {
  3390. if (b.length) {
  3391. var d = j(a, !0),
  3392. i = {};
  3393. b.forEach(function (b) {
  3394. if (!(b in d) && Object.getOwnPropertyDescriptor(a, b).configurable !== !1) {
  3395. var j = a[b];
  3396. i[b] = (c.lazy ? g : f)(j, b, d), c.deep && e(j) && h(j, Object.keys(j), c)
  3397. }
  3398. }), Object.defineProperties(a, i)
  3399. }
  3400. }
  3401. function i(a) {
  3402. return !!a && "object" == typeof a && a.constructor === Object
  3403. }
  3404. function j(a, b) {
  3405. x || (x = z());
  3406. var c = x.get(a);
  3407. return !c && b && (c = {}, x.set(a, c)), c
  3408. }
  3409. function k(a, b) {
  3410. if (x)
  3411. if (1 === arguments.length) x["delete"](a);
  3412. else {
  3413. var c = j(a, !1);
  3414. c && b.forEach(function (a) {
  3415. delete c[a]
  3416. })
  3417. }
  3418. }
  3419. function l(a, b, d) {
  3420. var e = this,
  3421. f = {
  3422. owner: a,
  3423. deferEvaluation: !0
  3424. };
  3425. if ("function" == typeof d) f.read = d;
  3426. else {
  3427. if ("value" in d) throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');
  3428. if ("function" != typeof d.get) throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');
  3429. f.read = d.get, f.write = d.set
  3430. }
  3431. return a[b] = e.computed(f), c.call(e, a, [b]), a
  3432. }
  3433. function m(a, b) {
  3434. var c = null;
  3435. a.computed(function () {
  3436. c && (c.dispose(), c = null);
  3437. var d = b();
  3438. d instanceof Array && (c = n(a, b, d))
  3439. })
  3440. }
  3441. function n(a, b, c) {
  3442. var d = o(a, c);
  3443. return d.subscribe(b)
  3444. }
  3445. function o(a, b) {
  3446. y || (y = z());
  3447. var c = y.get(b);
  3448. if (!c) {
  3449. c = new a.subscribable, y.set(b, c);
  3450. var d = {};
  3451. p(b, c, d), q(a, b, c, d)
  3452. }
  3453. return c
  3454. }
  3455. function p(a, b, c) {
  3456. ["pop", "push", "reverse", "shift", "sort", "splice", "unshift"].forEach(function (d) {
  3457. var e = a[d];
  3458. a[d] = function () {
  3459. var a = e.apply(this, arguments);
  3460. return c.pause !== !0 && b.notifySubscribers(this), a
  3461. }
  3462. })
  3463. }
  3464. function q(a, b, c, d) {
  3465. ["remove", "removeAll", "destroy", "destroyAll", "replace"].forEach(function (e) {
  3466. Object.defineProperty(b, e, {
  3467. enumerable: !1,
  3468. value: function () {
  3469. var f;
  3470. d.pause = !0;
  3471. try {
  3472. f = a.observableArray.fn[e].apply(a.observableArray(b), arguments)
  3473. } finally {
  3474. d.pause = !1
  3475. }
  3476. return c.notifySubscribers(b), f
  3477. }
  3478. })
  3479. })
  3480. }
  3481. function r(a, b) {
  3482. if (!a || "object" != typeof a) return null;
  3483. var c = j(a, !1);
  3484. return c && b in c ? c[b]() : null
  3485. }
  3486. function s(a, b) {
  3487. if (!a || "object" != typeof a) return !1;
  3488. var c = j(a, !1);
  3489. return !!c && b in c
  3490. }
  3491. function t(a, b) {
  3492. var c = r(a, b);
  3493. c && c.valueHasMutated()
  3494. }
  3495. function u(a) {
  3496. a.track = c, a.untrack = k, a.getObservable = r, a.valueHasMutated = t, a.defineProperty = l, a.es5 = {
  3497. getAllObservablesForObject: j,
  3498. notifyWhenPresentOrFutureArrayValuesMutate: m,
  3499. isTracked: s
  3500. }
  3501. }
  3502. function v() {
  3503. if ("object" == typeof exports && "object" == typeof module) {
  3504. w = require("knockout");
  3505. var b = require("../lib/weakmap");
  3506. u(w), z = function () {
  3507. return new b
  3508. }, module.exports = w
  3509. } else "function" == typeof define && define.amd ? define("KnockoutES5", ["knockout"], function (b) {
  3510. return w = b, u(b), z = function () {
  3511. return new a.WeakMap
  3512. }, b
  3513. }) : "ko" in a && (w = a.ko, u(a.ko), z = function () {
  3514. return new a.WeakMap
  3515. })
  3516. }
  3517. var w, x, y, z, A = /^function\s*([^\s(]+)/;
  3518. v()
  3519. }(this), void
  3520. function (a, b, c) {
  3521. function d(a, b, c) {
  3522. return "function" == typeof b && (c = b, b = e(c).replace(/_$/, "")), j(a, b, {
  3523. configurable: !0,
  3524. writable: !0,
  3525. value: c
  3526. })
  3527. }
  3528. function e(a) {
  3529. return "function" != typeof a ? "" : "_name" in a ? a._name : "name" in a ? a.name : k.call(a).match(n)[1]
  3530. }
  3531. function f(a, b) {
  3532. return b._name = a, b
  3533. }
  3534. function g(a) {
  3535. function b(b, e) {
  3536. return e || 2 === arguments.length ? d.set(b, e) : (e = d.get(b), e === c && (e = a(b), d.set(b, e))), e
  3537. }
  3538. var d = new p;
  3539. return a || (a = q), b
  3540. }
  3541. var h = Object.getOwnPropertyNames,
  3542. i = "object" == typeof window ? Object.getOwnPropertyNames(window) : [],
  3543. j = Object.defineProperty,
  3544. k = Function.prototype.toString,
  3545. l = Object.create,
  3546. m = Object.prototype.hasOwnProperty,
  3547. n = /^\n?function\s?(\w*)?_?\(/,
  3548. o = function () {
  3549. function a() {
  3550. var a = g(),
  3551. c = {};
  3552. this.unlock = function (d) {
  3553. var e = n(d);
  3554. if (m.call(e, a)) return e[a](c);
  3555. var f = l(null, b);
  3556. return j(e, a, {
  3557. value: function (a) {
  3558. return a === c ? f : void 0
  3559. }
  3560. }), f
  3561. }
  3562. }
  3563. var b = {
  3564. value: {
  3565. writable: !0,
  3566. value: c
  3567. }
  3568. },
  3569. e = l(null),
  3570. g = function () {
  3571. var a = Math.random().toString(36).slice(2);
  3572. return a in e ? g() : e[a] = a
  3573. },
  3574. k = g(),
  3575. n = function (a) {
  3576. if (m.call(a, k)) return a[k];
  3577. if (!Object.isExtensible(a)) throw new TypeError("Object must be extensible");
  3578. var b = l(null);
  3579. return j(a, k, {
  3580. value: b
  3581. }), b
  3582. };
  3583. return d(Object, f("getOwnPropertyNames", function (a) {
  3584. var b, c = Object(a);
  3585. if (c !== Window.prototype && "toString" in c && "[object Window]" === c.toString()) try {
  3586. b = h(a)
  3587. } catch (d) {
  3588. b = i
  3589. } else b = h(a);
  3590. return m.call(a, k) && b.splice(b.indexOf(k), 1), b
  3591. })), d(a.prototype, f("get", function (a) {
  3592. return this.unlock(a).value
  3593. })), d(a.prototype, f("set", function (a, b) {
  3594. this.unlock(a).value = b
  3595. })), a
  3596. }(),
  3597. p = function (g) {
  3598. function h(b) {
  3599. return this === a || null == this || this === h.prototype ? new h(b) : (p(this, new o), void r(this, b))
  3600. }
  3601. function i(a) {
  3602. n(a);
  3603. var d = q(this).get(a);
  3604. return d === b ? c : d
  3605. }
  3606. function j(a, d) {
  3607. n(a), q(this).set(a, d === c ? b : d)
  3608. }
  3609. function k(a) {
  3610. return n(a), q(this).get(a) !== c
  3611. }
  3612. function l(a) {
  3613. n(a);
  3614. var b = q(this),
  3615. d = b.get(a) !== c;
  3616. return b.set(a, c), d
  3617. }
  3618. function m() {
  3619. return q(this), "[object WeakMap]"
  3620. }
  3621. var n = function (a) {
  3622. if (null == a || "object" != typeof a && "function" != typeof a) throw new TypeError("Invalid WeakMap key")
  3623. },
  3624. p = function (a, b) {
  3625. var c = g.unlock(a);
  3626. if (c.value) throw new TypeError("Object is already a WeakMap");
  3627. c.value = b
  3628. },
  3629. q = function (a) {
  3630. var b = g.unlock(a).value;
  3631. if (!b) throw new TypeError("WeakMap is not generic");
  3632. return b
  3633. },
  3634. r = function (a, b) {
  3635. null !== b && "object" == typeof b && "function" == typeof b.forEach && b.forEach(function (c, d) {
  3636. c instanceof Array && 2 === c.length && j.call(a, b[d][0], b[d][1])
  3637. })
  3638. };
  3639. i._name = "get", j._name = "set", k._name = "has", m._name = "toString";
  3640. var s = ("" + Object).split("Object"),
  3641. t = f("toString", function () {
  3642. return s[0] + e(this) + s[1]
  3643. });
  3644. d(t, t);
  3645. var u = {
  3646. __proto__: []
  3647. }
  3648. instanceof Array ? function (a) {
  3649. a.__proto__ = t
  3650. } : function (a) {
  3651. d(a, t)
  3652. };
  3653. return u(h), [m, i, j, k, l].forEach(function (a) {
  3654. d(h.prototype, a), u(a)
  3655. }), h
  3656. }(new o),
  3657. q = Object.create ? function () {
  3658. return Object.create(null)
  3659. } : function () {
  3660. return {}
  3661. };
  3662. "undefined" != typeof module ? module.exports = p : "undefined" != typeof exports ? exports.WeakMap = p : "WeakMap" in a || (a.WeakMap = p), p.createStorage = g, a.WeakMap && (a.WeakMap.createStorage = g)
  3663. }(function () {
  3664. return this
  3665. }());
  3666. ! function (e) {
  3667. if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
  3668. else if ("function" == typeof define && define.amd) define("markdown-it-sanitizer", [], e);
  3669. else {
  3670. var t;
  3671. t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, t.markdownitSanitizer = e()
  3672. }
  3673. }(function () {
  3674. return function e(t, n, r) {
  3675. function o(l, f) {
  3676. if (!n[l]) {
  3677. if (!t[l]) {
  3678. var a = "function" == typeof require && require;
  3679. if (!f && a) return a(l, !0);
  3680. if (i) return i(l, !0);
  3681. var s = new Error("Cannot find module '" + l + "'");
  3682. throw s.code = "MODULE_NOT_FOUND", s
  3683. }
  3684. var u = n[l] = {
  3685. exports: {}
  3686. };
  3687. t[l][0].call(u.exports, function (e) {
  3688. var n = t[l][1][e];
  3689. return o(n ? n : e)
  3690. }, u, u.exports, e, t, n, r)
  3691. }
  3692. return n[l].exports
  3693. }
  3694. for (var i = "function" == typeof require && require, l = 0; l < r.length; l++) o(r[l]);
  3695. return o
  3696. }({
  3697. 1: [function (e, t, n) {
  3698. "use strict";
  3699. t.exports = function (e, t) {
  3700. function n(e) {
  3701. var t = l.match(e);
  3702. return t && 1 === t.length && 0 === t[0].index && t[0].lastIndex === e.length ? t[0].url : null
  3703. }
  3704. function r(e) {
  3705. var t = '<a\\shref="([^"<>]*)"(?:\\stitle="([^"<>]*)")?>',
  3706. r = RegExp(t, "i"),
  3707. o = '<img\\s([^<>]*src="[^"<>]*"[^<>]*)\\s?\\/?>',
  3708. i = RegExp(o, "i");
  3709. return e = e.replace(/<[^<>]*>?/gi, function (e) {
  3710. var t, o, l, a, u;
  3711. if (/(^<->|^<-\s|^<3\s)/.test(e)) return e;
  3712. if (t = e.match(i)) {
  3713. var m = t[1];
  3714. if (o = n(m.match(/src="([^"<>]*)"/i)[1]), l = m.match(/alt="([^"<>]*)"/i), l = l && "undefined" != typeof l[1] ? l[1] : "", a = m.match(/title="([^"<>]*)"/i), a = a && "undefined" != typeof a[1] ? a[1] : "", o && /^https?:\/\//i.test(o)) return "" !== c ? '<img src="' + o + '" alt="' + l + '" title="' + a + '" class="' + c + '">' : '<img src="' + o + '" alt="' + l + '" title="' + a + '">'
  3715. }
  3716. return u = d.indexOf("a"), t = e.match(r), t && (a = "undefined" != typeof t[2] ? t[2] : "", o = n(t[1]), o && /^(?:https?:\/\/|ftp:\/\/|mailto:|xmpp:)/i.test(o)) ? (p = !0, h[u] += 1, '<a href="' + o + '" title="' + a + '" target="_blank">') : (t = /<\/a>/i.test(e)) ? (p = !0, h[u] -= 1, h[u] < 0 && (g[u] = !0), "</a>") : (t = e.match(/<(br|hr)\s?\/?>/i)) ? "<" + t[1].toLowerCase() + ">" : (t = e.match(/<(\/?)(b|blockquote|code|em|h[1-6]|li|ol(?: start="\d+")?|p|pre|s|sub|sup|strong|ul)>/i), t && !/<\/ol start="\d+"/i.test(e) ? (p = !0, u = d.indexOf(t[2].toLowerCase().split(" ")[0]), "/" === t[1] ? h[u] -= 1 : h[u] += 1, h[u] < 0 && (g[u] = !0), "<" + t[1] + t[2].toLowerCase() + ">") : s === !0 ? "" : f(e))
  3717. })
  3718. }
  3719. function o(e) {
  3720. var t, n, o;
  3721. for (a = 0; a < d.length; a++) h[a] = 0;
  3722. for (a = 0; a < d.length; a++) g[a] = !1;
  3723. for (p = !1, n = 0; n < e.tokens.length; n++)
  3724. if ("html_block" === e.tokens[n].type && (e.tokens[n].content = r(e.tokens[n].content)), "inline" === e.tokens[n].type)
  3725. for (o = e.tokens[n].children, t = 0; t < o.length; t++) "html_inline" === o[t].type && (o[t].content = r(o[t].content))
  3726. }
  3727. function i(e) {
  3728. function t(e, t) {
  3729. var n, r;
  3730. return n = "a" === t ? RegExp('<a href="[^"<>]*" title="[^"<>]*" target="_blank">', "g") : "ol" === t ? /<ol(?: start="\d+")?>/g : RegExp("<" + t + ">", "g"), r = RegExp("</" + t + ">", "g"), u === !0 ? (e = e.replace(n, ""), e = e.replace(r, "")) : (e = e.replace(n, function (e) {
  3731. return f(e)
  3732. }), e = e.replace(r, function (e) {
  3733. return f(e)
  3734. })), e
  3735. }
  3736. function n(e) {
  3737. var n;
  3738. for (n = 0; n < d.length; n++) g[n] === !0 && (e = t(e, d[n]));
  3739. return e
  3740. }
  3741. if (p !== !1) {
  3742. var r, o;
  3743. for (a = 0; a < d.length; a++) 0 !== h[a] && (g[a] = !0);
  3744. for (r = 0; r < e.tokens.length; r++)
  3745. if ("html_block" !== e.tokens[r].type) {
  3746. if ("inline" === e.tokens[r].type)
  3747. for (o = e.tokens[r].children, a = 0; a < o.length; a++) "html_inline" === o[a].type && (o[a].content = n(o[a].content))
  3748. } else e.tokens[r].content = n(e.tokens[r].content)
  3749. }
  3750. }
  3751. var l = e.linkify,
  3752. f = e.utils.escapeHtml;
  3753. t = t ? t : {};
  3754. var a, s = "undefined" != typeof t.removeUnknown ? t.removeUnknown : !1,
  3755. u = "undefined" != typeof t.removeUnbalanced ? t.removeUnbalanced : !1,
  3756. c = "undefined" != typeof t.imageClass ? t.imageClass : "",
  3757. p = !1,
  3758. d = ["a", "b", "blockquote", "code", "em", "h1", "h2", "h3", "h4", "h5", "h6", "li", "ol", "p", "pre", "s", "sub", "sup", "strong", "ul"],
  3759. h = new Array(d.length),
  3760. g = new Array(d.length);
  3761. for (a = 0; a < d.length; a++) h[a] = 0;
  3762. for (a = 0; a < d.length; a++) g[a] = !1;
  3763. e.core.ruler.after("linkify", "sanitize_inline", o), e.core.ruler.after("sanitize_inline", "sanitize_balance", i)
  3764. }
  3765. }, {}]
  3766. }, {}, [1])(1)
  3767. });
  3768. ! function (e) {
  3769. if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
  3770. else if ("function" == typeof define && define.amd) define("markdown-it", [], e);
  3771. else {
  3772. var r;
  3773. r = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, r.markdownit = e()
  3774. }
  3775. }(function () {
  3776. var e;
  3777. return function r(e, t, n) {
  3778. function s(i, a) {
  3779. if (!t[i]) {
  3780. if (!e[i]) {
  3781. var c = "function" == typeof require && require;
  3782. if (!a && c) return c(i, !0);
  3783. if (o) return o(i, !0);
  3784. var l = new Error("Cannot find module '" + i + "'");
  3785. throw l.code = "MODULE_NOT_FOUND", l
  3786. }
  3787. var u = t[i] = {
  3788. exports: {}
  3789. };
  3790. e[i][0].call(u.exports, function (r) {
  3791. var t = e[i][1][r];
  3792. return s(t ? t : r)
  3793. }, u, u.exports, r, e, t, n)
  3794. }
  3795. return t[i].exports
  3796. }
  3797. for (var o = "function" == typeof require && require, i = 0; i < n.length; i++) s(n[i]);
  3798. return s
  3799. }({
  3800. 1: [function (e, r, t) {
  3801. "use strict";
  3802. r.exports = e("entities/maps/entities.json")
  3803. }, {
  3804. "entities/maps/entities.json": 53
  3805. }],
  3806. 2: [function (e, r, t) {
  3807. "use strict";
  3808. r.exports = ["address", "article", "aside", "base", "basefont", "blockquote", "body", "caption", "center", "col", "colgroup", "dd", "details", "dialog", "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "head", "header", "hr", "html", "iframe", "legend", "li", "link", "main", "menu", "menuitem", "meta", "nav", "noframes", "ol", "optgroup", "option", "p", "param", "pre", "section", "source", "title", "summary", "table", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", "ul"]
  3809. }, {}],
  3810. 3: [function (e, r, t) {
  3811. "use strict";
  3812. var n = "[a-zA-Z_:][a-zA-Z0-9:._-]*",
  3813. s = "[^\"'=<>`\\x00-\\x20]+",
  3814. o = "'[^']*'",
  3815. i = '"[^"]*"',
  3816. a = "(?:" + s + "|" + o + "|" + i + ")",
  3817. c = "(?:\\s+" + n + "(?:\\s*=\\s*" + a + ")?)",
  3818. l = "<[A-Za-z][A-Za-z0-9\\-]*" + c + "*\\s*\\/?>",
  3819. u = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",
  3820. p = "<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",
  3821. h = "<[?].*?[?]>",
  3822. f = "<![A-Z]+\\s+[^>]*>",
  3823. d = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",
  3824. m = new RegExp("^(?:" + l + "|" + u + "|" + p + "|" + h + "|" + f + "|" + d + ")"),
  3825. _ = new RegExp("^(?:" + l + "|" + u + ")");
  3826. r.exports.HTML_TAG_RE = m, r.exports.HTML_OPEN_CLOSE_TAG_RE = _
  3827. }, {}],
  3828. 4: [function (e, r, t) {
  3829. "use strict";
  3830. function n(e) {
  3831. return Object.prototype.toString.call(e)
  3832. }
  3833. function s(e) {
  3834. return "[object String]" === n(e)
  3835. }
  3836. function o(e, r) {
  3837. return x.call(e, r)
  3838. }
  3839. function i(e) {
  3840. var r = Array.prototype.slice.call(arguments, 1);
  3841. return r.forEach(function (r) {
  3842. if (r) {
  3843. if ("object" != typeof r) throw new TypeError(r + "must be object");
  3844. Object.keys(r).forEach(function (t) {
  3845. e[t] = r[t]
  3846. })
  3847. }
  3848. }), e
  3849. }
  3850. function a(e, r, t) {
  3851. return [].concat(e.slice(0, r), t, e.slice(r + 1))
  3852. }
  3853. function c(e) {
  3854. return !(e >= 55296 && e <= 57343) && (!(e >= 64976 && e <= 65007) && (65535 !== (65535 & e) && 65534 !== (65535 & e) && (!(e >= 0 && e <= 8) && (11 !== e && (!(e >= 14 && e <= 31) && (!(e >= 127 && e <= 159) && !(e > 1114111)))))))
  3855. }
  3856. function l(e) {
  3857. if (e > 65535) {
  3858. e -= 65536;
  3859. var r = 55296 + (e >> 10),
  3860. t = 56320 + (1023 & e);
  3861. return String.fromCharCode(r, t)
  3862. }
  3863. return String.fromCharCode(e)
  3864. }
  3865. function u(e, r) {
  3866. var t = 0;
  3867. return o(D, r) ? D[r] : 35 === r.charCodeAt(0) && w.test(r) && (t = "x" === r[1].toLowerCase() ? parseInt(r.slice(2), 16) : parseInt(r.slice(1), 10), c(t)) ? l(t) : e
  3868. }
  3869. function p(e) {
  3870. return e.indexOf("\\") < 0 ? e : e.replace(y, "$1")
  3871. }
  3872. function h(e) {
  3873. return e.indexOf("\\") < 0 && e.indexOf("&") < 0 ? e : e.replace(A, function (e, r, t) {
  3874. return r ? r : u(e, t)
  3875. })
  3876. }
  3877. function f(e) {
  3878. return S[e]
  3879. }
  3880. function d(e) {
  3881. return q.test(e) ? e.replace(E, f) : e
  3882. }
  3883. function m(e) {
  3884. return e.replace(F, "\\$&")
  3885. }
  3886. function _(e) {
  3887. switch (e) {
  3888. case 9:
  3889. case 32:
  3890. return !0
  3891. }
  3892. return !1
  3893. }
  3894. function g(e) {
  3895. if (e >= 8192 && e <= 8202) return !0;
  3896. switch (e) {
  3897. case 9:
  3898. case 10:
  3899. case 11:
  3900. case 12:
  3901. case 13:
  3902. case 32:
  3903. case 160:
  3904. case 5760:
  3905. case 8239:
  3906. case 8287:
  3907. case 12288:
  3908. return !0
  3909. }
  3910. return !1
  3911. }
  3912. function k(e) {
  3913. return z.test(e)
  3914. }
  3915. function b(e) {
  3916. switch (e) {
  3917. case 33:
  3918. case 34:
  3919. case 35:
  3920. case 36:
  3921. case 37:
  3922. case 38:
  3923. case 39:
  3924. case 40:
  3925. case 41:
  3926. case 42:
  3927. case 43:
  3928. case 44:
  3929. case 45:
  3930. case 46:
  3931. case 47:
  3932. case 58:
  3933. case 59:
  3934. case 60:
  3935. case 61:
  3936. case 62:
  3937. case 63:
  3938. case 64:
  3939. case 91:
  3940. case 92:
  3941. case 93:
  3942. case 94:
  3943. case 95:
  3944. case 96:
  3945. case 123:
  3946. case 124:
  3947. case 125:
  3948. case 126:
  3949. return !0;
  3950. default:
  3951. return !1
  3952. }
  3953. }
  3954. function v(e) {
  3955. return e.trim().replace(/\s+/g, " ").toUpperCase()
  3956. }
  3957. var x = Object.prototype.hasOwnProperty,
  3958. y = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,
  3959. C = /&([a-z#][a-z0-9]{1,31});/gi,
  3960. A = new RegExp(y.source + "|" + C.source, "gi"),
  3961. w = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,
  3962. D = e("./entities"),
  3963. q = /[&<>"]/,
  3964. E = /[&<>"]/g,
  3965. S = {
  3966. "&": "&amp;",
  3967. "<": "&lt;",
  3968. ">": "&gt;",
  3969. '"': "&quot;"
  3970. },
  3971. F = /[.?*+^$[\]\\(){}|-]/g,
  3972. z = e("uc.micro/categories/P/regex");
  3973. t.lib = {}, t.lib.mdurl = e("mdurl"), t.lib.ucmicro = e("uc.micro"), t.assign = i, t.isString = s, t.has = o, t.unescapeMd = p, t.unescapeAll = h, t.isValidEntityCode = c, t.fromCodePoint = l, t.escapeHtml = d, t.arrayReplaceAt = a, t.isSpace = _, t.isWhiteSpace = g, t.isMdAsciiPunct = b, t.isPunctChar = k, t.escapeRE = m, t.normalizeReference = v
  3974. }, {
  3975. "./entities": 1,
  3976. mdurl: 59,
  3977. "uc.micro": 65,
  3978. "uc.micro/categories/P/regex": 63
  3979. }],
  3980. 5: [function (e, r, t) {
  3981. "use strict";
  3982. t.parseLinkLabel = e("./parse_link_label"), t.parseLinkDestination = e("./parse_link_destination"), t.parseLinkTitle = e("./parse_link_title")
  3983. }, {
  3984. "./parse_link_destination": 6,
  3985. "./parse_link_label": 7,
  3986. "./parse_link_title": 8
  3987. }],
  3988. 6: [function (e, r, t) {
  3989. "use strict";
  3990. var n = e("../common/utils").isSpace,
  3991. s = e("../common/utils").unescapeAll;
  3992. r.exports = function (e, r, t) {
  3993. var o, i, a = 0,
  3994. c = r,
  3995. l = {
  3996. ok: !1,
  3997. pos: 0,
  3998. lines: 0,
  3999. str: ""
  4000. };
  4001. if (60 === e.charCodeAt(r)) {
  4002. for (r++; r < t;) {
  4003. if (o = e.charCodeAt(r), 10 === o || n(o)) return l;
  4004. if (62 === o) return l.pos = r + 1, l.str = s(e.slice(c + 1, r)), l.ok = !0, l;
  4005. 92 === o && r + 1 < t ? r += 2 : r++
  4006. }
  4007. return l
  4008. }
  4009. for (i = 0; r < t && (o = e.charCodeAt(r), 32 !== o) && !(o < 32 || 127 === o);)
  4010. if (92 === o && r + 1 < t) r += 2;
  4011. else {
  4012. if (40 === o && (i++, i > 1)) break;
  4013. if (41 === o && (i--, i < 0)) break;
  4014. r++
  4015. }
  4016. return c === r ? l : (l.str = s(e.slice(c, r)), l.lines = a, l.pos = r, l.ok = !0, l)
  4017. }
  4018. }, {
  4019. "../common/utils": 4
  4020. }],
  4021. 7: [function (e, r, t) {
  4022. "use strict";
  4023. r.exports = function (e, r, t) {
  4024. var n, s, o, i, a = -1,
  4025. c = e.posMax,
  4026. l = e.pos;
  4027. for (e.pos = r + 1, n = 1; e.pos < c;) {
  4028. if (o = e.src.charCodeAt(e.pos), 93 === o && (n--, 0 === n)) {
  4029. s = !0;
  4030. break
  4031. }
  4032. if (i = e.pos, e.md.inline.skipToken(e), 91 === o)
  4033. if (i === e.pos - 1) n++;
  4034. else if (t) return e.pos = l, -1
  4035. }
  4036. return s && (a = e.pos), e.pos = l, a
  4037. }
  4038. }, {}],
  4039. 8: [function (e, r, t) {
  4040. "use strict";
  4041. var n = e("../common/utils").unescapeAll;
  4042. r.exports = function (e, r, t) {
  4043. var s, o, i = 0,
  4044. a = r,
  4045. c = {
  4046. ok: !1,
  4047. pos: 0,
  4048. lines: 0,
  4049. str: ""
  4050. };
  4051. if (r >= t) return c;
  4052. if (o = e.charCodeAt(r), 34 !== o && 39 !== o && 40 !== o) return c;
  4053. for (r++, 40 === o && (o = 41); r < t;) {
  4054. if (s = e.charCodeAt(r), s === o) return c.pos = r + 1, c.lines = i, c.str = n(e.slice(a + 1, r)), c.ok = !0, c;
  4055. 10 === s ? i++ : 92 === s && r + 1 < t && (r++, 10 === e.charCodeAt(r) && i++), r++
  4056. }
  4057. return c
  4058. }
  4059. }, {
  4060. "../common/utils": 4
  4061. }],
  4062. 9: [function (e, r, t) {
  4063. "use strict";
  4064. function n(e) {
  4065. var r = e.trim().toLowerCase();
  4066. return !g.test(r) || !!k.test(r)
  4067. }
  4068. function s(e) {
  4069. var r = d.parse(e, !0);
  4070. if (r.hostname && (!r.protocol || b.indexOf(r.protocol) >= 0)) try {
  4071. r.hostname = m.toASCII(r.hostname)
  4072. } catch (t) {}
  4073. return d.encode(d.format(r))
  4074. }
  4075. function o(e) {
  4076. var r = d.parse(e, !0);
  4077. if (r.hostname && (!r.protocol || b.indexOf(r.protocol) >= 0)) try {
  4078. r.hostname = m.toUnicode(r.hostname)
  4079. } catch (t) {}
  4080. return d.decode(d.format(r))
  4081. }
  4082. function i(e, r) {
  4083. return this instanceof i ? (r || a.isString(e) || (r = e || {}, e = "default"), this.inline = new h, this.block = new p, this.core = new u, this.renderer = new l, this.linkify = new f, this.validateLink = n, this.normalizeLink = s, this.normalizeLinkText = o, this.utils = a, this.helpers = c, this.options = {}, this.configure(e), void(r && this.set(r))) : new i(e, r)
  4084. }
  4085. var a = e("./common/utils"),
  4086. c = e("./helpers"),
  4087. l = e("./renderer"),
  4088. u = e("./parser_core"),
  4089. p = e("./parser_block"),
  4090. h = e("./parser_inline"),
  4091. f = e("linkify-it"),
  4092. d = e("mdurl"),
  4093. m = e("punycode"),
  4094. _ = {
  4095. "default": e("./presets/default"),
  4096. zero: e("./presets/zero"),
  4097. commonmark: e("./presets/commonmark")
  4098. },
  4099. g = /^(vbscript|javascript|file|data):/,
  4100. k = /^data:image\/(gif|png|jpeg|webp);/,
  4101. b = ["http:", "https:", "mailto:"];
  4102. i.prototype.set = function (e) {
  4103. return a.assign(this.options, e), this
  4104. }, i.prototype.configure = function (e) {
  4105. var r, t = this;
  4106. if (a.isString(e) && (r = e, e = _[r], !e)) throw new Error('Wrong `markdown-it` preset "' + r + '", check name');
  4107. if (!e) throw new Error("Wrong `markdown-it` preset, can't be empty");
  4108. return e.options && t.set(e.options), e.components && Object.keys(e.components).forEach(function (r) {
  4109. e.components[r].rules && t[r].ruler.enableOnly(e.components[r].rules), e.components[r].rules2 && t[r].ruler2.enableOnly(e.components[r].rules2)
  4110. }), this
  4111. }, i.prototype.enable = function (e, r) {
  4112. var t = [];
  4113. Array.isArray(e) || (e = [e]), ["core", "block", "inline"].forEach(function (r) {
  4114. t = t.concat(this[r].ruler.enable(e, !0))
  4115. }, this), t = t.concat(this.inline.ruler2.enable(e, !0));
  4116. var n = e.filter(function (e) {
  4117. return t.indexOf(e) < 0
  4118. });
  4119. if (n.length && !r) throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + n);
  4120. return this
  4121. }, i.prototype.disable = function (e, r) {
  4122. var t = [];
  4123. Array.isArray(e) || (e = [e]), ["core", "block", "inline"].forEach(function (r) {
  4124. t = t.concat(this[r].ruler.disable(e, !0))
  4125. }, this), t = t.concat(this.inline.ruler2.disable(e, !0));
  4126. var n = e.filter(function (e) {
  4127. return t.indexOf(e) < 0
  4128. });
  4129. if (n.length && !r) throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + n);
  4130. return this
  4131. }, i.prototype.use = function (e) {
  4132. var r = [this].concat(Array.prototype.slice.call(arguments, 1));
  4133. return e.apply(e, r), this
  4134. }, i.prototype.parse = function (e, r) {
  4135. var t = new this.core.State(e, this, r);
  4136. return this.core.process(t), t.tokens
  4137. }, i.prototype.render = function (e, r) {
  4138. return r = r || {}, this.renderer.render(this.parse(e, r), this.options, r)
  4139. }, i.prototype.parseInline = function (e, r) {
  4140. var t = new this.core.State(e, this, r);
  4141. return t.inlineMode = !0, this.core.process(t), t.tokens
  4142. }, i.prototype.renderInline = function (e, r) {
  4143. return r = r || {}, this.renderer.render(this.parseInline(e, r), this.options, r)
  4144. }, r.exports = i
  4145. }, {
  4146. "./common/utils": 4,
  4147. "./helpers": 5,
  4148. "./parser_block": 10,
  4149. "./parser_core": 11,
  4150. "./parser_inline": 12,
  4151. "./presets/commonmark": 13,
  4152. "./presets/default": 14,
  4153. "./presets/zero": 15,
  4154. "./renderer": 16,
  4155. "linkify-it": 54,
  4156. mdurl: 59,
  4157. punycode: 52
  4158. }],
  4159. 10: [function (e, r, t) {
  4160. "use strict";
  4161. function n() {
  4162. this.ruler = new s;
  4163. for (var e = 0; e < o.length; e++) this.ruler.push(o[e][0], o[e][1], {
  4164. alt: (o[e][2] || []).slice()
  4165. })
  4166. }
  4167. var s = e("./ruler"),
  4168. o = [
  4169. ["table", e("./rules_block/table"), ["paragraph", "reference"]],
  4170. ["code", e("./rules_block/code")],
  4171. ["fence", e("./rules_block/fence"), ["paragraph", "reference", "blockquote", "list"]],
  4172. ["blockquote", e("./rules_block/blockquote"), ["paragraph", "reference", "list"]],
  4173. ["hr", e("./rules_block/hr"), ["paragraph", "reference", "blockquote", "list"]],
  4174. ["list", e("./rules_block/list"), ["paragraph", "reference", "blockquote"]],
  4175. ["reference", e("./rules_block/reference")],
  4176. ["heading", e("./rules_block/heading"), ["paragraph", "reference", "blockquote"]],
  4177. ["lheading", e("./rules_block/lheading")],
  4178. ["html_block", e("./rules_block/html_block"), ["paragraph", "reference", "blockquote"]],
  4179. ["paragraph", e("./rules_block/paragraph")]
  4180. ];
  4181. n.prototype.tokenize = function (e, r, t) {
  4182. for (var n, s, o = this.ruler.getRules(""), i = o.length, a = r, c = !1, l = e.md.options.maxNesting; a < t && (e.line = a = e.skipEmptyLines(a), !(a >= t)) && !(e.sCount[a] < e.blkIndent);) {
  4183. if (e.level >= l) {
  4184. e.line = t;
  4185. break
  4186. }
  4187. for (s = 0; s < i && !(n = o[s](e, a, t, !1)); s++);
  4188. if (e.tight = !c, e.isEmpty(e.line - 1) && (c = !0), a = e.line, a < t && e.isEmpty(a)) {
  4189. if (c = !0, a++, a < t && "list" === e.parentType && e.isEmpty(a)) break;
  4190. e.line = a
  4191. }
  4192. }
  4193. }, n.prototype.parse = function (e, r, t, n) {
  4194. var s;
  4195. e && (s = new this.State(e, r, t, n), this.tokenize(s, s.line, s.lineMax))
  4196. }, n.prototype.State = e("./rules_block/state_block"), r.exports = n
  4197. }, {
  4198. "./ruler": 17,
  4199. "./rules_block/blockquote": 18,
  4200. "./rules_block/code": 19,
  4201. "./rules_block/fence": 20,
  4202. "./rules_block/heading": 21,
  4203. "./rules_block/hr": 22,
  4204. "./rules_block/html_block": 23,
  4205. "./rules_block/lheading": 24,
  4206. "./rules_block/list": 25,
  4207. "./rules_block/paragraph": 26,
  4208. "./rules_block/reference": 27,
  4209. "./rules_block/state_block": 28,
  4210. "./rules_block/table": 29
  4211. }],
  4212. 11: [function (e, r, t) {
  4213. "use strict";
  4214. function n() {
  4215. this.ruler = new s;
  4216. for (var e = 0; e < o.length; e++) this.ruler.push(o[e][0], o[e][1])
  4217. }
  4218. var s = e("./ruler"),
  4219. o = [
  4220. ["normalize", e("./rules_core/normalize")],
  4221. ["block", e("./rules_core/block")],
  4222. ["inline", e("./rules_core/inline")],
  4223. ["linkify", e("./rules_core/linkify")],
  4224. ["replacements", e("./rules_core/replacements")],
  4225. ["smartquotes", e("./rules_core/smartquotes")]
  4226. ];
  4227. n.prototype.process = function (e) {
  4228. var r, t, n;
  4229. for (n = this.ruler.getRules(""), r = 0, t = n.length; r < t; r++) n[r](e)
  4230. }, n.prototype.State = e("./rules_core/state_core"), r.exports = n
  4231. }, {
  4232. "./ruler": 17,
  4233. "./rules_core/block": 30,
  4234. "./rules_core/inline": 31,
  4235. "./rules_core/linkify": 32,
  4236. "./rules_core/normalize": 33,
  4237. "./rules_core/replacements": 34,
  4238. "./rules_core/smartquotes": 35,
  4239. "./rules_core/state_core": 36
  4240. }],
  4241. 12: [function (e, r, t) {
  4242. "use strict";
  4243. function n() {
  4244. var e;
  4245. for (this.ruler = new s, e = 0; e < o.length; e++) this.ruler.push(o[e][0], o[e][1]);
  4246. for (this.ruler2 = new s, e = 0; e < i.length; e++) this.ruler2.push(i[e][0], i[e][1])
  4247. }
  4248. var s = e("./ruler"),
  4249. o = [
  4250. ["text", e("./rules_inline/text")],
  4251. ["newline", e("./rules_inline/newline")],
  4252. ["escape", e("./rules_inline/escape")],
  4253. ["backticks", e("./rules_inline/backticks")],
  4254. ["strikethrough", e("./rules_inline/strikethrough").tokenize],
  4255. ["emphasis", e("./rules_inline/emphasis").tokenize],
  4256. ["link", e("./rules_inline/link")],
  4257. ["image", e("./rules_inline/image")],
  4258. ["autolink", e("./rules_inline/autolink")],
  4259. ["html_inline", e("./rules_inline/html_inline")],
  4260. ["entity", e("./rules_inline/entity")]
  4261. ],
  4262. i = [
  4263. ["balance_pairs", e("./rules_inline/balance_pairs")],
  4264. ["strikethrough", e("./rules_inline/strikethrough").postProcess],
  4265. ["emphasis", e("./rules_inline/emphasis").postProcess],
  4266. ["text_collapse", e("./rules_inline/text_collapse")]
  4267. ];
  4268. n.prototype.skipToken = function (e) {
  4269. var r, t, n = e.pos,
  4270. s = this.ruler.getRules(""),
  4271. o = s.length,
  4272. i = e.md.options.maxNesting,
  4273. a = e.cache;
  4274. if ("undefined" != typeof a[n]) return void(e.pos = a[n]);
  4275. if (e.level < i)
  4276. for (t = 0; t < o && (e.level++, r = s[t](e, !0), e.level--, !r); t++);
  4277. else e.pos = e.posMax;
  4278. r || e.pos++, a[n] = e.pos
  4279. }, n.prototype.tokenize = function (e) {
  4280. for (var r, t, n = this.ruler.getRules(""), s = n.length, o = e.posMax, i = e.md.options.maxNesting; e.pos < o;) {
  4281. if (e.level < i)
  4282. for (t = 0; t < s && !(r = n[t](e, !1)); t++);
  4283. if (r) {
  4284. if (e.pos >= o) break
  4285. } else e.pending += e.src[e.pos++]
  4286. }
  4287. e.pending && e.pushPending()
  4288. }, n.prototype.parse = function (e, r, t, n) {
  4289. var s, o, i, a = new this.State(e, r, t, n);
  4290. for (this.tokenize(a), o = this.ruler2.getRules(""), i = o.length, s = 0; s < i; s++) o[s](a)
  4291. }, n.prototype.State = e("./rules_inline/state_inline"), r.exports = n
  4292. }, {
  4293. "./ruler": 17,
  4294. "./rules_inline/autolink": 37,
  4295. "./rules_inline/backticks": 38,
  4296. "./rules_inline/balance_pairs": 39,
  4297. "./rules_inline/emphasis": 40,
  4298. "./rules_inline/entity": 41,
  4299. "./rules_inline/escape": 42,
  4300. "./rules_inline/html_inline": 43,
  4301. "./rules_inline/image": 44,
  4302. "./rules_inline/link": 45,
  4303. "./rules_inline/newline": 46,
  4304. "./rules_inline/state_inline": 47,
  4305. "./rules_inline/strikethrough": 48,
  4306. "./rules_inline/text": 49,
  4307. "./rules_inline/text_collapse": 50
  4308. }],
  4309. 13: [function (e, r, t) {
  4310. "use strict";
  4311. r.exports = {
  4312. options: {
  4313. html: !0,
  4314. xhtmlOut: !0,
  4315. breaks: !1,
  4316. langPrefix: "language-",
  4317. linkify: !1,
  4318. typographer: !1,
  4319. quotes: "“”‘’",
  4320. highlight: null,
  4321. maxNesting: 20
  4322. },
  4323. components: {
  4324. core: {
  4325. rules: ["normalize", "block", "inline"]
  4326. },
  4327. block: {
  4328. rules: ["blockquote", "code", "fence", "heading", "hr", "html_block", "lheading", "list", "reference", "paragraph"]
  4329. },
  4330. inline: {
  4331. rules: ["autolink", "backticks", "emphasis", "entity", "escape", "html_inline", "image", "link", "newline", "text"],
  4332. rules2: ["balance_pairs", "emphasis", "text_collapse"]
  4333. }
  4334. }
  4335. }
  4336. }, {}],
  4337. 14: [function (e, r, t) {
  4338. "use strict";
  4339. r.exports = {
  4340. options: {
  4341. html: !1,
  4342. xhtmlOut: !1,
  4343. breaks: !1,
  4344. langPrefix: "language-",
  4345. linkify: !1,
  4346. typographer: !1,
  4347. quotes: "“”‘’",
  4348. highlight: null,
  4349. maxNesting: 100
  4350. },
  4351. components: {
  4352. core: {},
  4353. block: {},
  4354. inline: {}
  4355. }
  4356. }
  4357. }, {}],
  4358. 15: [function (e, r, t) {
  4359. "use strict";
  4360. r.exports = {
  4361. options: {
  4362. html: !1,
  4363. xhtmlOut: !1,
  4364. breaks: !1,
  4365. langPrefix: "language-",
  4366. linkify: !1,
  4367. typographer: !1,
  4368. quotes: "“”‘’",
  4369. highlight: null,
  4370. maxNesting: 20
  4371. },
  4372. components: {
  4373. core: {
  4374. rules: ["normalize", "block", "inline"]
  4375. },
  4376. block: {
  4377. rules: ["paragraph"]
  4378. },
  4379. inline: {
  4380. rules: ["text"],
  4381. rules2: ["balance_pairs", "text_collapse"]
  4382. }
  4383. }
  4384. }
  4385. }, {}],
  4386. 16: [function (e, r, t) {
  4387. "use strict";
  4388. function n() {
  4389. this.rules = s({}, a)
  4390. }
  4391. var s = e("./common/utils").assign,
  4392. o = e("./common/utils").unescapeAll,
  4393. i = e("./common/utils").escapeHtml,
  4394. a = {};
  4395. a.code_inline = function (e, r, t, n, s) {
  4396. var o = e[r],
  4397. a = s.renderAttrs(o);
  4398. return "<code" + (a ? " " + a : "") + ">" + i(e[r].content) + "</code>"
  4399. }, a.code_block = function (e, r, t, n, s) {
  4400. var o = e[r],
  4401. a = s.renderAttrs(o);
  4402. return "<pre" + (a ? " " + a : "") + "><code>" + i(e[r].content) + "</code></pre>\n"
  4403. }, a.fence = function (e, r, t, n, s) {
  4404. var a, c, l, u, p = e[r],
  4405. h = p.info ? o(p.info).trim() : "",
  4406. f = "";
  4407. return h && (f = h.split(/\s+/g)[0]), a = t.highlight ? t.highlight(p.content, f) || i(p.content) : i(p.content), 0 === a.indexOf("<pre") ? a + "\n" : h ? (c = p.attrIndex("class"), l = p.attrs ? p.attrs.slice() : [], c < 0 ? l.push(["class", t.langPrefix + f]) : l[c] += " " + t.langPrefix + f, u = {
  4408. attrs: l
  4409. }, "<pre><code" + s.renderAttrs(u) + ">" + a + "</code></pre>\n") : "<pre><code" + s.renderAttrs(p) + ">" + a + "</code></pre>\n"
  4410. }, a.image = function (e, r, t, n, s) {
  4411. var o = e[r];
  4412. return o.attrs[o.attrIndex("alt")][1] = s.renderInlineAsText(o.children, t, n), s.renderToken(e, r, t)
  4413. }, a.hardbreak = function (e, r, t) {
  4414. return t.xhtmlOut ? "<br />\n" : "<br>\n"
  4415. }, a.softbreak = function (e, r, t) {
  4416. return t.breaks ? t.xhtmlOut ? "<br />\n" : "<br>\n" : "\n"
  4417. }, a.text = function (e, r) {
  4418. return i(e[r].content)
  4419. }, a.html_block = function (e, r) {
  4420. return e[r].content
  4421. }, a.html_inline = function (e, r) {
  4422. return e[r].content
  4423. }, n.prototype.renderAttrs = function (e) {
  4424. var r, t, n;
  4425. if (!e.attrs) return "";
  4426. for (n = "", r = 0, t = e.attrs.length; r < t; r++) n += " " + i(e.attrs[r][0]) + '="' + i(e.attrs[r][1]) + '"';
  4427. return n
  4428. }, n.prototype.renderToken = function (e, r, t) {
  4429. var n, s = "",
  4430. o = !1,
  4431. i = e[r];
  4432. return i.hidden ? "" : (i.block && i.nesting !== -1 && r && e[r - 1].hidden && (s += "\n"), s += (i.nesting === -1 ? "</" : "<") + i.tag, s += this.renderAttrs(i), 0 === i.nesting && t.xhtmlOut && (s += " /"), i.block && (o = !0, 1 === i.nesting && r + 1 < e.length && (n = e[r + 1], "inline" === n.type || n.hidden ? o = !1 : n.nesting === -1 && n.tag === i.tag && (o = !1))), s += o ? ">\n" : ">")
  4433. }, n.prototype.renderInline = function (e, r, t) {
  4434. for (var n, s = "", o = this.rules, i = 0, a = e.length; i < a; i++) n = e[i].type, s += "undefined" != typeof o[n] ? o[n](e, i, r, t, this) : this.renderToken(e, i, r);
  4435. return s
  4436. }, n.prototype.renderInlineAsText = function (e, r, t) {
  4437. for (var n = "", s = 0, o = e.length; s < o; s++) "text" === e[s].type ? n += e[s].content : "image" === e[s].type && (n += this.renderInlineAsText(e[s].children, r, t));
  4438. return n
  4439. }, n.prototype.render = function (e, r, t) {
  4440. var n, s, o, i = "",
  4441. a = this.rules;
  4442. for (n = 0, s = e.length; n < s; n++) o = e[n].type, i += "inline" === o ? this.renderInline(e[n].children, r, t) : "undefined" != typeof a[o] ? a[e[n].type](e, n, r, t, this) : this.renderToken(e, n, r, t);
  4443. return i
  4444. }, r.exports = n
  4445. }, {
  4446. "./common/utils": 4
  4447. }],
  4448. 17: [function (e, r, t) {
  4449. "use strict";
  4450. function n() {
  4451. this.__rules__ = [], this.__cache__ = null
  4452. }
  4453. n.prototype.__find__ = function (e) {
  4454. for (var r = 0; r < this.__rules__.length; r++)
  4455. if (this.__rules__[r].name === e) return r;
  4456. return -1
  4457. }, n.prototype.__compile__ = function () {
  4458. var e = this,
  4459. r = [""];
  4460. e.__rules__.forEach(function (e) {
  4461. e.enabled && e.alt.forEach(function (e) {
  4462. r.indexOf(e) < 0 && r.push(e)
  4463. })
  4464. }), e.__cache__ = {}, r.forEach(function (r) {
  4465. e.__cache__[r] = [], e.__rules__.forEach(function (t) {
  4466. t.enabled && (r && t.alt.indexOf(r) < 0 || e.__cache__[r].push(t.fn))
  4467. })
  4468. })
  4469. }, n.prototype.at = function (e, r, t) {
  4470. var n = this.__find__(e),
  4471. s = t || {};
  4472. if (n === -1) throw new Error("Parser rule not found: " + e);
  4473. this.__rules__[n].fn = r, this.__rules__[n].alt = s.alt || [], this.__cache__ = null
  4474. }, n.prototype.before = function (e, r, t, n) {
  4475. var s = this.__find__(e),
  4476. o = n || {};
  4477. if (s === -1) throw new Error("Parser rule not found: " + e);
  4478. this.__rules__.splice(s, 0, {
  4479. name: r,
  4480. enabled: !0,
  4481. fn: t,
  4482. alt: o.alt || []
  4483. }), this.__cache__ = null
  4484. }, n.prototype.after = function (e, r, t, n) {
  4485. var s = this.__find__(e),
  4486. o = n || {};
  4487. if (s === -1) throw new Error("Parser rule not found: " + e);
  4488. this.__rules__.splice(s + 1, 0, {
  4489. name: r,
  4490. enabled: !0,
  4491. fn: t,
  4492. alt: o.alt || []
  4493. }), this.__cache__ = null
  4494. }, n.prototype.push = function (e, r, t) {
  4495. var n = t || {};
  4496. this.__rules__.push({
  4497. name: e,
  4498. enabled: !0,
  4499. fn: r,
  4500. alt: n.alt || []
  4501. }), this.__cache__ = null
  4502. }, n.prototype.enable = function (e, r) {
  4503. Array.isArray(e) || (e = [e]);
  4504. var t = [];
  4505. return e.forEach(function (e) {
  4506. var n = this.__find__(e);
  4507. if (n < 0) {
  4508. if (r) return;
  4509. throw new Error("Rules manager: invalid rule name " + e)
  4510. }
  4511. this.__rules__[n].enabled = !0, t.push(e)
  4512. }, this), this.__cache__ = null, t
  4513. }, n.prototype.enableOnly = function (e, r) {
  4514. Array.isArray(e) || (e = [e]), this.__rules__.forEach(function (e) {
  4515. e.enabled = !1
  4516. }), this.enable(e, r)
  4517. }, n.prototype.disable = function (e, r) {
  4518. Array.isArray(e) || (e = [e]);
  4519. var t = [];
  4520. return e.forEach(function (e) {
  4521. var n = this.__find__(e);
  4522. if (n < 0) {
  4523. if (r) return;
  4524. throw new Error("Rules manager: invalid rule name " + e)
  4525. }
  4526. this.__rules__[n].enabled = !1, t.push(e)
  4527. }, this), this.__cache__ = null, t
  4528. }, n.prototype.getRules = function (e) {
  4529. return null === this.__cache__ && this.__compile__(), this.__cache__[e] || []
  4530. }, r.exports = n
  4531. }, {}],
  4532. 18: [function (e, r, t) {
  4533. "use strict";
  4534. var n = e("../common/utils").isSpace;
  4535. r.exports = function (e, r, t, s) {
  4536. var o, i, a, c, l, u, p, h, f, d, m, _, g, k, b, v, x = e.bMarks[r] + e.tShift[r],
  4537. y = e.eMarks[r];
  4538. if (62 !== e.src.charCodeAt(x++)) return !1;
  4539. if (s) return !0;
  4540. for (32 === e.src.charCodeAt(x) && x++, u = e.blkIndent, e.blkIndent = 0, f = d = e.sCount[r] + x - (e.bMarks[r] + e.tShift[r]), l = [e.bMarks[r]], e.bMarks[r] = x; x < y && (m = e.src.charCodeAt(x), n(m));) 9 === m ? d += 4 - d % 4 : d++, x++;
  4541. for (i = x >= y, c = [e.sCount[r]], e.sCount[r] = d - f, a = [e.tShift[r]], e.tShift[r] = x - e.bMarks[r], _ = e.md.block.ruler.getRules("blockquote"), o = r + 1; o < t && !(e.sCount[o] < u) && (x = e.bMarks[o] + e.tShift[o], y = e.eMarks[o], !(x >= y)); o++)
  4542. if (62 !== e.src.charCodeAt(x++)) {
  4543. if (i) break;
  4544. for (v = !1, k = 0, b = _.length; k < b; k++)
  4545. if (_[k](e, o, t, !0)) {
  4546. v = !0;
  4547. break
  4548. }
  4549. if (v) break;
  4550. l.push(e.bMarks[o]), a.push(e.tShift[o]), c.push(e.sCount[o]), e.sCount[o] = -1
  4551. } else {
  4552. for (32 === e.src.charCodeAt(x) && x++, f = d = e.sCount[o] + x - (e.bMarks[o] + e.tShift[o]), l.push(e.bMarks[o]), e.bMarks[o] = x; x < y && (m = e.src.charCodeAt(x), n(m));) 9 === m ? d += 4 - d % 4 : d++, x++;
  4553. i = x >= y, c.push(e.sCount[o]), e.sCount[o] = d - f, a.push(e.tShift[o]), e.tShift[o] = x - e.bMarks[o]
  4554. }
  4555. for (p = e.parentType, e.parentType = "blockquote", g = e.push("blockquote_open", "blockquote", 1), g.markup = ">", g.map = h = [r, 0],
  4556. e.md.block.tokenize(e, r, o), g = e.push("blockquote_close", "blockquote", -1), g.markup = ">", e.parentType = p, h[1] = e.line, k = 0; k < a.length; k++) e.bMarks[k + r] = l[k], e.tShift[k + r] = a[k], e.sCount[k + r] = c[k];
  4557. return e.blkIndent = u, !0
  4558. }
  4559. }, {
  4560. "../common/utils": 4
  4561. }],
  4562. 19: [function (e, r, t) {
  4563. "use strict";
  4564. r.exports = function (e, r, t) {
  4565. var n, s, o, i = 0;
  4566. if (e.sCount[r] - e.blkIndent < 4) return !1;
  4567. for (s = n = r + 1; n < t;)
  4568. if (e.isEmpty(n)) {
  4569. if (i++, i >= 2 && "list" === e.parentType) break;
  4570. n++
  4571. } else {
  4572. if (i = 0, !(e.sCount[n] - e.blkIndent >= 4)) break;
  4573. n++, s = n
  4574. }
  4575. return e.line = s, o = e.push("code_block", "code", 0), o.content = e.getLines(r, s, 4 + e.blkIndent, !0), o.map = [r, e.line], !0
  4576. }
  4577. }, {}],
  4578. 20: [function (e, r, t) {
  4579. "use strict";
  4580. r.exports = function (e, r, t, n) {
  4581. var s, o, i, a, c, l, u, p = !1,
  4582. h = e.bMarks[r] + e.tShift[r],
  4583. f = e.eMarks[r];
  4584. if (h + 3 > f) return !1;
  4585. if (s = e.src.charCodeAt(h), 126 !== s && 96 !== s) return !1;
  4586. if (c = h, h = e.skipChars(h, s), o = h - c, o < 3) return !1;
  4587. if (u = e.src.slice(c, h), i = e.src.slice(h, f), i.indexOf("`") >= 0) return !1;
  4588. if (n) return !0;
  4589. for (a = r;
  4590. (a++, !(a >= t)) && (h = c = e.bMarks[a] + e.tShift[a], f = e.eMarks[a], !(h < f && e.sCount[a] < e.blkIndent));)
  4591. if (e.src.charCodeAt(h) === s && !(e.sCount[a] - e.blkIndent >= 4 || (h = e.skipChars(h, s), h - c < o || (h = e.skipSpaces(h), h < f)))) {
  4592. p = !0;
  4593. break
  4594. }
  4595. return o = e.sCount[r], e.line = a + (p ? 1 : 0), l = e.push("fence", "code", 0), l.info = i, l.content = e.getLines(r + 1, a, o, !0), l.markup = u, l.map = [r, e.line], !0
  4596. }
  4597. }, {}],
  4598. 21: [function (e, r, t) {
  4599. "use strict";
  4600. var n = e("../common/utils").isSpace;
  4601. r.exports = function (e, r, t, s) {
  4602. var o, i, a, c, l = e.bMarks[r] + e.tShift[r],
  4603. u = e.eMarks[r];
  4604. if (o = e.src.charCodeAt(l), 35 !== o || l >= u) return !1;
  4605. for (i = 1, o = e.src.charCodeAt(++l); 35 === o && l < u && i <= 6;) i++, o = e.src.charCodeAt(++l);
  4606. return !(i > 6 || l < u && 32 !== o) && (!!s || (u = e.skipSpacesBack(u, l), a = e.skipCharsBack(u, 35, l), a > l && n(e.src.charCodeAt(a - 1)) && (u = a), e.line = r + 1, c = e.push("heading_open", "h" + String(i), 1), c.markup = "########".slice(0, i), c.map = [r, e.line], c = e.push("inline", "", 0), c.content = e.src.slice(l, u).trim(), c.map = [r, e.line], c.children = [], c = e.push("heading_close", "h" + String(i), -1), c.markup = "########".slice(0, i), !0))
  4607. }
  4608. }, {
  4609. "../common/utils": 4
  4610. }],
  4611. 22: [function (e, r, t) {
  4612. "use strict";
  4613. var n = e("../common/utils").isSpace;
  4614. r.exports = function (e, r, t, s) {
  4615. var o, i, a, c, l = e.bMarks[r] + e.tShift[r],
  4616. u = e.eMarks[r];
  4617. if (o = e.src.charCodeAt(l++), 42 !== o && 45 !== o && 95 !== o) return !1;
  4618. for (i = 1; l < u;) {
  4619. if (a = e.src.charCodeAt(l++), a !== o && !n(a)) return !1;
  4620. a === o && i++
  4621. }
  4622. return !(i < 3) && (!!s || (e.line = r + 1, c = e.push("hr", "hr", 0), c.map = [r, e.line], c.markup = Array(i + 1).join(String.fromCharCode(o)), !0))
  4623. }
  4624. }, {
  4625. "../common/utils": 4
  4626. }],
  4627. 23: [function (e, r, t) {
  4628. "use strict";
  4629. var n = e("../common/html_blocks"),
  4630. s = e("../common/html_re").HTML_OPEN_CLOSE_TAG_RE,
  4631. o = [
  4632. [/^<(script|pre|style)(?=(\s|>|$))/i, /<\/(script|pre|style)>/i, !0],
  4633. [/^<!--/, /-->/, !0],
  4634. [/^<\?/, /\?>/, !0],
  4635. [/^<![A-Z]/, />/, !0],
  4636. [/^<!\[CDATA\[/, /\]\]>/, !0],
  4637. [new RegExp("^</?(" + n.join("|") + ")(?=(\\s|/?>|$))", "i"), /^$/, !0],
  4638. [new RegExp(s.source + "\\s*$"), /^$/, !1]
  4639. ];
  4640. r.exports = function (e, r, t, n) {
  4641. var s, i, a, c, l = e.bMarks[r] + e.tShift[r],
  4642. u = e.eMarks[r];
  4643. if (!e.md.options.html) return !1;
  4644. if (60 !== e.src.charCodeAt(l)) return !1;
  4645. for (c = e.src.slice(l, u), s = 0; s < o.length && !o[s][0].test(c); s++);
  4646. if (s === o.length) return !1;
  4647. if (n) return o[s][2];
  4648. if (i = r + 1, !o[s][1].test(c))
  4649. for (; i < t && !(e.sCount[i] < e.blkIndent); i++)
  4650. if (l = e.bMarks[i] + e.tShift[i], u = e.eMarks[i], c = e.src.slice(l, u), o[s][1].test(c)) {
  4651. 0 !== c.length && i++;
  4652. break
  4653. }
  4654. return e.line = i, a = e.push("html_block", "", 0), a.map = [r, i], a.content = e.getLines(r, i, e.blkIndent, !0), !0
  4655. }
  4656. }, {
  4657. "../common/html_blocks": 2,
  4658. "../common/html_re": 3
  4659. }],
  4660. 24: [function (e, r, t) {
  4661. "use strict";
  4662. r.exports = function (e, r, t) {
  4663. for (var n, s, o, i, a, c, l, u, p, h = r + 1, f = e.md.block.ruler.getRules("paragraph"); h < t && !e.isEmpty(h); h++)
  4664. if (!(e.sCount[h] - e.blkIndent > 3)) {
  4665. if (e.sCount[h] >= e.blkIndent && (c = e.bMarks[h] + e.tShift[h], l = e.eMarks[h], c < l && (p = e.src.charCodeAt(c), (45 === p || 61 === p) && (c = e.skipChars(c, p), c = e.skipSpaces(c), c >= l)))) {
  4666. u = 61 === p ? 1 : 2;
  4667. break
  4668. }
  4669. if (!(e.sCount[h] < 0)) {
  4670. for (s = !1, o = 0, i = f.length; o < i; o++)
  4671. if (f[o](e, h, t, !0)) {
  4672. s = !0;
  4673. break
  4674. }
  4675. if (s) break
  4676. }
  4677. }
  4678. return !!u && (n = e.getLines(r, h, e.blkIndent, !1).trim(), e.line = h + 1, a = e.push("heading_open", "h" + String(u), 1), a.markup = String.fromCharCode(p), a.map = [r, e.line], a = e.push("inline", "", 0), a.content = n, a.map = [r, e.line - 1], a.children = [], a = e.push("heading_close", "h" + String(u), -1), a.markup = String.fromCharCode(p), !0)
  4679. }
  4680. }, {}],
  4681. 25: [function (e, r, t) {
  4682. "use strict";
  4683. function n(e, r) {
  4684. var t, n, s, o;
  4685. return n = e.bMarks[r] + e.tShift[r], s = e.eMarks[r], t = e.src.charCodeAt(n++), 42 !== t && 45 !== t && 43 !== t ? -1 : n < s && (o = e.src.charCodeAt(n), !i(o)) ? -1 : n
  4686. }
  4687. function s(e, r) {
  4688. var t, n = e.bMarks[r] + e.tShift[r],
  4689. s = n,
  4690. o = e.eMarks[r];
  4691. if (s + 1 >= o) return -1;
  4692. if (t = e.src.charCodeAt(s++), t < 48 || t > 57) return -1;
  4693. for (;;) {
  4694. if (s >= o) return -1;
  4695. t = e.src.charCodeAt(s++); {
  4696. if (!(t >= 48 && t <= 57)) {
  4697. if (41 === t || 46 === t) break;
  4698. return -1
  4699. }
  4700. if (s - n >= 10) return -1
  4701. }
  4702. }
  4703. return s < o && (t = e.src.charCodeAt(s), !i(t)) ? -1 : s
  4704. }
  4705. function o(e, r) {
  4706. var t, n, s = e.level + 2;
  4707. for (t = r + 2, n = e.tokens.length - 2; t < n; t++) e.tokens[t].level === s && "paragraph_open" === e.tokens[t].type && (e.tokens[t + 2].hidden = !0, e.tokens[t].hidden = !0, t += 2)
  4708. }
  4709. var i = e("../common/utils").isSpace;
  4710. r.exports = function (e, r, t, a) {
  4711. var c, l, u, p, h, f, d, m, _, g, k, b, v, x, y, C, A, w, D, q, E, S, F, z, L, T, R, M, I = !0;
  4712. if ((k = s(e, r)) >= 0) w = !0;
  4713. else {
  4714. if (!((k = n(e, r)) >= 0)) return !1;
  4715. w = !1
  4716. }
  4717. if (A = e.src.charCodeAt(k - 1), a) return !0;
  4718. for (q = e.tokens.length, w ? (g = e.bMarks[r] + e.tShift[r], C = Number(e.src.substr(g, k - g - 1)), L = e.push("ordered_list_open", "ol", 1), 1 !== C && (L.attrs = [
  4719. ["start", C]
  4720. ])) : L = e.push("bullet_list_open", "ul", 1), L.map = S = [r, 0], L.markup = String.fromCharCode(A), c = r, E = !1, z = e.md.block.ruler.getRules("list"); c < t;) {
  4721. for (v = k, x = e.eMarks[c], l = u = e.sCount[c] + k - (e.bMarks[r] + e.tShift[r]); v < x && (b = e.src.charCodeAt(v), i(b));) 9 === b ? u += 4 - u % 4 : u++, v++;
  4722. if (D = v, y = D >= x ? 1 : u - l, y > 4 && (y = 1), p = l + y, L = e.push("list_item_open", "li", 1), L.markup = String.fromCharCode(A), L.map = F = [r, 0], f = e.blkIndent, m = e.tight, h = e.tShift[r], d = e.sCount[r], _ = e.parentType, e.blkIndent = p, e.tight = !0, e.parentType = "list", e.tShift[r] = D - e.bMarks[r], e.sCount[r] = u, D >= x && e.isEmpty(r + 1) ? e.line = Math.min(e.line + 2, t) : e.md.block.tokenize(e, r, t, !0), e.tight && !E || (I = !1), E = e.line - r > 1 && e.isEmpty(e.line - 1), e.blkIndent = f, e.tShift[r] = h, e.sCount[r] = d, e.tight = m, e.parentType = _, L = e.push("list_item_close", "li", -1), L.markup = String.fromCharCode(A), c = r = e.line, F[1] = c, D = e.bMarks[r], c >= t) break;
  4723. if (e.isEmpty(c)) break;
  4724. if (e.sCount[c] < e.blkIndent) break;
  4725. for (M = !1, T = 0, R = z.length; T < R; T++)
  4726. if (z[T](e, c, t, !0)) {
  4727. M = !0;
  4728. break
  4729. }
  4730. if (M) break;
  4731. if (w) {
  4732. if (k = s(e, c), k < 0) break
  4733. } else if (k = n(e, c), k < 0) break;
  4734. if (A !== e.src.charCodeAt(k - 1)) break
  4735. }
  4736. return L = w ? e.push("ordered_list_close", "ol", -1) : e.push("bullet_list_close", "ul", -1), L.markup = String.fromCharCode(A), S[1] = c, e.line = c, I && o(e, q), !0
  4737. }
  4738. }, {
  4739. "../common/utils": 4
  4740. }],
  4741. 26: [function (e, r, t) {
  4742. "use strict";
  4743. r.exports = function (e, r) {
  4744. for (var t, n, s, o, i, a = r + 1, c = e.md.block.ruler.getRules("paragraph"), l = e.lineMax; a < l && !e.isEmpty(a); a++)
  4745. if (!(e.sCount[a] - e.blkIndent > 3 || e.sCount[a] < 0)) {
  4746. for (n = !1, s = 0, o = c.length; s < o; s++)
  4747. if (c[s](e, a, l, !0)) {
  4748. n = !0;
  4749. break
  4750. }
  4751. if (n) break
  4752. }
  4753. return t = e.getLines(r, a, e.blkIndent, !1).trim(), e.line = a, i = e.push("paragraph_open", "p", 1), i.map = [r, e.line], i = e.push("inline", "", 0), i.content = t, i.map = [r, e.line], i.children = [], i = e.push("paragraph_close", "p", -1), !0
  4754. }
  4755. }, {}],
  4756. 27: [function (e, r, t) {
  4757. "use strict";
  4758. var n = e("../helpers/parse_link_destination"),
  4759. s = e("../helpers/parse_link_title"),
  4760. o = e("../common/utils").normalizeReference,
  4761. i = e("../common/utils").isSpace;
  4762. r.exports = function (e, r, t, a) {
  4763. var c, l, u, p, h, f, d, m, _, g, k, b, v, x, y, C = 0,
  4764. A = e.bMarks[r] + e.tShift[r],
  4765. w = e.eMarks[r],
  4766. D = r + 1;
  4767. if (91 !== e.src.charCodeAt(A)) return !1;
  4768. for (; ++A < w;)
  4769. if (93 === e.src.charCodeAt(A) && 92 !== e.src.charCodeAt(A - 1)) {
  4770. if (A + 1 === w) return !1;
  4771. if (58 !== e.src.charCodeAt(A + 1)) return !1;
  4772. break
  4773. }
  4774. for (p = e.lineMax, x = e.md.block.ruler.getRules("reference"); D < p && !e.isEmpty(D); D++)
  4775. if (!(e.sCount[D] - e.blkIndent > 3 || e.sCount[D] < 0)) {
  4776. for (v = !1, f = 0, d = x.length; f < d; f++)
  4777. if (x[f](e, D, p, !0)) {
  4778. v = !0;
  4779. break
  4780. }
  4781. if (v) break
  4782. }
  4783. for (b = e.getLines(r, D, e.blkIndent, !1).trim(), w = b.length, A = 1; A < w; A++) {
  4784. if (c = b.charCodeAt(A), 91 === c) return !1;
  4785. if (93 === c) {
  4786. _ = A;
  4787. break
  4788. }
  4789. 10 === c ? C++ : 92 === c && (A++, A < w && 10 === b.charCodeAt(A) && C++)
  4790. }
  4791. if (_ < 0 || 58 !== b.charCodeAt(_ + 1)) return !1;
  4792. for (A = _ + 2; A < w; A++)
  4793. if (c = b.charCodeAt(A), 10 === c) C++;
  4794. else if (!i(c)) break;
  4795. if (g = n(b, A, w), !g.ok) return !1;
  4796. if (h = e.md.normalizeLink(g.str), !e.md.validateLink(h)) return !1;
  4797. for (A = g.pos, C += g.lines, l = A, u = C, k = A; A < w; A++)
  4798. if (c = b.charCodeAt(A), 10 === c) C++;
  4799. else if (!i(c)) break;
  4800. for (g = s(b, A, w), A < w && k !== A && g.ok ? (y = g.str, A = g.pos, C += g.lines) : (y = "", A = l, C = u); A < w && (c = b.charCodeAt(A), i(c));) A++;
  4801. if (A < w && 10 !== b.charCodeAt(A) && y)
  4802. for (y = "", A = l, C = u; A < w && (c = b.charCodeAt(A), i(c));) A++;
  4803. return !(A < w && 10 !== b.charCodeAt(A)) && (!!(m = o(b.slice(1, _))) && (!!a || ("undefined" == typeof e.env.references && (e.env.references = {}), "undefined" == typeof e.env.references[m] && (e.env.references[m] = {
  4804. title: y,
  4805. href: h
  4806. }), e.line = r + C + 1, !0)))
  4807. }
  4808. }, {
  4809. "../common/utils": 4,
  4810. "../helpers/parse_link_destination": 6,
  4811. "../helpers/parse_link_title": 8
  4812. }],
  4813. 28: [function (e, r, t) {
  4814. "use strict";
  4815. function n(e, r, t, n) {
  4816. var s, i, a, c, l, u, p, h;
  4817. for (this.src = e, this.md = r, this.env = t, this.tokens = n, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.parentType = "root", this.ddIndent = -1, this.level = 0, this.result = "", i = this.src, h = !1, a = c = u = p = 0, l = i.length; c < l; c++) {
  4818. if (s = i.charCodeAt(c), !h) {
  4819. if (o(s)) {
  4820. u++, 9 === s ? p += 4 - p % 4 : p++;
  4821. continue
  4822. }
  4823. h = !0
  4824. }
  4825. 10 !== s && c !== l - 1 || (10 !== s && c++, this.bMarks.push(a), this.eMarks.push(c), this.tShift.push(u), this.sCount.push(p), h = !1, u = 0, p = 0, a = c + 1)
  4826. }
  4827. this.bMarks.push(i.length), this.eMarks.push(i.length), this.tShift.push(0), this.sCount.push(0), this.lineMax = this.bMarks.length - 1
  4828. }
  4829. var s = e("../token"),
  4830. o = e("../common/utils").isSpace;
  4831. n.prototype.push = function (e, r, t) {
  4832. var n = new s(e, r, t);
  4833. return n.block = !0, t < 0 && this.level--, n.level = this.level, t > 0 && this.level++, this.tokens.push(n), n
  4834. }, n.prototype.isEmpty = function (e) {
  4835. return this.bMarks[e] + this.tShift[e] >= this.eMarks[e]
  4836. }, n.prototype.skipEmptyLines = function (e) {
  4837. for (var r = this.lineMax; e < r && !(this.bMarks[e] + this.tShift[e] < this.eMarks[e]); e++);
  4838. return e
  4839. }, n.prototype.skipSpaces = function (e) {
  4840. for (var r, t = this.src.length; e < t && (r = this.src.charCodeAt(e), o(r)); e++);
  4841. return e
  4842. }, n.prototype.skipSpacesBack = function (e, r) {
  4843. if (e <= r) return e;
  4844. for (; e > r;)
  4845. if (!o(this.src.charCodeAt(--e))) return e + 1;
  4846. return e
  4847. }, n.prototype.skipChars = function (e, r) {
  4848. for (var t = this.src.length; e < t && this.src.charCodeAt(e) === r; e++);
  4849. return e
  4850. }, n.prototype.skipCharsBack = function (e, r, t) {
  4851. if (e <= t) return e;
  4852. for (; e > t;)
  4853. if (r !== this.src.charCodeAt(--e)) return e + 1;
  4854. return e
  4855. }, n.prototype.getLines = function (e, r, t, n) {
  4856. var s, i, a, c, l, u, p, h = e;
  4857. if (e >= r) return "";
  4858. for (u = new Array(r - e), s = 0; h < r; h++, s++) {
  4859. for (i = 0, p = c = this.bMarks[h], l = h + 1 < r || n ? this.eMarks[h] + 1 : this.eMarks[h]; c < l && i < t;) {
  4860. if (a = this.src.charCodeAt(c), o(a)) 9 === a ? i += 4 - i % 4 : i++;
  4861. else {
  4862. if (!(c - p < this.tShift[h])) break;
  4863. i++
  4864. }
  4865. c++
  4866. }
  4867. u[s] = this.src.slice(c, l)
  4868. }
  4869. return u.join("")
  4870. }, n.prototype.Token = s, r.exports = n
  4871. }, {
  4872. "../common/utils": 4,
  4873. "../token": 51
  4874. }],
  4875. 29: [function (e, r, t) {
  4876. "use strict";
  4877. function n(e, r) {
  4878. var t = e.bMarks[r] + e.blkIndent,
  4879. n = e.eMarks[r];
  4880. return e.src.substr(t, n - t)
  4881. }
  4882. function s(e) {
  4883. var r, t = [],
  4884. n = 0,
  4885. s = e.length,
  4886. o = 0,
  4887. i = 0,
  4888. a = !1,
  4889. c = 0;
  4890. for (r = e.charCodeAt(n); n < s;) 96 === r && o % 2 === 0 ? (a = !a, c = n) : 124 !== r || o % 2 !== 0 || a ? 92 === r ? o++ : o = 0 : (t.push(e.substring(i, n)), i = n + 1), n++, n === s && a && (a = !1, n = c + 1), r = e.charCodeAt(n);
  4891. return t.push(e.substring(i)), t
  4892. }
  4893. r.exports = function (e, r, t, o) {
  4894. var i, a, c, l, u, p, h, f, d, m, _, g;
  4895. if (r + 2 > t) return !1;
  4896. if (u = r + 1, e.sCount[u] < e.blkIndent) return !1;
  4897. if (c = e.bMarks[u] + e.tShift[u], c >= e.eMarks[u]) return !1;
  4898. if (i = e.src.charCodeAt(c), 124 !== i && 45 !== i && 58 !== i) return !1;
  4899. if (a = n(e, r + 1), !/^[-:| ]+$/.test(a)) return !1;
  4900. for (p = a.split("|"), d = [], l = 0; l < p.length; l++) {
  4901. if (m = p[l].trim(), !m) {
  4902. if (0 === l || l === p.length - 1) continue;
  4903. return !1
  4904. }
  4905. if (!/^:?-+:?$/.test(m)) return !1;
  4906. 58 === m.charCodeAt(m.length - 1) ? d.push(58 === m.charCodeAt(0) ? "center" : "right") : 58 === m.charCodeAt(0) ? d.push("left") : d.push("")
  4907. }
  4908. if (a = n(e, r).trim(), a.indexOf("|") === -1) return !1;
  4909. if (p = s(a.replace(/^\||\|$/g, "")), h = p.length, h > d.length) return !1;
  4910. if (o) return !0;
  4911. for (f = e.push("table_open", "table", 1), f.map = _ = [r, 0], f = e.push("thead_open", "thead", 1), f.map = [r, r + 1], f = e.push("tr_open", "tr", 1), f.map = [r, r + 1], l = 0; l < p.length; l++) f = e.push("th_open", "th", 1), f.map = [r, r + 1], d[l] && (f.attrs = [
  4912. ["style", "text-align:" + d[l]]
  4913. ]), f = e.push("inline", "", 0), f.content = p[l].trim(), f.map = [r, r + 1], f.children = [], f = e.push("th_close", "th", -1);
  4914. for (f = e.push("tr_close", "tr", -1), f = e.push("thead_close", "thead", -1), f = e.push("tbody_open", "tbody", 1), f.map = g = [r + 2, 0], u = r + 2; u < t && !(e.sCount[u] < e.blkIndent) && (a = n(e, u), a.indexOf("|") !== -1); u++) {
  4915. for (p = s(a.replace(/^\||\|\s*$/g, "")), f = e.push("tr_open", "tr", 1), l = 0; l < h; l++) f = e.push("td_open", "td", 1), d[l] && (f.attrs = [
  4916. ["style", "text-align:" + d[l]]
  4917. ]), f = e.push("inline", "", 0), f.content = p[l] ? p[l].trim() : "", f.children = [], f = e.push("td_close", "td", -1);
  4918. f = e.push("tr_close", "tr", -1)
  4919. }
  4920. return f = e.push("tbody_close", "tbody", -1), f = e.push("table_close", "table", -1), _[1] = g[1] = u, e.line = u, !0
  4921. }
  4922. }, {}],
  4923. 30: [function (e, r, t) {
  4924. "use strict";
  4925. r.exports = function (e) {
  4926. var r;
  4927. e.inlineMode ? (r = new e.Token("inline", "", 0), r.content = e.src, r.map = [0, 1], r.children = [], e.tokens.push(r)) : e.md.block.parse(e.src, e.md, e.env, e.tokens)
  4928. }
  4929. }, {}],
  4930. 31: [function (e, r, t) {
  4931. "use strict";
  4932. r.exports = function (e) {
  4933. var r, t, n, s = e.tokens;
  4934. for (t = 0, n = s.length; t < n; t++) r = s[t], "inline" === r.type && e.md.inline.parse(r.content, e.md, e.env, r.children)
  4935. }
  4936. }, {}],
  4937. 32: [function (e, r, t) {
  4938. "use strict";
  4939. function n(e) {
  4940. return /^<a[>\s]/i.test(e)
  4941. }
  4942. function s(e) {
  4943. return /^<\/a\s*>/i.test(e)
  4944. }
  4945. var o = e("../common/utils").arrayReplaceAt;
  4946. r.exports = function (e) {
  4947. var r, t, i, a, c, l, u, p, h, f, d, m, _, g, k, b, v, x = e.tokens;
  4948. if (e.md.options.linkify)
  4949. for (t = 0, i = x.length; t < i; t++)
  4950. if ("inline" === x[t].type && e.md.linkify.pretest(x[t].content))
  4951. for (a = x[t].children, _ = 0, r = a.length - 1; r >= 0; r--)
  4952. if (l = a[r], "link_close" !== l.type) {
  4953. if ("html_inline" === l.type && (n(l.content) && _ > 0 && _--, s(l.content) && _++), !(_ > 0) && "text" === l.type && e.md.linkify.test(l.content)) {
  4954. for (h = l.content, v = e.md.linkify.match(h), u = [], m = l.level, d = 0, p = 0; p < v.length; p++) g = v[p].url, k = e.md.normalizeLink(g), e.md.validateLink(k) && (b = v[p].text, b = v[p].schema ? "mailto:" !== v[p].schema || /^mailto:/i.test(b) ? e.md.normalizeLinkText(b) : e.md.normalizeLinkText("mailto:" + b).replace(/^mailto:/, "") : e.md.normalizeLinkText("http://" + b).replace(/^http:\/\//, ""), f = v[p].index, f > d && (c = new e.Token("text", "", 0), c.content = h.slice(d, f), c.level = m, u.push(c)), c = new e.Token("link_open", "a", 1), c.attrs = [
  4955. ["href", k]
  4956. ], c.level = m++, c.markup = "linkify", c.info = "auto", u.push(c), c = new e.Token("text", "", 0), c.content = b, c.level = m, u.push(c), c = new e.Token("link_close", "a", -1), c.level = --m, c.markup = "linkify", c.info = "auto", u.push(c), d = v[p].lastIndex);
  4957. d < h.length && (c = new e.Token("text", "", 0), c.content = h.slice(d), c.level = m, u.push(c)), x[t].children = a = o(a, r, u)
  4958. }
  4959. } else
  4960. for (r--; a[r].level !== l.level && "link_open" !== a[r].type;) r--
  4961. }
  4962. }, {
  4963. "../common/utils": 4
  4964. }],
  4965. 33: [function (e, r, t) {
  4966. "use strict";
  4967. var n = /\r[\n\u0085]?|[\u2424\u2028\u0085]/g,
  4968. s = /\u0000/g;
  4969. r.exports = function (e) {
  4970. var r;
  4971. r = e.src.replace(n, "\n"), r = r.replace(s, "�"), e.src = r
  4972. }
  4973. }, {}],
  4974. 34: [function (e, r, t) {
  4975. "use strict";
  4976. function n(e, r) {
  4977. return l[r.toLowerCase()]
  4978. }
  4979. function s(e) {
  4980. var r, t;
  4981. for (r = e.length - 1; r >= 0; r--) t = e[r], "text" === t.type && (t.content = t.content.replace(c, n))
  4982. }
  4983. function o(e) {
  4984. var r, t;
  4985. for (r = e.length - 1; r >= 0; r--) t = e[r], "text" === t.type && i.test(t.content) && (t.content = t.content.replace(/\+-/g, "±").replace(/\.{2,}/g, "…").replace(/([?!])\u2026/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---([^-]|$)/gm, "$1—$2").replace(/(^|\s)--(\s|$)/gm, "$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm, "$1–$2"))
  4986. }
  4987. var i = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/,
  4988. a = /\((c|tm|r|p)\)/i,
  4989. c = /\((c|tm|r|p)\)/gi,
  4990. l = {
  4991. c: "©",
  4992. r: "®",
  4993. p: "§",
  4994. tm: "™"
  4995. };
  4996. r.exports = function (e) {
  4997. var r;
  4998. if (e.md.options.typographer)
  4999. for (r = e.tokens.length - 1; r >= 0; r--) "inline" === e.tokens[r].type && (a.test(e.tokens[r].content) && s(e.tokens[r].children), i.test(e.tokens[r].content) && o(e.tokens[r].children))
  5000. }
  5001. }, {}],
  5002. 35: [function (e, r, t) {
  5003. "use strict";
  5004. function n(e, r, t) {
  5005. return e.substr(0, r) + t + e.substr(r + 1)
  5006. }
  5007. function s(e, r) {
  5008. var t, s, c, p, h, f, d, m, _, g, k, b, v, x, y, C, A, w, D, q, E;
  5009. for (D = [], t = 0; t < e.length; t++) {
  5010. for (s = e[t], d = e[t].level, A = D.length - 1; A >= 0 && !(D[A].level <= d); A--);
  5011. if (D.length = A + 1, "text" === s.type) {
  5012. c = s.content, h = 0, f = c.length;
  5013. e: for (; h < f && (l.lastIndex = h, p = l.exec(c));) {
  5014. if (y = C = !0, h = p.index + 1, w = "'" === p[0], _ = 32, p.index - 1 >= 0) _ = c.charCodeAt(p.index - 1);
  5015. else
  5016. for (A = t - 1; A >= 0; A--)
  5017. if ("text" === e[A].type) {
  5018. _ = e[A].content.charCodeAt(e[A].content.length - 1);
  5019. break
  5020. } if (g = 32, h < f) g = c.charCodeAt(h);
  5021. else
  5022. for (A = t + 1; A < e.length; A++)
  5023. if ("text" === e[A].type) {
  5024. g = e[A].content.charCodeAt(0);
  5025. break
  5026. } if (k = a(_) || i(String.fromCharCode(_)), b = a(g) || i(String.fromCharCode(g)), v = o(_), x = o(g), x ? y = !1 : b && (v || k || (y = !1)), v ? C = !1 : k && (x || b || (C = !1)), 34 === g && '"' === p[0] && _ >= 48 && _ <= 57 && (C = y = !1), y && C && (y = !1, C = b), y || C) {
  5027. if (C)
  5028. for (A = D.length - 1; A >= 0 && (m = D[A], !(D[A].level < d)); A--)
  5029. if (m.single === w && D[A].level === d) {
  5030. m = D[A], w ? (q = r.md.options.quotes[2], E = r.md.options.quotes[3]) : (q = r.md.options.quotes[0], E = r.md.options.quotes[1]), s.content = n(s.content, p.index, E), e[m.token].content = n(e[m.token].content, m.pos, q), h += E.length - 1, m.token === t && (h += q.length - 1), c = s.content, f = c.length, D.length = A;
  5031. continue e
  5032. }
  5033. y ? D.push({
  5034. token: t,
  5035. pos: p.index,
  5036. single: w,
  5037. level: d
  5038. }) : C && w && (s.content = n(s.content, p.index, u))
  5039. } else w && (s.content = n(s.content, p.index, u))
  5040. }
  5041. }
  5042. }
  5043. }
  5044. var o = e("../common/utils").isWhiteSpace,
  5045. i = e("../common/utils").isPunctChar,
  5046. a = e("../common/utils").isMdAsciiPunct,
  5047. c = /['"]/,
  5048. l = /['"]/g,
  5049. u = "’";
  5050. r.exports = function (e) {
  5051. var r;
  5052. if (e.md.options.typographer)
  5053. for (r = e.tokens.length - 1; r >= 0; r--) "inline" === e.tokens[r].type && c.test(e.tokens[r].content) && s(e.tokens[r].children, e)
  5054. }
  5055. }, {
  5056. "../common/utils": 4
  5057. }],
  5058. 36: [function (e, r, t) {
  5059. "use strict";
  5060. function n(e, r, t) {
  5061. this.src = e, this.env = t, this.tokens = [], this.inlineMode = !1, this.md = r
  5062. }
  5063. var s = e("../token");
  5064. n.prototype.Token = s, r.exports = n
  5065. }, {
  5066. "../token": 51
  5067. }],
  5068. 37: [function (e, r, t) {
  5069. "use strict";
  5070. var n = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,
  5071. s = /^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;
  5072. r.exports = function (e, r) {
  5073. var t, o, i, a, c, l, u = e.pos;
  5074. return 60 === e.src.charCodeAt(u) && (t = e.src.slice(u), !(t.indexOf(">") < 0) && (s.test(t) ? (o = t.match(s), a = o[0].slice(1, -1), c = e.md.normalizeLink(a), !!e.md.validateLink(c) && (r || (l = e.push("link_open", "a", 1), l.attrs = [
  5075. ["href", c]
  5076. ], l.markup = "autolink", l.info = "auto", l = e.push("text", "", 0), l.content = e.md.normalizeLinkText(a), l = e.push("link_close", "a", -1), l.markup = "autolink", l.info = "auto"), e.pos += o[0].length, !0)) : !!n.test(t) && (i = t.match(n), a = i[0].slice(1, -1), c = e.md.normalizeLink("mailto:" + a), !!e.md.validateLink(c) && (r || (l = e.push("link_open", "a", 1), l.attrs = [
  5077. ["href", c]
  5078. ], l.markup = "autolink", l.info = "auto", l = e.push("text", "", 0), l.content = e.md.normalizeLinkText(a), l = e.push("link_close", "a", -1), l.markup = "autolink", l.info = "auto"), e.pos += i[0].length, !0))))
  5079. }
  5080. }, {}],
  5081. 38: [function (e, r, t) {
  5082. "use strict";
  5083. r.exports = function (e, r) {
  5084. var t, n, s, o, i, a, c = e.pos,
  5085. l = e.src.charCodeAt(c);
  5086. if (96 !== l) return !1;
  5087. for (t = c, c++, n = e.posMax; c < n && 96 === e.src.charCodeAt(c);) c++;
  5088. for (s = e.src.slice(t, c), o = i = c;
  5089. (o = e.src.indexOf("`", i)) !== -1;) {
  5090. for (i = o + 1; i < n && 96 === e.src.charCodeAt(i);) i++;
  5091. if (i - o === s.length) return r || (a = e.push("code_inline", "code", 0), a.markup = s, a.content = e.src.slice(c, o).replace(/[ \n]+/g, " ").trim()), e.pos = i, !0
  5092. }
  5093. return r || (e.pending += s), e.pos += s.length, !0
  5094. }
  5095. }, {}],
  5096. 39: [function (e, r, t) {
  5097. "use strict";
  5098. r.exports = function (e) {
  5099. var r, t, n, s, o = e.delimiters,
  5100. i = e.delimiters.length;
  5101. for (r = 0; r < i; r++)
  5102. if (n = o[r], n.close)
  5103. for (t = r - n.jump - 1; t >= 0;) {
  5104. if (s = o[t], s.open && s.marker === n.marker && s.end < 0 && s.level === n.level) {
  5105. n.jump = r - t, n.open = !1, s.end = r, s.jump = 0;
  5106. break
  5107. }
  5108. t -= s.jump + 1
  5109. }
  5110. }
  5111. }, {}],
  5112. 40: [function (e, r, t) {
  5113. "use strict";
  5114. r.exports.tokenize = function (e, r) {
  5115. var t, n, s, o = e.pos,
  5116. i = e.src.charCodeAt(o);
  5117. if (r) return !1;
  5118. if (95 !== i && 42 !== i) return !1;
  5119. for (n = e.scanDelims(e.pos, 42 === i), t = 0; t < n.length; t++) s = e.push("text", "", 0), s.content = String.fromCharCode(i), e.delimiters.push({
  5120. marker: i,
  5121. jump: t,
  5122. token: e.tokens.length - 1,
  5123. level: e.level,
  5124. end: -1,
  5125. open: n.can_open,
  5126. close: n.can_close
  5127. });
  5128. return e.pos += n.length, !0
  5129. }, r.exports.postProcess = function (e) {
  5130. var r, t, n, s, o, i, a = e.delimiters,
  5131. c = e.delimiters.length;
  5132. for (r = 0; r < c; r++) t = a[r], 95 !== t.marker && 42 !== t.marker || t.end !== -1 && (n = a[t.end], i = r + 1 < c && a[r + 1].end === t.end - 1 && a[r + 1].token === t.token + 1 && a[t.end - 1].token === n.token - 1 && a[r + 1].marker === t.marker, o = String.fromCharCode(t.marker), s = e.tokens[t.token], s.type = i ? "strong_open" : "em_open", s.tag = i ? "strong" : "em", s.nesting = 1, s.markup = i ? o + o : o, s.content = "", s = e.tokens[n.token], s.type = i ? "strong_close" : "em_close", s.tag = i ? "strong" : "em", s.nesting = -1, s.markup = i ? o + o : o, s.content = "", i && (e.tokens[a[r + 1].token].content = "", e.tokens[a[t.end - 1].token].content = "", r++))
  5133. }
  5134. }, {}],
  5135. 41: [function (e, r, t) {
  5136. "use strict";
  5137. var n = e("../common/entities"),
  5138. s = e("../common/utils").has,
  5139. o = e("../common/utils").isValidEntityCode,
  5140. i = e("../common/utils").fromCodePoint,
  5141. a = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,
  5142. c = /^&([a-z][a-z0-9]{1,31});/i;
  5143. r.exports = function (e, r) {
  5144. var t, l, u, p = e.pos,
  5145. h = e.posMax;
  5146. if (38 !== e.src.charCodeAt(p)) return !1;
  5147. if (p + 1 < h)
  5148. if (t = e.src.charCodeAt(p + 1), 35 === t) {
  5149. if (u = e.src.slice(p).match(a)) return r || (l = "x" === u[1][0].toLowerCase() ? parseInt(u[1].slice(1), 16) : parseInt(u[1], 10), e.pending += i(o(l) ? l : 65533)), e.pos += u[0].length, !0
  5150. } else if (u = e.src.slice(p).match(c), u && s(n, u[1])) return r || (e.pending += n[u[1]]), e.pos += u[0].length, !0;
  5151. return r || (e.pending += "&"), e.pos++, !0
  5152. }
  5153. }, {
  5154. "../common/entities": 1,
  5155. "../common/utils": 4
  5156. }],
  5157. 42: [function (e, r, t) {
  5158. "use strict";
  5159. for (var n = e("../common/utils").isSpace, s = [], o = 0; o < 256; o++) s.push(0);
  5160. "\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function (e) {
  5161. s[e.charCodeAt(0)] = 1
  5162. }), r.exports = function (e, r) {
  5163. var t, o = e.pos,
  5164. i = e.posMax;
  5165. if (92 !== e.src.charCodeAt(o)) return !1;
  5166. if (o++, o < i) {
  5167. if (t = e.src.charCodeAt(o), t < 256 && 0 !== s[t]) return r || (e.pending += e.src[o]), e.pos += 2, !0;
  5168. if (10 === t) {
  5169. for (r || e.push("hardbreak", "br", 0), o++; o < i && (t = e.src.charCodeAt(o), n(t));) o++;
  5170. return e.pos = o, !0
  5171. }
  5172. }
  5173. return r || (e.pending += "\\"), e.pos++, !0
  5174. }
  5175. }, {
  5176. "../common/utils": 4
  5177. }],
  5178. 43: [function (e, r, t) {
  5179. "use strict";
  5180. function n(e) {
  5181. var r = 32 | e;
  5182. return r >= 97 && r <= 122
  5183. }
  5184. var s = e("../common/html_re").HTML_TAG_RE;
  5185. r.exports = function (e, r) {
  5186. var t, o, i, a, c = e.pos;
  5187. return !!e.md.options.html && (i = e.posMax, !(60 !== e.src.charCodeAt(c) || c + 2 >= i) && (t = e.src.charCodeAt(c + 1), !(33 !== t && 63 !== t && 47 !== t && !n(t)) && (!!(o = e.src.slice(c).match(s)) && (r || (a = e.push("html_inline", "", 0), a.content = e.src.slice(c, c + o[0].length)), e.pos += o[0].length, !0))))
  5188. }
  5189. }, {
  5190. "../common/html_re": 3
  5191. }],
  5192. 44: [function (e, r, t) {
  5193. "use strict";
  5194. var n = e("../helpers/parse_link_label"),
  5195. s = e("../helpers/parse_link_destination"),
  5196. o = e("../helpers/parse_link_title"),
  5197. i = e("../common/utils").normalizeReference,
  5198. a = e("../common/utils").isSpace;
  5199. r.exports = function (e, r) {
  5200. var t, c, l, u, p, h, f, d, m, _, g, k, b, v = "",
  5201. x = e.pos,
  5202. y = e.posMax;
  5203. if (33 !== e.src.charCodeAt(e.pos)) return !1;
  5204. if (91 !== e.src.charCodeAt(e.pos + 1)) return !1;
  5205. if (h = e.pos + 2, p = n(e, e.pos + 1, !1), p < 0) return !1;
  5206. if (f = p + 1, f < y && 40 === e.src.charCodeAt(f)) {
  5207. for (f++; f < y && (c = e.src.charCodeAt(f), a(c) || 10 === c); f++);
  5208. if (f >= y) return !1;
  5209. for (b = f, m = s(e.src, f, e.posMax), m.ok && (v = e.md.normalizeLink(m.str), e.md.validateLink(v) ? f = m.pos : v = ""), b = f; f < y && (c = e.src.charCodeAt(f), a(c) || 10 === c); f++);
  5210. if (m = o(e.src, f, e.posMax), f < y && b !== f && m.ok)
  5211. for (_ = m.str, f = m.pos; f < y && (c = e.src.charCodeAt(f), a(c) || 10 === c); f++);
  5212. else _ = "";
  5213. if (f >= y || 41 !== e.src.charCodeAt(f)) return e.pos = x, !1;
  5214. f++
  5215. } else {
  5216. if ("undefined" == typeof e.env.references) return !1;
  5217. if (f < y && 91 === e.src.charCodeAt(f) ? (b = f + 1, f = n(e, f), f >= 0 ? u = e.src.slice(b, f++) : f = p + 1) : f = p + 1, u || (u = e.src.slice(h, p)), d = e.env.references[i(u)], !d) return e.pos = x, !1;
  5218. v = d.href, _ = d.title
  5219. }
  5220. return r || (l = e.src.slice(h, p), e.md.inline.parse(l, e.md, e.env, k = []), g = e.push("image", "img", 0), g.attrs = t = [
  5221. ["src", v],
  5222. ["alt", ""]
  5223. ], g.children = k, g.content = l, _ && t.push(["title", _])), e.pos = f, e.posMax = y, !0
  5224. }
  5225. }, {
  5226. "../common/utils": 4,
  5227. "../helpers/parse_link_destination": 6,
  5228. "../helpers/parse_link_label": 7,
  5229. "../helpers/parse_link_title": 8
  5230. }],
  5231. 45: [function (e, r, t) {
  5232. "use strict";
  5233. var n = e("../helpers/parse_link_label"),
  5234. s = e("../helpers/parse_link_destination"),
  5235. o = e("../helpers/parse_link_title"),
  5236. i = e("../common/utils").normalizeReference,
  5237. a = e("../common/utils").isSpace;
  5238. r.exports = function (e, r) {
  5239. var t, c, l, u, p, h, f, d, m, _, g = "",
  5240. k = e.pos,
  5241. b = e.posMax,
  5242. v = e.pos;
  5243. if (91 !== e.src.charCodeAt(e.pos)) return !1;
  5244. if (p = e.pos + 1, u = n(e, e.pos, !0), u < 0) return !1;
  5245. if (h = u + 1, h < b && 40 === e.src.charCodeAt(h)) {
  5246. for (h++; h < b && (c = e.src.charCodeAt(h), a(c) || 10 === c); h++);
  5247. if (h >= b) return !1;
  5248. for (v = h, f = s(e.src, h, e.posMax), f.ok && (g = e.md.normalizeLink(f.str), e.md.validateLink(g) ? h = f.pos : g = ""), v = h; h < b && (c = e.src.charCodeAt(h), a(c) || 10 === c); h++);
  5249. if (f = o(e.src, h, e.posMax), h < b && v !== h && f.ok)
  5250. for (m = f.str, h = f.pos; h < b && (c = e.src.charCodeAt(h), a(c) || 10 === c); h++);
  5251. else m = "";
  5252. if (h >= b || 41 !== e.src.charCodeAt(h)) return e.pos = k, !1;
  5253. h++
  5254. } else {
  5255. if ("undefined" == typeof e.env.references) return !1;
  5256. if (h < b && 91 === e.src.charCodeAt(h) ? (v = h + 1, h = n(e, h), h >= 0 ? l = e.src.slice(v, h++) : h = u + 1) : h = u + 1, l || (l = e.src.slice(p, u)), d = e.env.references[i(l)], !d) return e.pos = k, !1;
  5257. g = d.href, m = d.title
  5258. }
  5259. return r || (e.pos = p, e.posMax = u, _ = e.push("link_open", "a", 1), _.attrs = t = [
  5260. ["href", g]
  5261. ], m && t.push(["title", m]), e.md.inline.tokenize(e), _ = e.push("link_close", "a", -1)), e.pos = h, e.posMax = b, !0
  5262. }
  5263. }, {
  5264. "../common/utils": 4,
  5265. "../helpers/parse_link_destination": 6,
  5266. "../helpers/parse_link_label": 7,
  5267. "../helpers/parse_link_title": 8
  5268. }],
  5269. 46: [function (e, r, t) {
  5270. "use strict";
  5271. r.exports = function (e, r) {
  5272. var t, n, s = e.pos;
  5273. if (10 !== e.src.charCodeAt(s)) return !1;
  5274. for (t = e.pending.length - 1, n = e.posMax, r || (t >= 0 && 32 === e.pending.charCodeAt(t) ? t >= 1 && 32 === e.pending.charCodeAt(t - 1) ? (e.pending = e.pending.replace(/ +$/, ""), e.push("hardbreak", "br", 0)) : (e.pending = e.pending.slice(0, -1), e.push("softbreak", "br", 0)) : e.push("softbreak", "br", 0)), s++; s < n && 32 === e.src.charCodeAt(s);) s++;
  5275. return e.pos = s, !0
  5276. }
  5277. }, {}],
  5278. 47: [function (e, r, t) {
  5279. "use strict";
  5280. function n(e, r, t, n) {
  5281. this.src = e, this.env = t, this.md = r, this.tokens = n, this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = []
  5282. }
  5283. var s = e("../token"),
  5284. o = e("../common/utils").isWhiteSpace,
  5285. i = e("../common/utils").isPunctChar,
  5286. a = e("../common/utils").isMdAsciiPunct;
  5287. n.prototype.pushPending = function () {
  5288. var e = new s("text", "", 0);
  5289. return e.content = this.pending, e.level = this.pendingLevel, this.tokens.push(e), this.pending = "", e
  5290. }, n.prototype.push = function (e, r, t) {
  5291. this.pending && this.pushPending();
  5292. var n = new s(e, r, t);
  5293. return t < 0 && this.level--, n.level = this.level, t > 0 && this.level++, this.pendingLevel = this.level, this.tokens.push(n), n
  5294. }, n.prototype.scanDelims = function (e, r) {
  5295. var t, n, s, c, l, u, p, h, f, d = e,
  5296. m = !0,
  5297. _ = !0,
  5298. g = this.posMax,
  5299. k = this.src.charCodeAt(e);
  5300. for (t = e > 0 ? this.src.charCodeAt(e - 1) : 32; d < g && this.src.charCodeAt(d) === k;) d++;
  5301. return s = d - e, n = d < g ? this.src.charCodeAt(d) : 32, p = a(t) || i(String.fromCharCode(t)), f = a(n) || i(String.fromCharCode(n)), u = o(t), h = o(n), h ? m = !1 : f && (u || p || (m = !1)), u ? _ = !1 : p && (h || f || (_ = !1)), r ? (c = m, l = _) : (c = m && (!_ || p), l = _ && (!m || f)), {
  5302. can_open: c,
  5303. can_close: l,
  5304. length: s
  5305. }
  5306. }, n.prototype.Token = s, r.exports = n
  5307. }, {
  5308. "../common/utils": 4,
  5309. "../token": 51
  5310. }],
  5311. 48: [function (e, r, t) {
  5312. "use strict";
  5313. r.exports.tokenize = function (e, r) {
  5314. var t, n, s, o, i, a = e.pos,
  5315. c = e.src.charCodeAt(a);
  5316. if (r) return !1;
  5317. if (126 !== c) return !1;
  5318. if (n = e.scanDelims(e.pos, !0), o = n.length, i = String.fromCharCode(c), o < 2) return !1;
  5319. for (o % 2 && (s = e.push("text", "", 0), s.content = i, o--), t = 0; t < o; t += 2) s = e.push("text", "", 0), s.content = i + i, e.delimiters.push({
  5320. marker: c,
  5321. jump: t,
  5322. token: e.tokens.length - 1,
  5323. level: e.level,
  5324. end: -1,
  5325. open: n.can_open,
  5326. close: n.can_close
  5327. });
  5328. return e.pos += n.length, !0
  5329. }, r.exports.postProcess = function (e) {
  5330. var r, t, n, s, o, i = [],
  5331. a = e.delimiters,
  5332. c = e.delimiters.length;
  5333. for (r = 0; r < c; r++) n = a[r], 126 === n.marker && n.end !== -1 && (s = a[n.end], o = e.tokens[n.token], o.type = "s_open", o.tag = "s", o.nesting = 1, o.markup = "~~", o.content = "", o = e.tokens[s.token], o.type = "s_close", o.tag = "s", o.nesting = -1, o.markup = "~~", o.content = "", "text" === e.tokens[s.token - 1].type && "~" === e.tokens[s.token - 1].content && i.push(s.token - 1));
  5334. for (; i.length;) {
  5335. for (r = i.pop(), t = r + 1; t < e.tokens.length && "s_close" === e.tokens[t].type;) t++;
  5336. t--, r !== t && (o = e.tokens[t], e.tokens[t] = e.tokens[r], e.tokens[r] = o)
  5337. }
  5338. }
  5339. }, {}],
  5340. 49: [function (e, r, t) {
  5341. "use strict";
  5342. function n(e) {
  5343. switch (e) {
  5344. case 10:
  5345. case 33:
  5346. case 35:
  5347. case 36:
  5348. case 37:
  5349. case 38:
  5350. case 42:
  5351. case 43:
  5352. case 45:
  5353. case 58:
  5354. case 60:
  5355. case 61:
  5356. case 62:
  5357. case 64:
  5358. case 91:
  5359. case 92:
  5360. case 93:
  5361. case 94:
  5362. case 95:
  5363. case 96:
  5364. case 123:
  5365. case 125:
  5366. case 126:
  5367. return !0;
  5368. default:
  5369. return !1
  5370. }
  5371. }
  5372. r.exports = function (e, r) {
  5373. for (var t = e.pos; t < e.posMax && !n(e.src.charCodeAt(t));) t++;
  5374. return t !== e.pos && (r || (e.pending += e.src.slice(e.pos, t)), e.pos = t, !0)
  5375. }
  5376. }, {}],
  5377. 50: [function (e, r, t) {
  5378. "use strict";
  5379. r.exports = function (e) {
  5380. var r, t, n = 0,
  5381. s = e.tokens,
  5382. o = e.tokens.length;
  5383. for (r = t = 0; r < o; r++) n += s[r].nesting, s[r].level = n, "text" === s[r].type && r + 1 < o && "text" === s[r + 1].type ? s[r + 1].content = s[r].content + s[r + 1].content : (r !== t && (s[t] = s[r]), t++);
  5384. r !== t && (s.length = t)
  5385. }
  5386. }, {}],
  5387. 51: [function (e, r, t) {
  5388. "use strict";
  5389. function n(e, r, t) {
  5390. this.type = e, this.tag = r, this.attrs = null, this.map = null, this.nesting = t, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1
  5391. }
  5392. n.prototype.attrIndex = function (e) {
  5393. var r, t, n;
  5394. if (!this.attrs) return -1;
  5395. for (r = this.attrs, t = 0, n = r.length; t < n; t++)
  5396. if (r[t][0] === e) return t;
  5397. return -1
  5398. }, n.prototype.attrPush = function (e) {
  5399. this.attrs ? this.attrs.push(e) : this.attrs = [e]
  5400. }, n.prototype.attrSet = function (e, r) {
  5401. var t = this.attrIndex(e),
  5402. n = [e, r];
  5403. t < 0 ? this.attrPush(n) : this.attrs[t] = n
  5404. }, n.prototype.attrGet = function (e) {
  5405. var r = this.attrIndex(e),
  5406. t = null;
  5407. return r >= 0 && (t = this.attrs[r][1]), t
  5408. }, n.prototype.attrJoin = function (e, r) {
  5409. var t = this.attrIndex(e);
  5410. t < 0 ? this.attrPush([e, r]) : this.attrs[t][1] = this.attrs[t][1] + " " + r
  5411. }, r.exports = n
  5412. }, {}],
  5413. 52: [function (r, t, n) {
  5414. (function (r) {
  5415. ! function (s) {
  5416. function o(e) {
  5417. throw new RangeError(R[e])
  5418. }
  5419. function i(e, r) {
  5420. for (var t = e.length, n = []; t--;) n[t] = r(e[t]);
  5421. return n
  5422. }
  5423. function a(e, r) {
  5424. var t = e.split("@"),
  5425. n = "";
  5426. t.length > 1 && (n = t[0] + "@", e = t[1]), e = e.replace(T, ".");
  5427. var s = e.split("."),
  5428. o = i(s, r).join(".");
  5429. return n + o
  5430. }
  5431. function c(e) {
  5432. for (var r, t, n = [], s = 0, o = e.length; s < o;) r = e.charCodeAt(s++), r >= 55296 && r <= 56319 && s < o ? (t = e.charCodeAt(s++), 56320 == (64512 & t) ? n.push(((1023 & r) << 10) + (1023 & t) + 65536) : (n.push(r), s--)) : n.push(r);
  5433. return n
  5434. }
  5435. function l(e) {
  5436. return i(e, function (e) {
  5437. var r = "";
  5438. return e > 65535 && (e -= 65536, r += B(e >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), r += B(e)
  5439. }).join("")
  5440. }
  5441. function u(e) {
  5442. return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e - 97 : C
  5443. }
  5444. function p(e, r) {
  5445. return e + 22 + 75 * (e < 26) - ((0 != r) << 5)
  5446. }
  5447. function h(e, r, t) {
  5448. var n = 0;
  5449. for (e = t ? I(e / q) : e >> 1, e += I(e / r); e > M * w >> 1; n += C) e = I(e / M);
  5450. return I(n + (M + 1) * e / (e + D))
  5451. }
  5452. function f(e) {
  5453. var r, t, n, s, i, a, c, p, f, d, m = [],
  5454. _ = e.length,
  5455. g = 0,
  5456. k = S,
  5457. b = E;
  5458. for (t = e.lastIndexOf(F), t < 0 && (t = 0), n = 0; n < t; ++n) e.charCodeAt(n) >= 128 && o("not-basic"), m.push(e.charCodeAt(n));
  5459. for (s = t > 0 ? t + 1 : 0; s < _;) {
  5460. for (i = g, a = 1, c = C; s >= _ && o("invalid-input"), p = u(e.charCodeAt(s++)), (p >= C || p > I((y - g) / a)) && o("overflow"), g += p * a, f = c <= b ? A : c >= b + w ? w : c - b, !(p < f); c += C) d = C - f, a > I(y / d) && o("overflow"), a *= d;
  5461. r = m.length + 1, b = h(g - i, r, 0 == i), I(g / r) > y - k && o("overflow"), k += I(g / r), g %= r, m.splice(g++, 0, k)
  5462. }
  5463. return l(m)
  5464. }
  5465. function d(e) {
  5466. var r, t, n, s, i, a, l, u, f, d, m, _, g, k, b, v = [];
  5467. for (e = c(e), _ = e.length, r = S, t = 0, i = E, a = 0; a < _; ++a) m = e[a], m < 128 && v.push(B(m));
  5468. for (n = s = v.length, s && v.push(F); n < _;) {
  5469. for (l = y, a = 0; a < _; ++a) m = e[a], m >= r && m < l && (l = m);
  5470. for (g = n + 1, l - r > I((y - t) / g) && o("overflow"), t += (l - r) * g, r = l, a = 0; a < _; ++a)
  5471. if (m = e[a], m < r && ++t > y && o("overflow"), m == r) {
  5472. for (u = t, f = C; d = f <= i ? A : f >= i + w ? w : f - i, !(u < d); f += C) b = u - d, k = C - d, v.push(B(p(d + b % k, 0))), u = I(b / k);
  5473. v.push(B(p(u, 0))), i = h(t, g, n == s), t = 0, ++n
  5474. }++ t, ++r
  5475. }
  5476. return v.join("")
  5477. }
  5478. function m(e) {
  5479. return a(e, function (e) {
  5480. return z.test(e) ? f(e.slice(4).toLowerCase()) : e
  5481. })
  5482. }
  5483. function _(e) {
  5484. return a(e, function (e) {
  5485. return L.test(e) ? "xn--" + d(e) : e
  5486. })
  5487. }
  5488. var g = "object" == typeof n && n && !n.nodeType && n,
  5489. k = "object" == typeof t && t && !t.nodeType && t,
  5490. b = "object" == typeof r && r;
  5491. b.global !== b && b.window !== b && b.self !== b || (s = b);
  5492. var v, x, y = 2147483647,
  5493. C = 36,
  5494. A = 1,
  5495. w = 26,
  5496. D = 38,
  5497. q = 700,
  5498. E = 72,
  5499. S = 128,
  5500. F = "-",
  5501. z = /^xn--/,
  5502. L = /[^\x20-\x7E]/,
  5503. T = /[\x2E\u3002\uFF0E\uFF61]/g,
  5504. R = {
  5505. overflow: "Overflow: input needs wider integers to process",
  5506. "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  5507. "invalid-input": "Invalid input"
  5508. },
  5509. M = C - A,
  5510. I = Math.floor,
  5511. B = String.fromCharCode;
  5512. if (v = {
  5513. version: "1.4.1",
  5514. ucs2: {
  5515. decode: c,
  5516. encode: l
  5517. },
  5518. decode: f,
  5519. encode: d,
  5520. toASCII: _,
  5521. toUnicode: m
  5522. }, "function" == typeof e && "object" == typeof e.amd && e.amd) e("punycode", function () {
  5523. return v
  5524. });
  5525. else if (g && k)
  5526. if (t.exports == g) k.exports = v;
  5527. else
  5528. for (x in v) v.hasOwnProperty(x) && (g[x] = v[x]);
  5529. else s.punycode = v
  5530. }(this)
  5531. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  5532. }, {}],
  5533. 53: [function (e, r, t) {
  5534. r.exports = {
  5535. Aacute: "Á",
  5536. aacute: "á",
  5537. Abreve: "Ă",
  5538. abreve: "ă",
  5539. ac: "∾",
  5540. acd: "∿",
  5541. acE: "∾̳",
  5542. Acirc: "Â",
  5543. acirc: "â",
  5544. acute: "´",
  5545. Acy: "А",
  5546. acy: "а",
  5547. AElig: "Æ",
  5548. aelig: "æ",
  5549. af: "⁡",
  5550. Afr: "𝔄",
  5551. afr: "𝔞",
  5552. Agrave: "À",
  5553. agrave: "à",
  5554. alefsym: "ℵ",
  5555. aleph: "ℵ",
  5556. Alpha: "Α",
  5557. alpha: "α",
  5558. Amacr: "Ā",
  5559. amacr: "ā",
  5560. amalg: "⨿",
  5561. amp: "&",
  5562. AMP: "&",
  5563. andand: "⩕",
  5564. And: "⩓",
  5565. and: "∧",
  5566. andd: "⩜",
  5567. andslope: "⩘",
  5568. andv: "⩚",
  5569. ang: "∠",
  5570. ange: "⦤",
  5571. angle: "∠",
  5572. angmsdaa: "⦨",
  5573. angmsdab: "⦩",
  5574. angmsdac: "⦪",
  5575. angmsdad: "⦫",
  5576. angmsdae: "⦬",
  5577. angmsdaf: "⦭",
  5578. angmsdag: "⦮",
  5579. angmsdah: "⦯",
  5580. angmsd: "∡",
  5581. angrt: "∟",
  5582. angrtvb: "⊾",
  5583. angrtvbd: "⦝",
  5584. angsph: "∢",
  5585. angst: "Å",
  5586. angzarr: "⍼",
  5587. Aogon: "Ą",
  5588. aogon: "ą",
  5589. Aopf: "𝔸",
  5590. aopf: "𝕒",
  5591. apacir: "⩯",
  5592. ap: "≈",
  5593. apE: "⩰",
  5594. ape: "≊",
  5595. apid: "≋",
  5596. apos: "'",
  5597. ApplyFunction: "⁡",
  5598. approx: "≈",
  5599. approxeq: "≊",
  5600. Aring: "Å",
  5601. aring: "å",
  5602. Ascr: "𝒜",
  5603. ascr: "𝒶",
  5604. Assign: "≔",
  5605. ast: "*",
  5606. asymp: "≈",
  5607. asympeq: "≍",
  5608. Atilde: "Ã",
  5609. atilde: "ã",
  5610. Auml: "Ä",
  5611. auml: "ä",
  5612. awconint: "∳",
  5613. awint: "⨑",
  5614. backcong: "≌",
  5615. backepsilon: "϶",
  5616. backprime: "‵",
  5617. backsim: "∽",
  5618. backsimeq: "⋍",
  5619. Backslash: "∖",
  5620. Barv: "⫧",
  5621. barvee: "⊽",
  5622. barwed: "⌅",
  5623. Barwed: "⌆",
  5624. barwedge: "⌅",
  5625. bbrk: "⎵",
  5626. bbrktbrk: "⎶",
  5627. bcong: "≌",
  5628. Bcy: "Б",
  5629. bcy: "б",
  5630. bdquo: "„",
  5631. becaus: "∵",
  5632. because: "∵",
  5633. Because: "∵",
  5634. bemptyv: "⦰",
  5635. bepsi: "϶",
  5636. bernou: "ℬ",
  5637. Bernoullis: "ℬ",
  5638. Beta: "Β",
  5639. beta: "β",
  5640. beth: "ℶ",
  5641. between: "≬",
  5642. Bfr: "𝔅",
  5643. bfr: "𝔟",
  5644. bigcap: "⋂",
  5645. bigcirc: "◯",
  5646. bigcup: "⋃",
  5647. bigodot: "⨀",
  5648. bigoplus: "⨁",
  5649. bigotimes: "⨂",
  5650. bigsqcup: "⨆",
  5651. bigstar: "★",
  5652. bigtriangledown: "▽",
  5653. bigtriangleup: "△",
  5654. biguplus: "⨄",
  5655. bigvee: "⋁",
  5656. bigwedge: "⋀",
  5657. bkarow: "⤍",
  5658. blacklozenge: "⧫",
  5659. blacksquare: "▪",
  5660. blacktriangle: "▴",
  5661. blacktriangledown: "▾",
  5662. blacktriangleleft: "◂",
  5663. blacktriangleright: "▸",
  5664. blank: "␣",
  5665. blk12: "▒",
  5666. blk14: "░",
  5667. blk34: "▓",
  5668. block: "█",
  5669. bne: "=⃥",
  5670. bnequiv: "≡⃥",
  5671. bNot: "⫭",
  5672. bnot: "⌐",
  5673. Bopf: "𝔹",
  5674. bopf: "𝕓",
  5675. bot: "⊥",
  5676. bottom: "⊥",
  5677. bowtie: "⋈",
  5678. boxbox: "⧉",
  5679. boxdl: "┐",
  5680. boxdL: "╕",
  5681. boxDl: "╖",
  5682. boxDL: "╗",
  5683. boxdr: "┌",
  5684. boxdR: "╒",
  5685. boxDr: "╓",
  5686. boxDR: "╔",
  5687. boxh: "─",
  5688. boxH: "═",
  5689. boxhd: "┬",
  5690. boxHd: "╤",
  5691. boxhD: "╥",
  5692. boxHD: "╦",
  5693. boxhu: "┴",
  5694. boxHu: "╧",
  5695. boxhU: "╨",
  5696. boxHU: "╩",
  5697. boxminus: "⊟",
  5698. boxplus: "⊞",
  5699. boxtimes: "⊠",
  5700. boxul: "┘",
  5701. boxuL: "╛",
  5702. boxUl: "╜",
  5703. boxUL: "╝",
  5704. boxur: "└",
  5705. boxuR: "╘",
  5706. boxUr: "╙",
  5707. boxUR: "╚",
  5708. boxv: "│",
  5709. boxV: "║",
  5710. boxvh: "┼",
  5711. boxvH: "╪",
  5712. boxVh: "╫",
  5713. boxVH: "╬",
  5714. boxvl: "┤",
  5715. boxvL: "╡",
  5716. boxVl: "╢",
  5717. boxVL: "╣",
  5718. boxvr: "├",
  5719. boxvR: "╞",
  5720. boxVr: "╟",
  5721. boxVR: "╠",
  5722. bprime: "‵",
  5723. breve: "˘",
  5724. Breve: "˘",
  5725. brvbar: "¦",
  5726. bscr: "𝒷",
  5727. Bscr: "ℬ",
  5728. bsemi: "⁏",
  5729. bsim: "∽",
  5730. bsime: "⋍",
  5731. bsolb: "⧅",
  5732. bsol: "\\",
  5733. bsolhsub: "⟈",
  5734. bull: "•",
  5735. bullet: "•",
  5736. bump: "≎",
  5737. bumpE: "⪮",
  5738. bumpe: "≏",
  5739. Bumpeq: "≎",
  5740. bumpeq: "≏",
  5741. Cacute: "Ć",
  5742. cacute: "ć",
  5743. capand: "⩄",
  5744. capbrcup: "⩉",
  5745. capcap: "⩋",
  5746. cap: "∩",
  5747. Cap: "⋒",
  5748. capcup: "⩇",
  5749. capdot: "⩀",
  5750. CapitalDifferentialD: "ⅅ",
  5751. caps: "∩︀",
  5752. caret: "⁁",
  5753. caron: "ˇ",
  5754. Cayleys: "ℭ",
  5755. ccaps: "⩍",
  5756. Ccaron: "Č",
  5757. ccaron: "č",
  5758. Ccedil: "Ç",
  5759. ccedil: "ç",
  5760. Ccirc: "Ĉ",
  5761. ccirc: "ĉ",
  5762. Cconint: "∰",
  5763. ccups: "⩌",
  5764. ccupssm: "⩐",
  5765. Cdot: "Ċ",
  5766. cdot: "ċ",
  5767. cedil: "¸",
  5768. Cedilla: "¸",
  5769. cemptyv: "⦲",
  5770. cent: "¢",
  5771. centerdot: "·",
  5772. CenterDot: "·",
  5773. cfr: "𝔠",
  5774. Cfr: "ℭ",
  5775. CHcy: "Ч",
  5776. chcy: "ч",
  5777. check: "✓",
  5778. checkmark: "✓",
  5779. Chi: "Χ",
  5780. chi: "χ",
  5781. circ: "ˆ",
  5782. circeq: "≗",
  5783. circlearrowleft: "↺",
  5784. circlearrowright: "↻",
  5785. circledast: "⊛",
  5786. circledcirc: "⊚",
  5787. circleddash: "⊝",
  5788. CircleDot: "⊙",
  5789. circledR: "®",
  5790. circledS: "Ⓢ",
  5791. CircleMinus: "⊖",
  5792. CirclePlus: "⊕",
  5793. CircleTimes: "⊗",
  5794. cir: "○",
  5795. cirE: "⧃",
  5796. cire: "≗",
  5797. cirfnint: "⨐",
  5798. cirmid: "⫯",
  5799. cirscir: "⧂",
  5800. ClockwiseContourIntegral: "∲",
  5801. CloseCurlyDoubleQuote: "”",
  5802. CloseCurlyQuote: "’",
  5803. clubs: "♣",
  5804. clubsuit: "♣",
  5805. colon: ":",
  5806. Colon: "∷",
  5807. Colone: "⩴",
  5808. colone: "≔",
  5809. coloneq: "≔",
  5810. comma: ",",
  5811. commat: "@",
  5812. comp: "∁",
  5813. compfn: "∘",
  5814. complement: "∁",
  5815. complexes: "ℂ",
  5816. cong: "≅",
  5817. congdot: "⩭",
  5818. Congruent: "≡",
  5819. conint: "∮",
  5820. Conint: "∯",
  5821. ContourIntegral: "∮",
  5822. copf: "𝕔",
  5823. Copf: "ℂ",
  5824. coprod: "∐",
  5825. Coproduct: "∐",
  5826. copy: "©",
  5827. COPY: "©",
  5828. copysr: "℗",
  5829. CounterClockwiseContourIntegral: "∳",
  5830. crarr: "↵",
  5831. cross: "✗",
  5832. Cross: "⨯",
  5833. Cscr: "𝒞",
  5834. cscr: "𝒸",
  5835. csub: "⫏",
  5836. csube: "⫑",
  5837. csup: "⫐",
  5838. csupe: "⫒",
  5839. ctdot: "⋯",
  5840. cudarrl: "⤸",
  5841. cudarrr: "⤵",
  5842. cuepr: "⋞",
  5843. cuesc: "⋟",
  5844. cularr: "↶",
  5845. cularrp: "⤽",
  5846. cupbrcap: "⩈",
  5847. cupcap: "⩆",
  5848. CupCap: "≍",
  5849. cup: "∪",
  5850. Cup: "⋓",
  5851. cupcup: "⩊",
  5852. cupdot: "⊍",
  5853. cupor: "⩅",
  5854. cups: "∪︀",
  5855. curarr: "↷",
  5856. curarrm: "⤼",
  5857. curlyeqprec: "⋞",
  5858. curlyeqsucc: "⋟",
  5859. curlyvee: "⋎",
  5860. curlywedge: "⋏",
  5861. curren: "¤",
  5862. curvearrowleft: "↶",
  5863. curvearrowright: "↷",
  5864. cuvee: "⋎",
  5865. cuwed: "⋏",
  5866. cwconint: "∲",
  5867. cwint: "∱",
  5868. cylcty: "⌭",
  5869. dagger: "†",
  5870. Dagger: "‡",
  5871. daleth: "ℸ",
  5872. darr: "↓",
  5873. Darr: "↡",
  5874. dArr: "⇓",
  5875. dash: "‐",
  5876. Dashv: "⫤",
  5877. dashv: "⊣",
  5878. dbkarow: "⤏",
  5879. dblac: "˝",
  5880. Dcaron: "Ď",
  5881. dcaron: "ď",
  5882. Dcy: "Д",
  5883. dcy: "д",
  5884. ddagger: "‡",
  5885. ddarr: "⇊",
  5886. DD: "ⅅ",
  5887. dd: "ⅆ",
  5888. DDotrahd: "⤑",
  5889. ddotseq: "⩷",
  5890. deg: "°",
  5891. Del: "∇",
  5892. Delta: "Δ",
  5893. delta: "δ",
  5894. demptyv: "⦱",
  5895. dfisht: "⥿",
  5896. Dfr: "𝔇",
  5897. dfr: "𝔡",
  5898. dHar: "⥥",
  5899. dharl: "⇃",
  5900. dharr: "⇂",
  5901. DiacriticalAcute: "´",
  5902. DiacriticalDot: "˙",
  5903. DiacriticalDoubleAcute: "˝",
  5904. DiacriticalGrave: "`",
  5905. DiacriticalTilde: "˜",
  5906. diam: "⋄",
  5907. diamond: "⋄",
  5908. Diamond: "⋄",
  5909. diamondsuit: "♦",
  5910. diams: "♦",
  5911. die: "¨",
  5912. DifferentialD: "ⅆ",
  5913. digamma: "ϝ",
  5914. disin: "⋲",
  5915. div: "÷",
  5916. divide: "÷",
  5917. divideontimes: "⋇",
  5918. divonx: "⋇",
  5919. DJcy: "Ђ",
  5920. djcy: "ђ",
  5921. dlcorn: "⌞",
  5922. dlcrop: "⌍",
  5923. dollar: "$",
  5924. Dopf: "𝔻",
  5925. dopf: "𝕕",
  5926. Dot: "¨",
  5927. dot: "˙",
  5928. DotDot: "⃜",
  5929. doteq: "≐",
  5930. doteqdot: "≑",
  5931. DotEqual: "≐",
  5932. dotminus: "∸",
  5933. dotplus: "∔",
  5934. dotsquare: "⊡",
  5935. doublebarwedge: "⌆",
  5936. DoubleContourIntegral: "∯",
  5937. DoubleDot: "¨",
  5938. DoubleDownArrow: "⇓",
  5939. DoubleLeftArrow: "⇐",
  5940. DoubleLeftRightArrow: "⇔",
  5941. DoubleLeftTee: "⫤",
  5942. DoubleLongLeftArrow: "⟸",
  5943. DoubleLongLeftRightArrow: "⟺",
  5944. DoubleLongRightArrow: "⟹",
  5945. DoubleRightArrow: "⇒",
  5946. DoubleRightTee: "⊨",
  5947. DoubleUpArrow: "⇑",
  5948. DoubleUpDownArrow: "⇕",
  5949. DoubleVerticalBar: "∥",
  5950. DownArrowBar: "⤓",
  5951. downarrow: "↓",
  5952. DownArrow: "↓",
  5953. Downarrow: "⇓",
  5954. DownArrowUpArrow: "⇵",
  5955. DownBreve: "̑",
  5956. downdownarrows: "⇊",
  5957. downharpoonleft: "⇃",
  5958. downharpoonright: "⇂",
  5959. DownLeftRightVector: "⥐",
  5960. DownLeftTeeVector: "⥞",
  5961. DownLeftVectorBar: "⥖",
  5962. DownLeftVector: "↽",
  5963. DownRightTeeVector: "⥟",
  5964. DownRightVectorBar: "⥗",
  5965. DownRightVector: "⇁",
  5966. DownTeeArrow: "↧",
  5967. DownTee: "⊤",
  5968. drbkarow: "⤐",
  5969. drcorn: "⌟",
  5970. drcrop: "⌌",
  5971. Dscr: "𝒟",
  5972. dscr: "𝒹",
  5973. DScy: "Ѕ",
  5974. dscy: "ѕ",
  5975. dsol: "⧶",
  5976. Dstrok: "Đ",
  5977. dstrok: "đ",
  5978. dtdot: "⋱",
  5979. dtri: "▿",
  5980. dtrif: "▾",
  5981. duarr: "⇵",
  5982. duhar: "⥯",
  5983. dwangle: "⦦",
  5984. DZcy: "Џ",
  5985. dzcy: "џ",
  5986. dzigrarr: "⟿",
  5987. Eacute: "É",
  5988. eacute: "é",
  5989. easter: "⩮",
  5990. Ecaron: "Ě",
  5991. ecaron: "ě",
  5992. Ecirc: "Ê",
  5993. ecirc: "ê",
  5994. ecir: "≖",
  5995. ecolon: "≕",
  5996. Ecy: "Э",
  5997. ecy: "э",
  5998. eDDot: "⩷",
  5999. Edot: "Ė",
  6000. edot: "ė",
  6001. eDot: "≑",
  6002. ee: "ⅇ",
  6003. efDot: "≒",
  6004. Efr: "𝔈",
  6005. efr: "𝔢",
  6006. eg: "⪚",
  6007. Egrave: "È",
  6008. egrave: "è",
  6009. egs: "⪖",
  6010. egsdot: "⪘",
  6011. el: "⪙",
  6012. Element: "∈",
  6013. elinters: "⏧",
  6014. ell: "ℓ",
  6015. els: "⪕",
  6016. elsdot: "⪗",
  6017. Emacr: "Ē",
  6018. emacr: "ē",
  6019. empty: "∅",
  6020. emptyset: "∅",
  6021. EmptySmallSquare: "◻",
  6022. emptyv: "∅",
  6023. EmptyVerySmallSquare: "▫",
  6024. emsp13: " ",
  6025. emsp14: " ",
  6026. emsp: " ",
  6027. ENG: "Ŋ",
  6028. eng: "ŋ",
  6029. ensp: " ",
  6030. Eogon: "Ę",
  6031. eogon: "ę",
  6032. Eopf: "𝔼",
  6033. eopf: "𝕖",
  6034. epar: "⋕",
  6035. eparsl: "⧣",
  6036. eplus: "⩱",
  6037. epsi: "ε",
  6038. Epsilon: "Ε",
  6039. epsilon: "ε",
  6040. epsiv: "ϵ",
  6041. eqcirc: "≖",
  6042. eqcolon: "≕",
  6043. eqsim: "≂",
  6044. eqslantgtr: "⪖",
  6045. eqslantless: "⪕",
  6046. Equal: "⩵",
  6047. equals: "=",
  6048. EqualTilde: "≂",
  6049. equest: "≟",
  6050. Equilibrium: "⇌",
  6051. equiv: "≡",
  6052. equivDD: "⩸",
  6053. eqvparsl: "⧥",
  6054. erarr: "⥱",
  6055. erDot: "≓",
  6056. escr: "ℯ",
  6057. Escr: "ℰ",
  6058. esdot: "≐",
  6059. Esim: "⩳",
  6060. esim: "≂",
  6061. Eta: "Η",
  6062. eta: "η",
  6063. ETH: "Ð",
  6064. eth: "ð",
  6065. Euml: "Ë",
  6066. euml: "ë",
  6067. euro: "€",
  6068. excl: "!",
  6069. exist: "∃",
  6070. Exists: "∃",
  6071. expectation: "ℰ",
  6072. exponentiale: "ⅇ",
  6073. ExponentialE: "ⅇ",
  6074. fallingdotseq: "≒",
  6075. Fcy: "Ф",
  6076. fcy: "ф",
  6077. female: "♀",
  6078. ffilig: "ffi",
  6079. fflig: "ff",
  6080. ffllig: "ffl",
  6081. Ffr: "𝔉",
  6082. ffr: "𝔣",
  6083. filig: "fi",
  6084. FilledSmallSquare: "◼",
  6085. FilledVerySmallSquare: "▪",
  6086. fjlig: "fj",
  6087. flat: "♭",
  6088. fllig: "fl",
  6089. fltns: "▱",
  6090. fnof: "ƒ",
  6091. Fopf: "𝔽",
  6092. fopf: "𝕗",
  6093. forall: "∀",
  6094. ForAll: "∀",
  6095. fork: "⋔",
  6096. forkv: "⫙",
  6097. Fouriertrf: "ℱ",
  6098. fpartint: "⨍",
  6099. frac12: "½",
  6100. frac13: "⅓",
  6101. frac14: "¼",
  6102. frac15: "⅕",
  6103. frac16: "⅙",
  6104. frac18: "⅛",
  6105. frac23: "⅔",
  6106. frac25: "⅖",
  6107. frac34: "¾",
  6108. frac35: "⅗",
  6109. frac38: "⅜",
  6110. frac45: "⅘",
  6111. frac56: "⅚",
  6112. frac58: "⅝",
  6113. frac78: "⅞",
  6114. frasl: "⁄",
  6115. frown: "⌢",
  6116. fscr: "𝒻",
  6117. Fscr: "ℱ",
  6118. gacute: "ǵ",
  6119. Gamma: "Γ",
  6120. gamma: "γ",
  6121. Gammad: "Ϝ",
  6122. gammad: "ϝ",
  6123. gap: "⪆",
  6124. Gbreve: "Ğ",
  6125. gbreve: "ğ",
  6126. Gcedil: "Ģ",
  6127. Gcirc: "Ĝ",
  6128. gcirc: "ĝ",
  6129. Gcy: "Г",
  6130. gcy: "г",
  6131. Gdot: "Ġ",
  6132. gdot: "ġ",
  6133. ge: "≥",
  6134. gE: "≧",
  6135. gEl: "⪌",
  6136. gel: "⋛",
  6137. geq: "≥",
  6138. geqq: "≧",
  6139. geqslant: "⩾",
  6140. gescc: "⪩",
  6141. ges: "⩾",
  6142. gesdot: "⪀",
  6143. gesdoto: "⪂",
  6144. gesdotol: "⪄",
  6145. gesl: "⋛︀",
  6146. gesles: "⪔",
  6147. Gfr: "𝔊",
  6148. gfr: "𝔤",
  6149. gg: "≫",
  6150. Gg: "⋙",
  6151. ggg: "⋙",
  6152. gimel: "ℷ",
  6153. GJcy: "Ѓ",
  6154. gjcy: "ѓ",
  6155. gla: "⪥",
  6156. gl: "≷",
  6157. glE: "⪒",
  6158. glj: "⪤",
  6159. gnap: "⪊",
  6160. gnapprox: "⪊",
  6161. gne: "⪈",
  6162. gnE: "≩",
  6163. gneq: "⪈",
  6164. gneqq: "≩",
  6165. gnsim: "⋧",
  6166. Gopf: "𝔾",
  6167. gopf: "𝕘",
  6168. grave: "`",
  6169. GreaterEqual: "≥",
  6170. GreaterEqualLess: "⋛",
  6171. GreaterFullEqual: "≧",
  6172. GreaterGreater: "⪢",
  6173. GreaterLess: "≷",
  6174. GreaterSlantEqual: "⩾",
  6175. GreaterTilde: "≳",
  6176. Gscr: "𝒢",
  6177. gscr: "ℊ",
  6178. gsim: "≳",
  6179. gsime: "⪎",
  6180. gsiml: "⪐",
  6181. gtcc: "⪧",
  6182. gtcir: "⩺",
  6183. gt: ">",
  6184. GT: ">",
  6185. Gt: "≫",
  6186. gtdot: "⋗",
  6187. gtlPar: "⦕",
  6188. gtquest: "⩼",
  6189. gtrapprox: "⪆",
  6190. gtrarr: "⥸",
  6191. gtrdot: "⋗",
  6192. gtreqless: "⋛",
  6193. gtreqqless: "⪌",
  6194. gtrless: "≷",
  6195. gtrsim: "≳",
  6196. gvertneqq: "≩︀",
  6197. gvnE: "≩︀",
  6198. Hacek: "ˇ",
  6199. hairsp: " ",
  6200. half: "½",
  6201. hamilt: "ℋ",
  6202. HARDcy: "Ъ",
  6203. hardcy: "ъ",
  6204. harrcir: "⥈",
  6205. harr: "↔",
  6206. hArr: "⇔",
  6207. harrw: "↭",
  6208. Hat: "^",
  6209. hbar: "ℏ",
  6210. Hcirc: "Ĥ",
  6211. hcirc: "ĥ",
  6212. hearts: "♥",
  6213. heartsuit: "♥",
  6214. hellip: "…",
  6215. hercon: "⊹",
  6216. hfr: "𝔥",
  6217. Hfr: "ℌ",
  6218. HilbertSpace: "ℋ",
  6219. hksearow: "⤥",
  6220. hkswarow: "⤦",
  6221. hoarr: "⇿",
  6222. homtht: "∻",
  6223. hookleftarrow: "↩",
  6224. hookrightarrow: "↪",
  6225. hopf: "𝕙",
  6226. Hopf: "ℍ",
  6227. horbar: "―",
  6228. HorizontalLine: "─",
  6229. hscr: "𝒽",
  6230. Hscr: "ℋ",
  6231. hslash: "ℏ",
  6232. Hstrok: "Ħ",
  6233. hstrok: "ħ",
  6234. HumpDownHump: "≎",
  6235. HumpEqual: "≏",
  6236. hybull: "⁃",
  6237. hyphen: "‐",
  6238. Iacute: "Í",
  6239. iacute: "í",
  6240. ic: "⁣",
  6241. Icirc: "Î",
  6242. icirc: "î",
  6243. Icy: "И",
  6244. icy: "и",
  6245. Idot: "İ",
  6246. IEcy: "Е",
  6247. iecy: "е",
  6248. iexcl: "¡",
  6249. iff: "⇔",
  6250. ifr: "𝔦",
  6251. Ifr: "ℑ",
  6252. Igrave: "Ì",
  6253. igrave: "ì",
  6254. ii: "ⅈ",
  6255. iiiint: "⨌",
  6256. iiint: "∭",
  6257. iinfin: "⧜",
  6258. iiota: "℩",
  6259. IJlig: "IJ",
  6260. ijlig: "ij",
  6261. Imacr: "Ī",
  6262. imacr: "ī",
  6263. image: "ℑ",
  6264. ImaginaryI: "ⅈ",
  6265. imagline: "ℐ",
  6266. imagpart: "ℑ",
  6267. imath: "ı",
  6268. Im: "ℑ",
  6269. imof: "⊷",
  6270. imped: "Ƶ",
  6271. Implies: "⇒",
  6272. incare: "℅",
  6273. "in": "∈",
  6274. infin: "∞",
  6275. infintie: "⧝",
  6276. inodot: "ı",
  6277. intcal: "⊺",
  6278. "int": "∫",
  6279. Int: "∬",
  6280. integers: "ℤ",
  6281. Integral: "∫",
  6282. intercal: "⊺",
  6283. Intersection: "⋂",
  6284. intlarhk: "⨗",
  6285. intprod: "⨼",
  6286. InvisibleComma: "⁣",
  6287. InvisibleTimes: "⁢",
  6288. IOcy: "Ё",
  6289. iocy: "ё",
  6290. Iogon: "Į",
  6291. iogon: "į",
  6292. Iopf: "𝕀",
  6293. iopf: "𝕚",
  6294. Iota: "Ι",
  6295. iota: "ι",
  6296. iprod: "⨼",
  6297. iquest: "¿",
  6298. iscr: "𝒾",
  6299. Iscr: "ℐ",
  6300. isin: "∈",
  6301. isindot: "⋵",
  6302. isinE: "⋹",
  6303. isins: "⋴",
  6304. isinsv: "⋳",
  6305. isinv: "∈",
  6306. it: "⁢",
  6307. Itilde: "Ĩ",
  6308. itilde: "ĩ",
  6309. Iukcy: "І",
  6310. iukcy: "і",
  6311. Iuml: "Ï",
  6312. iuml: "ï",
  6313. Jcirc: "Ĵ",
  6314. jcirc: "ĵ",
  6315. Jcy: "Й",
  6316. jcy: "й",
  6317. Jfr: "𝔍",
  6318. jfr: "𝔧",
  6319. jmath: "ȷ",
  6320. Jopf: "𝕁",
  6321. jopf: "𝕛",
  6322. Jscr: "𝒥",
  6323. jscr: "𝒿",
  6324. Jsercy: "Ј",
  6325. jsercy: "ј",
  6326. Jukcy: "Є",
  6327. jukcy: "є",
  6328. Kappa: "Κ",
  6329. kappa: "κ",
  6330. kappav: "ϰ",
  6331. Kcedil: "Ķ",
  6332. kcedil: "ķ",
  6333. Kcy: "К",
  6334. kcy: "к",
  6335. Kfr: "𝔎",
  6336. kfr: "𝔨",
  6337. kgreen: "ĸ",
  6338. KHcy: "Х",
  6339. khcy: "х",
  6340. KJcy: "Ќ",
  6341. kjcy: "ќ",
  6342. Kopf: "𝕂",
  6343. kopf: "𝕜",
  6344. Kscr: "𝒦",
  6345. kscr: "𝓀",
  6346. lAarr: "⇚",
  6347. Lacute: "Ĺ",
  6348. lacute: "ĺ",
  6349. laemptyv: "⦴",
  6350. lagran: "ℒ",
  6351. Lambda: "Λ",
  6352. lambda: "λ",
  6353. lang: "⟨",
  6354. Lang: "⟪",
  6355. langd: "⦑",
  6356. langle: "⟨",
  6357. lap: "⪅",
  6358. Laplacetrf: "ℒ",
  6359. laquo: "«",
  6360. larrb: "⇤",
  6361. larrbfs: "⤟",
  6362. larr: "←",
  6363. Larr: "↞",
  6364. lArr: "⇐",
  6365. larrfs: "⤝",
  6366. larrhk: "↩",
  6367. larrlp: "↫",
  6368. larrpl: "⤹",
  6369. larrsim: "⥳",
  6370. larrtl: "↢",
  6371. latail: "⤙",
  6372. lAtail: "⤛",
  6373. lat: "⪫",
  6374. late: "⪭",
  6375. lates: "⪭︀",
  6376. lbarr: "⤌",
  6377. lBarr: "⤎",
  6378. lbbrk: "❲",
  6379. lbrace: "{",
  6380. lbrack: "[",
  6381. lbrke: "⦋",
  6382. lbrksld: "⦏",
  6383. lbrkslu: "⦍",
  6384. Lcaron: "Ľ",
  6385. lcaron: "ľ",
  6386. Lcedil: "Ļ",
  6387. lcedil: "ļ",
  6388. lceil: "⌈",
  6389. lcub: "{",
  6390. Lcy: "Л",
  6391. lcy: "л",
  6392. ldca: "⤶",
  6393. ldquo: "“",
  6394. ldquor: "„",
  6395. ldrdhar: "⥧",
  6396. ldrushar: "⥋",
  6397. ldsh: "↲",
  6398. le: "≤",
  6399. lE: "≦",
  6400. LeftAngleBracket: "⟨",
  6401. LeftArrowBar: "⇤",
  6402. leftarrow: "←",
  6403. LeftArrow: "←",
  6404. Leftarrow: "⇐",
  6405. LeftArrowRightArrow: "⇆",
  6406. leftarrowtail: "↢",
  6407. LeftCeiling: "⌈",
  6408. LeftDoubleBracket: "⟦",
  6409. LeftDownTeeVector: "⥡",
  6410. LeftDownVectorBar: "⥙",
  6411. LeftDownVector: "⇃",
  6412. LeftFloor: "⌊",
  6413. leftharpoondown: "↽",
  6414. leftharpoonup: "↼",
  6415. leftleftarrows: "⇇",
  6416. leftrightarrow: "↔",
  6417. LeftRightArrow: "↔",
  6418. Leftrightarrow: "⇔",
  6419. leftrightarrows: "⇆",
  6420. leftrightharpoons: "⇋",
  6421. leftrightsquigarrow: "↭",
  6422. LeftRightVector: "⥎",
  6423. LeftTeeArrow: "↤",
  6424. LeftTee: "⊣",
  6425. LeftTeeVector: "⥚",
  6426. leftthreetimes: "⋋",
  6427. LeftTriangleBar: "⧏",
  6428. LeftTriangle: "⊲",
  6429. LeftTriangleEqual: "⊴",
  6430. LeftUpDownVector: "⥑",
  6431. LeftUpTeeVector: "⥠",
  6432. LeftUpVectorBar: "⥘",
  6433. LeftUpVector: "↿",
  6434. LeftVectorBar: "⥒",
  6435. LeftVector: "↼",
  6436. lEg: "⪋",
  6437. leg: "⋚",
  6438. leq: "≤",
  6439. leqq: "≦",
  6440. leqslant: "⩽",
  6441. lescc: "⪨",
  6442. les: "⩽",
  6443. lesdot: "⩿",
  6444. lesdoto: "⪁",
  6445. lesdotor: "⪃",
  6446. lesg: "⋚︀",
  6447. lesges: "⪓",
  6448. lessapprox: "⪅",
  6449. lessdot: "⋖",
  6450. lesseqgtr: "⋚",
  6451. lesseqqgtr: "⪋",
  6452. LessEqualGreater: "⋚",
  6453. LessFullEqual: "≦",
  6454. LessGreater: "≶",
  6455. lessgtr: "≶",
  6456. LessLess: "⪡",
  6457. lesssim: "≲",
  6458. LessSlantEqual: "⩽",
  6459. LessTilde: "≲",
  6460. lfisht: "⥼",
  6461. lfloor: "⌊",
  6462. Lfr: "𝔏",
  6463. lfr: "𝔩",
  6464. lg: "≶",
  6465. lgE: "⪑",
  6466. lHar: "⥢",
  6467. lhard: "↽",
  6468. lharu: "↼",
  6469. lharul: "⥪",
  6470. lhblk: "▄",
  6471. LJcy: "Љ",
  6472. ljcy: "љ",
  6473. llarr: "⇇",
  6474. ll: "≪",
  6475. Ll: "⋘",
  6476. llcorner: "⌞",
  6477. Lleftarrow: "⇚",
  6478. llhard: "⥫",
  6479. lltri: "◺",
  6480. Lmidot: "Ŀ",
  6481. lmidot: "ŀ",
  6482. lmoustache: "⎰",
  6483. lmoust: "⎰",
  6484. lnap: "⪉",
  6485. lnapprox: "⪉",
  6486. lne: "⪇",
  6487. lnE: "≨",
  6488. lneq: "⪇",
  6489. lneqq: "≨",
  6490. lnsim: "⋦",
  6491. loang: "⟬",
  6492. loarr: "⇽",
  6493. lobrk: "⟦",
  6494. longleftarrow: "⟵",
  6495. LongLeftArrow: "⟵",
  6496. Longleftarrow: "⟸",
  6497. longleftrightarrow: "⟷",
  6498. LongLeftRightArrow: "⟷",
  6499. Longleftrightarrow: "⟺",
  6500. longmapsto: "⟼",
  6501. longrightarrow: "⟶",
  6502. LongRightArrow: "⟶",
  6503. Longrightarrow: "⟹",
  6504. looparrowleft: "↫",
  6505. looparrowright: "↬",
  6506. lopar: "⦅",
  6507. Lopf: "𝕃",
  6508. lopf: "𝕝",
  6509. loplus: "⨭",
  6510. lotimes: "⨴",
  6511. lowast: "∗",
  6512. lowbar: "_",
  6513. LowerLeftArrow: "↙",
  6514. LowerRightArrow: "↘",
  6515. loz: "◊",
  6516. lozenge: "◊",
  6517. lozf: "⧫",
  6518. lpar: "(",
  6519. lparlt: "⦓",
  6520. lrarr: "⇆",
  6521. lrcorner: "⌟",
  6522. lrhar: "⇋",
  6523. lrhard: "⥭",
  6524. lrm: "‎",
  6525. lrtri: "⊿",
  6526. lsaquo: "‹",
  6527. lscr: "𝓁",
  6528. Lscr: "ℒ",
  6529. lsh: "↰",
  6530. Lsh: "↰",
  6531. lsim: "≲",
  6532. lsime: "⪍",
  6533. lsimg: "⪏",
  6534. lsqb: "[",
  6535. lsquo: "‘",
  6536. lsquor: "‚",
  6537. Lstrok: "Ł",
  6538. lstrok: "ł",
  6539. ltcc: "⪦",
  6540. ltcir: "⩹",
  6541. lt: "<",
  6542. LT: "<",
  6543. Lt: "≪",
  6544. ltdot: "⋖",
  6545. lthree: "⋋",
  6546. ltimes: "⋉",
  6547. ltlarr: "⥶",
  6548. ltquest: "⩻",
  6549. ltri: "◃",
  6550. ltrie: "⊴",
  6551. ltrif: "◂",
  6552. ltrPar: "⦖",
  6553. lurdshar: "⥊",
  6554. luruhar: "⥦",
  6555. lvertneqq: "≨︀",
  6556. lvnE: "≨︀",
  6557. macr: "¯",
  6558. male: "♂",
  6559. malt: "✠",
  6560. maltese: "✠",
  6561. Map: "⤅",
  6562. map: "↦",
  6563. mapsto: "↦",
  6564. mapstodown: "↧",
  6565. mapstoleft: "↤",
  6566. mapstoup: "↥",
  6567. marker: "▮",
  6568. mcomma: "⨩",
  6569. Mcy: "М",
  6570. mcy: "м",
  6571. mdash: "—",
  6572. mDDot: "∺",
  6573. measuredangle: "∡",
  6574. MediumSpace: " ",
  6575. Mellintrf: "ℳ",
  6576. Mfr: "𝔐",
  6577. mfr: "𝔪",
  6578. mho: "℧",
  6579. micro: "µ",
  6580. midast: "*",
  6581. midcir: "⫰",
  6582. mid: "∣",
  6583. middot: "·",
  6584. minusb: "⊟",
  6585. minus: "−",
  6586. minusd: "∸",
  6587. minusdu: "⨪",
  6588. MinusPlus: "∓",
  6589. mlcp: "⫛",
  6590. mldr: "…",
  6591. mnplus: "∓",
  6592. models: "⊧",
  6593. Mopf: "𝕄",
  6594. mopf: "𝕞",
  6595. mp: "∓",
  6596. mscr: "𝓂",
  6597. Mscr: "ℳ",
  6598. mstpos: "∾",
  6599. Mu: "Μ",
  6600. mu: "μ",
  6601. multimap: "⊸",
  6602. mumap: "⊸",
  6603. nabla: "∇",
  6604. Nacute: "Ń",
  6605. nacute: "ń",
  6606. nang: "∠⃒",
  6607. nap: "≉",
  6608. napE: "⩰̸",
  6609. napid: "≋̸",
  6610. napos: "ʼn",
  6611. napprox: "≉",
  6612. natural: "♮",
  6613. naturals: "ℕ",
  6614. natur: "♮",
  6615. nbsp: " ",
  6616. nbump: "≎̸",
  6617. nbumpe: "≏̸",
  6618. ncap: "⩃",
  6619. Ncaron: "Ň",
  6620. ncaron: "ň",
  6621. Ncedil: "Ņ",
  6622. ncedil: "ņ",
  6623. ncong: "≇",
  6624. ncongdot: "⩭̸",
  6625. ncup: "⩂",
  6626. Ncy: "Н",
  6627. ncy: "н",
  6628. ndash: "–",
  6629. nearhk: "⤤",
  6630. nearr: "↗",
  6631. neArr: "⇗",
  6632. nearrow: "↗",
  6633. ne: "≠",
  6634. nedot: "≐̸",
  6635. NegativeMediumSpace: "​",
  6636. NegativeThickSpace: "​",
  6637. NegativeThinSpace: "​",
  6638. NegativeVeryThinSpace: "​",
  6639. nequiv: "≢",
  6640. nesear: "⤨",
  6641. nesim: "≂̸",
  6642. NestedGreaterGreater: "≫",
  6643. NestedLessLess: "≪",
  6644. NewLine: "\n",
  6645. nexist: "∄",
  6646. nexists: "∄",
  6647. Nfr: "𝔑",
  6648. nfr: "𝔫",
  6649. ngE: "≧̸",
  6650. nge: "≱",
  6651. ngeq: "≱",
  6652. ngeqq: "≧̸",
  6653. ngeqslant: "⩾̸",
  6654. nges: "⩾̸",
  6655. nGg: "⋙̸",
  6656. ngsim: "≵",
  6657. nGt: "≫⃒",
  6658. ngt: "≯",
  6659. ngtr: "≯",
  6660. nGtv: "≫̸",
  6661. nharr: "↮",
  6662. nhArr: "⇎",
  6663. nhpar: "⫲",
  6664. ni: "∋",
  6665. nis: "⋼",
  6666. nisd: "⋺",
  6667. niv: "∋",
  6668. NJcy: "Њ",
  6669. njcy: "њ",
  6670. nlarr: "↚",
  6671. nlArr: "⇍",
  6672. nldr: "‥",
  6673. nlE: "≦̸",
  6674. nle: "≰",
  6675. nleftarrow: "↚",
  6676. nLeftarrow: "⇍",
  6677. nleftrightarrow: "↮",
  6678. nLeftrightarrow: "⇎",
  6679. nleq: "≰",
  6680. nleqq: "≦̸",
  6681. nleqslant: "⩽̸",
  6682. nles: "⩽̸",
  6683. nless: "≮",
  6684. nLl: "⋘̸",
  6685. nlsim: "≴",
  6686. nLt: "≪⃒",
  6687. nlt: "≮",
  6688. nltri: "⋪",
  6689. nltrie: "⋬",
  6690. nLtv: "≪̸",
  6691. nmid: "∤",
  6692. NoBreak: "⁠",
  6693. NonBreakingSpace: " ",
  6694. nopf: "𝕟",
  6695. Nopf: "ℕ",
  6696. Not: "⫬",
  6697. not: "¬",
  6698. NotCongruent: "≢",
  6699. NotCupCap: "≭",
  6700. NotDoubleVerticalBar: "∦",
  6701. NotElement: "∉",
  6702. NotEqual: "≠",
  6703. NotEqualTilde: "≂̸",
  6704. NotExists: "∄",
  6705. NotGreater: "≯",
  6706. NotGreaterEqual: "≱",
  6707. NotGreaterFullEqual: "≧̸",
  6708. NotGreaterGreater: "≫̸",
  6709. NotGreaterLess: "≹",
  6710. NotGreaterSlantEqual: "⩾̸",
  6711. NotGreaterTilde: "≵",
  6712. NotHumpDownHump: "≎̸",
  6713. NotHumpEqual: "≏̸",
  6714. notin: "∉",
  6715. notindot: "⋵̸",
  6716. notinE: "⋹̸",
  6717. notinva: "∉",
  6718. notinvb: "⋷",
  6719. notinvc: "⋶",
  6720. NotLeftTriangleBar: "⧏̸",
  6721. NotLeftTriangle: "⋪",
  6722. NotLeftTriangleEqual: "⋬",
  6723. NotLess: "≮",
  6724. NotLessEqual: "≰",
  6725. NotLessGreater: "≸",
  6726. NotLessLess: "≪̸",
  6727. NotLessSlantEqual: "⩽̸",
  6728. NotLessTilde: "≴",
  6729. NotNestedGreaterGreater: "⪢̸",
  6730. NotNestedLessLess: "⪡̸",
  6731. notni: "∌",
  6732. notniva: "∌",
  6733. notnivb: "⋾",
  6734. notnivc: "⋽",
  6735. NotPrecedes: "⊀",
  6736. NotPrecedesEqual: "⪯̸",
  6737. NotPrecedesSlantEqual: "⋠",
  6738. NotReverseElement: "∌",
  6739. NotRightTriangleBar: "⧐̸",
  6740. NotRightTriangle: "⋫",
  6741. NotRightTriangleEqual: "⋭",
  6742. NotSquareSubset: "⊏̸",
  6743. NotSquareSubsetEqual: "⋢",
  6744. NotSquareSuperset: "⊐̸",
  6745. NotSquareSupersetEqual: "⋣",
  6746. NotSubset: "⊂⃒",
  6747. NotSubsetEqual: "⊈",
  6748. NotSucceeds: "⊁",
  6749. NotSucceedsEqual: "⪰̸",
  6750. NotSucceedsSlantEqual: "⋡",
  6751. NotSucceedsTilde: "≿̸",
  6752. NotSuperset: "⊃⃒",
  6753. NotSupersetEqual: "⊉",
  6754. NotTilde: "≁",
  6755. NotTildeEqual: "≄",
  6756. NotTildeFullEqual: "≇",
  6757. NotTildeTilde: "≉",
  6758. NotVerticalBar: "∤",
  6759. nparallel: "∦",
  6760. npar: "∦",
  6761. nparsl: "⫽⃥",
  6762. npart: "∂̸",
  6763. npolint: "⨔",
  6764. npr: "⊀",
  6765. nprcue: "⋠",
  6766. nprec: "⊀",
  6767. npreceq: "⪯̸",
  6768. npre: "⪯̸",
  6769. nrarrc: "⤳̸",
  6770. nrarr: "↛",
  6771. nrArr: "⇏",
  6772. nrarrw: "↝̸",
  6773. nrightarrow: "↛",
  6774. nRightarrow: "⇏",
  6775. nrtri: "⋫",
  6776. nrtrie: "⋭",
  6777. nsc: "⊁",
  6778. nsccue: "⋡",
  6779. nsce: "⪰̸",
  6780. Nscr: "𝒩",
  6781. nscr: "𝓃",
  6782. nshortmid: "∤",
  6783. nshortparallel: "∦",
  6784. nsim: "≁",
  6785. nsime: "≄",
  6786. nsimeq: "≄",
  6787. nsmid: "∤",
  6788. nspar: "∦",
  6789. nsqsube: "⋢",
  6790. nsqsupe: "⋣",
  6791. nsub: "⊄",
  6792. nsubE: "⫅̸",
  6793. nsube: "⊈",
  6794. nsubset: "⊂⃒",
  6795. nsubseteq: "⊈",
  6796. nsubseteqq: "⫅̸",
  6797. nsucc: "⊁",
  6798. nsucceq: "⪰̸",
  6799. nsup: "⊅",
  6800. nsupE: "⫆̸",
  6801. nsupe: "⊉",
  6802. nsupset: "⊃⃒",
  6803. nsupseteq: "⊉",
  6804. nsupseteqq: "⫆̸",
  6805. ntgl: "≹",
  6806. Ntilde: "Ñ",
  6807. ntilde: "ñ",
  6808. ntlg: "≸",
  6809. ntriangleleft: "⋪",
  6810. ntrianglelefteq: "⋬",
  6811. ntriangleright: "⋫",
  6812. ntrianglerighteq: "⋭",
  6813. Nu: "Ν",
  6814. nu: "ν",
  6815. num: "#",
  6816. numero: "№",
  6817. numsp: " ",
  6818. nvap: "≍⃒",
  6819. nvdash: "⊬",
  6820. nvDash: "⊭",
  6821. nVdash: "⊮",
  6822. nVDash: "⊯",
  6823. nvge: "≥⃒",
  6824. nvgt: ">⃒",
  6825. nvHarr: "⤄",
  6826. nvinfin: "⧞",
  6827. nvlArr: "⤂",
  6828. nvle: "≤⃒",
  6829. nvlt: "<⃒",
  6830. nvltrie: "⊴⃒",
  6831. nvrArr: "⤃",
  6832. nvrtrie: "⊵⃒",
  6833. nvsim: "∼⃒",
  6834. nwarhk: "⤣",
  6835. nwarr: "↖",
  6836. nwArr: "⇖",
  6837. nwarrow: "↖",
  6838. nwnear: "⤧",
  6839. Oacute: "Ó",
  6840. oacute: "ó",
  6841. oast: "⊛",
  6842. Ocirc: "Ô",
  6843. ocirc: "ô",
  6844. ocir: "⊚",
  6845. Ocy: "О",
  6846. ocy: "о",
  6847. odash: "⊝",
  6848. Odblac: "Ő",
  6849. odblac: "ő",
  6850. odiv: "⨸",
  6851. odot: "⊙",
  6852. odsold: "⦼",
  6853. OElig: "Œ",
  6854. oelig: "œ",
  6855. ofcir: "⦿",
  6856. Ofr: "𝔒",
  6857. ofr: "𝔬",
  6858. ogon: "˛",
  6859. Ograve: "Ò",
  6860. ograve: "ò",
  6861. ogt: "⧁",
  6862. ohbar: "⦵",
  6863. ohm: "Ω",
  6864. oint: "∮",
  6865. olarr: "↺",
  6866. olcir: "⦾",
  6867. olcross: "⦻",
  6868. oline: "‾",
  6869. olt: "⧀",
  6870. Omacr: "Ō",
  6871. omacr: "ō",
  6872. Omega: "Ω",
  6873. omega: "ω",
  6874. Omicron: "Ο",
  6875. omicron: "ο",
  6876. omid: "⦶",
  6877. ominus: "⊖",
  6878. Oopf: "𝕆",
  6879. oopf: "𝕠",
  6880. opar: "⦷",
  6881. OpenCurlyDoubleQuote: "“",
  6882. OpenCurlyQuote: "‘",
  6883. operp: "⦹",
  6884. oplus: "⊕",
  6885. orarr: "↻",
  6886. Or: "⩔",
  6887. or: "∨",
  6888. ord: "⩝",
  6889. order: "ℴ",
  6890. orderof: "ℴ",
  6891. ordf: "ª",
  6892. ordm: "º",
  6893. origof: "⊶",
  6894. oror: "⩖",
  6895. orslope: "⩗",
  6896. orv: "⩛",
  6897. oS: "Ⓢ",
  6898. Oscr: "𝒪",
  6899. oscr: "ℴ",
  6900. Oslash: "Ø",
  6901. oslash: "ø",
  6902. osol: "⊘",
  6903. Otilde: "Õ",
  6904. otilde: "õ",
  6905. otimesas: "⨶",
  6906. Otimes: "⨷",
  6907. otimes: "⊗",
  6908. Ouml: "Ö",
  6909. ouml: "ö",
  6910. ovbar: "⌽",
  6911. OverBar: "‾",
  6912. OverBrace: "⏞",
  6913. OverBracket: "⎴",
  6914. OverParenthesis: "⏜",
  6915. para: "¶",
  6916. parallel: "∥",
  6917. par: "∥",
  6918. parsim: "⫳",
  6919. parsl: "⫽",
  6920. part: "∂",
  6921. PartialD: "∂",
  6922. Pcy: "П",
  6923. pcy: "п",
  6924. percnt: "%",
  6925. period: ".",
  6926. permil: "‰",
  6927. perp: "⊥",
  6928. pertenk: "‱",
  6929. Pfr: "𝔓",
  6930. pfr: "𝔭",
  6931. Phi: "Φ",
  6932. phi: "φ",
  6933. phiv: "ϕ",
  6934. phmmat: "ℳ",
  6935. phone: "☎",
  6936. Pi: "Π",
  6937. pi: "π",
  6938. pitchfork: "⋔",
  6939. piv: "ϖ",
  6940. planck: "ℏ",
  6941. planckh: "ℎ",
  6942. plankv: "ℏ",
  6943. plusacir: "⨣",
  6944. plusb: "⊞",
  6945. pluscir: "⨢",
  6946. plus: "+",
  6947. plusdo: "∔",
  6948. plusdu: "⨥",
  6949. pluse: "⩲",
  6950. PlusMinus: "±",
  6951. plusmn: "±",
  6952. plussim: "⨦",
  6953. plustwo: "⨧",
  6954. pm: "±",
  6955. Poincareplane: "ℌ",
  6956. pointint: "⨕",
  6957. popf: "𝕡",
  6958. Popf: "ℙ",
  6959. pound: "£",
  6960. prap: "⪷",
  6961. Pr: "⪻",
  6962. pr: "≺",
  6963. prcue: "≼",
  6964. precapprox: "⪷",
  6965. prec: "≺",
  6966. preccurlyeq: "≼",
  6967. Precedes: "≺",
  6968. PrecedesEqual: "⪯",
  6969. PrecedesSlantEqual: "≼",
  6970. PrecedesTilde: "≾",
  6971. preceq: "⪯",
  6972. precnapprox: "⪹",
  6973. precneqq: "⪵",
  6974. precnsim: "⋨",
  6975. pre: "⪯",
  6976. prE: "⪳",
  6977. precsim: "≾",
  6978. prime: "′",
  6979. Prime: "″",
  6980. primes: "ℙ",
  6981. prnap: "⪹",
  6982. prnE: "⪵",
  6983. prnsim: "⋨",
  6984. prod: "∏",
  6985. Product: "∏",
  6986. profalar: "⌮",
  6987. profline: "⌒",
  6988. profsurf: "⌓",
  6989. prop: "∝",
  6990. Proportional: "∝",
  6991. Proportion: "∷",
  6992. propto: "∝",
  6993. prsim: "≾",
  6994. prurel: "⊰",
  6995. Pscr: "𝒫",
  6996. pscr: "𝓅",
  6997. Psi: "Ψ",
  6998. psi: "ψ",
  6999. puncsp: " ",
  7000. Qfr: "𝔔",
  7001. qfr: "𝔮",
  7002. qint: "⨌",
  7003. qopf: "𝕢",
  7004. Qopf: "ℚ",
  7005. qprime: "⁗",
  7006. Qscr: "𝒬",
  7007. qscr: "𝓆",
  7008. quaternions: "ℍ",
  7009. quatint: "⨖",
  7010. quest: "?",
  7011. questeq: "≟",
  7012. quot: '"',
  7013. QUOT: '"',
  7014. rAarr: "⇛",
  7015. race: "∽̱",
  7016. Racute: "Ŕ",
  7017. racute: "ŕ",
  7018. radic: "√",
  7019. raemptyv: "⦳",
  7020. rang: "⟩",
  7021. Rang: "⟫",
  7022. rangd: "⦒",
  7023. range: "⦥",
  7024. rangle: "⟩",
  7025. raquo: "»",
  7026. rarrap: "⥵",
  7027. rarrb: "⇥",
  7028. rarrbfs: "⤠",
  7029. rarrc: "⤳",
  7030. rarr: "→",
  7031. Rarr: "↠",
  7032. rArr: "⇒",
  7033. rarrfs: "⤞",
  7034. rarrhk: "↪",
  7035. rarrlp: "↬",
  7036. rarrpl: "⥅",
  7037. rarrsim: "⥴",
  7038. Rarrtl: "⤖",
  7039. rarrtl: "↣",
  7040. rarrw: "↝",
  7041. ratail: "⤚",
  7042. rAtail: "⤜",
  7043. ratio: "∶",
  7044. rationals: "ℚ",
  7045. rbarr: "⤍",
  7046. rBarr: "⤏",
  7047. RBarr: "⤐",
  7048. rbbrk: "❳",
  7049. rbrace: "}",
  7050. rbrack: "]",
  7051. rbrke: "⦌",
  7052. rbrksld: "⦎",
  7053. rbrkslu: "⦐",
  7054. Rcaron: "Ř",
  7055. rcaron: "ř",
  7056. Rcedil: "Ŗ",
  7057. rcedil: "ŗ",
  7058. rceil: "⌉",
  7059. rcub: "}",
  7060. Rcy: "Р",
  7061. rcy: "р",
  7062. rdca: "⤷",
  7063. rdldhar: "⥩",
  7064. rdquo: "”",
  7065. rdquor: "”",
  7066. rdsh: "↳",
  7067. real: "ℜ",
  7068. realine: "ℛ",
  7069. realpart: "ℜ",
  7070. reals: "ℝ",
  7071. Re: "ℜ",
  7072. rect: "▭",
  7073. reg: "®",
  7074. REG: "®",
  7075. ReverseElement: "∋",
  7076. ReverseEquilibrium: "⇋",
  7077. ReverseUpEquilibrium: "⥯",
  7078. rfisht: "⥽",
  7079. rfloor: "⌋",
  7080. rfr: "𝔯",
  7081. Rfr: "ℜ",
  7082. rHar: "⥤",
  7083. rhard: "⇁",
  7084. rharu: "⇀",
  7085. rharul: "⥬",
  7086. Rho: "Ρ",
  7087. rho: "ρ",
  7088. rhov: "ϱ",
  7089. RightAngleBracket: "⟩",
  7090. RightArrowBar: "⇥",
  7091. rightarrow: "→",
  7092. RightArrow: "→",
  7093. Rightarrow: "⇒",
  7094. RightArrowLeftArrow: "⇄",
  7095. rightarrowtail: "↣",
  7096. RightCeiling: "⌉",
  7097. RightDoubleBracket: "⟧",
  7098. RightDownTeeVector: "⥝",
  7099. RightDownVectorBar: "⥕",
  7100. RightDownVector: "⇂",
  7101. RightFloor: "⌋",
  7102. rightharpoondown: "⇁",
  7103. rightharpoonup: "⇀",
  7104. rightleftarrows: "⇄",
  7105. rightleftharpoons: "⇌",
  7106. rightrightarrows: "⇉",
  7107. rightsquigarrow: "↝",
  7108. RightTeeArrow: "↦",
  7109. RightTee: "⊢",
  7110. RightTeeVector: "⥛",
  7111. rightthreetimes: "⋌",
  7112. RightTriangleBar: "⧐",
  7113. RightTriangle: "⊳",
  7114. RightTriangleEqual: "⊵",
  7115. RightUpDownVector: "⥏",
  7116. RightUpTeeVector: "⥜",
  7117. RightUpVectorBar: "⥔",
  7118. RightUpVector: "↾",
  7119. RightVectorBar: "⥓",
  7120. RightVector: "⇀",
  7121. ring: "˚",
  7122. risingdotseq: "≓",
  7123. rlarr: "⇄",
  7124. rlhar: "⇌",
  7125. rlm: "‏",
  7126. rmoustache: "⎱",
  7127. rmoust: "⎱",
  7128. rnmid: "⫮",
  7129. roang: "⟭",
  7130. roarr: "⇾",
  7131. robrk: "⟧",
  7132. ropar: "⦆",
  7133. ropf: "𝕣",
  7134. Ropf: "ℝ",
  7135. roplus: "⨮",
  7136. rotimes: "⨵",
  7137. RoundImplies: "⥰",
  7138. rpar: ")",
  7139. rpargt: "⦔",
  7140. rppolint: "⨒",
  7141. rrarr: "⇉",
  7142. Rrightarrow: "⇛",
  7143. rsaquo: "›",
  7144. rscr: "𝓇",
  7145. Rscr: "ℛ",
  7146. rsh: "↱",
  7147. Rsh: "↱",
  7148. rsqb: "]",
  7149. rsquo: "’",
  7150. rsquor: "’",
  7151. rthree: "⋌",
  7152. rtimes: "⋊",
  7153. rtri: "▹",
  7154. rtrie: "⊵",
  7155. rtrif: "▸",
  7156. rtriltri: "⧎",
  7157. RuleDelayed: "⧴",
  7158. ruluhar: "⥨",
  7159. rx: "℞",
  7160. Sacute: "Ś",
  7161. sacute: "ś",
  7162. sbquo: "‚",
  7163. scap: "⪸",
  7164. Scaron: "Š",
  7165. scaron: "š",
  7166. Sc: "⪼",
  7167. sc: "≻",
  7168. sccue: "≽",
  7169. sce: "⪰",
  7170. scE: "⪴",
  7171. Scedil: "Ş",
  7172. scedil: "ş",
  7173. Scirc: "Ŝ",
  7174. scirc: "ŝ",
  7175. scnap: "⪺",
  7176. scnE: "⪶",
  7177. scnsim: "⋩",
  7178. scpolint: "⨓",
  7179. scsim: "≿",
  7180. Scy: "С",
  7181. scy: "с",
  7182. sdotb: "⊡",
  7183. sdot: "⋅",
  7184. sdote: "⩦",
  7185. searhk: "⤥",
  7186. searr: "↘",
  7187. seArr: "⇘",
  7188. searrow: "↘",
  7189. sect: "§",
  7190. semi: ";",
  7191. seswar: "⤩",
  7192. setminus: "∖",
  7193. setmn: "∖",
  7194. sext: "✶",
  7195. Sfr: "𝔖",
  7196. sfr: "𝔰",
  7197. sfrown: "⌢",
  7198. sharp: "♯",
  7199. SHCHcy: "Щ",
  7200. shchcy: "щ",
  7201. SHcy: "Ш",
  7202. shcy: "ш",
  7203. ShortDownArrow: "↓",
  7204. ShortLeftArrow: "←",
  7205. shortmid: "∣",
  7206. shortparallel: "∥",
  7207. ShortRightArrow: "→",
  7208. ShortUpArrow: "↑",
  7209. shy: "­",
  7210. Sigma: "Σ",
  7211. sigma: "σ",
  7212. sigmaf: "ς",
  7213. sigmav: "ς",
  7214. sim: "∼",
  7215. simdot: "⩪",
  7216. sime: "≃",
  7217. simeq: "≃",
  7218. simg: "⪞",
  7219. simgE: "⪠",
  7220. siml: "⪝",
  7221. simlE: "⪟",
  7222. simne: "≆",
  7223. simplus: "⨤",
  7224. simrarr: "⥲",
  7225. slarr: "←",
  7226. SmallCircle: "∘",
  7227. smallsetminus: "∖",
  7228. smashp: "⨳",
  7229. smeparsl: "⧤",
  7230. smid: "∣",
  7231. smile: "⌣",
  7232. smt: "⪪",
  7233. smte: "⪬",
  7234. smtes: "⪬︀",
  7235. SOFTcy: "Ь",
  7236. softcy: "ь",
  7237. solbar: "⌿",
  7238. solb: "⧄",
  7239. sol: "/",
  7240. Sopf: "𝕊",
  7241. sopf: "𝕤",
  7242. spades: "♠",
  7243. spadesuit: "♠",
  7244. spar: "∥",
  7245. sqcap: "⊓",
  7246. sqcaps: "⊓︀",
  7247. sqcup: "⊔",
  7248. sqcups: "⊔︀",
  7249. Sqrt: "√",
  7250. sqsub: "⊏",
  7251. sqsube: "⊑",
  7252. sqsubset: "⊏",
  7253. sqsubseteq: "⊑",
  7254. sqsup: "⊐",
  7255. sqsupe: "⊒",
  7256. sqsupset: "⊐",
  7257. sqsupseteq: "⊒",
  7258. square: "□",
  7259. Square: "□",
  7260. SquareIntersection: "⊓",
  7261. SquareSubset: "⊏",
  7262. SquareSubsetEqual: "⊑",
  7263. SquareSuperset: "⊐",
  7264. SquareSupersetEqual: "⊒",
  7265. SquareUnion: "⊔",
  7266. squarf: "▪",
  7267. squ: "□",
  7268. squf: "▪",
  7269. srarr: "→",
  7270. Sscr: "𝒮",
  7271. sscr: "𝓈",
  7272. ssetmn: "∖",
  7273. ssmile: "⌣",
  7274. sstarf: "⋆",
  7275. Star: "⋆",
  7276. star: "☆",
  7277. starf: "★",
  7278. straightepsilon: "ϵ",
  7279. straightphi: "ϕ",
  7280. strns: "¯",
  7281. sub: "⊂",
  7282. Sub: "⋐",
  7283. subdot: "⪽",
  7284. subE: "⫅",
  7285. sube: "⊆",
  7286. subedot: "⫃",
  7287. submult: "⫁",
  7288. subnE: "⫋",
  7289. subne: "⊊",
  7290. subplus: "⪿",
  7291. subrarr: "⥹",
  7292. subset: "⊂",
  7293. Subset: "⋐",
  7294. subseteq: "⊆",
  7295. subseteqq: "⫅",
  7296. SubsetEqual: "⊆",
  7297. subsetneq: "⊊",
  7298. subsetneqq: "⫋",
  7299. subsim: "⫇",
  7300. subsub: "⫕",
  7301. subsup: "⫓",
  7302. succapprox: "⪸",
  7303. succ: "≻",
  7304. succcurlyeq: "≽",
  7305. Succeeds: "≻",
  7306. SucceedsEqual: "⪰",
  7307. SucceedsSlantEqual: "≽",
  7308. SucceedsTilde: "≿",
  7309. succeq: "⪰",
  7310. succnapprox: "⪺",
  7311. succneqq: "⪶",
  7312. succnsim: "⋩",
  7313. succsim: "≿",
  7314. SuchThat: "∋",
  7315. sum: "∑",
  7316. Sum: "∑",
  7317. sung: "♪",
  7318. sup1: "¹",
  7319. sup2: "²",
  7320. sup3: "³",
  7321. sup: "⊃",
  7322. Sup: "⋑",
  7323. supdot: "⪾",
  7324. supdsub: "⫘",
  7325. supE: "⫆",
  7326. supe: "⊇",
  7327. supedot: "⫄",
  7328. Superset: "⊃",
  7329. SupersetEqual: "⊇",
  7330. suphsol: "⟉",
  7331. suphsub: "⫗",
  7332. suplarr: "⥻",
  7333. supmult: "⫂",
  7334. supnE: "⫌",
  7335. supne: "⊋",
  7336. supplus: "⫀",
  7337. supset: "⊃",
  7338. Supset: "⋑",
  7339. supseteq: "⊇",
  7340. supseteqq: "⫆",
  7341. supsetneq: "⊋",
  7342. supsetneqq: "⫌",
  7343. supsim: "⫈",
  7344. supsub: "⫔",
  7345. supsup: "⫖",
  7346. swarhk: "⤦",
  7347. swarr: "↙",
  7348. swArr: "⇙",
  7349. swarrow: "↙",
  7350. swnwar: "⤪",
  7351. szlig: "ß",
  7352. Tab: " ",
  7353. target: "⌖",
  7354. Tau: "Τ",
  7355. tau: "τ",
  7356. tbrk: "⎴",
  7357. Tcaron: "Ť",
  7358. tcaron: "ť",
  7359. Tcedil: "Ţ",
  7360. tcedil: "ţ",
  7361. Tcy: "Т",
  7362. tcy: "т",
  7363. tdot: "⃛",
  7364. telrec: "⌕",
  7365. Tfr: "𝔗",
  7366. tfr: "𝔱",
  7367. there4: "∴",
  7368. therefore: "∴",
  7369. Therefore: "∴",
  7370. Theta: "Θ",
  7371. theta: "θ",
  7372. thetasym: "ϑ",
  7373. thetav: "ϑ",
  7374. thickapprox: "≈",
  7375. thicksim: "∼",
  7376. ThickSpace: "  ",
  7377. ThinSpace: " ",
  7378. thinsp: " ",
  7379. thkap: "≈",
  7380. thksim: "∼",
  7381. THORN: "Þ",
  7382. thorn: "þ",
  7383. tilde: "˜",
  7384. Tilde: "∼",
  7385. TildeEqual: "≃",
  7386. TildeFullEqual: "≅",
  7387. TildeTilde: "≈",
  7388. timesbar: "⨱",
  7389. timesb: "⊠",
  7390. times: "×",
  7391. timesd: "⨰",
  7392. tint: "∭",
  7393. toea: "⤨",
  7394. topbot: "⌶",
  7395. topcir: "⫱",
  7396. top: "⊤",
  7397. Topf: "𝕋",
  7398. topf: "𝕥",
  7399. topfork: "⫚",
  7400. tosa: "⤩",
  7401. tprime: "‴",
  7402. trade: "™",
  7403. TRADE: "™",
  7404. triangle: "▵",
  7405. triangledown: "▿",
  7406. triangleleft: "◃",
  7407. trianglelefteq: "⊴",
  7408. triangleq: "≜",
  7409. triangleright: "▹",
  7410. trianglerighteq: "⊵",
  7411. tridot: "◬",
  7412. trie: "≜",
  7413. triminus: "⨺",
  7414. TripleDot: "⃛",
  7415. triplus: "⨹",
  7416. trisb: "⧍",
  7417. tritime: "⨻",
  7418. trpezium: "⏢",
  7419. Tscr: "𝒯",
  7420. tscr: "𝓉",
  7421. TScy: "Ц",
  7422. tscy: "ц",
  7423. TSHcy: "Ћ",
  7424. tshcy: "ћ",
  7425. Tstrok: "Ŧ",
  7426. tstrok: "ŧ",
  7427. twixt: "≬",
  7428. twoheadleftarrow: "↞",
  7429. twoheadrightarrow: "↠",
  7430. Uacute: "Ú",
  7431. uacute: "ú",
  7432. uarr: "↑",
  7433. Uarr: "↟",
  7434. uArr: "⇑",
  7435. Uarrocir: "⥉",
  7436. Ubrcy: "Ў",
  7437. ubrcy: "ў",
  7438. Ubreve: "Ŭ",
  7439. ubreve: "ŭ",
  7440. Ucirc: "Û",
  7441. ucirc: "û",
  7442. Ucy: "У",
  7443. ucy: "у",
  7444. udarr: "⇅",
  7445. Udblac: "Ű",
  7446. udblac: "ű",
  7447. udhar: "⥮",
  7448. ufisht: "⥾",
  7449. Ufr: "𝔘",
  7450. ufr: "𝔲",
  7451. Ugrave: "Ù",
  7452. ugrave: "ù",
  7453. uHar: "⥣",
  7454. uharl: "↿",
  7455. uharr: "↾",
  7456. uhblk: "▀",
  7457. ulcorn: "⌜",
  7458. ulcorner: "⌜",
  7459. ulcrop: "⌏",
  7460. ultri: "◸",
  7461. Umacr: "Ū",
  7462. umacr: "ū",
  7463. uml: "¨",
  7464. UnderBar: "_",
  7465. UnderBrace: "⏟",
  7466. UnderBracket: "⎵",
  7467. UnderParenthesis: "⏝",
  7468. Union: "⋃",
  7469. UnionPlus: "⊎",
  7470. Uogon: "Ų",
  7471. uogon: "ų",
  7472. Uopf: "𝕌",
  7473. uopf: "𝕦",
  7474. UpArrowBar: "⤒",
  7475. uparrow: "↑",
  7476. UpArrow: "↑",
  7477. Uparrow: "⇑",
  7478. UpArrowDownArrow: "⇅",
  7479. updownarrow: "↕",
  7480. UpDownArrow: "↕",
  7481. Updownarrow: "⇕",
  7482. UpEquilibrium: "⥮",
  7483. upharpoonleft: "↿",
  7484. upharpoonright: "↾",
  7485. uplus: "⊎",
  7486. UpperLeftArrow: "↖",
  7487. UpperRightArrow: "↗",
  7488. upsi: "υ",
  7489. Upsi: "ϒ",
  7490. upsih: "ϒ",
  7491. Upsilon: "Υ",
  7492. upsilon: "υ",
  7493. UpTeeArrow: "↥",
  7494. UpTee: "⊥",
  7495. upuparrows: "⇈",
  7496. urcorn: "⌝",
  7497. urcorner: "⌝",
  7498. urcrop: "⌎",
  7499. Uring: "Ů",
  7500. uring: "ů",
  7501. urtri: "◹",
  7502. Uscr: "𝒰",
  7503. uscr: "𝓊",
  7504. utdot: "⋰",
  7505. Utilde: "Ũ",
  7506. utilde: "ũ",
  7507. utri: "▵",
  7508. utrif: "▴",
  7509. uuarr: "⇈",
  7510. Uuml: "Ü",
  7511. uuml: "ü",
  7512. uwangle: "⦧",
  7513. vangrt: "⦜",
  7514. varepsilon: "ϵ",
  7515. varkappa: "ϰ",
  7516. varnothing: "∅",
  7517. varphi: "ϕ",
  7518. varpi: "ϖ",
  7519. varpropto: "∝",
  7520. varr: "↕",
  7521. vArr: "⇕",
  7522. varrho: "ϱ",
  7523. varsigma: "ς",
  7524. varsubsetneq: "⊊︀",
  7525. varsubsetneqq: "⫋︀",
  7526. varsupsetneq: "⊋︀",
  7527. varsupsetneqq: "⫌︀",
  7528. vartheta: "ϑ",
  7529. vartriangleleft: "⊲",
  7530. vartriangleright: "⊳",
  7531. vBar: "⫨",
  7532. Vbar: "⫫",
  7533. vBarv: "⫩",
  7534. Vcy: "В",
  7535. vcy: "в",
  7536. vdash: "⊢",
  7537. vDash: "⊨",
  7538. Vdash: "⊩",
  7539. VDash: "⊫",
  7540. Vdashl: "⫦",
  7541. veebar: "⊻",
  7542. vee: "∨",
  7543. Vee: "⋁",
  7544. veeeq: "≚",
  7545. vellip: "⋮",
  7546. verbar: "|",
  7547. Verbar: "‖",
  7548. vert: "|",
  7549. Vert: "‖",
  7550. VerticalBar: "∣",
  7551. VerticalLine: "|",
  7552. VerticalSeparator: "❘",
  7553. VerticalTilde: "≀",
  7554. VeryThinSpace: " ",
  7555. Vfr: "𝔙",
  7556. vfr: "𝔳",
  7557. vltri: "⊲",
  7558. vnsub: "⊂⃒",
  7559. vnsup: "⊃⃒",
  7560. Vopf: "𝕍",
  7561. vopf: "𝕧",
  7562. vprop: "∝",
  7563. vrtri: "⊳",
  7564. Vscr: "𝒱",
  7565. vscr: "𝓋",
  7566. vsubnE: "⫋︀",
  7567. vsubne: "⊊︀",
  7568. vsupnE: "⫌︀",
  7569. vsupne: "⊋︀",
  7570. Vvdash: "⊪",
  7571. vzigzag: "⦚",
  7572. Wcirc: "Ŵ",
  7573. wcirc: "ŵ",
  7574. wedbar: "⩟",
  7575. wedge: "∧",
  7576. Wedge: "⋀",
  7577. wedgeq: "≙",
  7578. weierp: "℘",
  7579. Wfr: "𝔚",
  7580. wfr: "𝔴",
  7581. Wopf: "𝕎",
  7582. wopf: "𝕨",
  7583. wp: "℘",
  7584. wr: "≀",
  7585. wreath: "≀",
  7586. Wscr: "𝒲",
  7587. wscr: "𝓌",
  7588. xcap: "⋂",
  7589. xcirc: "◯",
  7590. xcup: "⋃",
  7591. xdtri: "▽",
  7592. Xfr: "𝔛",
  7593. xfr: "𝔵",
  7594. xharr: "⟷",
  7595. xhArr: "⟺",
  7596. Xi: "Ξ",
  7597. xi: "ξ",
  7598. xlarr: "⟵",
  7599. xlArr: "⟸",
  7600. xmap: "⟼",
  7601. xnis: "⋻",
  7602. xodot: "⨀",
  7603. Xopf: "𝕏",
  7604. xopf: "𝕩",
  7605. xoplus: "⨁",
  7606. xotime: "⨂",
  7607. xrarr: "⟶",
  7608. xrArr: "⟹",
  7609. Xscr: "𝒳",
  7610. xscr: "𝓍",
  7611. xsqcup: "⨆",
  7612. xuplus: "⨄",
  7613. xutri: "△",
  7614. xvee: "⋁",
  7615. xwedge: "⋀",
  7616. Yacute: "Ý",
  7617. yacute: "ý",
  7618. YAcy: "Я",
  7619. yacy: "я",
  7620. Ycirc: "Ŷ",
  7621. ycirc: "ŷ",
  7622. Ycy: "Ы",
  7623. ycy: "ы",
  7624. yen: "¥",
  7625. Yfr: "𝔜",
  7626. yfr: "𝔶",
  7627. YIcy: "Ї",
  7628. yicy: "ї",
  7629. Yopf: "𝕐",
  7630. yopf: "𝕪",
  7631. Yscr: "𝒴",
  7632. yscr: "𝓎",
  7633. YUcy: "Ю",
  7634. yucy: "ю",
  7635. yuml: "ÿ",
  7636. Yuml: "Ÿ",
  7637. Zacute: "Ź",
  7638. zacute: "ź",
  7639. Zcaron: "Ž",
  7640. zcaron: "ž",
  7641. Zcy: "З",
  7642. zcy: "з",
  7643. Zdot: "Ż",
  7644. zdot: "ż",
  7645. zeetrf: "ℨ",
  7646. ZeroWidthSpace: "​",
  7647. Zeta: "Ζ",
  7648. zeta: "ζ",
  7649. zfr: "𝔷",
  7650. Zfr: "ℨ",
  7651. ZHcy: "Ж",
  7652. zhcy: "ж",
  7653. zigrarr: "⇝",
  7654. zopf: "𝕫",
  7655. Zopf: "ℤ",
  7656. Zscr: "𝒵",
  7657. zscr: "𝓏",
  7658. zwj: "‍",
  7659. zwnj: "‌"
  7660. }
  7661. }, {}],
  7662. 54: [function (e, r, t) {
  7663. "use strict";
  7664. function n(e) {
  7665. var r = Array.prototype.slice.call(arguments, 1);
  7666. return r.forEach(function (r) {
  7667. r && Object.keys(r).forEach(function (t) {
  7668. e[t] = r[t]
  7669. })
  7670. }), e
  7671. }
  7672. function s(e) {
  7673. return Object.prototype.toString.call(e)
  7674. }
  7675. function o(e) {
  7676. return "[object String]" === s(e)
  7677. }
  7678. function i(e) {
  7679. return "[object Object]" === s(e)
  7680. }
  7681. function a(e) {
  7682. return "[object RegExp]" === s(e)
  7683. }
  7684. function c(e) {
  7685. return "[object Function]" === s(e)
  7686. }
  7687. function l(e) {
  7688. return e.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&")
  7689. }
  7690. function u(e) {
  7691. return Object.keys(e || {}).reduce(function (e, r) {
  7692. return e || k.hasOwnProperty(r)
  7693. }, !1)
  7694. }
  7695. function p(e) {
  7696. e.__index__ = -1, e.__text_cache__ = ""
  7697. }
  7698. function h(e) {
  7699. return function (r, t) {
  7700. var n = r.slice(t);
  7701. return e.test(n) ? n.match(e)[0].length : 0
  7702. }
  7703. }
  7704. function f() {
  7705. return function (e, r) {
  7706. r.normalize(e)
  7707. }
  7708. }
  7709. function d(r) {
  7710. function t(e) {
  7711. return e.replace("%TLDS%", s.src_tlds)
  7712. }
  7713. function n(e, r) {
  7714. throw new Error('(LinkifyIt) Invalid schema "' + e + '": ' + r)
  7715. }
  7716. var s = r.re = e("./lib/re")(r.__opts__),
  7717. u = r.__tlds__.slice();
  7718. r.onCompile(), r.__tlds_replaced__ || u.push(v), u.push(s.src_xn), s.src_tlds = u.join("|"), s.email_fuzzy = RegExp(t(s.tpl_email_fuzzy), "i"), s.link_fuzzy = RegExp(t(s.tpl_link_fuzzy), "i"), s.link_no_ip_fuzzy = RegExp(t(s.tpl_link_no_ip_fuzzy), "i"), s.host_fuzzy_test = RegExp(t(s.tpl_host_fuzzy_test), "i");
  7719. var d = [];
  7720. r.__compiled__ = {}, Object.keys(r.__schemas__).forEach(function (e) {
  7721. var t = r.__schemas__[e];
  7722. if (null !== t) {
  7723. var s = {
  7724. validate: null,
  7725. link: null
  7726. };
  7727. return r.__compiled__[e] = s, i(t) ? (a(t.validate) ? s.validate = h(t.validate) : c(t.validate) ? s.validate = t.validate : n(e, t), void(c(t.normalize) ? s.normalize = t.normalize : t.normalize ? n(e, t) : s.normalize = f())) : o(t) ? void d.push(e) : void n(e, t)
  7728. }
  7729. }), d.forEach(function (e) {
  7730. r.__compiled__[r.__schemas__[e]] && (r.__compiled__[e].validate = r.__compiled__[r.__schemas__[e]].validate, r.__compiled__[e].normalize = r.__compiled__[r.__schemas__[e]].normalize)
  7731. }), r.__compiled__[""] = {
  7732. validate: null,
  7733. normalize: f()
  7734. };
  7735. var m = Object.keys(r.__compiled__).filter(function (e) {
  7736. return e.length > 0 && r.__compiled__[e]
  7737. }).map(l).join("|");
  7738. r.re.schema_test = RegExp("(^|(?!_)(?:[><]|" + s.src_ZPCc + "))(" + m + ")", "i"), r.re.schema_search = RegExp("(^|(?!_)(?:[><]|" + s.src_ZPCc + "))(" + m + ")", "ig"), r.re.pretest = RegExp("(" + r.re.schema_test.source + ")|(" + r.re.host_fuzzy_test.source + ")|@", "i"), p(r)
  7739. }
  7740. function m(e, r) {
  7741. var t = e.__index__,
  7742. n = e.__last_index__,
  7743. s = e.__text_cache__.slice(t, n);
  7744. this.schema = e.__schema__.toLowerCase(), this.index = t + r, this.lastIndex = n + r, this.raw = s, this.text = s, this.url = s
  7745. }
  7746. function _(e, r) {
  7747. var t = new m(e, r);
  7748. return e.__compiled__[t.schema].normalize(t, e), t
  7749. }
  7750. function g(e, r) {
  7751. return this instanceof g ? (r || u(e) && (r = e, e = {}), this.__opts__ = n({}, k, r), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = n({}, b, e), this.__compiled__ = {}, this.__tlds__ = x, this.__tlds_replaced__ = !1, this.re = {}, void d(this)) : new g(e, r)
  7752. }
  7753. var k = {
  7754. fuzzyLink: !0,
  7755. fuzzyEmail: !0,
  7756. fuzzyIP: !1
  7757. },
  7758. b = {
  7759. "http:": {
  7760. validate: function (e, r, t) {
  7761. var n = e.slice(r);
  7762. return t.re.http || (t.re.http = new RegExp("^\\/\\/" + t.re.src_auth + t.re.src_host_port_strict + t.re.src_path, "i")), t.re.http.test(n) ? n.match(t.re.http)[0].length : 0
  7763. }
  7764. },
  7765. "https:": "http:",
  7766. "ftp:": "http:",
  7767. "//": {
  7768. validate: function (e, r, t) {
  7769. var n = e.slice(r);
  7770. return t.re.no_http || (t.re.no_http = new RegExp("^" + t.re.src_auth + "(?:localhost|(?:(?:" + t.re.src_domain + ")\\.)+" + t.re.src_domain_root + ")" + t.re.src_port + t.re.src_host_terminator + t.re.src_path, "i")), t.re.no_http.test(n) ? r >= 3 && ":" === e[r - 3] ? 0 : r >= 3 && "/" === e[r - 3] ? 0 : n.match(t.re.no_http)[0].length : 0
  7771. }
  7772. },
  7773. "mailto:": {
  7774. validate: function (e, r, t) {
  7775. var n = e.slice(r);
  7776. return t.re.mailto || (t.re.mailto = new RegExp("^" + t.re.src_email_name + "@" + t.re.src_host_strict, "i")), t.re.mailto.test(n) ? n.match(t.re.mailto)[0].length : 0
  7777. }
  7778. }
  7779. },
  7780. v = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",
  7781. x = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");
  7782. g.prototype.add = function (e, r) {
  7783. return this.__schemas__[e] = r, d(this), this
  7784. }, g.prototype.set = function (e) {
  7785. return this.__opts__ = n(this.__opts__, e), this
  7786. }, g.prototype.test = function (e) {
  7787. if (this.__text_cache__ = e, this.__index__ = -1, !e.length) return !1;
  7788. var r, t, n, s, o, i, a, c, l;
  7789. if (this.re.schema_test.test(e))
  7790. for (a = this.re.schema_search, a.lastIndex = 0; null !== (r = a.exec(e));)
  7791. if (s = this.testSchemaAt(e, r[2], a.lastIndex)) {
  7792. this.__schema__ = r[2], this.__index__ = r.index + r[1].length, this.__last_index__ = r.index + r[0].length + s;
  7793. break
  7794. }
  7795. return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (c = e.search(this.re.host_fuzzy_test), c >= 0 && (this.__index__ < 0 || c < this.__index__) && null !== (t = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) && (o = t.index + t[1].length, (this.__index__ < 0 || o < this.__index__) && (this.__schema__ = "", this.__index__ = o, this.__last_index__ = t.index + t[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (l = e.indexOf("@"), l >= 0 && null !== (n = e.match(this.re.email_fuzzy)) && (o = n.index + n[1].length, i = n.index + n[0].length, (this.__index__ < 0 || o < this.__index__ || o === this.__index__ && i > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = o, this.__last_index__ = i))), this.__index__ >= 0
  7796. }, g.prototype.pretest = function (e) {
  7797. return this.re.pretest.test(e)
  7798. }, g.prototype.testSchemaAt = function (e, r, t) {
  7799. return this.__compiled__[r.toLowerCase()] ? this.__compiled__[r.toLowerCase()].validate(e, t, this) : 0
  7800. }, g.prototype.match = function (e) {
  7801. var r = 0,
  7802. t = [];
  7803. this.__index__ >= 0 && this.__text_cache__ === e && (t.push(_(this, r)), r = this.__last_index__);
  7804. for (var n = r ? e.slice(r) : e; this.test(n);) t.push(_(this, r)), n = n.slice(this.__last_index__), r += this.__last_index__;
  7805. return t.length ? t : null
  7806. }, g.prototype.tlds = function (e, r) {
  7807. return e = Array.isArray(e) ? e : [e], r ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function (e, r, t) {
  7808. return e !== t[r - 1]
  7809. }).reverse(), d(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, d(this), this)
  7810. }, g.prototype.normalize = function (e) {
  7811. e.schema || (e.url = "http://" + e.url), "mailto:" !== e.schema || /^mailto:/i.test(e.url) || (e.url = "mailto:" + e.url)
  7812. }, g.prototype.onCompile = function () {}, r.exports = g
  7813. }, {
  7814. "./lib/re": 55
  7815. }],
  7816. 55: [function (e, r, t) {
  7817. "use strict";
  7818. r.exports = function (r) {
  7819. var t = {};
  7820. return t.src_Any = e("uc.micro/properties/Any/regex").source, t.src_Cc = e("uc.micro/categories/Cc/regex").source, t.src_Z = e("uc.micro/categories/Z/regex").source, t.src_P = e("uc.micro/categories/P/regex").source, t.src_ZPCc = [t.src_Z, t.src_P, t.src_Cc].join("|"), t.src_ZCc = [t.src_Z, t.src_Cc].join("|"), t.src_pseudo_letter = "(?:(?!>|<|" + t.src_ZPCc + ")" + t.src_Any + ")", t.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", t.src_auth = "(?:(?:(?!" + t.src_ZCc + "|[@/]).)+@)?", t.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", t.src_host_terminator = "(?=$|>|<|" + t.src_ZPCc + ")(?!-|_|:\\d|\\.-|\\.(?!$|" + t.src_ZPCc + "))", t.src_path = "(?:[/?#](?:(?!" + t.src_ZCc + "|[()[\\]{}.,\"'?!\\-<>]).|\\[(?:(?!" + t.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + t.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + t.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + t.src_ZCc + '|["]).)+\\"|\\\'(?:(?!' + t.src_ZCc + "|[']).)+\\'|\\'(?=" + t.src_pseudo_letter + "|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!" + t.src_ZCc + "|[.]).|" + (r && r["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + "\\,(?!" + t.src_ZCc + ").|\\!(?!" + t.src_ZCc + "|[!]).|\\?(?!" + t.src_ZCc + "|[?]).)+|\\/)?", t.src_email_name = '[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',
  7821. t.src_xn = "xn--[a-z0-9\\-]{1,59}", t.src_domain_root = "(?:" + t.src_xn + "|" + t.src_pseudo_letter + "{1,63})", t.src_domain = "(?:" + t.src_xn + "|(?:" + t.src_pseudo_letter + ")|(?:" + t.src_pseudo_letter + "(?:-(?!-)|" + t.src_pseudo_letter + "){0,61}" + t.src_pseudo_letter + "))", t.src_host = "(?:(?:(?:(?:" + t.src_domain + ")\\.)*" + t.src_domain_root + "))", t.tpl_host_fuzzy = "(?:" + t.src_ip4 + "|(?:(?:(?:" + t.src_domain + ")\\.)+(?:%TLDS%)))", t.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + t.src_domain + ")\\.)+(?:%TLDS%))", t.src_host_strict = t.src_host + t.src_host_terminator, t.tpl_host_fuzzy_strict = t.tpl_host_fuzzy + t.src_host_terminator, t.src_host_port_strict = t.src_host + t.src_port + t.src_host_terminator, t.tpl_host_port_fuzzy_strict = t.tpl_host_fuzzy + t.src_port + t.src_host_terminator, t.tpl_host_port_no_ip_fuzzy_strict = t.tpl_host_no_ip_fuzzy + t.src_port + t.src_host_terminator, t.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + t.src_ZPCc + "|>|$))", t.tpl_email_fuzzy = "(^|<|>|\\(|" + t.src_ZCc + ")(" + t.src_email_name + "@" + t.tpl_host_fuzzy_strict + ")", t.tpl_link_fuzzy = "(^|(?![.:/\\-_@])(?:[$+<=>^`|]|" + t.src_ZPCc + "))((?![$+<=>^`|])" + t.tpl_host_port_fuzzy_strict + t.src_path + ")", t.tpl_link_no_ip_fuzzy = "(^|(?![.:/\\-_@])(?:[$+<=>^`|]|" + t.src_ZPCc + "))((?![$+<=>^`|])" + t.tpl_host_port_no_ip_fuzzy_strict + t.src_path + ")", t
  7822. }
  7823. }, {
  7824. "uc.micro/categories/Cc/regex": 61,
  7825. "uc.micro/categories/P/regex": 63,
  7826. "uc.micro/categories/Z/regex": 64,
  7827. "uc.micro/properties/Any/regex": 66
  7828. }],
  7829. 56: [function (e, r, t) {
  7830. "use strict";
  7831. function n(e) {
  7832. var r, t, n = o[e];
  7833. if (n) return n;
  7834. for (n = o[e] = [], r = 0; r < 128; r++) t = String.fromCharCode(r), n.push(t);
  7835. for (r = 0; r < e.length; r++) t = e.charCodeAt(r), n[t] = "%" + ("0" + t.toString(16).toUpperCase()).slice(-2);
  7836. return n
  7837. }
  7838. function s(e, r) {
  7839. var t;
  7840. return "string" != typeof r && (r = s.defaultChars), t = n(r), e.replace(/(%[a-f0-9]{2})+/gi, function (e) {
  7841. var r, n, s, o, i, a, c, l = "";
  7842. for (r = 0, n = e.length; r < n; r += 3) s = parseInt(e.slice(r + 1, r + 3), 16), s < 128 ? l += t[s] : 192 === (224 & s) && r + 3 < n && (o = parseInt(e.slice(r + 4, r + 6), 16), 128 === (192 & o)) ? (c = s << 6 & 1984 | 63 & o, l += c < 128 ? "��" : String.fromCharCode(c), r += 3) : 224 === (240 & s) && r + 6 < n && (o = parseInt(e.slice(r + 4, r + 6), 16), i = parseInt(e.slice(r + 7, r + 9), 16), 128 === (192 & o) && 128 === (192 & i)) ? (c = s << 12 & 61440 | o << 6 & 4032 | 63 & i, l += c < 2048 || c >= 55296 && c <= 57343 ? "���" : String.fromCharCode(c), r += 6) : 240 === (248 & s) && r + 9 < n && (o = parseInt(e.slice(r + 4, r + 6), 16), i = parseInt(e.slice(r + 7, r + 9), 16), a = parseInt(e.slice(r + 10, r + 12), 16), 128 === (192 & o) && 128 === (192 & i) && 128 === (192 & a)) ? (c = s << 18 & 1835008 | o << 12 & 258048 | i << 6 & 4032 | 63 & a, c < 65536 || c > 1114111 ? l += "����" : (c -= 65536, l += String.fromCharCode(55296 + (c >> 10), 56320 + (1023 & c))), r += 9) : l += "�";
  7843. return l
  7844. })
  7845. }
  7846. var o = {};
  7847. s.defaultChars = ";/?:@&=+$,#", s.componentChars = "", r.exports = s
  7848. }, {}],
  7849. 57: [function (e, r, t) {
  7850. "use strict";
  7851. function n(e) {
  7852. var r, t, n = o[e];
  7853. if (n) return n;
  7854. for (n = o[e] = [], r = 0; r < 128; r++) t = String.fromCharCode(r), /^[0-9a-z]$/i.test(t) ? n.push(t) : n.push("%" + ("0" + r.toString(16).toUpperCase()).slice(-2));
  7855. for (r = 0; r < e.length; r++) n[e.charCodeAt(r)] = e[r];
  7856. return n
  7857. }
  7858. function s(e, r, t) {
  7859. var o, i, a, c, l, u = "";
  7860. for ("string" != typeof r && (t = r, r = s.defaultChars), "undefined" == typeof t && (t = !0), l = n(r), o = 0, i = e.length; o < i; o++)
  7861. if (a = e.charCodeAt(o), t && 37 === a && o + 2 < i && /^[0-9a-f]{2}$/i.test(e.slice(o + 1, o + 3))) u += e.slice(o, o + 3), o += 2;
  7862. else if (a < 128) u += l[a];
  7863. else if (a >= 55296 && a <= 57343) {
  7864. if (a >= 55296 && a <= 56319 && o + 1 < i && (c = e.charCodeAt(o + 1), c >= 56320 && c <= 57343)) {
  7865. u += encodeURIComponent(e[o] + e[o + 1]), o++;
  7866. continue
  7867. }
  7868. u += "%EF%BF%BD"
  7869. } else u += encodeURIComponent(e[o]);
  7870. return u
  7871. }
  7872. var o = {};
  7873. s.defaultChars = ";/?:@&=+$,-_.!~*'()#", s.componentChars = "-_.!~*'()", r.exports = s
  7874. }, {}],
  7875. 58: [function (e, r, t) {
  7876. "use strict";
  7877. r.exports = function (e) {
  7878. var r = "";
  7879. return r += e.protocol || "", r += e.slashes ? "//" : "", r += e.auth ? e.auth + "@" : "", r += e.hostname && e.hostname.indexOf(":") !== -1 ? "[" + e.hostname + "]" : e.hostname || "", r += e.port ? ":" + e.port : "", r += e.pathname || "", r += e.search || "", r += e.hash || ""
  7880. }
  7881. }, {}],
  7882. 59: [function (e, r, t) {
  7883. "use strict";
  7884. r.exports.encode = e("./encode"), r.exports.decode = e("./decode"), r.exports.format = e("./format"), r.exports.parse = e("./parse")
  7885. }, {
  7886. "./decode": 56,
  7887. "./encode": 57,
  7888. "./format": 58,
  7889. "./parse": 60
  7890. }],
  7891. 60: [function (e, r, t) {
  7892. "use strict";
  7893. function n() {
  7894. this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null
  7895. }
  7896. function s(e, r) {
  7897. if (e && e instanceof n) return e;
  7898. var t = new n;
  7899. return t.parse(e, r), t
  7900. }
  7901. var o = /^([a-z0-9.+-]+:)/i,
  7902. i = /:[0-9]*$/,
  7903. a = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
  7904. c = ["<", ">", '"', "`", " ", "\r", "\n", " "],
  7905. l = ["{", "}", "|", "\\", "^", "`"].concat(c),
  7906. u = ["'"].concat(l),
  7907. p = ["%", "/", "?", ";", "#"].concat(u),
  7908. h = ["/", "?", "#"],
  7909. f = 255,
  7910. d = /^[+a-z0-9A-Z_-]{0,63}$/,
  7911. m = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
  7912. _ = {
  7913. javascript: !0,
  7914. "javascript:": !0
  7915. },
  7916. g = {
  7917. http: !0,
  7918. https: !0,
  7919. ftp: !0,
  7920. gopher: !0,
  7921. file: !0,
  7922. "http:": !0,
  7923. "https:": !0,
  7924. "ftp:": !0,
  7925. "gopher:": !0,
  7926. "file:": !0
  7927. };
  7928. n.prototype.parse = function (e, r) {
  7929. var t, n, s, i, c, l = e;
  7930. if (l = l.trim(), !r && 1 === e.split("#").length) {
  7931. var u = a.exec(l);
  7932. if (u) return this.pathname = u[1], u[2] && (this.search = u[2]), this
  7933. }
  7934. var k = o.exec(l);
  7935. if (k && (k = k[0], s = k.toLowerCase(), this.protocol = k, l = l.substr(k.length)), (r || k || l.match(/^\/\/[^@\/]+@[^@\/]+/)) && (c = "//" === l.substr(0, 2), !c || k && _[k] || (l = l.substr(2), this.slashes = !0)), !_[k] && (c || k && !g[k])) {
  7936. var b = -1;
  7937. for (t = 0; t < h.length; t++) i = l.indexOf(h[t]), i !== -1 && (b === -1 || i < b) && (b = i);
  7938. var v, x;
  7939. for (x = b === -1 ? l.lastIndexOf("@") : l.lastIndexOf("@", b), x !== -1 && (v = l.slice(0, x), l = l.slice(x + 1), this.auth = v), b = -1, t = 0; t < p.length; t++) i = l.indexOf(p[t]), i !== -1 && (b === -1 || i < b) && (b = i);
  7940. b === -1 && (b = l.length), ":" === l[b - 1] && b--;
  7941. var y = l.slice(0, b);
  7942. l = l.slice(b), this.parseHost(y), this.hostname = this.hostname || "";
  7943. var C = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
  7944. if (!C) {
  7945. var A = this.hostname.split(/\./);
  7946. for (t = 0, n = A.length; t < n; t++) {
  7947. var w = A[t];
  7948. if (w && !w.match(d)) {
  7949. for (var D = "", q = 0, E = w.length; q < E; q++) D += w.charCodeAt(q) > 127 ? "x" : w[q];
  7950. if (!D.match(d)) {
  7951. var S = A.slice(0, t),
  7952. F = A.slice(t + 1),
  7953. z = w.match(m);
  7954. z && (S.push(z[1]), F.unshift(z[2])), F.length && (l = F.join(".") + l), this.hostname = S.join(".");
  7955. break
  7956. }
  7957. }
  7958. }
  7959. }
  7960. this.hostname.length > f && (this.hostname = ""), C && (this.hostname = this.hostname.substr(1, this.hostname.length - 2))
  7961. }
  7962. var L = l.indexOf("#");
  7963. L !== -1 && (this.hash = l.substr(L), l = l.slice(0, L));
  7964. var T = l.indexOf("?");
  7965. return T !== -1 && (this.search = l.substr(T), l = l.slice(0, T)), l && (this.pathname = l), g[s] && this.hostname && !this.pathname && (this.pathname = ""), this
  7966. }, n.prototype.parseHost = function (e) {
  7967. var r = i.exec(e);
  7968. r && (r = r[0], ":" !== r && (this.port = r.substr(1)), e = e.substr(0, e.length - r.length)), e && (this.hostname = e)
  7969. }, r.exports = s
  7970. }, {}],
  7971. 61: [function (e, r, t) {
  7972. r.exports = /[\0-\x1F\x7F-\x9F]/
  7973. }, {}],
  7974. 62: [function (e, r, t) {
  7975. r.exports = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/
  7976. }, {}],
  7977. 63: [function (e, r, t) {
  7978. r.exports = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/
  7979. }, {}],
  7980. 64: [function (e, r, t) {
  7981. r.exports = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/
  7982. }, {}],
  7983. 65: [function (e, r, t) {
  7984. r.exports.Any = e("./properties/Any/regex"), r.exports.Cc = e("./categories/Cc/regex"), r.exports.Cf = e("./categories/Cf/regex"), r.exports.P = e("./categories/P/regex"), r.exports.Z = e("./categories/Z/regex")
  7985. }, {
  7986. "./categories/Cc/regex": 61,
  7987. "./categories/Cf/regex": 62,
  7988. "./categories/P/regex": 63,
  7989. "./categories/Z/regex": 64,
  7990. "./properties/Any/regex": 66
  7991. }],
  7992. 66: [function (e, r, t) {
  7993. r.exports = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/
  7994. }, {}],
  7995. 67: [function (e, r, t) {
  7996. "use strict";
  7997. r.exports = e("./lib/")
  7998. }, {
  7999. "./lib/": 9
  8000. }]
  8001. }, {}, [67])(67)
  8002. });
  8003. define("Core/KnockoutMarkdownBinding", ["markdown-it-sanitizer", "markdown-it"], function (MarkdownItSanitizer, MarkdownIt) {
  8004. "use strict";
  8005. var htmlTagRegex = /<html(.|\s)*>(.|\s)*<\/html>/im;
  8006. var md = new MarkdownIt({
  8007. html: true,
  8008. linkify: true
  8009. });
  8010. md.use(MarkdownItSanitizer, {
  8011. imageClass: "",
  8012. removeUnbalanced: false,
  8013. removeUnknown: false
  8014. });
  8015. var KnockoutMarkdownBinding = {
  8016. register: function (Knockout) {
  8017. Knockout.bindingHandlers.markdown = {
  8018. init: function () {
  8019. return {
  8020. controlsDescendantBindings: true
  8021. }
  8022. },
  8023. update: function (element, valueAccessor) {
  8024. while (element.firstChild) {
  8025. Knockout.removeNode(element.firstChild)
  8026. }
  8027. var rawText = Knockout.unwrap(valueAccessor());
  8028. var html;
  8029. if (htmlTagRegex.test(rawText)) {
  8030. html = rawText
  8031. } else {
  8032. html = md.render(rawText)
  8033. }
  8034. var nodes = Knockout.utils.parseHtmlFragment(html, element);
  8035. element.className = element.className + " markdown";
  8036. for (var i = 0; i < nodes.length; ++i) {
  8037. var node = nodes[i];
  8038. setAnchorTargets(node);
  8039. element.appendChild(node)
  8040. }
  8041. }
  8042. }
  8043. }
  8044. };
  8045. function setAnchorTargets(element) {
  8046. if (element instanceof HTMLAnchorElement) {
  8047. element.target = "_blank"
  8048. }
  8049. if (element.childNodes && element.childNodes.length > 0) {
  8050. for (var i = 0; i < element.childNodes.length; ++i) {
  8051. setAnchorTargets(element.childNodes[i])
  8052. }
  8053. }
  8054. }
  8055. return KnockoutMarkdownBinding
  8056. });
  8057. ! function (a, b, c, d) {
  8058. "use strict";
  8059. function e(a, b, c) {
  8060. return setTimeout(j(a, c), b)
  8061. }
  8062. function f(a, b, c) {
  8063. return Array.isArray(a) ? (g(a, c[b], c), !0) : !1
  8064. }
  8065. function g(a, b, c) {
  8066. var e;
  8067. if (a)
  8068. if (a.forEach) a.forEach(b, c);
  8069. else if (a.length !== d)
  8070. for (e = 0; e < a.length;) b.call(c, a[e], e, a), e++;
  8071. else
  8072. for (e in a) a.hasOwnProperty(e) && b.call(c, a[e], e, a)
  8073. }
  8074. function h(b, c, d) {
  8075. var e = "DEPRECATED METHOD: " + c + "\n" + d + " AT \n";
  8076. return function () {
  8077. var c = new Error("get-stack-trace"),
  8078. d = c && c.stack ? c.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace",
  8079. f = a.console && (a.console.warn || a.console.log);
  8080. return f && f.call(a.console, e, d), b.apply(this, arguments)
  8081. }
  8082. }
  8083. function i(a, b, c) {
  8084. var d, e = b.prototype;
  8085. d = a.prototype = Object.create(e), d.constructor = a, d._super = e, c && la(d, c)
  8086. }
  8087. function j(a, b) {
  8088. return function () {
  8089. return a.apply(b, arguments)
  8090. }
  8091. }
  8092. function k(a, b) {
  8093. return typeof a == oa ? a.apply(b ? b[0] || d : d, b) : a
  8094. }
  8095. function l(a, b) {
  8096. return a === d ? b : a
  8097. }
  8098. function m(a, b, c) {
  8099. g(q(b), function (b) {
  8100. a.addEventListener(b, c, !1)
  8101. })
  8102. }
  8103. function n(a, b, c) {
  8104. g(q(b), function (b) {
  8105. a.removeEventListener(b, c, !1)
  8106. })
  8107. }
  8108. function o(a, b) {
  8109. for (; a;) {
  8110. if (a == b) return !0;
  8111. a = a.parentNode
  8112. }
  8113. return !1
  8114. }
  8115. function p(a, b) {
  8116. return a.indexOf(b) > -1
  8117. }
  8118. function q(a) {
  8119. return a.trim().split(/\s+/g)
  8120. }
  8121. function r(a, b, c) {
  8122. if (a.indexOf && !c) return a.indexOf(b);
  8123. for (var d = 0; d < a.length;) {
  8124. if (c && a[d][c] == b || !c && a[d] === b) return d;
  8125. d++
  8126. }
  8127. return -1
  8128. }
  8129. function s(a) {
  8130. return Array.prototype.slice.call(a, 0)
  8131. }
  8132. function t(a, b, c) {
  8133. for (var d = [], e = [], f = 0; f < a.length;) {
  8134. var g = b ? a[f][b] : a[f];
  8135. r(e, g) < 0 && d.push(a[f]), e[f] = g, f++
  8136. }
  8137. return c && (d = b ? d.sort(function (a, c) {
  8138. return a[b] > c[b]
  8139. }) : d.sort()), d
  8140. }
  8141. function u(a, b) {
  8142. for (var c, e, f = b[0].toUpperCase() + b.slice(1), g = 0; g < ma.length;) {
  8143. if (c = ma[g], e = c ? c + f : b, e in a) return e;
  8144. g++
  8145. }
  8146. return d
  8147. }
  8148. function v() {
  8149. return ua++
  8150. }
  8151. function w(b) {
  8152. var c = b.ownerDocument || b;
  8153. return c.defaultView || c.parentWindow || a
  8154. }
  8155. function x(a, b) {
  8156. var c = this;
  8157. this.manager = a, this.callback = b, this.element = a.element, this.target = a.options.inputTarget, this.domHandler = function (b) {
  8158. k(a.options.enable, [a]) && c.handler(b)
  8159. }, this.init()
  8160. }
  8161. function y(a) {
  8162. var b, c = a.options.inputClass;
  8163. return new(b = c ? c : xa ? M : ya ? P : wa ? R : L)(a, z)
  8164. }
  8165. function z(a, b, c) {
  8166. var d = c.pointers.length,
  8167. e = c.changedPointers.length,
  8168. f = b & Ea && d - e === 0,
  8169. g = b & (Ga | Ha) && d - e === 0;
  8170. c.isFirst = !!f, c.isFinal = !!g, f && (a.session = {}), c.eventType = b, A(a, c), a.emit("hammer.input", c), a.recognize(c), a.session.prevInput = c
  8171. }
  8172. function A(a, b) {
  8173. var c = a.session,
  8174. d = b.pointers,
  8175. e = d.length;
  8176. c.firstInput || (c.firstInput = D(b)), e > 1 && !c.firstMultiple ? c.firstMultiple = D(b) : 1 === e && (c.firstMultiple = !1);
  8177. var f = c.firstInput,
  8178. g = c.firstMultiple,
  8179. h = g ? g.center : f.center,
  8180. i = b.center = E(d);
  8181. b.timeStamp = ra(), b.deltaTime = b.timeStamp - f.timeStamp, b.angle = I(h, i), b.distance = H(h, i), B(c, b), b.offsetDirection = G(b.deltaX, b.deltaY);
  8182. var j = F(b.deltaTime, b.deltaX, b.deltaY);
  8183. b.overallVelocityX = j.x, b.overallVelocityY = j.y, b.overallVelocity = qa(j.x) > qa(j.y) ? j.x : j.y, b.scale = g ? K(g.pointers, d) : 1, b.rotation = g ? J(g.pointers, d) : 0, b.maxPointers = c.prevInput ? b.pointers.length > c.prevInput.maxPointers ? b.pointers.length : c.prevInput.maxPointers : b.pointers.length, C(c, b);
  8184. var k = a.element;
  8185. o(b.srcEvent.target, k) && (k = b.srcEvent.target), b.target = k
  8186. }
  8187. function B(a, b) {
  8188. var c = b.center,
  8189. d = a.offsetDelta || {},
  8190. e = a.prevDelta || {},
  8191. f = a.prevInput || {};
  8192. b.eventType !== Ea && f.eventType !== Ga || (e = a.prevDelta = {
  8193. x: f.deltaX || 0,
  8194. y: f.deltaY || 0
  8195. }, d = a.offsetDelta = {
  8196. x: c.x,
  8197. y: c.y
  8198. }), b.deltaX = e.x + (c.x - d.x), b.deltaY = e.y + (c.y - d.y)
  8199. }
  8200. function C(a, b) {
  8201. var c, e, f, g, h = a.lastInterval || b,
  8202. i = b.timeStamp - h.timeStamp;
  8203. if (b.eventType != Ha && (i > Da || h.velocity === d)) {
  8204. var j = b.deltaX - h.deltaX,
  8205. k = b.deltaY - h.deltaY,
  8206. l = F(i, j, k);
  8207. e = l.x, f = l.y, c = qa(l.x) > qa(l.y) ? l.x : l.y, g = G(j, k), a.lastInterval = b
  8208. } else c = h.velocity, e = h.velocityX, f = h.velocityY, g = h.direction;
  8209. b.velocity = c, b.velocityX = e, b.velocityY = f, b.direction = g
  8210. }
  8211. function D(a) {
  8212. for (var b = [], c = 0; c < a.pointers.length;) b[c] = {
  8213. clientX: pa(a.pointers[c].clientX),
  8214. clientY: pa(a.pointers[c].clientY)
  8215. }, c++;
  8216. return {
  8217. timeStamp: ra(),
  8218. pointers: b,
  8219. center: E(b),
  8220. deltaX: a.deltaX,
  8221. deltaY: a.deltaY
  8222. }
  8223. }
  8224. function E(a) {
  8225. var b = a.length;
  8226. if (1 === b) return {
  8227. x: pa(a[0].clientX),
  8228. y: pa(a[0].clientY)
  8229. };
  8230. for (var c = 0, d = 0, e = 0; b > e;) c += a[e].clientX, d += a[e].clientY, e++;
  8231. return {
  8232. x: pa(c / b),
  8233. y: pa(d / b)
  8234. }
  8235. }
  8236. function F(a, b, c) {
  8237. return {
  8238. x: b / a || 0,
  8239. y: c / a || 0
  8240. }
  8241. }
  8242. function G(a, b) {
  8243. return a === b ? Ia : qa(a) >= qa(b) ? 0 > a ? Ja : Ka : 0 > b ? La : Ma
  8244. }
  8245. function H(a, b, c) {
  8246. c || (c = Qa);
  8247. var d = b[c[0]] - a[c[0]],
  8248. e = b[c[1]] - a[c[1]];
  8249. return Math.sqrt(d * d + e * e)
  8250. }
  8251. function I(a, b, c) {
  8252. c || (c = Qa);
  8253. var d = b[c[0]] - a[c[0]],
  8254. e = b[c[1]] - a[c[1]];
  8255. return 180 * Math.atan2(e, d) / Math.PI
  8256. }
  8257. function J(a, b) {
  8258. return I(b[1], b[0], Ra) + I(a[1], a[0], Ra)
  8259. }
  8260. function K(a, b) {
  8261. return H(b[0], b[1], Ra) / H(a[0], a[1], Ra)
  8262. }
  8263. function L() {
  8264. this.evEl = Ta, this.evWin = Ua, this.pressed = !1, x.apply(this, arguments)
  8265. }
  8266. function M() {
  8267. this.evEl = Xa, this.evWin = Ya, x.apply(this, arguments), this.store = this.manager.session.pointerEvents = []
  8268. }
  8269. function N() {
  8270. this.evTarget = $a, this.evWin = _a, this.started = !1, x.apply(this, arguments)
  8271. }
  8272. function O(a, b) {
  8273. var c = s(a.touches),
  8274. d = s(a.changedTouches);
  8275. return b & (Ga | Ha) && (c = t(c.concat(d), "identifier", !0)), [c, d]
  8276. }
  8277. function P() {
  8278. this.evTarget = bb, this.targetIds = {}, x.apply(this, arguments)
  8279. }
  8280. function Q(a, b) {
  8281. var c = s(a.touches),
  8282. d = this.targetIds;
  8283. if (b & (Ea | Fa) && 1 === c.length) return d[c[0].identifier] = !0, [c, c];
  8284. var e, f, g = s(a.changedTouches),
  8285. h = [],
  8286. i = this.target;
  8287. if (f = c.filter(function (a) {
  8288. return o(a.target, i)
  8289. }), b === Ea)
  8290. for (e = 0; e < f.length;) d[f[e].identifier] = !0, e++;
  8291. for (e = 0; e < g.length;) d[g[e].identifier] && h.push(g[e]), b & (Ga | Ha) && delete d[g[e].identifier], e++;
  8292. return h.length ? [t(f.concat(h), "identifier", !0), h] : void 0
  8293. }
  8294. function R() {
  8295. x.apply(this, arguments);
  8296. var a = j(this.handler, this);
  8297. this.touch = new P(this.manager, a), this.mouse = new L(this.manager, a), this.primaryTouch = null, this.lastTouches = []
  8298. }
  8299. function S(a, b) {
  8300. a & Ea ? (this.primaryTouch = b.changedPointers[0].identifier, T.call(this, b)) : a & (Ga | Ha) && T.call(this, b)
  8301. }
  8302. function T(a) {
  8303. var b = a.changedPointers[0];
  8304. if (b.identifier === this.primaryTouch) {
  8305. var c = {
  8306. x: b.clientX,
  8307. y: b.clientY
  8308. };
  8309. this.lastTouches.push(c);
  8310. var d = this.lastTouches,
  8311. e = function () {
  8312. var a = d.indexOf(c);
  8313. a > -1 && d.splice(a, 1)
  8314. };
  8315. setTimeout(e, cb)
  8316. }
  8317. }
  8318. function U(a) {
  8319. for (var b = a.srcEvent.clientX, c = a.srcEvent.clientY, d = 0; d < this.lastTouches.length; d++) {
  8320. var e = this.lastTouches[d],
  8321. f = Math.abs(b - e.x),
  8322. g = Math.abs(c - e.y);
  8323. if (db >= f && db >= g) return !0
  8324. }
  8325. return !1
  8326. }
  8327. function V(a, b) {
  8328. this.manager = a, this.set(b)
  8329. }
  8330. function W(a) {
  8331. if (p(a, jb)) return jb;
  8332. var b = p(a, kb),
  8333. c = p(a, lb);
  8334. return b && c ? jb : b || c ? b ? kb : lb : p(a, ib) ? ib : hb
  8335. }
  8336. function X() {
  8337. if (!fb) return !1;
  8338. var b = {},
  8339. c = a.CSS && a.CSS.supports;
  8340. return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function (d) {
  8341. b[d] = c ? a.CSS.supports("touch-action", d) : !0
  8342. }), b
  8343. }
  8344. function Y(a) {
  8345. this.options = la({}, this.defaults, a || {}), this.id = v(), this.manager = null, this.options.enable = l(this.options.enable, !0), this.state = nb, this.simultaneous = {}, this.requireFail = []
  8346. }
  8347. function Z(a) {
  8348. return a & sb ? "cancel" : a & qb ? "end" : a & pb ? "move" : a & ob ? "start" : ""
  8349. }
  8350. function $(a) {
  8351. return a == Ma ? "down" : a == La ? "up" : a == Ja ? "left" : a == Ka ? "right" : ""
  8352. }
  8353. function _(a, b) {
  8354. var c = b.manager;
  8355. return c ? c.get(a) : a
  8356. }
  8357. function aa() {
  8358. Y.apply(this, arguments)
  8359. }
  8360. function ba() {
  8361. aa.apply(this, arguments), this.pX = null, this.pY = null
  8362. }
  8363. function ca() {
  8364. aa.apply(this, arguments)
  8365. }
  8366. function da() {
  8367. Y.apply(this, arguments), this._timer = null, this._input = null
  8368. }
  8369. function ea() {
  8370. aa.apply(this, arguments)
  8371. }
  8372. function fa() {
  8373. aa.apply(this, arguments)
  8374. }
  8375. function ga() {
  8376. Y.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0
  8377. }
  8378. function ha(a, b) {
  8379. return b = b || {}, b.recognizers = l(b.recognizers, ha.defaults.preset), new ia(a, b)
  8380. }
  8381. function ia(a, b) {
  8382. this.options = la({}, ha.defaults, b || {}), this.options.inputTarget = this.options.inputTarget || a, this.handlers = {}, this.session = {}, this.recognizers = [], this.oldCssProps = {}, this.element = a, this.input = y(this), this.touchAction = new V(this, this.options.touchAction), ja(this, !0), g(this.options.recognizers, function (a) {
  8383. var b = this.add(new a[0](a[1]));
  8384. a[2] && b.recognizeWith(a[2]), a[3] && b.requireFailure(a[3])
  8385. }, this)
  8386. }
  8387. function ja(a, b) {
  8388. var c = a.element;
  8389. if (c.style) {
  8390. var d;
  8391. g(a.options.cssProps, function (e, f) {
  8392. d = u(c.style, f), b ? (a.oldCssProps[d] = c.style[d], c.style[d] = e) : c.style[d] = a.oldCssProps[d] || ""
  8393. }), b || (a.oldCssProps = {})
  8394. }
  8395. }
  8396. function ka(a, c) {
  8397. var d = b.createEvent("Event");
  8398. d.initEvent(a, !0, !0), d.gesture = c, c.target.dispatchEvent(d)
  8399. }
  8400. var la, ma = ["", "webkit", "Moz", "MS", "ms", "o"],
  8401. na = b.createElement("div"),
  8402. oa = "function",
  8403. pa = Math.round,
  8404. qa = Math.abs,
  8405. ra = Date.now;
  8406. la = "function" != typeof Object.assign ? function (a) {
  8407. if (a === d || null === a) throw new TypeError("Cannot convert undefined or null to object");
  8408. for (var b = Object(a), c = 1; c < arguments.length; c++) {
  8409. var e = arguments[c];
  8410. if (e !== d && null !== e)
  8411. for (var f in e) e.hasOwnProperty(f) && (b[f] = e[f])
  8412. }
  8413. return b
  8414. } : Object.assign;
  8415. var sa = h(function (a, b, c) {
  8416. for (var e = Object.keys(b), f = 0; f < e.length;)(!c || c && a[e[f]] === d) && (a[e[f]] = b[e[f]]), f++;
  8417. return a
  8418. }, "extend", "Use `assign`."),
  8419. ta = h(function (a, b) {
  8420. return sa(a, b, !0)
  8421. }, "merge", "Use `assign`."),
  8422. ua = 1,
  8423. va = /mobile|tablet|ip(ad|hone|od)|android/i,
  8424. wa = "ontouchstart" in a,
  8425. xa = u(a, "PointerEvent") !== d,
  8426. ya = wa && va.test(navigator.userAgent),
  8427. za = "touch",
  8428. Aa = "pen",
  8429. Ba = "mouse",
  8430. Ca = "kinect",
  8431. Da = 25,
  8432. Ea = 1,
  8433. Fa = 2,
  8434. Ga = 4,
  8435. Ha = 8,
  8436. Ia = 1,
  8437. Ja = 2,
  8438. Ka = 4,
  8439. La = 8,
  8440. Ma = 16,
  8441. Na = Ja | Ka,
  8442. Oa = La | Ma,
  8443. Pa = Na | Oa,
  8444. Qa = ["x", "y"],
  8445. Ra = ["clientX", "clientY"];
  8446. x.prototype = {
  8447. handler: function () {},
  8448. init: function () {
  8449. this.evEl && m(this.element, this.evEl, this.domHandler), this.evTarget && m(this.target, this.evTarget, this.domHandler), this.evWin && m(w(this.element), this.evWin, this.domHandler)
  8450. },
  8451. destroy: function () {
  8452. this.evEl && n(this.element, this.evEl, this.domHandler), this.evTarget && n(this.target, this.evTarget, this.domHandler), this.evWin && n(w(this.element), this.evWin, this.domHandler)
  8453. }
  8454. };
  8455. var Sa = {
  8456. mousedown: Ea,
  8457. mousemove: Fa,
  8458. mouseup: Ga
  8459. },
  8460. Ta = "mousedown",
  8461. Ua = "mousemove mouseup";
  8462. i(L, x, {
  8463. handler: function (a) {
  8464. var b = Sa[a.type];
  8465. b & Ea && 0 === a.button && (this.pressed = !0), b & Fa && 1 !== a.which && (b = Ga), this.pressed && (b & Ga && (this.pressed = !1), this.callback(this.manager, b, {
  8466. pointers: [a],
  8467. changedPointers: [a],
  8468. pointerType: Ba,
  8469. srcEvent: a
  8470. }))
  8471. }
  8472. });
  8473. var Va = {
  8474. pointerdown: Ea,
  8475. pointermove: Fa,
  8476. pointerup: Ga,
  8477. pointercancel: Ha,
  8478. pointerout: Ha
  8479. },
  8480. Wa = {
  8481. 2: za,
  8482. 3: Aa,
  8483. 4: Ba,
  8484. 5: Ca
  8485. },
  8486. Xa = "pointerdown",
  8487. Ya = "pointermove pointerup pointercancel";
  8488. a.MSPointerEvent && !a.PointerEvent && (Xa = "MSPointerDown", Ya = "MSPointerMove MSPointerUp MSPointerCancel"), i(M, x, {
  8489. handler: function (a) {
  8490. var b = this.store,
  8491. c = !1,
  8492. d = a.type.toLowerCase().replace("ms", ""),
  8493. e = Va[d],
  8494. f = Wa[a.pointerType] || a.pointerType,
  8495. g = f == za,
  8496. h = r(b, a.pointerId, "pointerId");
  8497. e & Ea && (0 === a.button || g) ? 0 > h && (b.push(a), h = b.length - 1) : e & (Ga | Ha) && (c = !0), 0 > h || (b[h] = a, this.callback(this.manager, e, {
  8498. pointers: b,
  8499. changedPointers: [a],
  8500. pointerType: f,
  8501. srcEvent: a
  8502. }), c && b.splice(h, 1))
  8503. }
  8504. });
  8505. var Za = {
  8506. touchstart: Ea,
  8507. touchmove: Fa,
  8508. touchend: Ga,
  8509. touchcancel: Ha
  8510. },
  8511. $a = "touchstart",
  8512. _a = "touchstart touchmove touchend touchcancel";
  8513. i(N, x, {
  8514. handler: function (a) {
  8515. var b = Za[a.type];
  8516. if (b === Ea && (this.started = !0), this.started) {
  8517. var c = O.call(this, a, b);
  8518. b & (Ga | Ha) && c[0].length - c[1].length === 0 && (this.started = !1), this.callback(this.manager, b, {
  8519. pointers: c[0],
  8520. changedPointers: c[1],
  8521. pointerType: za,
  8522. srcEvent: a
  8523. })
  8524. }
  8525. }
  8526. });
  8527. var ab = {
  8528. touchstart: Ea,
  8529. touchmove: Fa,
  8530. touchend: Ga,
  8531. touchcancel: Ha
  8532. },
  8533. bb = "touchstart touchmove touchend touchcancel";
  8534. i(P, x, {
  8535. handler: function (a) {
  8536. var b = ab[a.type],
  8537. c = Q.call(this, a, b);
  8538. c && this.callback(this.manager, b, {
  8539. pointers: c[0],
  8540. changedPointers: c[1],
  8541. pointerType: za,
  8542. srcEvent: a
  8543. })
  8544. }
  8545. });
  8546. var cb = 2500,
  8547. db = 25;
  8548. i(R, x, {
  8549. handler: function (a, b, c) {
  8550. var d = c.pointerType == za,
  8551. e = c.pointerType == Ba;
  8552. if (!(e && c.sourceCapabilities && c.sourceCapabilities.firesTouchEvents)) {
  8553. if (d) S.call(this, b, c);
  8554. else if (e && U.call(this, c)) return;
  8555. this.callback(a, b, c)
  8556. }
  8557. },
  8558. destroy: function () {
  8559. this.touch.destroy(), this.mouse.destroy()
  8560. }
  8561. });
  8562. var eb = u(na.style, "touchAction"),
  8563. fb = eb !== d,
  8564. gb = "compute",
  8565. hb = "auto",
  8566. ib = "manipulation",
  8567. jb = "none",
  8568. kb = "pan-x",
  8569. lb = "pan-y",
  8570. mb = X();
  8571. V.prototype = {
  8572. set: function (a) {
  8573. a == gb && (a = this.compute()), fb && this.manager.element.style && mb[a] && (this.manager.element.style[eb] = a), this.actions = a.toLowerCase().trim()
  8574. },
  8575. update: function () {
  8576. this.set(this.manager.options.touchAction)
  8577. },
  8578. compute: function () {
  8579. var a = [];
  8580. return g(this.manager.recognizers, function (b) {
  8581. k(b.options.enable, [b]) && (a = a.concat(b.getTouchAction()))
  8582. }), W(a.join(" "))
  8583. },
  8584. preventDefaults: function (a) {
  8585. var b = a.srcEvent,
  8586. c = a.offsetDirection;
  8587. if (this.manager.session.prevented) return void b.preventDefault();
  8588. var d = this.actions,
  8589. e = p(d, jb) && !mb[jb],
  8590. f = p(d, lb) && !mb[lb],
  8591. g = p(d, kb) && !mb[kb];
  8592. if (e) {
  8593. var h = 1 === a.pointers.length,
  8594. i = a.distance < 2,
  8595. j = a.deltaTime < 250;
  8596. if (h && i && j) return
  8597. }
  8598. return g && f ? void 0 : e || f && c & Na || g && c & Oa ? this.preventSrc(b) : void 0
  8599. },
  8600. preventSrc: function (a) {
  8601. this.manager.session.prevented = !0, a.preventDefault()
  8602. }
  8603. };
  8604. var nb = 1,
  8605. ob = 2,
  8606. pb = 4,
  8607. qb = 8,
  8608. rb = qb,
  8609. sb = 16,
  8610. tb = 32;
  8611. Y.prototype = {
  8612. defaults: {},
  8613. set: function (a) {
  8614. return la(this.options, a), this.manager && this.manager.touchAction.update(), this
  8615. },
  8616. recognizeWith: function (a) {
  8617. if (f(a, "recognizeWith", this)) return this;
  8618. var b = this.simultaneous;
  8619. return a = _(a, this), b[a.id] || (b[a.id] = a, a.recognizeWith(this)), this
  8620. },
  8621. dropRecognizeWith: function (a) {
  8622. return f(a, "dropRecognizeWith", this) ? this : (a = _(a, this), delete this.simultaneous[a.id], this)
  8623. },
  8624. requireFailure: function (a) {
  8625. if (f(a, "requireFailure", this)) return this;
  8626. var b = this.requireFail;
  8627. return a = _(a, this), -1 === r(b, a) && (b.push(a), a.requireFailure(this)), this
  8628. },
  8629. dropRequireFailure: function (a) {
  8630. if (f(a, "dropRequireFailure", this)) return this;
  8631. a = _(a, this);
  8632. var b = r(this.requireFail, a);
  8633. return b > -1 && this.requireFail.splice(b, 1), this
  8634. },
  8635. hasRequireFailures: function () {
  8636. return this.requireFail.length > 0
  8637. },
  8638. canRecognizeWith: function (a) {
  8639. return !!this.simultaneous[a.id]
  8640. },
  8641. emit: function (a) {
  8642. function b(b) {
  8643. c.manager.emit(b, a)
  8644. }
  8645. var c = this,
  8646. d = this.state;
  8647. qb > d && b(c.options.event + Z(d)), b(c.options.event), a.additionalEvent && b(a.additionalEvent), d >= qb && b(c.options.event + Z(d))
  8648. },
  8649. tryEmit: function (a) {
  8650. return this.canEmit() ? this.emit(a) : void(this.state = tb)
  8651. },
  8652. canEmit: function () {
  8653. for (var a = 0; a < this.requireFail.length;) {
  8654. if (!(this.requireFail[a].state & (tb | nb))) return !1;
  8655. a++
  8656. }
  8657. return !0
  8658. },
  8659. recognize: function (a) {
  8660. var b = la({}, a);
  8661. return k(this.options.enable, [this, b]) ? (this.state & (rb | sb | tb) && (this.state = nb), this.state = this.process(b), void(this.state & (ob | pb | qb | sb) && this.tryEmit(b))) : (this.reset(), void(this.state = tb))
  8662. },
  8663. process: function (a) {},
  8664. getTouchAction: function () {},
  8665. reset: function () {}
  8666. }, i(aa, Y, {
  8667. defaults: {
  8668. pointers: 1
  8669. },
  8670. attrTest: function (a) {
  8671. var b = this.options.pointers;
  8672. return 0 === b || a.pointers.length === b
  8673. },
  8674. process: function (a) {
  8675. var b = this.state,
  8676. c = a.eventType,
  8677. d = b & (ob | pb),
  8678. e = this.attrTest(a);
  8679. return d && (c & Ha || !e) ? b | sb : d || e ? c & Ga ? b | qb : b & ob ? b | pb : ob : tb
  8680. }
  8681. }), i(ba, aa, {
  8682. defaults: {
  8683. event: "pan",
  8684. threshold: 10,
  8685. pointers: 1,
  8686. direction: Pa
  8687. },
  8688. getTouchAction: function () {
  8689. var a = this.options.direction,
  8690. b = [];
  8691. return a & Na && b.push(lb), a & Oa && b.push(kb), b
  8692. },
  8693. directionTest: function (a) {
  8694. var b = this.options,
  8695. c = !0,
  8696. d = a.distance,
  8697. e = a.direction,
  8698. f = a.deltaX,
  8699. g = a.deltaY;
  8700. return e & b.direction || (b.direction & Na ? (e = 0 === f ? Ia : 0 > f ? Ja : Ka, c = f != this.pX, d = Math.abs(a.deltaX)) : (e = 0 === g ? Ia : 0 > g ? La : Ma, c = g != this.pY, d = Math.abs(a.deltaY))), a.direction = e, c && d > b.threshold && e & b.direction
  8701. },
  8702. attrTest: function (a) {
  8703. return aa.prototype.attrTest.call(this, a) && (this.state & ob || !(this.state & ob) && this.directionTest(a))
  8704. },
  8705. emit: function (a) {
  8706. this.pX = a.deltaX, this.pY = a.deltaY;
  8707. var b = $(a.direction);
  8708. b && (a.additionalEvent = this.options.event + b), this._super.emit.call(this, a)
  8709. }
  8710. }), i(ca, aa, {
  8711. defaults: {
  8712. event: "pinch",
  8713. threshold: 0,
  8714. pointers: 2
  8715. },
  8716. getTouchAction: function () {
  8717. return [jb]
  8718. },
  8719. attrTest: function (a) {
  8720. return this._super.attrTest.call(this, a) && (Math.abs(a.scale - 1) > this.options.threshold || this.state & ob)
  8721. },
  8722. emit: function (a) {
  8723. if (1 !== a.scale) {
  8724. var b = a.scale < 1 ? "in" : "out";
  8725. a.additionalEvent = this.options.event + b
  8726. }
  8727. this._super.emit.call(this, a)
  8728. }
  8729. }), i(da, Y, {
  8730. defaults: {
  8731. event: "press",
  8732. pointers: 1,
  8733. time: 251,
  8734. threshold: 9
  8735. },
  8736. getTouchAction: function () {
  8737. return [hb]
  8738. },
  8739. process: function (a) {
  8740. var b = this.options,
  8741. c = a.pointers.length === b.pointers,
  8742. d = a.distance < b.threshold,
  8743. f = a.deltaTime > b.time;
  8744. if (this._input = a, !d || !c || a.eventType & (Ga | Ha) && !f) this.reset();
  8745. else if (a.eventType & Ea) this.reset(), this._timer = e(function () {
  8746. this.state = rb, this.tryEmit()
  8747. }, b.time, this);
  8748. else if (a.eventType & Ga) return rb;
  8749. return tb
  8750. },
  8751. reset: function () {
  8752. clearTimeout(this._timer)
  8753. },
  8754. emit: function (a) {
  8755. this.state === rb && (a && a.eventType & Ga ? this.manager.emit(this.options.event + "up", a) : (this._input.timeStamp = ra(), this.manager.emit(this.options.event, this._input)))
  8756. }
  8757. }), i(ea, aa, {
  8758. defaults: {
  8759. event: "rotate",
  8760. threshold: 0,
  8761. pointers: 2
  8762. },
  8763. getTouchAction: function () {
  8764. return [jb]
  8765. },
  8766. attrTest: function (a) {
  8767. return this._super.attrTest.call(this, a) && (Math.abs(a.rotation) > this.options.threshold || this.state & ob)
  8768. }
  8769. }), i(fa, aa, {
  8770. defaults: {
  8771. event: "swipe",
  8772. threshold: 10,
  8773. velocity: .3,
  8774. direction: Na | Oa,
  8775. pointers: 1
  8776. },
  8777. getTouchAction: function () {
  8778. return ba.prototype.getTouchAction.call(this)
  8779. },
  8780. attrTest: function (a) {
  8781. var b, c = this.options.direction;
  8782. return c & (Na | Oa) ? b = a.overallVelocity : c & Na ? b = a.overallVelocityX : c & Oa && (b = a.overallVelocityY), this._super.attrTest.call(this, a) && c & a.offsetDirection && a.distance > this.options.threshold && a.maxPointers == this.options.pointers && qa(b) > this.options.velocity && a.eventType & Ga
  8783. },
  8784. emit: function (a) {
  8785. var b = $(a.offsetDirection);
  8786. b && this.manager.emit(this.options.event + b, a), this.manager.emit(this.options.event, a)
  8787. }
  8788. }), i(ga, Y, {
  8789. defaults: {
  8790. event: "tap",
  8791. pointers: 1,
  8792. taps: 1,
  8793. interval: 300,
  8794. time: 250,
  8795. threshold: 9,
  8796. posThreshold: 10
  8797. },
  8798. getTouchAction: function () {
  8799. return [ib]
  8800. },
  8801. process: function (a) {
  8802. var b = this.options,
  8803. c = a.pointers.length === b.pointers,
  8804. d = a.distance < b.threshold,
  8805. f = a.deltaTime < b.time;
  8806. if (this.reset(), a.eventType & Ea && 0 === this.count) return this.failTimeout();
  8807. if (d && f && c) {
  8808. if (a.eventType != Ga) return this.failTimeout();
  8809. var g = this.pTime ? a.timeStamp - this.pTime < b.interval : !0,
  8810. h = !this.pCenter || H(this.pCenter, a.center) < b.posThreshold;
  8811. this.pTime = a.timeStamp, this.pCenter = a.center, h && g ? this.count += 1 : this.count = 1, this._input = a;
  8812. var i = this.count % b.taps;
  8813. if (0 === i) return this.hasRequireFailures() ? (this._timer = e(function () {
  8814. this.state = rb, this.tryEmit()
  8815. }, b.interval, this), ob) : rb
  8816. }
  8817. return tb
  8818. },
  8819. failTimeout: function () {
  8820. return this._timer = e(function () {
  8821. this.state = tb
  8822. }, this.options.interval, this), tb
  8823. },
  8824. reset: function () {
  8825. clearTimeout(this._timer)
  8826. },
  8827. emit: function () {
  8828. this.state == rb && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input))
  8829. }
  8830. }), ha.VERSION = "2.0.7", ha.defaults = {
  8831. domEvents: !1,
  8832. touchAction: gb,
  8833. enable: !0,
  8834. inputTarget: null,
  8835. inputClass: null,
  8836. preset: [
  8837. [ea, {
  8838. enable: !1
  8839. }],
  8840. [ca, {
  8841. enable: !1
  8842. },
  8843. ["rotate"]
  8844. ],
  8845. [fa, {
  8846. direction: Na
  8847. }],
  8848. [ba, {
  8849. direction: Na
  8850. },
  8851. ["swipe"]
  8852. ],
  8853. [ga],
  8854. [ga, {
  8855. event: "doubletap",
  8856. taps: 2
  8857. },
  8858. ["tap"]
  8859. ],
  8860. [da]
  8861. ],
  8862. cssProps: {
  8863. userSelect: "none",
  8864. touchSelect: "none",
  8865. touchCallout: "none",
  8866. contentZooming: "none",
  8867. userDrag: "none",
  8868. tapHighlightColor: "rgba(0,0,0,0)"
  8869. }
  8870. };
  8871. var ub = 1,
  8872. vb = 2;
  8873. ia.prototype = {
  8874. set: function (a) {
  8875. return la(this.options, a), a.touchAction && this.touchAction.update(), a.inputTarget && (this.input.destroy(), this.input.target = a.inputTarget, this.input.init()), this
  8876. },
  8877. stop: function (a) {
  8878. this.session.stopped = a ? vb : ub
  8879. },
  8880. recognize: function (a) {
  8881. var b = this.session;
  8882. if (!b.stopped) {
  8883. this.touchAction.preventDefaults(a);
  8884. var c, d = this.recognizers,
  8885. e = b.curRecognizer;
  8886. (!e || e && e.state & rb) && (e = b.curRecognizer = null);
  8887. for (var f = 0; f < d.length;) c = d[f], b.stopped === vb || e && c != e && !c.canRecognizeWith(e) ? c.reset() : c.recognize(a), !e && c.state & (ob | pb | qb) && (e = b.curRecognizer = c), f++
  8888. }
  8889. },
  8890. get: function (a) {
  8891. if (a instanceof Y) return a;
  8892. for (var b = this.recognizers, c = 0; c < b.length; c++)
  8893. if (b[c].options.event == a) return b[c];
  8894. return null
  8895. },
  8896. add: function (a) {
  8897. if (f(a, "add", this)) return this;
  8898. var b = this.get(a.options.event);
  8899. return b && this.remove(b), this.recognizers.push(a), a.manager = this, this.touchAction.update(), a
  8900. },
  8901. remove: function (a) {
  8902. if (f(a, "remove", this)) return this;
  8903. if (a = this.get(a)) {
  8904. var b = this.recognizers,
  8905. c = r(b, a); - 1 !== c && (b.splice(c, 1), this.touchAction.update())
  8906. }
  8907. return this
  8908. },
  8909. on: function (a, b) {
  8910. if (a !== d && b !== d) {
  8911. var c = this.handlers;
  8912. return g(q(a), function (a) {
  8913. c[a] = c[a] || [], c[a].push(b)
  8914. }), this
  8915. }
  8916. },
  8917. off: function (a, b) {
  8918. if (a !== d) {
  8919. var c = this.handlers;
  8920. return g(q(a), function (a) {
  8921. b ? c[a] && c[a].splice(r(c[a], b), 1) : delete c[a]
  8922. }), this
  8923. }
  8924. },
  8925. emit: function (a, b) {
  8926. this.options.domEvents && ka(a, b);
  8927. var c = this.handlers[a] && this.handlers[a].slice();
  8928. if (c && c.length) {
  8929. b.type = a, b.preventDefault = function () {
  8930. b.srcEvent.preventDefault()
  8931. };
  8932. for (var d = 0; d < c.length;) c[d](b), d++
  8933. }
  8934. },
  8935. destroy: function () {
  8936. this.element && ja(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null
  8937. }
  8938. }, la(ha, {
  8939. INPUT_START: Ea,
  8940. INPUT_MOVE: Fa,
  8941. INPUT_END: Ga,
  8942. INPUT_CANCEL: Ha,
  8943. STATE_POSSIBLE: nb,
  8944. STATE_BEGAN: ob,
  8945. STATE_CHANGED: pb,
  8946. STATE_ENDED: qb,
  8947. STATE_RECOGNIZED: rb,
  8948. STATE_CANCELLED: sb,
  8949. STATE_FAILED: tb,
  8950. DIRECTION_NONE: Ia,
  8951. DIRECTION_LEFT: Ja,
  8952. DIRECTION_RIGHT: Ka,
  8953. DIRECTION_UP: La,
  8954. DIRECTION_DOWN: Ma,
  8955. DIRECTION_HORIZONTAL: Na,
  8956. DIRECTION_VERTICAL: Oa,
  8957. DIRECTION_ALL: Pa,
  8958. Manager: ia,
  8959. Input: x,
  8960. TouchAction: V,
  8961. TouchInput: P,
  8962. MouseInput: L,
  8963. PointerEventInput: M,
  8964. TouchMouseInput: R,
  8965. SingleTouchInput: N,
  8966. Recognizer: Y,
  8967. AttrRecognizer: aa,
  8968. Tap: ga,
  8969. Pan: ba,
  8970. Swipe: fa,
  8971. Pinch: ca,
  8972. Rotate: ea,
  8973. Press: da,
  8974. on: m,
  8975. off: n,
  8976. each: g,
  8977. merge: ta,
  8978. extend: sa,
  8979. assign: la,
  8980. inherit: i,
  8981. bindFn: j,
  8982. prefixed: u
  8983. });
  8984. var wb = "undefined" != typeof a ? a : "undefined" != typeof self ? self : {};
  8985. wb.Hammer = ha, "function" == typeof define && define.amd ? define("Hammer", [], function () {
  8986. return ha
  8987. }) : "undefined" != typeof module && module.exports ? module.exports = ha : a[c] = ha
  8988. }(window, document, "Hammer");
  8989. define("Core/KnockoutHammerBinding", ["KnockoutES5", "Hammer"], function (Knockout, Hammer) {
  8990. "use strict";
  8991. var KnockoutHammerBinding = {
  8992. register: function (Knockout) {
  8993. Knockout.bindingHandlers.swipeLeft = {
  8994. init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {
  8995. var f = Knockout.unwrap(valueAccessor());
  8996. new Hammer(element).on("swipeleft", function (e) {
  8997. var viewModel = bindingContext.$data;
  8998. f.apply(viewModel, arguments)
  8999. })
  9000. }
  9001. };
  9002. Knockout.bindingHandlers.swipeRight = {
  9003. init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {
  9004. var f = Knockout.unwrap(valueAccessor());
  9005. new Hammer(element).on("swiperight", function (e) {
  9006. var viewModel = bindingContext.$data;
  9007. f.apply(viewModel, arguments)
  9008. })
  9009. }
  9010. }
  9011. }
  9012. };
  9013. return KnockoutHammerBinding
  9014. });
  9015. define("Core/registerKnockoutBindings", ["Cesium/Widgets/SvgPathBindingHandler", "KnockoutES5", "Core/KnockoutMarkdownBinding", "Core/KnockoutHammerBinding"], function (SvgPathBindingHandler, Knockout, KnockoutMarkdownBinding, KnockoutHammerBinding) {
  9016. "use strict";
  9017. var registerKnockoutBindings = function () {
  9018. SvgPathBindingHandler.register(Knockout);
  9019. KnockoutMarkdownBinding.register(Knockout);
  9020. KnockoutHammerBinding.register(Knockout);
  9021. Knockout.bindingHandlers.embeddedComponent = {
  9022. init: function (element, valueAccessor, allBindings, viewModel, bindingContext) {
  9023. var component = Knockout.unwrap(valueAccessor());
  9024. component.show(element);
  9025. return {
  9026. controlsDescendantBindings: true
  9027. }
  9028. },
  9029. update: function (element, valueAccessor, allBindings, viewModel, bindingContext) {}
  9030. }
  9031. };
  9032. return registerKnockoutBindings
  9033. });
  9034. define("Core/createFragmentFromTemplate", [], function () {
  9035. "use strict";
  9036. var createFragmentFromTemplate = function (htmlString) {
  9037. var holder = document.createElement("div");
  9038. holder.innerHTML = htmlString;
  9039. var fragment = document.createDocumentFragment();
  9040. while (holder.firstChild) {
  9041. fragment.appendChild(holder.firstChild)
  9042. }
  9043. return fragment
  9044. };
  9045. return createFragmentFromTemplate
  9046. });
  9047. define("Core/loadView", ["Cesium/Widgets/getElement", "KnockoutES5", "Core/createFragmentFromTemplate"], function (getElement, Knockout, createFragmentFromTemplate) {
  9048. "use strict";
  9049. var loadView = function (htmlString, container, viewModel) {
  9050. container = getElement(container);
  9051. var fragment = createFragmentFromTemplate(htmlString);
  9052. var nodes = [];
  9053. var i;
  9054. for (i = 0; i < fragment.childNodes.length; ++i) {
  9055. nodes.push(fragment.childNodes[i])
  9056. }
  9057. container.appendChild(fragment);
  9058. for (i = 0; i < nodes.length; ++i) {
  9059. var node = nodes[i];
  9060. if (node.nodeType === 1 || node.nodeType === 8) {
  9061. Knockout.applyBindings(viewModel, node)
  9062. }
  9063. }
  9064. return nodes
  9065. };
  9066. return loadView
  9067. });
  9068. ! function (t, e, i) {
  9069. var n = t.J,
  9070. o = {};
  9071. o.version = "0.7.7", "object" == typeof module && "object" == typeof module.exports ? module.exports = o : "function" == typeof define && define.amd && define("leaflet", o), o.noConflict = function () {
  9072. return t.J = n, this
  9073. }, t.J = o, o.Util = {
  9074. extend: function (t) {
  9075. var e, i, n, o, s = Array.prototype.slice.call(arguments, 1);
  9076. for (i = 0, n = s.length; n > i; i++) {
  9077. o = s[i] || {};
  9078. for (e in o) o.hasOwnProperty(e) && (t[e] = o[e])
  9079. }
  9080. return t
  9081. },
  9082. bind: function (t, e) {
  9083. var i = arguments.length > 2 ? Array.prototype.slice.call(arguments, 2) : null;
  9084. return function () {
  9085. return t.apply(e, i || arguments)
  9086. }
  9087. },
  9088. stamp: function () {
  9089. var t = 0,
  9090. e = "_leaflet_id";
  9091. return function (i) {
  9092. return i[e] = i[e] || ++t, i[e]
  9093. }
  9094. }(),
  9095. invokeEach: function (t, e, i) {
  9096. var n, o;
  9097. if ("object" == typeof t) {
  9098. o = Array.prototype.slice.call(arguments, 3);
  9099. for (n in t) e.apply(i, [n, t[n]].concat(o));
  9100. return !0
  9101. }
  9102. return !1
  9103. },
  9104. limitExecByInterval: function (t, e, i) {
  9105. var n, o;
  9106. return function s() {
  9107. var a = arguments;
  9108. return n ? void(o = !0) : (n = !0, setTimeout(function () {
  9109. n = !1, o && (s.apply(i, a), o = !1)
  9110. }, e), void t.apply(i, a))
  9111. }
  9112. },
  9113. falseFn: function () {
  9114. return !1
  9115. },
  9116. formatNum: function (t, e) {
  9117. var i = Math.pow(10, e || 5);
  9118. return Math.round(t * i) / i
  9119. },
  9120. trim: function (t) {
  9121. return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "")
  9122. },
  9123. splitWords: function (t) {
  9124. return o.Util.trim(t).split(/\s+/)
  9125. },
  9126. setOptions: function (t, e) {
  9127. return t.options = o.extend({}, t.options, e), t.options
  9128. },
  9129. getParamString: function (t, e, i) {
  9130. var n = [];
  9131. for (var o in t) n.push(encodeURIComponent(i ? o.toUpperCase() : o) + "=" + encodeURIComponent(t[o]));
  9132. return (e && -1 !== e.indexOf("?") ? "&" : "?") + n.join("&")
  9133. },
  9134. template: function (t, e) {
  9135. return t.replace(/\{ *([\w_]+) *\}/g, function (t, n) {
  9136. var o = e[n];
  9137. if (o === i) throw new Error("No value provided for variable " + t);
  9138. return "function" == typeof o && (o = o(e)), o
  9139. })
  9140. },
  9141. isArray: Array.isArray || function (t) {
  9142. return "[object Array]" === Object.prototype.toString.call(t)
  9143. },
  9144. emptyImageUrl: "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="
  9145. },
  9146. function () {
  9147. function e(e) {
  9148. var i, n, o = ["webkit", "moz", "o", "ms"];
  9149. for (i = 0; i < o.length && !n; i++) n = t[o[i] + e];
  9150. return n
  9151. }
  9152. function i(e) {
  9153. var i = +new Date,
  9154. o = Math.max(0, 16 - (i - n));
  9155. return n = i + o, t.setTimeout(e, o)
  9156. }
  9157. var n = 0,
  9158. s = t.requestAnimationFrame || e("RequestAnimationFrame") || i,
  9159. a = t.cancelAnimationFrame || e("CancelAnimationFrame") || e("CancelRequestAnimationFrame") || function (e) {
  9160. t.clearTimeout(e)
  9161. };
  9162. o.Util.requestAnimFrame = function (e, n, a, r) {
  9163. return e = o.bind(e, n), a && s === i ? void e() : s.call(t, e, r)
  9164. }, o.Util.cancelAnimFrame = function (e) {
  9165. e && a.call(t, e)
  9166. }
  9167. }(), o.extend = o.Util.extend, o.bind = o.Util.bind, o.stamp = o.Util.stamp, o.setOptions = o.Util.setOptions, o.Class = function () {}, o.Class.extend = function (t) {
  9168. var e = function () {
  9169. this.initialize && this.initialize.apply(this, arguments), this._initHooks && this.callInitHooks()
  9170. },
  9171. i = function () {};
  9172. i.prototype = this.prototype;
  9173. var n = new i;
  9174. n.constructor = e, e.prototype = n;
  9175. for (var s in this) this.hasOwnProperty(s) && "prototype" !== s && (e[s] = this[s]);
  9176. t.statics && (o.extend(e, t.statics), delete t.statics), t.includes && (o.Util.extend.apply(null, [n].concat(t.includes)), delete t.includes), t.options && n.options && (t.options = o.extend({}, n.options, t.options)), o.extend(n, t), n._initHooks = [];
  9177. var a = this;
  9178. return e.__super__ = a.prototype, n.callInitHooks = function () {
  9179. if (!this._initHooksCalled) {
  9180. a.prototype.callInitHooks && a.prototype.callInitHooks.call(this), this._initHooksCalled = !0;
  9181. for (var t = 0, e = n._initHooks.length; e > t; t++) n._initHooks[t].call(this)
  9182. }
  9183. }, e
  9184. }, o.Class.include = function (t) {
  9185. o.extend(this.prototype, t)
  9186. }, o.Class.mergeOptions = function (t) {
  9187. o.extend(this.prototype.options, t)
  9188. }, o.Class.addInitHook = function (t) {
  9189. var e = Array.prototype.slice.call(arguments, 1),
  9190. i = "function" == typeof t ? t : function () {
  9191. this[t].apply(this, e)
  9192. };
  9193. this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(i)
  9194. };
  9195. var s = "_leaflet_events";
  9196. o.Mixin = {}, o.Mixin.Events = {
  9197. addEventListener: function (t, e, i) {
  9198. if (o.Util.invokeEach(t, this.addEventListener, this, e, i)) return this;
  9199. var n, a, r, h, l, u, c, d = this[s] = this[s] || {},
  9200. p = i && i !== this && o.stamp(i);
  9201. for (t = o.Util.splitWords(t), n = 0, a = t.length; a > n; n++) r = {
  9202. action: e,
  9203. context: i || this
  9204. }, h = t[n], p ? (l = h + "_idx", u = l + "_len", c = d[l] = d[l] || {}, c[p] || (c[p] = [], d[u] = (d[u] || 0) + 1), c[p].push(r)) : (d[h] = d[h] || [], d[h].push(r));
  9205. return this
  9206. },
  9207. hasEventListeners: function (t) {
  9208. var e = this[s];
  9209. return !!e && (t in e && e[t].length > 0 || t + "_idx" in e && e[t + "_idx_len"] > 0)
  9210. },
  9211. removeEventListener: function (t, e, i) {
  9212. if (!this[s]) return this;
  9213. if (!t) return this.clearAllEventListeners();
  9214. if (o.Util.invokeEach(t, this.removeEventListener, this, e, i)) return this;
  9215. var n, a, r, h, l, u, c, d, p, _ = this[s],
  9216. m = i && i !== this && o.stamp(i);
  9217. for (t = o.Util.splitWords(t), n = 0, a = t.length; a > n; n++)
  9218. if (r = t[n], u = r + "_idx", c = u + "_len", d = _[u], e) {
  9219. if (h = m && d ? d[m] : _[r]) {
  9220. for (l = h.length - 1; l >= 0; l--) h[l].action !== e || i && h[l].context !== i || (p = h.splice(l, 1), p[0].action = o.Util.falseFn);
  9221. i && d && 0 === h.length && (delete d[m], _[c]--)
  9222. }
  9223. } else delete _[r], delete _[u], delete _[c];
  9224. return this
  9225. },
  9226. clearAllEventListeners: function () {
  9227. return delete this[s], this
  9228. },
  9229. fireEvent: function (t, e) {
  9230. if (!this.hasEventListeners(t)) return this;
  9231. var i, n, a, r, h, l = o.Util.extend({}, e, {
  9232. type: t,
  9233. target: this
  9234. }),
  9235. u = this[s];
  9236. if (u[t])
  9237. for (i = u[t].slice(), n = 0, a = i.length; a > n; n++) i[n].action.call(i[n].context, l);
  9238. r = u[t + "_idx"];
  9239. for (h in r)
  9240. if (i = r[h].slice())
  9241. for (n = 0, a = i.length; a > n; n++) i[n].action.call(i[n].context, l);
  9242. return this
  9243. },
  9244. addOneTimeEventListener: function (t, e, i) {
  9245. if (o.Util.invokeEach(t, this.addOneTimeEventListener, this, e, i)) return this;
  9246. var n = o.bind(function () {
  9247. this.removeEventListener(t, e, i).removeEventListener(t, n, i)
  9248. }, this);
  9249. return this.addEventListener(t, e, i).addEventListener(t, n, i)
  9250. }
  9251. }, o.Mixin.Events.on = o.Mixin.Events.addEventListener, o.Mixin.Events.off = o.Mixin.Events.removeEventListener, o.Mixin.Events.once = o.Mixin.Events.addOneTimeEventListener, o.Mixin.Events.fire = o.Mixin.Events.fireEvent,
  9252. function () {
  9253. var n = "ActiveXObject" in t,
  9254. s = n && !e.addEventListener,
  9255. a = navigator.userAgent.toLowerCase(),
  9256. r = -1 !== a.indexOf("webkit"),
  9257. h = -1 !== a.indexOf("chrome"),
  9258. l = -1 !== a.indexOf("phantom"),
  9259. u = -1 !== a.indexOf("android"),
  9260. c = -1 !== a.search("android [23]"),
  9261. d = -1 !== a.indexOf("gecko"),
  9262. p = typeof orientation != i + "",
  9263. _ = !t.PointerEvent && t.MSPointerEvent,
  9264. m = t.PointerEvent && t.navigator.pointerEnabled || _,
  9265. f = "devicePixelRatio" in t && t.devicePixelRatio > 1 || "matchMedia" in t && t.matchMedia("(min-resolution:144dpi)") && t.matchMedia("(min-resolution:144dpi)").matches,
  9266. g = e.documentElement,
  9267. v = n && "transition" in g.style,
  9268. y = "WebKitCSSMatrix" in t && "m11" in new t.WebKitCSSMatrix && !c,
  9269. P = "MozPerspective" in g.style,
  9270. L = "OTransition" in g.style,
  9271. x = !t.L_DISABLE_3D && (v || y || P || L) && !l,
  9272. w = !t.L_NO_TOUCH && !l && (m || "ontouchstart" in t || t.DocumentTouch && e instanceof t.DocumentTouch);
  9273. o.Browser = {
  9274. ie: n,
  9275. ielt9: s,
  9276. webkit: r,
  9277. gecko: d && !r && !t.opera && !n,
  9278. android: u,
  9279. android23: c,
  9280. chrome: h,
  9281. ie3d: v,
  9282. webkit3d: y,
  9283. gecko3d: P,
  9284. opera3d: L,
  9285. any3d: x,
  9286. mobile: p,
  9287. mobileWebkit: p && r,
  9288. mobileWebkit3d: p && y,
  9289. mobileOpera: p && t.opera,
  9290. touch: w,
  9291. msPointer: _,
  9292. pointer: m,
  9293. retina: f
  9294. }
  9295. }(), o.Point = function (t, e, i) {
  9296. this.x = i ? Math.round(t) : t, this.y = i ? Math.round(e) : e
  9297. }, o.Point.prototype = {
  9298. clone: function () {
  9299. return new o.Point(this.x, this.y)
  9300. },
  9301. add: function (t) {
  9302. return this.clone()._add(o.point(t))
  9303. },
  9304. _add: function (t) {
  9305. return this.x += t.x, this.y += t.y, this
  9306. },
  9307. subtract: function (t) {
  9308. return this.clone()._subtract(o.point(t))
  9309. },
  9310. _subtract: function (t) {
  9311. return this.x -= t.x, this.y -= t.y, this
  9312. },
  9313. divideBy: function (t) {
  9314. return this.clone()._divideBy(t)
  9315. },
  9316. _divideBy: function (t) {
  9317. return this.x /= t, this.y /= t, this
  9318. },
  9319. multiplyBy: function (t) {
  9320. return this.clone()._multiplyBy(t)
  9321. },
  9322. _multiplyBy: function (t) {
  9323. return this.x *= t, this.y *= t, this
  9324. },
  9325. round: function () {
  9326. return this.clone()._round()
  9327. },
  9328. _round: function () {
  9329. return this.x = Math.round(this.x), this.y = Math.round(this.y), this
  9330. },
  9331. floor: function () {
  9332. return this.clone()._floor()
  9333. },
  9334. _floor: function () {
  9335. return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this
  9336. },
  9337. distanceTo: function (t) {
  9338. t = o.point(t);
  9339. var e = t.x - this.x,
  9340. i = t.y - this.y;
  9341. return Math.sqrt(e * e + i * i)
  9342. },
  9343. equals: function (t) {
  9344. return t = o.point(t), t.x === this.x && t.y === this.y
  9345. },
  9346. contains: function (t) {
  9347. return t = o.point(t), Math.abs(t.x) <= Math.abs(this.x) && Math.abs(t.y) <= Math.abs(this.y)
  9348. },
  9349. toString: function () {
  9350. return "Point(" + o.Util.formatNum(this.x) + ", " + o.Util.formatNum(this.y) + ")"
  9351. }
  9352. }, o.point = function (t, e, n) {
  9353. return t instanceof o.Point ? t : o.Util.isArray(t) ? new o.Point(t[0], t[1]) : t === i || null === t ? t : new o.Point(t, e, n)
  9354. }, o.Bounds = function (t, e) {
  9355. if (t)
  9356. for (var i = e ? [t, e] : t, n = 0, o = i.length; o > n; n++) this.extend(i[n])
  9357. }, o.Bounds.prototype = {
  9358. extend: function (t) {
  9359. return t = o.point(t), this.min || this.max ? (this.min.x = Math.min(t.x, this.min.x), this.max.x = Math.max(t.x, this.max.x), this.min.y = Math.min(t.y, this.min.y), this.max.y = Math.max(t.y, this.max.y)) : (this.min = t.clone(), this.max = t.clone()), this
  9360. },
  9361. getCenter: function (t) {
  9362. return new o.Point((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, t)
  9363. },
  9364. getBottomLeft: function () {
  9365. return new o.Point(this.min.x, this.max.y)
  9366. },
  9367. getTopRight: function () {
  9368. return new o.Point(this.max.x, this.min.y)
  9369. },
  9370. getSize: function () {
  9371. return this.max.subtract(this.min)
  9372. },
  9373. contains: function (t) {
  9374. var e, i;
  9375. return t = "number" == typeof t[0] || t instanceof o.Point ? o.point(t) : o.bounds(t), t instanceof o.Bounds ? (e = t.min, i = t.max) : e = i = t, e.x >= this.min.x && i.x <= this.max.x && e.y >= this.min.y && i.y <= this.max.y
  9376. },
  9377. intersects: function (t) {
  9378. t = o.bounds(t);
  9379. var e = this.min,
  9380. i = this.max,
  9381. n = t.min,
  9382. s = t.max,
  9383. a = s.x >= e.x && n.x <= i.x,
  9384. r = s.y >= e.y && n.y <= i.y;
  9385. return a && r
  9386. },
  9387. isValid: function () {
  9388. return !(!this.min || !this.max)
  9389. }
  9390. }, o.bounds = function (t, e) {
  9391. return !t || t instanceof o.Bounds ? t : new o.Bounds(t, e)
  9392. }, o.Transformation = function (t, e, i, n) {
  9393. this._a = t, this._b = e, this._c = i, this._d = n
  9394. }, o.Transformation.prototype = {
  9395. transform: function (t, e) {
  9396. return this._transform(t.clone(), e)
  9397. },
  9398. _transform: function (t, e) {
  9399. return e = e || 1, t.x = e * (this._a * t.x + this._b), t.y = e * (this._c * t.y + this._d), t
  9400. },
  9401. untransform: function (t, e) {
  9402. return e = e || 1, new o.Point((t.x / e - this._b) / this._a, (t.y / e - this._d) / this._c)
  9403. }
  9404. }, o.DomUtil = {
  9405. get: function (t) {
  9406. return "string" == typeof t ? e.getElementById(t) : t
  9407. },
  9408. getStyle: function (t, i) {
  9409. var n = t.style[i];
  9410. if (!n && t.currentStyle && (n = t.currentStyle[i]), (!n || "auto" === n) && e.defaultView) {
  9411. var o = e.defaultView.getComputedStyle(t, null);
  9412. n = o ? o[i] : null
  9413. }
  9414. return "auto" === n ? null : n
  9415. },
  9416. getViewportOffset: function (t) {
  9417. var i, n = 0,
  9418. s = 0,
  9419. a = t,
  9420. r = e.body,
  9421. h = e.documentElement;
  9422. do {
  9423. if (n += a.offsetTop || 0, s += a.offsetLeft || 0, n += parseInt(o.DomUtil.getStyle(a, "borderTopWidth"), 10) || 0, s += parseInt(o.DomUtil.getStyle(a, "borderLeftWidth"), 10) || 0, i = o.DomUtil.getStyle(a, "position"), a.offsetParent === r && "absolute" === i) break;
  9424. if ("fixed" === i) {
  9425. n += r.scrollTop || h.scrollTop || 0, s += r.scrollLeft || h.scrollLeft || 0;
  9426. break
  9427. }
  9428. if ("relative" === i && !a.offsetLeft) {
  9429. var l = o.DomUtil.getStyle(a, "width"),
  9430. u = o.DomUtil.getStyle(a, "max-width"),
  9431. c = a.getBoundingClientRect();
  9432. ("none" !== l || "none" !== u) && (s += c.left + a.clientLeft), n += c.top + (r.scrollTop || h.scrollTop || 0);
  9433. break
  9434. }
  9435. a = a.offsetParent
  9436. } while (a);
  9437. a = t;
  9438. do {
  9439. if (a === r) break;
  9440. n -= a.scrollTop || 0, s -= a.scrollLeft || 0, a = a.parentNode
  9441. } while (a);
  9442. return new o.Point(s, n)
  9443. },
  9444. documentIsLtr: function () {
  9445. return o.DomUtil._docIsLtrCached || (o.DomUtil._docIsLtrCached = !0, o.DomUtil._docIsLtr = "ltr" === o.DomUtil.getStyle(e.body, "direction")), o.DomUtil._docIsLtr
  9446. },
  9447. create: function (t, i, n) {
  9448. var o = e.createElement(t);
  9449. return o.className = i, n && n.appendChild(o), o
  9450. },
  9451. hasClass: function (t, e) {
  9452. if (t.classList !== i) return t.classList.contains(e);
  9453. var n = o.DomUtil._getClass(t);
  9454. return n.length > 0 && new RegExp("(^|\\s)" + e + "(\\s|$)").test(n)
  9455. },
  9456. addClass: function (t, e) {
  9457. if (t.classList !== i)
  9458. for (var n = o.Util.splitWords(e), s = 0, a = n.length; a > s; s++) t.classList.add(n[s]);
  9459. else if (!o.DomUtil.hasClass(t, e)) {
  9460. var r = o.DomUtil._getClass(t);
  9461. o.DomUtil._setClass(t, (r ? r + " " : "") + e)
  9462. }
  9463. },
  9464. removeClass: function (t, e) {
  9465. t.classList !== i ? t.classList.remove(e) : o.DomUtil._setClass(t, o.Util.trim((" " + o.DomUtil._getClass(t) + " ").replace(" " + e + " ", " ")))
  9466. },
  9467. _setClass: function (t, e) {
  9468. t.className.baseVal === i ? t.className = e : t.className.baseVal = e
  9469. },
  9470. _getClass: function (t) {
  9471. return t.className.baseVal === i ? t.className : t.className.baseVal
  9472. },
  9473. setOpacity: function (t, e) {
  9474. if ("opacity" in t.style) t.style.opacity = e;
  9475. else if ("filter" in t.style) {
  9476. var i = !1,
  9477. n = "DXImageTransform.Microsoft.Alpha";
  9478. try {
  9479. i = t.filters.item(n)
  9480. } catch (o) {
  9481. if (1 === e) return
  9482. }
  9483. e = Math.round(100 * e), i ? (i.Enabled = 100 !== e, i.Opacity = e) : t.style.filter += " progid:" + n + "(opacity=" + e + ")"
  9484. }
  9485. },
  9486. testProp: function (t) {
  9487. for (var i = e.documentElement.style, n = 0; n < t.length; n++)
  9488. if (t[n] in i) return t[n];
  9489. return !1
  9490. },
  9491. getTranslateString: function (t) {
  9492. var e = o.Browser.webkit3d,
  9493. i = "translate" + (e ? "3d" : "") + "(",
  9494. n = (e ? ",0" : "") + ")";
  9495. return i + t.x + "px," + t.y + "px" + n
  9496. },
  9497. getScaleString: function (t, e) {
  9498. var i = o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1 * t))),
  9499. n = " scale(" + t + ") ";
  9500. return i + n
  9501. },
  9502. setPosition: function (t, e, i) {
  9503. t._leaflet_pos = e, !i && o.Browser.any3d ? t.style[o.DomUtil.TRANSFORM] = o.DomUtil.getTranslateString(e) : (t.style.left = e.x + "px", t.style.top = e.y + "px")
  9504. },
  9505. getPosition: function (t) {
  9506. return t._leaflet_pos
  9507. }
  9508. }, o.DomUtil.TRANSFORM = o.DomUtil.testProp(["transform", "WebkitTransform", "OTransform", "MozTransform", "msTransform"]), o.DomUtil.TRANSITION = o.DomUtil.testProp(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]), o.DomUtil.TRANSITION_END = "webkitTransition" === o.DomUtil.TRANSITION || "OTransition" === o.DomUtil.TRANSITION ? o.DomUtil.TRANSITION + "End" : "transitionend",
  9509. function () {
  9510. if ("onselectstart" in e) o.extend(o.DomUtil, {
  9511. disableTextSelection: function () {
  9512. o.DomEvent.on(t, "selectstart", o.DomEvent.preventDefault)
  9513. },
  9514. enableTextSelection: function () {
  9515. o.DomEvent.off(t, "selectstart", o.DomEvent.preventDefault)
  9516. }
  9517. });
  9518. else {
  9519. var i = o.DomUtil.testProp(["userSelect", "WebkitUserSelect", "OUserSelect", "MozUserSelect", "msUserSelect"]);
  9520. o.extend(o.DomUtil, {
  9521. disableTextSelection: function () {
  9522. if (i) {
  9523. var t = e.documentElement.style;
  9524. this._userSelect = t[i], t[i] = "none"
  9525. }
  9526. },
  9527. enableTextSelection: function () {
  9528. i && (e.documentElement.style[i] = this._userSelect, delete this._userSelect)
  9529. }
  9530. })
  9531. }
  9532. o.extend(o.DomUtil, {
  9533. disableImageDrag: function () {
  9534. o.DomEvent.on(t, "dragstart", o.DomEvent.preventDefault)
  9535. },
  9536. enableImageDrag: function () {
  9537. o.DomEvent.off(t, "dragstart", o.DomEvent.preventDefault)
  9538. }
  9539. })
  9540. }(), o.LatLng = function (t, e, n) {
  9541. if (t = parseFloat(t), e = parseFloat(e), isNaN(t) || isNaN(e)) throw new Error("Invalid LatLng object: (" + t + ", " + e + ")");
  9542. this.lat = t, this.lng = e, n !== i && (this.alt = parseFloat(n))
  9543. }, o.extend(o.LatLng, {
  9544. DEG_TO_RAD: Math.PI / 180,
  9545. RAD_TO_DEG: 180 / Math.PI,
  9546. MAX_MARGIN: 1e-9
  9547. }), o.LatLng.prototype = {
  9548. equals: function (t) {
  9549. if (!t) return !1;
  9550. t = o.latLng(t);
  9551. var e = Math.max(Math.abs(this.lat - t.lat), Math.abs(this.lng - t.lng));
  9552. return e <= o.LatLng.MAX_MARGIN
  9553. },
  9554. toString: function (t) {
  9555. return "LatLng(" + o.Util.formatNum(this.lat, t) + ", " + o.Util.formatNum(this.lng, t) + ")"
  9556. },
  9557. distanceTo: function (t) {
  9558. t = o.latLng(t);
  9559. var e = 6378137,
  9560. i = o.LatLng.DEG_TO_RAD,
  9561. n = (t.lat - this.lat) * i,
  9562. s = (t.lng - this.lng) * i,
  9563. a = this.lat * i,
  9564. r = t.lat * i,
  9565. h = Math.sin(n / 2),
  9566. l = Math.sin(s / 2),
  9567. u = h * h + l * l * Math.cos(a) * Math.cos(r);
  9568. return 2 * e * Math.atan2(Math.sqrt(u), Math.sqrt(1 - u))
  9569. },
  9570. wrap: function (t, e) {
  9571. var i = this.lng;
  9572. return t = t || -180, e = e || 180, i = (i + e) % (e - t) + (t > i || i === e ? e : t), new o.LatLng(this.lat, i)
  9573. }
  9574. }, o.latLng = function (t, e) {
  9575. return t instanceof o.LatLng ? t : o.Util.isArray(t) ? "number" == typeof t[0] || "string" == typeof t[0] ? new o.LatLng(t[0], t[1], t[2]) : null : t === i || null === t ? t : "object" == typeof t && "lat" in t ? new o.LatLng(t.lat, "lng" in t ? t.lng : t.lon) : e === i ? null : new o.LatLng(t, e)
  9576. }, o.LatLngBounds = function (t, e) {
  9577. if (t)
  9578. for (var i = e ? [t, e] : t, n = 0, o = i.length; o > n; n++) this.extend(i[n])
  9579. }, o.LatLngBounds.prototype = {
  9580. extend: function (t) {
  9581. if (!t) return this;
  9582. var e = o.latLng(t);
  9583. return t = null !== e ? e : o.latLngBounds(t), t instanceof o.LatLng ? this._southWest || this._northEast ? (this._southWest.lat = Math.min(t.lat, this._southWest.lat), this._southWest.lng = Math.min(t.lng, this._southWest.lng), this._northEast.lat = Math.max(t.lat, this._northEast.lat), this._northEast.lng = Math.max(t.lng, this._northEast.lng)) : (this._southWest = new o.LatLng(t.lat, t.lng), this._northEast = new o.LatLng(t.lat, t.lng)) : t instanceof o.LatLngBounds && (this.extend(t._southWest), this.extend(t._northEast)), this
  9584. },
  9585. pad: function (t) {
  9586. var e = this._southWest,
  9587. i = this._northEast,
  9588. n = Math.abs(e.lat - i.lat) * t,
  9589. s = Math.abs(e.lng - i.lng) * t;
  9590. return new o.LatLngBounds(new o.LatLng(e.lat - n, e.lng - s), new o.LatLng(i.lat + n, i.lng + s))
  9591. },
  9592. getCenter: function () {
  9593. return new o.LatLng((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2)
  9594. },
  9595. getSouthWest: function () {
  9596. return this._southWest
  9597. },
  9598. getNorthEast: function () {
  9599. return this._northEast
  9600. },
  9601. getNorthWest: function () {
  9602. return new o.LatLng(this.getNorth(), this.getWest())
  9603. },
  9604. getSouthEast: function () {
  9605. return new o.LatLng(this.getSouth(), this.getEast())
  9606. },
  9607. getWest: function () {
  9608. return this._southWest.lng
  9609. },
  9610. getSouth: function () {
  9611. return this._southWest.lat
  9612. },
  9613. getEast: function () {
  9614. return this._northEast.lng
  9615. },
  9616. getNorth: function () {
  9617. return this._northEast.lat
  9618. },
  9619. contains: function (t) {
  9620. t = "number" == typeof t[0] || t instanceof o.LatLng ? o.latLng(t) : o.latLngBounds(t);
  9621. var e, i, n = this._southWest,
  9622. s = this._northEast;
  9623. return t instanceof o.LatLngBounds ? (e = t.getSouthWest(), i = t.getNorthEast()) : e = i = t, e.lat >= n.lat && i.lat <= s.lat && e.lng >= n.lng && i.lng <= s.lng
  9624. },
  9625. intersects: function (t) {
  9626. t = o.latLngBounds(t);
  9627. var e = this._southWest,
  9628. i = this._northEast,
  9629. n = t.getSouthWest(),
  9630. s = t.getNorthEast(),
  9631. a = s.lat >= e.lat && n.lat <= i.lat,
  9632. r = s.lng >= e.lng && n.lng <= i.lng;
  9633. return a && r
  9634. },
  9635. toBBoxString: function () {
  9636. return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(",")
  9637. },
  9638. equals: function (t) {
  9639. return t ? (t = o.latLngBounds(t), this._southWest.equals(t.getSouthWest()) && this._northEast.equals(t.getNorthEast())) : !1
  9640. },
  9641. isValid: function () {
  9642. return !(!this._southWest || !this._northEast)
  9643. }
  9644. }, o.latLngBounds = function (t, e) {
  9645. return !t || t instanceof o.LatLngBounds ? t : new o.LatLngBounds(t, e)
  9646. }, o.Projection = {}, o.Projection.SphericalMercator = {
  9647. MAX_LATITUDE: 85.0511287798,
  9648. project: function (t) {
  9649. var e = o.LatLng.DEG_TO_RAD,
  9650. i = this.MAX_LATITUDE,
  9651. n = Math.max(Math.min(i, t.lat), -i),
  9652. s = t.lng * e,
  9653. a = n * e;
  9654. return a = Math.log(Math.tan(Math.PI / 4 + a / 2)), new o.Point(s, a)
  9655. },
  9656. unproject: function (t) {
  9657. var e = o.LatLng.RAD_TO_DEG,
  9658. i = t.x * e,
  9659. n = (2 * Math.atan(Math.exp(t.y)) - Math.PI / 2) * e;
  9660. return new o.LatLng(n, i)
  9661. }
  9662. }, o.Projection.LonLat = {
  9663. project: function (t) {
  9664. return new o.Point(t.lng, t.lat)
  9665. },
  9666. unproject: function (t) {
  9667. return new o.LatLng(t.y, t.x)
  9668. }
  9669. }, o.CRS = {
  9670. latLngToPoint: function (t, e) {
  9671. var i = this.projection.project(t),
  9672. n = this.scale(e);
  9673. return this.transformation._transform(i, n)
  9674. },
  9675. pointToLatLng: function (t, e) {
  9676. var i = this.scale(e),
  9677. n = this.transformation.untransform(t, i);
  9678. return this.projection.unproject(n)
  9679. },
  9680. project: function (t) {
  9681. return this.projection.project(t)
  9682. },
  9683. scale: function (t) {
  9684. return 256 * Math.pow(2, t)
  9685. },
  9686. getSize: function (t) {
  9687. var e = this.scale(t);
  9688. return o.point(e, e)
  9689. }
  9690. }, o.CRS.Simple = o.extend({}, o.CRS, {
  9691. projection: o.Projection.LonLat,
  9692. transformation: new o.Transformation(1, 0, -1, 0),
  9693. scale: function (t) {
  9694. return Math.pow(2, t)
  9695. }
  9696. }), o.CRS.EPSG3857 = o.extend({}, o.CRS, {
  9697. code: "EPSG:3857",
  9698. projection: o.Projection.SphericalMercator,
  9699. transformation: new o.Transformation(.5 / Math.PI, .5, -.5 / Math.PI, .5),
  9700. project: function (t) {
  9701. var e = this.projection.project(t),
  9702. i = 6378137;
  9703. return e.multiplyBy(i)
  9704. }
  9705. }), o.CRS.EPSG900913 = o.extend({}, o.CRS.EPSG3857, {
  9706. code: "EPSG:900913"
  9707. }), o.CRS.EPSG4326 = o.extend({}, o.CRS, {
  9708. code: "EPSG:4326",
  9709. projection: o.Projection.LonLat,
  9710. transformation: new o.Transformation(1 / 360, .5, -1 / 360, .5)
  9711. }), o.Map = o.Class.extend({
  9712. includes: o.Mixin.Events,
  9713. options: {
  9714. crs: o.CRS.EPSG3857,
  9715. fadeAnimation: o.DomUtil.TRANSITION && !o.Browser.android23,
  9716. trackResize: !0,
  9717. markerZoomAnimation: o.DomUtil.TRANSITION && o.Browser.any3d
  9718. },
  9719. initialize: function (t, e) {
  9720. e = o.setOptions(this, e), this._initContainer(t), this._initLayout(), this._onResize = o.bind(this._onResize, this), this._initEvents(), e.maxBounds && this.setMaxBounds(e.maxBounds), e.center && e.zoom !== i && this.setView(o.latLng(e.center), e.zoom, {
  9721. reset: !0
  9722. }), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._tileLayersNum = 0, this.callInitHooks(), this._addLayers(e.layers)
  9723. },
  9724. setView: function (t, e) {
  9725. return e = e === i ? this.getZoom() : e, this._resetView(o.latLng(t), this._limitZoom(e)), this
  9726. },
  9727. setZoom: function (t, e) {
  9728. return this._loaded ? this.setView(this.getCenter(), t, {
  9729. zoom: e
  9730. }) : (this._zoom = this._limitZoom(t), this)
  9731. },
  9732. zoomIn: function (t, e) {
  9733. return this.setZoom(this._zoom + (t || 1), e)
  9734. },
  9735. zoomOut: function (t, e) {
  9736. return this.setZoom(this._zoom - (t || 1), e)
  9737. },
  9738. setZoomAround: function (t, e, i) {
  9739. var n = this.getZoomScale(e),
  9740. s = this.getSize().divideBy(2),
  9741. a = t instanceof o.Point ? t : this.latLngToContainerPoint(t),
  9742. r = a.subtract(s).multiplyBy(1 - 1 / n),
  9743. h = this.containerPointToLatLng(s.add(r));
  9744. return this.setView(h, e, {
  9745. zoom: i
  9746. })
  9747. },
  9748. fitBounds: function (t, e) {
  9749. e = e || {}, t = t.getBounds ? t.getBounds() : o.latLngBounds(t);
  9750. var i = o.point(e.paddingTopLeft || e.padding || [0, 0]),
  9751. n = o.point(e.paddingBottomRight || e.padding || [0, 0]),
  9752. s = this.getBoundsZoom(t, !1, i.add(n));
  9753. s = e.maxZoom ? Math.min(e.maxZoom, s) : s;
  9754. var a = n.subtract(i).divideBy(2),
  9755. r = this.project(t.getSouthWest(), s),
  9756. h = this.project(t.getNorthEast(), s),
  9757. l = this.unproject(r.add(h).divideBy(2).add(a), s);
  9758. return this.setView(l, s, e)
  9759. },
  9760. fitWorld: function (t) {
  9761. return this.fitBounds([
  9762. [-90, -180],
  9763. [90, 180]
  9764. ], t)
  9765. },
  9766. panTo: function (t, e) {
  9767. return this.setView(t, this._zoom, {
  9768. pan: e
  9769. })
  9770. },
  9771. panBy: function (t) {
  9772. return this.fire("movestart"), this._rawPanBy(o.point(t)), this.fire("move"), this.fire("moveend")
  9773. },
  9774. setMaxBounds: function (t) {
  9775. return t = o.latLngBounds(t), this.options.maxBounds = t, t ? (this._loaded && this._panInsideMaxBounds(), this.on("moveend", this._panInsideMaxBounds, this)) : this.off("moveend", this._panInsideMaxBounds, this)
  9776. },
  9777. panInsideBounds: function (t, e) {
  9778. var i = this.getCenter(),
  9779. n = this._limitCenter(i, this._zoom, t);
  9780. return i.equals(n) ? this : this.panTo(n, e)
  9781. },
  9782. addLayer: function (t) {
  9783. var e = o.stamp(t);
  9784. return this._layers[e] ? this : (this._layers[e] = t, !t.options || isNaN(t.options.maxZoom) && isNaN(t.options.minZoom) || (this._zoomBoundLayers[e] = t, this._updateZoomLevels()), this.options.zoomAnimation && o.TileLayer && t instanceof o.TileLayer && (this._tileLayersNum++, this._tileLayersToLoad++, t.on("load", this._onTileLayerLoad, this)), this._loaded && this._layerAdd(t), this)
  9785. },
  9786. removeLayer: function (t) {
  9787. var e = o.stamp(t);
  9788. return this._layers[e] ? (this._loaded && t.onRemove(this), delete this._layers[e], this._loaded && this.fire("layerremove", {
  9789. layer: t
  9790. }), this._zoomBoundLayers[e] && (delete this._zoomBoundLayers[e], this._updateZoomLevels()), this.options.zoomAnimation && o.TileLayer && t instanceof o.TileLayer && (this._tileLayersNum--, this._tileLayersToLoad--, t.off("load", this._onTileLayerLoad, this)), this) : this
  9791. },
  9792. hasLayer: function (t) {
  9793. return t ? o.stamp(t) in this._layers : !1
  9794. },
  9795. eachLayer: function (t, e) {
  9796. for (var i in this._layers) t.call(e, this._layers[i]);
  9797. return this
  9798. },
  9799. invalidateSize: function (t) {
  9800. if (!this._loaded) return this;
  9801. t = o.extend({
  9802. animate: !1,
  9803. pan: !0
  9804. }, t === !0 ? {
  9805. animate: !0
  9806. } : t);
  9807. var e = this.getSize();
  9808. this._sizeChanged = !0, this._initialCenter = null;
  9809. var i = this.getSize(),
  9810. n = e.divideBy(2).round(),
  9811. s = i.divideBy(2).round(),
  9812. a = n.subtract(s);
  9813. return a.x || a.y ? (t.animate && t.pan ? this.panBy(a) : (t.pan && this._rawPanBy(a), this.fire("move"), t.debounceMoveend ? (clearTimeout(this._sizeTimer), this._sizeTimer = setTimeout(o.bind(this.fire, this, "moveend"), 200)) : this.fire("moveend")), this.fire("resize", {
  9814. oldSize: e,
  9815. newSize: i
  9816. })) : this
  9817. },
  9818. addHandler: function (t, e) {
  9819. if (!e) return this;
  9820. var i = this[t] = new e(this);
  9821. return this._handlers.push(i), this.options[t] && i.enable(), this
  9822. },
  9823. remove: function () {
  9824. this._loaded && this.fire("unload"), this._initEvents("off");
  9825. try {
  9826. delete this._container._leaflet
  9827. } catch (t) {
  9828. this._container._leaflet = i
  9829. }
  9830. return this._clearPanes(), this._clearControlPos && this._clearControlPos(), this._clearHandlers(), this
  9831. },
  9832. getCenter: function () {
  9833. return this._checkIfLoaded(), this._initialCenter && !this._moved() ? this._initialCenter : this.layerPointToLatLng(this._getCenterLayerPoint())
  9834. },
  9835. getZoom: function () {
  9836. return this._zoom
  9837. },
  9838. getBounds: function () {
  9839. var t = this.getPixelBounds(),
  9840. e = this.unproject(t.getBottomLeft()),
  9841. i = this.unproject(t.getTopRight());
  9842. return new o.LatLngBounds(e, i)
  9843. },
  9844. getMinZoom: function () {
  9845. return this.options.minZoom === i ? this._layersMinZoom === i ? 0 : this._layersMinZoom : this.options.minZoom
  9846. },
  9847. getMaxZoom: function () {
  9848. return this.options.maxZoom === i ? this._layersMaxZoom === i ? 1 / 0 : this._layersMaxZoom : this.options.maxZoom
  9849. },
  9850. getBoundsZoom: function (t, e, i) {
  9851. t = o.latLngBounds(t);
  9852. var n, s = this.getMinZoom() - (e ? 1 : 0),
  9853. a = this.getMaxZoom(),
  9854. r = this.getSize(),
  9855. h = t.getNorthWest(),
  9856. l = t.getSouthEast(),
  9857. u = !0;
  9858. i = o.point(i || [0, 0]);
  9859. do s++, n = this.project(l, s).subtract(this.project(h, s)).add(i), u = e ? n.x < r.x || n.y < r.y : r.contains(n); while (u && a >= s);
  9860. return u && e ? null : e ? s : s - 1
  9861. },
  9862. getSize: function () {
  9863. return (!this._size || this._sizeChanged) && (this._size = new o.Point(this._container.clientWidth, this._container.clientHeight), this._sizeChanged = !1), this._size.clone()
  9864. },
  9865. getPixelBounds: function () {
  9866. var t = this._getTopLeftPoint();
  9867. return new o.Bounds(t, t.add(this.getSize()))
  9868. },
  9869. getPixelOrigin: function () {
  9870. return this._checkIfLoaded(), this._initialTopLeftPoint
  9871. },
  9872. getPanes: function () {
  9873. return this._panes
  9874. },
  9875. getContainer: function () {
  9876. return this._container
  9877. },
  9878. getZoomScale: function (t) {
  9879. var e = this.options.crs;
  9880. return e.scale(t) / e.scale(this._zoom)
  9881. },
  9882. getScaleZoom: function (t) {
  9883. return this._zoom + Math.log(t) / Math.LN2
  9884. },
  9885. project: function (t, e) {
  9886. return e = e === i ? this._zoom : e, this.options.crs.latLngToPoint(o.latLng(t), e)
  9887. },
  9888. unproject: function (t, e) {
  9889. return e = e === i ? this._zoom : e, this.options.crs.pointToLatLng(o.point(t), e)
  9890. },
  9891. layerPointToLatLng: function (t) {
  9892. var e = o.point(t).add(this.getPixelOrigin());
  9893. return this.unproject(e)
  9894. },
  9895. latLngToLayerPoint: function (t) {
  9896. var e = this.project(o.latLng(t))._round();
  9897. return e._subtract(this.getPixelOrigin())
  9898. },
  9899. containerPointToLayerPoint: function (t) {
  9900. return o.point(t).subtract(this._getMapPanePos())
  9901. },
  9902. layerPointToContainerPoint: function (t) {
  9903. return o.point(t).add(this._getMapPanePos())
  9904. },
  9905. containerPointToLatLng: function (t) {
  9906. var e = this.containerPointToLayerPoint(o.point(t));
  9907. return this.layerPointToLatLng(e)
  9908. },
  9909. latLngToContainerPoint: function (t) {
  9910. return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))
  9911. },
  9912. mouseEventToContainerPoint: function (t) {
  9913. return o.DomEvent.getMousePosition(t, this._container)
  9914. },
  9915. mouseEventToLayerPoint: function (t) {
  9916. return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))
  9917. },
  9918. mouseEventToLatLng: function (t) {
  9919. return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))
  9920. },
  9921. _initContainer: function (t) {
  9922. var e = this._container = o.DomUtil.get(t);
  9923. if (!e) throw new Error("Map container not found.");
  9924. if (e._leaflet) throw new Error("Map container is already initialized.");
  9925. e._leaflet = !0
  9926. },
  9927. _initLayout: function () {
  9928. var t = this._container;
  9929. o.DomUtil.addClass(t, "leaflet-container" + (o.Browser.touch ? " leaflet-touch" : "") + (o.Browser.retina ? " leaflet-retina" : "") + (o.Browser.ielt9 ? " leaflet-oldie" : "") + (this.options.fadeAnimation ? " leaflet-fade-anim" : ""));
  9930. var e = o.DomUtil.getStyle(t, "position");
  9931. "absolute" !== e && "relative" !== e && "fixed" !== e && (t.style.position = "relative"), this._initPanes(), this._initControlPos && this._initControlPos()
  9932. },
  9933. _initPanes: function () {
  9934. var t = this._panes = {};
  9935. this._mapPane = t.mapPane = this._createPane("leaflet-map-pane", this._container), this._tilePane = t.tilePane = this._createPane("leaflet-tile-pane", this._mapPane), t.objectsPane = this._createPane("leaflet-objects-pane", this._mapPane), t.shadowPane = this._createPane("leaflet-shadow-pane"), t.overlayPane = this._createPane("leaflet-overlay-pane"), t.markerPane = this._createPane("leaflet-marker-pane"), t.popupPane = this._createPane("leaflet-popup-pane");
  9936. var e = " leaflet-zoom-hide";
  9937. this.options.markerZoomAnimation || (o.DomUtil.addClass(t.markerPane, e), o.DomUtil.addClass(t.shadowPane, e), o.DomUtil.addClass(t.popupPane, e))
  9938. },
  9939. _createPane: function (t, e) {
  9940. return o.DomUtil.create("div", t, e || this._panes.objectsPane)
  9941. },
  9942. _clearPanes: function () {
  9943. this._container.removeChild(this._mapPane)
  9944. },
  9945. _addLayers: function (t) {
  9946. t = t ? o.Util.isArray(t) ? t : [t] : [];
  9947. for (var e = 0, i = t.length; i > e; e++) this.addLayer(t[e])
  9948. },
  9949. _resetView: function (t, e, i, n) {
  9950. var s = this._zoom !== e;
  9951. n || (this.fire("movestart"), s && this.fire("zoomstart")), this._zoom = e, this._initialCenter = t, this._initialTopLeftPoint = this._getNewTopLeftPoint(t), i ? this._initialTopLeftPoint._add(this._getMapPanePos()) : o.DomUtil.setPosition(this._mapPane, new o.Point(0, 0)), this._tileLayersToLoad = this._tileLayersNum;
  9952. var a = !this._loaded;
  9953. this._loaded = !0, this.fire("viewreset", {
  9954. hard: !i
  9955. }), a && (this.fire("load"), this.eachLayer(this._layerAdd, this)), this.fire("move"), (s || n) && this.fire("zoomend"), this.fire("moveend", {
  9956. hard: !i
  9957. })
  9958. },
  9959. _rawPanBy: function (t) {
  9960. o.DomUtil.setPosition(this._mapPane, this._getMapPanePos().subtract(t))
  9961. },
  9962. _getZoomSpan: function () {
  9963. return this.getMaxZoom() - this.getMinZoom()
  9964. },
  9965. _updateZoomLevels: function () {
  9966. var t, e = 1 / 0,
  9967. n = -(1 / 0),
  9968. o = this._getZoomSpan();
  9969. for (t in this._zoomBoundLayers) {
  9970. var s = this._zoomBoundLayers[t];
  9971. isNaN(s.options.minZoom) || (e = Math.min(e, s.options.minZoom)), isNaN(s.options.maxZoom) || (n = Math.max(n, s.options.maxZoom))
  9972. }
  9973. t === i ? this._layersMaxZoom = this._layersMinZoom = i : (this._layersMaxZoom = n, this._layersMinZoom = e), o !== this._getZoomSpan() && this.fire("zoomlevelschange")
  9974. },
  9975. _panInsideMaxBounds: function () {
  9976. this.panInsideBounds(this.options.maxBounds)
  9977. },
  9978. _checkIfLoaded: function () {
  9979. if (!this._loaded) throw new Error("Set map center and zoom first.")
  9980. },
  9981. _initEvents: function (e) {
  9982. if (o.DomEvent) {
  9983. e = e || "on", o.DomEvent[e](this._container, "click", this._onMouseClick, this);
  9984. var i, n, s = ["dblclick", "mousedown", "mouseup", "mouseenter", "mouseleave", "mousemove", "contextmenu"];
  9985. for (i = 0, n = s.length; n > i; i++) o.DomEvent[e](this._container, s[i], this._fireMouseEvent, this);
  9986. this.options.trackResize && o.DomEvent[e](t, "resize", this._onResize, this)
  9987. }
  9988. },
  9989. _onResize: function () {
  9990. o.Util.cancelAnimFrame(this._resizeRequest), this._resizeRequest = o.Util.requestAnimFrame(function () {
  9991. this.invalidateSize({
  9992. debounceMoveend: !0
  9993. })
  9994. }, this, !1, this._container)
  9995. },
  9996. _onMouseClick: function (t) {
  9997. !this._loaded || !t._simulated && (this.dragging && this.dragging.moved() || this.boxZoom && this.boxZoom.moved()) || o.DomEvent._skipped(t) || (this.fire("preclick"), this._fireMouseEvent(t))
  9998. },
  9999. _fireMouseEvent: function (t) {
  10000. if (this._loaded && !o.DomEvent._skipped(t)) {
  10001. var e = t.type;
  10002. if (e = "mouseenter" === e ? "mouseover" : "mouseleave" === e ? "mouseout" : e, this.hasEventListeners(e)) {
  10003. "contextmenu" === e && o.DomEvent.preventDefault(t);
  10004. var i = this.mouseEventToContainerPoint(t),
  10005. n = this.containerPointToLayerPoint(i),
  10006. s = this.layerPointToLatLng(n);
  10007. this.fire(e, {
  10008. latlng: s,
  10009. layerPoint: n,
  10010. containerPoint: i,
  10011. originalEvent: t
  10012. })
  10013. }
  10014. }
  10015. },
  10016. _onTileLayerLoad: function () {
  10017. this._tileLayersToLoad--, this._tileLayersNum && !this._tileLayersToLoad && this.fire("tilelayersload")
  10018. },
  10019. _clearHandlers: function () {
  10020. for (var t = 0, e = this._handlers.length; e > t; t++) this._handlers[t].disable()
  10021. },
  10022. whenReady: function (t, e) {
  10023. return this._loaded ? t.call(e || this, this) : this.on("load", t, e), this
  10024. },
  10025. _layerAdd: function (t) {
  10026. t.onAdd(this), this.fire("layeradd", {
  10027. layer: t
  10028. })
  10029. },
  10030. _getMapPanePos: function () {
  10031. return o.DomUtil.getPosition(this._mapPane)
  10032. },
  10033. _moved: function () {
  10034. var t = this._getMapPanePos();
  10035. return t && !t.equals([0, 0])
  10036. },
  10037. _getTopLeftPoint: function () {
  10038. return this.getPixelOrigin().subtract(this._getMapPanePos())
  10039. },
  10040. _getNewTopLeftPoint: function (t, e) {
  10041. var i = this.getSize()._divideBy(2);
  10042. return this.project(t, e)._subtract(i)._round()
  10043. },
  10044. _latLngToNewLayerPoint: function (t, e, i) {
  10045. var n = this._getNewTopLeftPoint(i, e).add(this._getMapPanePos());
  10046. return this.project(t, e)._subtract(n)
  10047. },
  10048. _getCenterLayerPoint: function () {
  10049. return this.containerPointToLayerPoint(this.getSize()._divideBy(2))
  10050. },
  10051. _getCenterOffset: function (t) {
  10052. return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())
  10053. },
  10054. _limitCenter: function (t, e, i) {
  10055. if (!i) return t;
  10056. var n = this.project(t, e),
  10057. s = this.getSize().divideBy(2),
  10058. a = new o.Bounds(n.subtract(s), n.add(s)),
  10059. r = this._getBoundsOffset(a, i, e);
  10060. return this.unproject(n.add(r), e)
  10061. },
  10062. _limitOffset: function (t, e) {
  10063. if (!e) return t;
  10064. var i = this.getPixelBounds(),
  10065. n = new o.Bounds(i.min.add(t), i.max.add(t));
  10066. return t.add(this._getBoundsOffset(n, e))
  10067. },
  10068. _getBoundsOffset: function (t, e, i) {
  10069. var n = this.project(e.getNorthWest(), i).subtract(t.min),
  10070. s = this.project(e.getSouthEast(), i).subtract(t.max),
  10071. a = this._rebound(n.x, -s.x),
  10072. r = this._rebound(n.y, -s.y);
  10073. return new o.Point(a, r)
  10074. },
  10075. _rebound: function (t, e) {
  10076. return t + e > 0 ? Math.round(t - e) / 2 : Math.max(0, Math.ceil(t)) - Math.max(0, Math.floor(e))
  10077. },
  10078. _limitZoom: function (t) {
  10079. var e = this.getMinZoom(),
  10080. i = this.getMaxZoom();
  10081. return Math.max(e, Math.min(i, t))
  10082. }
  10083. }), o.map = function (t, e) {
  10084. return new o.Map(t, e)
  10085. }, o.Projection.Mercator = {
  10086. MAX_LATITUDE: 85.0840591556,
  10087. R_MINOR: 6356752.314245179,
  10088. R_MAJOR: 6378137,
  10089. project: function (t) {
  10090. var e = o.LatLng.DEG_TO_RAD,
  10091. i = this.MAX_LATITUDE,
  10092. n = Math.max(Math.min(i, t.lat), -i),
  10093. s = this.R_MAJOR,
  10094. a = this.R_MINOR,
  10095. r = t.lng * e * s,
  10096. h = n * e,
  10097. l = a / s,
  10098. u = Math.sqrt(1 - l * l),
  10099. c = u * Math.sin(h);
  10100. c = Math.pow((1 - c) / (1 + c), .5 * u);
  10101. var d = Math.tan(.5 * (.5 * Math.PI - h)) / c;
  10102. return h = -s * Math.log(d), new o.Point(r, h)
  10103. },
  10104. unproject: function (t) {
  10105. for (var e, i = o.LatLng.RAD_TO_DEG, n = this.R_MAJOR, s = this.R_MINOR, a = t.x * i / n, r = s / n, h = Math.sqrt(1 - r * r), l = Math.exp(-t.y / n), u = Math.PI / 2 - 2 * Math.atan(l), c = 15, d = 1e-7, p = c, _ = .1; Math.abs(_) > d && --p > 0;) e = h * Math.sin(u), _ = Math.PI / 2 - 2 * Math.atan(l * Math.pow((1 - e) / (1 + e), .5 * h)) - u, u += _;
  10106. return new o.LatLng(u * i, a)
  10107. }
  10108. }, o.CRS.EPSG3395 = o.extend({}, o.CRS, {
  10109. code: "EPSG:3395",
  10110. projection: o.Projection.Mercator,
  10111. transformation: function () {
  10112. var t = o.Projection.Mercator,
  10113. e = t.R_MAJOR,
  10114. i = .5 / (Math.PI * e);
  10115. return new o.Transformation(i, .5, -i, .5)
  10116. }()
  10117. }), o.TileLayer = o.Class.extend({
  10118. includes: o.Mixin.Events,
  10119. options: {
  10120. minZoom: 0,
  10121. maxZoom: 18,
  10122. tileSize: 256,
  10123. subdomains: "abc",
  10124. errorTileUrl: "",
  10125. attribution: "",
  10126. zoomOffset: 0,
  10127. opacity: 1,
  10128. unloadInvisibleTiles: o.Browser.mobile,
  10129. updateWhenIdle: o.Browser.mobile
  10130. },
  10131. initialize: function (t, e) {
  10132. e = o.setOptions(this, e), e.detectRetina && o.Browser.retina && e.maxZoom > 0 && (e.tileSize = Math.floor(e.tileSize / 2), e.zoomOffset++, e.minZoom > 0 && e.minZoom--, this.options.maxZoom--), e.bounds && (e.bounds = o.latLngBounds(e.bounds)), this._url = t;
  10133. var i = this.options.subdomains;
  10134. "string" == typeof i && (this.options.subdomains = i.split(""))
  10135. },
  10136. onAdd: function (t) {
  10137. this._map = t, this._animated = t._zoomAnimated, this._initContainer(), t.on({
  10138. viewreset: this._reset,
  10139. moveend: this._update
  10140. }, this), this._animated && t.on({
  10141. zoomanim: this._animateZoom,
  10142. zoomend: this._endZoomAnim
  10143. }, this), this.options.updateWhenIdle || (this._limitedUpdate = o.Util.limitExecByInterval(this._update, 150, this), t.on("move", this._limitedUpdate, this)), this._reset(), this._update()
  10144. },
  10145. addTo: function (t) {
  10146. return t.addLayer(this), this
  10147. },
  10148. onRemove: function (t) {
  10149. this._container.parentNode.removeChild(this._container), t.off({
  10150. viewreset: this._reset,
  10151. moveend: this._update
  10152. }, this), this._animated && t.off({
  10153. zoomanim: this._animateZoom,
  10154. zoomend: this._endZoomAnim
  10155. }, this), this.options.updateWhenIdle || t.off("move", this._limitedUpdate, this), this._container = null, this._map = null
  10156. },
  10157. bringToFront: function () {
  10158. var t = this._map._panes.tilePane;
  10159. return this._container && (t.appendChild(this._container), this._setAutoZIndex(t, Math.max)), this
  10160. },
  10161. bringToBack: function () {
  10162. var t = this._map._panes.tilePane;
  10163. return this._container && (t.insertBefore(this._container, t.firstChild), this._setAutoZIndex(t, Math.min)), this
  10164. },
  10165. getAttribution: function () {
  10166. return this.options.attribution
  10167. },
  10168. getContainer: function () {
  10169. return this._container
  10170. },
  10171. setOpacity: function (t) {
  10172. return this.options.opacity = t, this._map && this._updateOpacity(), this
  10173. },
  10174. setZIndex: function (t) {
  10175. return this.options.zIndex = t, this._updateZIndex(), this
  10176. },
  10177. setUrl: function (t, e) {
  10178. return this._url = t, e || this.redraw(), this
  10179. },
  10180. redraw: function () {
  10181. return this._map && (this._reset({
  10182. hard: !0
  10183. }), this._update()), this
  10184. },
  10185. _updateZIndex: function () {
  10186. this._container && this.options.zIndex !== i && (this._container.style.zIndex = this.options.zIndex)
  10187. },
  10188. _setAutoZIndex: function (t, e) {
  10189. var i, n, o, s = t.children,
  10190. a = -e(1 / 0, -(1 / 0));
  10191. for (n = 0, o = s.length; o > n; n++) s[n] !== this._container && (i = parseInt(s[n].style.zIndex, 10), isNaN(i) || (a = e(a, i)));
  10192. this.options.zIndex = this._container.style.zIndex = (isFinite(a) ? a : 0) + e(1, -1)
  10193. },
  10194. _updateOpacity: function () {
  10195. var t, e = this._tiles;
  10196. if (o.Browser.ielt9)
  10197. for (t in e) o.DomUtil.setOpacity(e[t], this.options.opacity);
  10198. else o.DomUtil.setOpacity(this._container, this.options.opacity)
  10199. },
  10200. _initContainer: function () {
  10201. var t = this._map._panes.tilePane;
  10202. if (!this._container) {
  10203. if (this._container = o.DomUtil.create("div", "leaflet-layer"), this._updateZIndex(), this._animated) {
  10204. var e = "leaflet-tile-container";
  10205. this._bgBuffer = o.DomUtil.create("div", e, this._container), this._tileContainer = o.DomUtil.create("div", e, this._container)
  10206. } else this._tileContainer = this._container;
  10207. t.appendChild(this._container), this.options.opacity < 1 && this._updateOpacity()
  10208. }
  10209. },
  10210. _reset: function (t) {
  10211. for (var e in this._tiles) this.fire("tileunload", {
  10212. tile: this._tiles[e]
  10213. });
  10214. this._tiles = {}, this._tilesToLoad = 0, this.options.reuseTiles && (this._unusedTiles = []), this._tileContainer.innerHTML = "", this._animated && t && t.hard && this._clearBgBuffer(), this._initContainer()
  10215. },
  10216. _getTileSize: function () {
  10217. var t = this._map,
  10218. e = t.getZoom() + this.options.zoomOffset,
  10219. i = this.options.maxNativeZoom,
  10220. n = this.options.tileSize;
  10221. return i && e > i && (n = Math.round(t.getZoomScale(e) / t.getZoomScale(i) * n)), n
  10222. },
  10223. _update: function () {
  10224. if (this._map) {
  10225. var t = this._map,
  10226. e = t.getPixelBounds(),
  10227. i = t.getZoom(),
  10228. n = this._getTileSize();
  10229. if (!(i > this.options.maxZoom || i < this.options.minZoom)) {
  10230. var s = o.bounds(e.min.divideBy(n)._floor(), e.max.divideBy(n)._floor());
  10231. this._addTilesFromCenterOut(s), (this.options.unloadInvisibleTiles || this.options.reuseTiles) && this._removeOtherTiles(s)
  10232. }
  10233. }
  10234. },
  10235. _addTilesFromCenterOut: function (t) {
  10236. var i, n, s, a = [],
  10237. r = t.getCenter();
  10238. for (i = t.min.y; i <= t.max.y; i++)
  10239. for (n = t.min.x; n <= t.max.x; n++) s = new o.Point(n, i), this._tileShouldBeLoaded(s) && a.push(s);
  10240. var h = a.length;
  10241. if (0 !== h) {
  10242. a.sort(function (t, e) {
  10243. return t.distanceTo(r) - e.distanceTo(r)
  10244. });
  10245. var l = e.createDocumentFragment();
  10246. for (this._tilesToLoad || this.fire("loading"), this._tilesToLoad += h, n = 0; h > n; n++) this._addTile(a[n], l);
  10247. this._tileContainer.appendChild(l)
  10248. }
  10249. },
  10250. _tileShouldBeLoaded: function (t) {
  10251. if (t.x + ":" + t.y in this._tiles) return !1;
  10252. var e = this.options;
  10253. if (!e.continuousWorld) {
  10254. var i = this._getWrapTileNum();
  10255. if (e.noWrap && (t.x < 0 || t.x >= i.x) || t.y < 0 || t.y >= i.y) return !1
  10256. }
  10257. if (e.bounds) {
  10258. var n = this._getTileSize(),
  10259. o = t.multiplyBy(n),
  10260. s = o.add([n, n]),
  10261. a = this._map.unproject(o),
  10262. r = this._map.unproject(s);
  10263. if (e.continuousWorld || e.noWrap || (a = a.wrap(), r = r.wrap()), !e.bounds.intersects([a, r])) return !1
  10264. }
  10265. return !0
  10266. },
  10267. _removeOtherTiles: function (t) {
  10268. var e, i, n, o;
  10269. for (o in this._tiles) e = o.split(":"), i = parseInt(e[0], 10), n = parseInt(e[1], 10), (i < t.min.x || i > t.max.x || n < t.min.y || n > t.max.y) && this._removeTile(o)
  10270. },
  10271. _removeTile: function (t) {
  10272. var e = this._tiles[t];
  10273. this.fire("tileunload", {
  10274. tile: e,
  10275. url: e.src
  10276. }), this.options.reuseTiles ? (o.DomUtil.removeClass(e, "leaflet-tile-loaded"), this._unusedTiles.push(e)) : e.parentNode === this._tileContainer && this._tileContainer.removeChild(e), o.Browser.android || (e.onload = null, e.src = o.Util.emptyImageUrl), delete this._tiles[t]
  10277. },
  10278. _addTile: function (t, e) {
  10279. var i = this._getTilePos(t),
  10280. n = this._getTile();
  10281. o.DomUtil.setPosition(n, i, o.Browser.chrome), this._tiles[t.x + ":" + t.y] = n, this._loadTile(n, t), n.parentNode !== this._tileContainer && e.appendChild(n)
  10282. },
  10283. _getZoomForUrl: function () {
  10284. var t = this.options,
  10285. e = this._map.getZoom();
  10286. return t.zoomReverse && (e = t.maxZoom - e), e += t.zoomOffset, t.maxNativeZoom ? Math.min(e, t.maxNativeZoom) : e
  10287. },
  10288. _getTilePos: function (t) {
  10289. var e = this._map.getPixelOrigin(),
  10290. i = this._getTileSize();
  10291. return t.multiplyBy(i).subtract(e)
  10292. },
  10293. getTileUrl: function (t) {
  10294. return o.Util.template(this._url, o.extend({
  10295. s: this._getSubdomain(t),
  10296. z: t.z,
  10297. x: t.x,
  10298. y: t.y
  10299. }, this.options))
  10300. },
  10301. _getWrapTileNum: function () {
  10302. var t = this._map.options.crs,
  10303. e = t.getSize(this._map.getZoom());
  10304. return e.divideBy(this._getTileSize())._floor()
  10305. },
  10306. _adjustTilePoint: function (t) {
  10307. var e = this._getWrapTileNum();
  10308. this.options.continuousWorld || this.options.noWrap || (t.x = (t.x % e.x + e.x) % e.x), this.options.tms && (t.y = e.y - t.y - 1), t.z = this._getZoomForUrl()
  10309. },
  10310. _getSubdomain: function (t) {
  10311. var e = Math.abs(t.x + t.y) % this.options.subdomains.length;
  10312. return this.options.subdomains[e]
  10313. },
  10314. _getTile: function () {
  10315. if (this.options.reuseTiles && this._unusedTiles.length > 0) {
  10316. var t = this._unusedTiles.pop();
  10317. return this._resetTile(t), t
  10318. }
  10319. return this._createTile()
  10320. },
  10321. _resetTile: function () {},
  10322. _createTile: function () {
  10323. var t = o.DomUtil.create("img", "leaflet-tile");
  10324. return t.style.width = t.style.height = this._getTileSize() + "px", t.galleryimg = "no", t.onselectstart = t.onmousemove = o.Util.falseFn, o.Browser.ielt9 && this.options.opacity !== i && o.DomUtil.setOpacity(t, this.options.opacity), o.Browser.mobileWebkit3d && (t.style.WebkitBackfaceVisibility = "hidden"), t
  10325. },
  10326. _loadTile: function (t, e) {
  10327. t._layer = this, t.onload = this._tileOnLoad, t.onerror = this._tileOnError, this._adjustTilePoint(e), t.src = this.getTileUrl(e), this.fire("tileloadstart", {
  10328. tile: t,
  10329. url: t.src
  10330. })
  10331. },
  10332. _tileLoaded: function () {
  10333. this._tilesToLoad--, this._animated && o.DomUtil.addClass(this._tileContainer, "leaflet-zoom-animated"), this._tilesToLoad || (this.fire("load"), this._animated && (clearTimeout(this._clearBgBufferTimer), this._clearBgBufferTimer = setTimeout(o.bind(this._clearBgBuffer, this), 500)))
  10334. },
  10335. _tileOnLoad: function () {
  10336. var t = this._layer;
  10337. this.src !== o.Util.emptyImageUrl && (o.DomUtil.addClass(this, "leaflet-tile-loaded"), t.fire("tileload", {
  10338. tile: this,
  10339. url: this.src
  10340. })), t._tileLoaded()
  10341. },
  10342. _tileOnError: function () {
  10343. var t = this._layer;
  10344. t.fire("tileerror", {
  10345. tile: this,
  10346. url: this.src
  10347. });
  10348. var e = t.options.errorTileUrl;
  10349. e && (this.src = e), t._tileLoaded()
  10350. }
  10351. }), o.tileLayer = function (t, e) {
  10352. return new o.TileLayer(t, e)
  10353. }, o.TileLayer.WMS = o.TileLayer.extend({
  10354. defaultWmsParams: {
  10355. service: "WMS",
  10356. request: "GetMap",
  10357. version: "1.1.1",
  10358. layers: "",
  10359. styles: "",
  10360. format: "image/jpeg",
  10361. transparent: !1
  10362. },
  10363. initialize: function (t, e) {
  10364. this._url = t;
  10365. var i = o.extend({}, this.defaultWmsParams),
  10366. n = e.tileSize || this.options.tileSize;
  10367. e.detectRetina && o.Browser.retina ? i.width = i.height = 2 * n : i.width = i.height = n;
  10368. for (var s in e) this.options.hasOwnProperty(s) || "crs" === s || (i[s] = e[s]);
  10369. this.wmsParams = i, o.setOptions(this, e)
  10370. },
  10371. onAdd: function (t) {
  10372. this._crs = this.options.crs || t.options.crs, this._wmsVersion = parseFloat(this.wmsParams.version);
  10373. var e = this._wmsVersion >= 1.3 ? "crs" : "srs";
  10374. this.wmsParams[e] = this._crs.code, o.TileLayer.prototype.onAdd.call(this, t)
  10375. },
  10376. getTileUrl: function (t) {
  10377. var e = this._map,
  10378. i = this.options.tileSize,
  10379. n = t.multiplyBy(i),
  10380. s = n.add([i, i]),
  10381. a = this._crs.project(e.unproject(n, t.z)),
  10382. r = this._crs.project(e.unproject(s, t.z)),
  10383. h = this._wmsVersion >= 1.3 && this._crs === o.CRS.EPSG4326 ? [r.y, a.x, a.y, r.x].join(",") : [a.x, r.y, r.x, a.y].join(","),
  10384. l = o.Util.template(this._url, {
  10385. s: this._getSubdomain(t)
  10386. });
  10387. return l + o.Util.getParamString(this.wmsParams, l, !0) + "&BBOX=" + h
  10388. },
  10389. setParams: function (t, e) {
  10390. return o.extend(this.wmsParams, t), e || this.redraw(), this
  10391. }
  10392. }), o.tileLayer.wms = function (t, e) {
  10393. return new o.TileLayer.WMS(t, e)
  10394. }, o.TileLayer.Canvas = o.TileLayer.extend({
  10395. options: {
  10396. async: !1
  10397. },
  10398. initialize: function (t) {
  10399. o.setOptions(this, t)
  10400. },
  10401. redraw: function () {
  10402. this._map && (this._reset({
  10403. hard: !0
  10404. }), this._update());
  10405. for (var t in this._tiles) this._redrawTile(this._tiles[t]);
  10406. return this
  10407. },
  10408. _redrawTile: function (t) {
  10409. this.drawTile(t, t._tilePoint, this._map._zoom)
  10410. },
  10411. _createTile: function () {
  10412. var t = o.DomUtil.create("canvas", "leaflet-tile");
  10413. return t.width = t.height = this.options.tileSize, t.onselectstart = t.onmousemove = o.Util.falseFn, t
  10414. },
  10415. _loadTile: function (t, e) {
  10416. t._layer = this, t._tilePoint = e, this._redrawTile(t), this.options.async || this.tileDrawn(t)
  10417. },
  10418. drawTile: function () {},
  10419. tileDrawn: function (t) {
  10420. this._tileOnLoad.call(t)
  10421. }
  10422. }), o.tileLayer.canvas = function (t) {
  10423. return new o.TileLayer.Canvas(t)
  10424. }, o.ImageOverlay = o.Class.extend({
  10425. includes: o.Mixin.Events,
  10426. options: {
  10427. opacity: 1
  10428. },
  10429. initialize: function (t, e, i) {
  10430. this._url = t, this._bounds = o.latLngBounds(e), o.setOptions(this, i)
  10431. },
  10432. onAdd: function (t) {
  10433. this._map = t, this._image || this._initImage(), t._panes.overlayPane.appendChild(this._image), t.on("viewreset", this._reset, this), t.options.zoomAnimation && o.Browser.any3d && t.on("zoomanim", this._animateZoom, this), this._reset()
  10434. },
  10435. onRemove: function (t) {
  10436. t.getPanes().overlayPane.removeChild(this._image), t.off("viewreset", this._reset, this), t.options.zoomAnimation && t.off("zoomanim", this._animateZoom, this)
  10437. },
  10438. addTo: function (t) {
  10439. return t.addLayer(this), this
  10440. },
  10441. setOpacity: function (t) {
  10442. return this.options.opacity = t, this._updateOpacity(), this
  10443. },
  10444. bringToFront: function () {
  10445. return this._image && this._map._panes.overlayPane.appendChild(this._image), this
  10446. },
  10447. bringToBack: function () {
  10448. var t = this._map._panes.overlayPane;
  10449. return this._image && t.insertBefore(this._image, t.firstChild), this
  10450. },
  10451. setUrl: function (t) {
  10452. this._url = t, this._image.src = this._url
  10453. },
  10454. getAttribution: function () {
  10455. return this.options.attribution
  10456. },
  10457. _initImage: function () {
  10458. this._image = o.DomUtil.create("img", "leaflet-image-layer"), this._map.options.zoomAnimation && o.Browser.any3d ? o.DomUtil.addClass(this._image, "leaflet-zoom-animated") : o.DomUtil.addClass(this._image, "leaflet-zoom-hide"), this._updateOpacity(), o.extend(this._image, {
  10459. galleryimg: "no",
  10460. onselectstart: o.Util.falseFn,
  10461. onmousemove: o.Util.falseFn,
  10462. onload: o.bind(this._onImageLoad, this),
  10463. src: this._url
  10464. })
  10465. },
  10466. _animateZoom: function (t) {
  10467. var e = this._map,
  10468. i = this._image,
  10469. n = e.getZoomScale(t.zoom),
  10470. s = this._bounds.getNorthWest(),
  10471. a = this._bounds.getSouthEast(),
  10472. r = e._latLngToNewLayerPoint(s, t.zoom, t.center),
  10473. h = e._latLngToNewLayerPoint(a, t.zoom, t.center)._subtract(r),
  10474. l = r._add(h._multiplyBy(.5 * (1 - 1 / n)));
  10475. i.style[o.DomUtil.TRANSFORM] = o.DomUtil.getTranslateString(l) + " scale(" + n + ") "
  10476. },
  10477. _reset: function () {
  10478. var t = this._image,
  10479. e = this._map.latLngToLayerPoint(this._bounds.getNorthWest()),
  10480. i = this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);
  10481. o.DomUtil.setPosition(t, e), t.style.width = i.x + "px", t.style.height = i.y + "px"
  10482. },
  10483. _onImageLoad: function () {
  10484. this.fire("load")
  10485. },
  10486. _updateOpacity: function () {
  10487. o.DomUtil.setOpacity(this._image, this.options.opacity)
  10488. }
  10489. }), o.imageOverlay = function (t, e, i) {
  10490. return new o.ImageOverlay(t, e, i)
  10491. }, o.Icon = o.Class.extend({
  10492. options: {
  10493. className: ""
  10494. },
  10495. initialize: function (t) {
  10496. o.setOptions(this, t)
  10497. },
  10498. createIcon: function (t) {
  10499. return this._createIcon("icon", t)
  10500. },
  10501. createShadow: function (t) {
  10502. return this._createIcon("shadow", t)
  10503. },
  10504. _createIcon: function (t, e) {
  10505. var i = this._getIconUrl(t);
  10506. if (!i) {
  10507. if ("icon" === t) throw new Error("iconUrl not set in Icon options (see the docs).");
  10508. return null
  10509. }
  10510. var n;
  10511. return n = e && "IMG" === e.tagName ? this._createImg(i, e) : this._createImg(i), this._setIconStyles(n, t), n
  10512. },
  10513. _setIconStyles: function (t, e) {
  10514. var i, n = this.options,
  10515. s = o.point(n[e + "Size"]);
  10516. i = "shadow" === e ? o.point(n.shadowAnchor || n.iconAnchor) : o.point(n.iconAnchor), !i && s && (i = s.divideBy(2, !0)), t.className = "leaflet-marker-" + e + " " + n.className, i && (t.style.marginLeft = -i.x + "px", t.style.marginTop = -i.y + "px"), s && (t.style.width = s.x + "px", t.style.height = s.y + "px")
  10517. },
  10518. _createImg: function (t, i) {
  10519. return i = i || e.createElement("img"), i.src = t, i
  10520. },
  10521. _getIconUrl: function (t) {
  10522. return o.Browser.retina && this.options[t + "RetinaUrl"] ? this.options[t + "RetinaUrl"] : this.options[t + "Url"]
  10523. }
  10524. }), o.icon = function (t) {
  10525. return new o.Icon(t)
  10526. }, o.Icon.Default = o.Icon.extend({
  10527. options: {
  10528. iconSize: [25, 41],
  10529. iconAnchor: [12, 41],
  10530. popupAnchor: [1, -34],
  10531. shadowSize: [41, 41]
  10532. },
  10533. _getIconUrl: function (t) {
  10534. var e = t + "Url";
  10535. if (this.options[e]) return this.options[e];
  10536. o.Browser.retina && "icon" === t && (t += "-2x");
  10537. var i = o.Icon.Default.imagePath;
  10538. if (!i) throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");
  10539. return i + "/marker-" + t + ".png"
  10540. }
  10541. }), o.Icon.Default.imagePath = function () {
  10542. var t, i, n, o, s, a = e.getElementsByTagName("script"),
  10543. r = /[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;
  10544. for (t = 0, i = a.length; i > t; t++)
  10545. if (n = a[t].src, o = n.match(r)) return s = n.split(r)[0], (s ? s + "/" : "") + "images"
  10546. }(), o.Marker = o.Class.extend({
  10547. includes: o.Mixin.Events,
  10548. options: {
  10549. icon: new o.Icon.Default,
  10550. title: "",
  10551. alt: "",
  10552. clickable: !0,
  10553. draggable: !1,
  10554. keyboard: !0,
  10555. zIndexOffset: 0,
  10556. opacity: 1,
  10557. riseOnHover: !1,
  10558. riseOffset: 250
  10559. },
  10560. initialize: function (t, e) {
  10561. o.setOptions(this, e), this._latlng = o.latLng(t)
  10562. },
  10563. onAdd: function (t) {
  10564. this._map = t, t.on("viewreset", this.update, this), this._initIcon(), this.update(), this.fire("add"), t.options.zoomAnimation && t.options.markerZoomAnimation && t.on("zoomanim", this._animateZoom, this)
  10565. },
  10566. addTo: function (t) {
  10567. return t.addLayer(this), this
  10568. },
  10569. onRemove: function (t) {
  10570. this.dragging && this.dragging.disable(), this._removeIcon(), this._removeShadow(), this.fire("remove"), t.off({
  10571. viewreset: this.update,
  10572. zoomanim: this._animateZoom
  10573. }, this), this._map = null
  10574. },
  10575. getLatLng: function () {
  10576. return this._latlng
  10577. },
  10578. setLatLng: function (t) {
  10579. return this._latlng = o.latLng(t), this.update(), this.fire("move", {
  10580. latlng: this._latlng
  10581. })
  10582. },
  10583. setZIndexOffset: function (t) {
  10584. return this.options.zIndexOffset = t, this.update(), this
  10585. },
  10586. setIcon: function (t) {
  10587. return this.options.icon = t, this._map && (this._initIcon(), this.update()), this._popup && this.bindPopup(this._popup), this
  10588. },
  10589. update: function () {
  10590. return this._icon && this._setPos(this._map.latLngToLayerPoint(this._latlng).round()), this
  10591. },
  10592. _initIcon: function () {
  10593. var t = this.options,
  10594. e = this._map,
  10595. i = e.options.zoomAnimation && e.options.markerZoomAnimation,
  10596. n = i ? "leaflet-zoom-animated" : "leaflet-zoom-hide",
  10597. s = t.icon.createIcon(this._icon),
  10598. a = !1;
  10599. s !== this._icon && (this._icon && this._removeIcon(), a = !0, t.title && (s.title = t.title), t.alt && (s.alt = t.alt)), o.DomUtil.addClass(s, n), t.keyboard && (s.tabIndex = "0"), this._icon = s, this._initInteraction(), t.riseOnHover && o.DomEvent.on(s, "mouseover", this._bringToFront, this).on(s, "mouseout", this._resetZIndex, this);
  10600. var r = t.icon.createShadow(this._shadow),
  10601. h = !1;
  10602. r !== this._shadow && (this._removeShadow(), h = !0), r && o.DomUtil.addClass(r, n), this._shadow = r, t.opacity < 1 && this._updateOpacity();
  10603. var l = this._map._panes;
  10604. a && l.markerPane.appendChild(this._icon), r && h && l.shadowPane.appendChild(this._shadow)
  10605. },
  10606. _removeIcon: function () {
  10607. this.options.riseOnHover && o.DomEvent.off(this._icon, "mouseover", this._bringToFront).off(this._icon, "mouseout", this._resetZIndex), this._map._panes.markerPane.removeChild(this._icon), this._icon = null
  10608. },
  10609. _removeShadow: function () {
  10610. this._shadow && this._map._panes.shadowPane.removeChild(this._shadow), this._shadow = null
  10611. },
  10612. _setPos: function (t) {
  10613. o.DomUtil.setPosition(this._icon, t), this._shadow && o.DomUtil.setPosition(this._shadow, t), this._zIndex = t.y + this.options.zIndexOffset, this._resetZIndex()
  10614. },
  10615. _updateZIndex: function (t) {
  10616. this._icon.style.zIndex = this._zIndex + t
  10617. },
  10618. _animateZoom: function (t) {
  10619. var e = this._map._latLngToNewLayerPoint(this._latlng, t.zoom, t.center).round();
  10620. this._setPos(e)
  10621. },
  10622. _initInteraction: function () {
  10623. if (this.options.clickable) {
  10624. var t = this._icon,
  10625. e = ["dblclick", "mousedown", "mouseover", "mouseout", "contextmenu"];
  10626. o.DomUtil.addClass(t, "leaflet-clickable"), o.DomEvent.on(t, "click", this._onMouseClick, this), o.DomEvent.on(t, "keypress", this._onKeyPress, this);
  10627. for (var i = 0; i < e.length; i++) o.DomEvent.on(t, e[i], this._fireMouseEvent, this);
  10628. o.Handler.MarkerDrag && (this.dragging = new o.Handler.MarkerDrag(this), this.options.draggable && this.dragging.enable())
  10629. }
  10630. },
  10631. _onMouseClick: function (t) {
  10632. var e = this.dragging && this.dragging.moved();
  10633. (this.hasEventListeners(t.type) || e) && o.DomEvent.stopPropagation(t), e || (this.dragging && this.dragging._enabled || !this._map.dragging || !this._map.dragging.moved()) && this.fire(t.type, {
  10634. originalEvent: t,
  10635. latlng: this._latlng
  10636. })
  10637. },
  10638. _onKeyPress: function (t) {
  10639. 13 === t.keyCode && this.fire("click", {
  10640. originalEvent: t,
  10641. latlng: this._latlng
  10642. })
  10643. },
  10644. _fireMouseEvent: function (t) {
  10645. this.fire(t.type, {
  10646. originalEvent: t,
  10647. latlng: this._latlng
  10648. }), "contextmenu" === t.type && this.hasEventListeners(t.type) && o.DomEvent.preventDefault(t), "mousedown" !== t.type ? o.DomEvent.stopPropagation(t) : o.DomEvent.preventDefault(t)
  10649. },
  10650. setOpacity: function (t) {
  10651. return this.options.opacity = t, this._map && this._updateOpacity(), this
  10652. },
  10653. _updateOpacity: function () {
  10654. o.DomUtil.setOpacity(this._icon, this.options.opacity), this._shadow && o.DomUtil.setOpacity(this._shadow, this.options.opacity)
  10655. },
  10656. _bringToFront: function () {
  10657. this._updateZIndex(this.options.riseOffset)
  10658. },
  10659. _resetZIndex: function () {
  10660. this._updateZIndex(0)
  10661. }
  10662. }), o.marker = function (t, e) {
  10663. return new o.Marker(t, e)
  10664. }, o.DivIcon = o.Icon.extend({
  10665. options: {
  10666. iconSize: [12, 12],
  10667. className: "leaflet-div-icon",
  10668. html: !1
  10669. },
  10670. createIcon: function (t) {
  10671. var i = t && "DIV" === t.tagName ? t : e.createElement("div"),
  10672. n = this.options;
  10673. return n.html !== !1 ? i.innerHTML = n.html : i.innerHTML = "", n.bgPos && (i.style.backgroundPosition = -n.bgPos.x + "px " + -n.bgPos.y + "px"), this._setIconStyles(i, "icon"), i
  10674. },
  10675. createShadow: function () {
  10676. return null
  10677. }
  10678. }), o.divIcon = function (t) {
  10679. return new o.DivIcon(t)
  10680. }, o.Map.mergeOptions({
  10681. closePopupOnClick: !0
  10682. }), o.Popup = o.Class.extend({
  10683. includes: o.Mixin.Events,
  10684. options: {
  10685. minWidth: 50,
  10686. maxWidth: 300,
  10687. autoPan: !0,
  10688. closeButton: !0,
  10689. offset: [0, 7],
  10690. autoPanPadding: [5, 5],
  10691. keepInView: !1,
  10692. className: "",
  10693. zoomAnimation: !0
  10694. },
  10695. initialize: function (t, e) {
  10696. o.setOptions(this, t), this._source = e, this._animated = o.Browser.any3d && this.options.zoomAnimation, this._isOpen = !1
  10697. },
  10698. onAdd: function (t) {
  10699. this._map = t, this._container || this._initLayout();
  10700. var e = t.options.fadeAnimation;
  10701. e && o.DomUtil.setOpacity(this._container, 0), t._panes.popupPane.appendChild(this._container), t.on(this._getEvents(), this), this.update(), e && o.DomUtil.setOpacity(this._container, 1), this.fire("open"), t.fire("popupopen", {
  10702. popup: this
  10703. }), this._source && this._source.fire("popupopen", {
  10704. popup: this
  10705. })
  10706. },
  10707. addTo: function (t) {
  10708. return t.addLayer(this), this
  10709. },
  10710. openOn: function (t) {
  10711. return t.openPopup(this), this
  10712. },
  10713. onRemove: function (t) {
  10714. t._panes.popupPane.removeChild(this._container), o.Util.falseFn(this._container.offsetWidth), t.off(this._getEvents(), this), t.options.fadeAnimation && o.DomUtil.setOpacity(this._container, 0), this._map = null, this.fire("close"), t.fire("popupclose", {
  10715. popup: this
  10716. }), this._source && this._source.fire("popupclose", {
  10717. popup: this
  10718. })
  10719. },
  10720. getLatLng: function () {
  10721. return this._latlng
  10722. },
  10723. setLatLng: function (t) {
  10724. return this._latlng = o.latLng(t), this._map && (this._updatePosition(), this._adjustPan()), this
  10725. },
  10726. getContent: function () {
  10727. return this._content
  10728. },
  10729. setContent: function (t) {
  10730. return this._content = t, this.update(), this
  10731. },
  10732. update: function () {
  10733. this._map && (this._container.style.visibility = "hidden", this._updateContent(), this._updateLayout(), this._updatePosition(), this._container.style.visibility = "", this._adjustPan())
  10734. },
  10735. _getEvents: function () {
  10736. var t = {
  10737. viewreset: this._updatePosition
  10738. };
  10739. return this._animated && (t.zoomanim = this._zoomAnimation), ("closeOnClick" in this.options ? this.options.closeOnClick : this._map.options.closePopupOnClick) && (t.preclick = this._close), this.options.keepInView && (t.moveend = this._adjustPan), t
  10740. },
  10741. _close: function () {
  10742. this._map && this._map.closePopup(this)
  10743. },
  10744. _initLayout: function () {
  10745. var t, e = "leaflet-popup",
  10746. i = e + " " + this.options.className + " leaflet-zoom-" + (this._animated ? "animated" : "hide"),
  10747. n = this._container = o.DomUtil.create("div", i);
  10748. this.options.closeButton && (t = this._closeButton = o.DomUtil.create("a", e + "-close-button", n), t.href = "#close", t.innerHTML = "&#215;", o.DomEvent.disableClickPropagation(t), o.DomEvent.on(t, "click", this._onCloseButtonClick, this));
  10749. var s = this._wrapper = o.DomUtil.create("div", e + "-content-wrapper", n);
  10750. o.DomEvent.disableClickPropagation(s), this._contentNode = o.DomUtil.create("div", e + "-content", s), o.DomEvent.disableScrollPropagation(this._contentNode), o.DomEvent.on(s, "contextmenu", o.DomEvent.stopPropagation), this._tipContainer = o.DomUtil.create("div", e + "-tip-container", n), this._tip = o.DomUtil.create("div", e + "-tip", this._tipContainer)
  10751. },
  10752. _updateContent: function () {
  10753. if (this._content) {
  10754. if ("string" == typeof this._content) this._contentNode.innerHTML = this._content;
  10755. else {
  10756. for (; this._contentNode.hasChildNodes();) this._contentNode.removeChild(this._contentNode.firstChild);
  10757. this._contentNode.appendChild(this._content)
  10758. }
  10759. this.fire("contentupdate")
  10760. }
  10761. },
  10762. _updateLayout: function () {
  10763. var t = this._contentNode,
  10764. e = t.style;
  10765. e.width = "", e.whiteSpace = "nowrap";
  10766. var i = t.offsetWidth;
  10767. i = Math.min(i, this.options.maxWidth), i = Math.max(i, this.options.minWidth), e.width = i + 1 + "px", e.whiteSpace = "", e.height = "";
  10768. var n = t.offsetHeight,
  10769. s = this.options.maxHeight,
  10770. a = "leaflet-popup-scrolled";
  10771. s && n > s ? (e.height = s + "px", o.DomUtil.addClass(t, a)) : o.DomUtil.removeClass(t, a), this._containerWidth = this._container.offsetWidth
  10772. },
  10773. _updatePosition: function () {
  10774. if (this._map) {
  10775. var t = this._map.latLngToLayerPoint(this._latlng),
  10776. e = this._animated,
  10777. i = o.point(this.options.offset);
  10778. e && o.DomUtil.setPosition(this._container, t), this._containerBottom = -i.y - (e ? 0 : t.y), this._containerLeft = -Math.round(this._containerWidth / 2) + i.x + (e ? 0 : t.x), this._container.style.bottom = this._containerBottom + "px", this._container.style.left = this._containerLeft + "px"
  10779. }
  10780. },
  10781. _zoomAnimation: function (t) {
  10782. var e = this._map._latLngToNewLayerPoint(this._latlng, t.zoom, t.center);
  10783. o.DomUtil.setPosition(this._container, e)
  10784. },
  10785. _adjustPan: function () {
  10786. if (this.options.autoPan) {
  10787. var t = this._map,
  10788. e = this._container.offsetHeight,
  10789. i = this._containerWidth,
  10790. n = new o.Point(this._containerLeft, -e - this._containerBottom);
  10791. this._animated && n._add(o.DomUtil.getPosition(this._container));
  10792. var s = t.layerPointToContainerPoint(n),
  10793. a = o.point(this.options.autoPanPadding),
  10794. r = o.point(this.options.autoPanPaddingTopLeft || a),
  10795. h = o.point(this.options.autoPanPaddingBottomRight || a),
  10796. l = t.getSize(),
  10797. u = 0,
  10798. c = 0;
  10799. s.x + i + h.x > l.x && (u = s.x + i - l.x + h.x), s.x - u - r.x < 0 && (u = s.x - r.x), s.y + e + h.y > l.y && (c = s.y + e - l.y + h.y), s.y - c - r.y < 0 && (c = s.y - r.y), (u || c) && t.fire("autopanstart").panBy([u, c])
  10800. }
  10801. },
  10802. _onCloseButtonClick: function (t) {
  10803. this._close(), o.DomEvent.stop(t)
  10804. }
  10805. }), o.popup = function (t, e) {
  10806. return new o.Popup(t, e)
  10807. }, o.Map.include({
  10808. openPopup: function (t, e, i) {
  10809. if (this.closePopup(), !(t instanceof o.Popup)) {
  10810. var n = t;
  10811. t = new o.Popup(i).setLatLng(e).setContent(n)
  10812. }
  10813. return t._isOpen = !0, this._popup = t, this.addLayer(t)
  10814. },
  10815. closePopup: function (t) {
  10816. return t && t !== this._popup || (t = this._popup, this._popup = null), t && (this.removeLayer(t), t._isOpen = !1), this
  10817. }
  10818. }), o.Marker.include({
  10819. openPopup: function () {
  10820. return this._popup && this._map && !this._map.hasLayer(this._popup) && (this._popup.setLatLng(this._latlng), this._map.openPopup(this._popup)), this
  10821. },
  10822. closePopup: function () {
  10823. return this._popup && this._popup._close(), this
  10824. },
  10825. togglePopup: function () {
  10826. return this._popup && (this._popup._isOpen ? this.closePopup() : this.openPopup()), this
  10827. },
  10828. bindPopup: function (t, e) {
  10829. var i = o.point(this.options.icon.options.popupAnchor || [0, 0]);
  10830. return i = i.add(o.Popup.prototype.options.offset), e && e.offset && (i = i.add(e.offset)), e = o.extend({
  10831. offset: i
  10832. }, e), this._popupHandlersAdded || (this.on("click", this.togglePopup, this).on("remove", this.closePopup, this).on("move", this._movePopup, this), this._popupHandlersAdded = !0), t instanceof o.Popup ? (o.setOptions(t, e), this._popup = t, t._source = this) : this._popup = new o.Popup(e, this).setContent(t), this
  10833. },
  10834. setPopupContent: function (t) {
  10835. return this._popup && this._popup.setContent(t), this
  10836. },
  10837. unbindPopup: function () {
  10838. return this._popup && (this._popup = null, this.off("click", this.togglePopup, this).off("remove", this.closePopup, this).off("move", this._movePopup, this), this._popupHandlersAdded = !1), this
  10839. },
  10840. getPopup: function () {
  10841. return this._popup
  10842. },
  10843. _movePopup: function (t) {
  10844. this._popup.setLatLng(t.latlng)
  10845. }
  10846. }), o.LayerGroup = o.Class.extend({
  10847. initialize: function (t) {
  10848. this._layers = {};
  10849. var e, i;
  10850. if (t)
  10851. for (e = 0, i = t.length; i > e; e++) this.addLayer(t[e])
  10852. },
  10853. addLayer: function (t) {
  10854. var e = this.getLayerId(t);
  10855. return this._layers[e] = t, this._map && this._map.addLayer(t), this
  10856. },
  10857. removeLayer: function (t) {
  10858. var e = t in this._layers ? t : this.getLayerId(t);
  10859. return this._map && this._layers[e] && this._map.removeLayer(this._layers[e]), delete this._layers[e], this
  10860. },
  10861. hasLayer: function (t) {
  10862. return t ? t in this._layers || this.getLayerId(t) in this._layers : !1
  10863. },
  10864. clearLayers: function () {
  10865. return this.eachLayer(this.removeLayer, this), this
  10866. },
  10867. invoke: function (t) {
  10868. var e, i, n = Array.prototype.slice.call(arguments, 1);
  10869. for (e in this._layers) i = this._layers[e], i[t] && i[t].apply(i, n);
  10870. return this
  10871. },
  10872. onAdd: function (t) {
  10873. this._map = t, this.eachLayer(t.addLayer, t)
  10874. },
  10875. onRemove: function (t) {
  10876. this.eachLayer(t.removeLayer, t), this._map = null
  10877. },
  10878. addTo: function (t) {
  10879. return t.addLayer(this), this
  10880. },
  10881. eachLayer: function (t, e) {
  10882. for (var i in this._layers) t.call(e, this._layers[i]);
  10883. return this
  10884. },
  10885. getLayer: function (t) {
  10886. return this._layers[t]
  10887. },
  10888. getLayers: function () {
  10889. var t = [];
  10890. for (var e in this._layers) t.push(this._layers[e]);
  10891. return t
  10892. },
  10893. setZIndex: function (t) {
  10894. return this.invoke("setZIndex", t)
  10895. },
  10896. getLayerId: function (t) {
  10897. return o.stamp(t)
  10898. }
  10899. }), o.layerGroup = function (t) {
  10900. return new o.LayerGroup(t)
  10901. }, o.FeatureGroup = o.LayerGroup.extend({
  10902. includes: o.Mixin.Events,
  10903. statics: {
  10904. EVENTS: "click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"
  10905. },
  10906. addLayer: function (t) {
  10907. return this.hasLayer(t) ? this : ("on" in t && t.on(o.FeatureGroup.EVENTS, this._propagateEvent, this), o.LayerGroup.prototype.addLayer.call(this, t), this._popupContent && t.bindPopup && t.bindPopup(this._popupContent, this._popupOptions), this.fire("layeradd", {
  10908. layer: t
  10909. }))
  10910. },
  10911. removeLayer: function (t) {
  10912. return this.hasLayer(t) ? (t in this._layers && (t = this._layers[t]), "off" in t && t.off(o.FeatureGroup.EVENTS, this._propagateEvent, this), o.LayerGroup.prototype.removeLayer.call(this, t), this._popupContent && this.invoke("unbindPopup"), this.fire("layerremove", {
  10913. layer: t
  10914. })) : this
  10915. },
  10916. bindPopup: function (t, e) {
  10917. return this._popupContent = t, this._popupOptions = e, this.invoke("bindPopup", t, e)
  10918. },
  10919. openPopup: function (t) {
  10920. for (var e in this._layers) {
  10921. this._layers[e].openPopup(t);
  10922. break
  10923. }
  10924. return this
  10925. },
  10926. setStyle: function (t) {
  10927. return this.invoke("setStyle", t)
  10928. },
  10929. bringToFront: function () {
  10930. return this.invoke("bringToFront")
  10931. },
  10932. bringToBack: function () {
  10933. return this.invoke("bringToBack")
  10934. },
  10935. getBounds: function () {
  10936. var t = new o.LatLngBounds;
  10937. return this.eachLayer(function (e) {
  10938. t.extend(e instanceof o.Marker ? e.getLatLng() : e.getBounds())
  10939. }), t
  10940. },
  10941. _propagateEvent: function (t) {
  10942. t = o.extend({
  10943. layer: t.target,
  10944. target: this
  10945. }, t), this.fire(t.type, t)
  10946. }
  10947. }), o.featureGroup = function (t) {
  10948. return new o.FeatureGroup(t)
  10949. }, o.Path = o.Class.extend({
  10950. includes: [o.Mixin.Events],
  10951. statics: {
  10952. CLIP_PADDING: function () {
  10953. var e = o.Browser.mobile ? 1280 : 2e3,
  10954. i = (e / Math.max(t.outerWidth, t.outerHeight) - 1) / 2;
  10955. return Math.max(0, Math.min(.5, i))
  10956. }()
  10957. },
  10958. options: {
  10959. stroke: !0,
  10960. color: "#0033ff",
  10961. dashArray: null,
  10962. lineCap: null,
  10963. lineJoin: null,
  10964. weight: 5,
  10965. opacity: .5,
  10966. fill: !1,
  10967. fillColor: null,
  10968. fillOpacity: .2,
  10969. clickable: !0
  10970. },
  10971. initialize: function (t) {
  10972. o.setOptions(this, t)
  10973. },
  10974. onAdd: function (t) {
  10975. this._map = t, this._container || (this._initElements(), this._initEvents()), this.projectLatlngs(), this._updatePath(), this._container && this._map._pathRoot.appendChild(this._container), this.fire("add"), t.on({
  10976. viewreset: this.projectLatlngs,
  10977. moveend: this._updatePath
  10978. }, this)
  10979. },
  10980. addTo: function (t) {
  10981. return t.addLayer(this), this
  10982. },
  10983. onRemove: function (t) {
  10984. t._pathRoot.removeChild(this._container), this.fire("remove"), this._map = null, o.Browser.vml && (this._container = null, this._stroke = null, this._fill = null), t.off({
  10985. viewreset: this.projectLatlngs,
  10986. moveend: this._updatePath
  10987. }, this)
  10988. },
  10989. projectLatlngs: function () {},
  10990. setStyle: function (t) {
  10991. return o.setOptions(this, t), this._container && this._updateStyle(), this
  10992. },
  10993. redraw: function () {
  10994. return this._map && (this.projectLatlngs(), this._updatePath()), this
  10995. }
  10996. }), o.Map.include({
  10997. _updatePathViewport: function () {
  10998. var t = o.Path.CLIP_PADDING,
  10999. e = this.getSize(),
  11000. i = o.DomUtil.getPosition(this._mapPane),
  11001. n = i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),
  11002. s = n.add(e.multiplyBy(1 + 2 * t)._round());
  11003. this._pathViewport = new o.Bounds(n, s)
  11004. }
  11005. }), o.Path.SVG_NS = "http://www.w3.org/2000/svg", o.Browser.svg = !(!e.createElementNS || !e.createElementNS(o.Path.SVG_NS, "svg").createSVGRect), o.Path = o.Path.extend({
  11006. statics: {
  11007. SVG: o.Browser.svg
  11008. },
  11009. bringToFront: function () {
  11010. var t = this._map._pathRoot,
  11011. e = this._container;
  11012. return e && t.lastChild !== e && t.appendChild(e), this
  11013. },
  11014. bringToBack: function () {
  11015. var t = this._map._pathRoot,
  11016. e = this._container,
  11017. i = t.firstChild;
  11018. return e && i !== e && t.insertBefore(e, i), this
  11019. },
  11020. getPathString: function () {},
  11021. _createElement: function (t) {
  11022. return e.createElementNS(o.Path.SVG_NS, t)
  11023. },
  11024. _initElements: function () {
  11025. this._map._initPathRoot(), this._initPath(), this._initStyle()
  11026. },
  11027. _initPath: function () {
  11028. this._container = this._createElement("g"), this._path = this._createElement("path"), this.options.className && o.DomUtil.addClass(this._path, this.options.className), this._container.appendChild(this._path)
  11029. },
  11030. _initStyle: function () {
  11031. this.options.stroke && (this._path.setAttribute("stroke-linejoin", "round"), this._path.setAttribute("stroke-linecap", "round")), this.options.fill && this._path.setAttribute("fill-rule", "evenodd"), this.options.pointerEvents && this._path.setAttribute("pointer-events", this.options.pointerEvents), this.options.clickable || this.options.pointerEvents || this._path.setAttribute("pointer-events", "none"), this._updateStyle()
  11032. },
  11033. _updateStyle: function () {
  11034. this.options.stroke ? (this._path.setAttribute("stroke", this.options.color), this._path.setAttribute("stroke-opacity", this.options.opacity), this._path.setAttribute("stroke-width", this.options.weight), this.options.dashArray ? this._path.setAttribute("stroke-dasharray", this.options.dashArray) : this._path.removeAttribute("stroke-dasharray"), this.options.lineCap && this._path.setAttribute("stroke-linecap", this.options.lineCap), this.options.lineJoin && this._path.setAttribute("stroke-linejoin", this.options.lineJoin)) : this._path.setAttribute("stroke", "none"), this.options.fill ? (this._path.setAttribute("fill", this.options.fillColor || this.options.color), this._path.setAttribute("fill-opacity", this.options.fillOpacity)) : this._path.setAttribute("fill", "none")
  11035. },
  11036. _updatePath: function () {
  11037. var t = this.getPathString();
  11038. t || (t = "M0 0"), this._path.setAttribute("d", t)
  11039. },
  11040. _initEvents: function () {
  11041. if (this.options.clickable) {
  11042. (o.Browser.svg || !o.Browser.vml) && o.DomUtil.addClass(this._path, "leaflet-clickable"), o.DomEvent.on(this._container, "click", this._onMouseClick, this);
  11043. for (var t = ["dblclick", "mousedown", "mouseover", "mouseout", "mousemove", "contextmenu"], e = 0; e < t.length; e++) o.DomEvent.on(this._container, t[e], this._fireMouseEvent, this)
  11044. }
  11045. },
  11046. _onMouseClick: function (t) {
  11047. this._map.dragging && this._map.dragging.moved() || this._fireMouseEvent(t)
  11048. },
  11049. _fireMouseEvent: function (t) {
  11050. if (this._map && this.hasEventListeners(t.type)) {
  11051. var e = this._map,
  11052. i = e.mouseEventToContainerPoint(t),
  11053. n = e.containerPointToLayerPoint(i),
  11054. s = e.layerPointToLatLng(n);
  11055. this.fire(t.type, {
  11056. latlng: s,
  11057. layerPoint: n,
  11058. containerPoint: i,
  11059. originalEvent: t
  11060. }), "contextmenu" === t.type && o.DomEvent.preventDefault(t), "mousemove" !== t.type && o.DomEvent.stopPropagation(t)
  11061. }
  11062. }
  11063. }), o.Map.include({
  11064. _initPathRoot: function () {
  11065. this._pathRoot || (this._pathRoot = o.Path.prototype._createElement("svg"), this._panes.overlayPane.appendChild(this._pathRoot), this.options.zoomAnimation && o.Browser.any3d ? (o.DomUtil.addClass(this._pathRoot, "leaflet-zoom-animated"), this.on({
  11066. zoomanim: this._animatePathZoom,
  11067. zoomend: this._endPathZoom
  11068. })) : o.DomUtil.addClass(this._pathRoot, "leaflet-zoom-hide"), this.on("moveend", this._updateSvgViewport), this._updateSvgViewport())
  11069. },
  11070. _animatePathZoom: function (t) {
  11071. var e = this.getZoomScale(t.zoom),
  11072. i = this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);
  11073. this._pathRoot.style[o.DomUtil.TRANSFORM] = o.DomUtil.getTranslateString(i) + " scale(" + e + ") ", this._pathZooming = !0
  11074. },
  11075. _endPathZoom: function () {
  11076. this._pathZooming = !1
  11077. },
  11078. _updateSvgViewport: function () {
  11079. if (!this._pathZooming) {
  11080. this._updatePathViewport();
  11081. var t = this._pathViewport,
  11082. e = t.min,
  11083. i = t.max,
  11084. n = i.x - e.x,
  11085. s = i.y - e.y,
  11086. a = this._pathRoot,
  11087. r = this._panes.overlayPane;
  11088. o.Browser.mobileWebkit && r.removeChild(a), o.DomUtil.setPosition(a, e), a.setAttribute("width", n), a.setAttribute("height", s), a.setAttribute("viewBox", [e.x, e.y, n, s].join(" ")), o.Browser.mobileWebkit && r.appendChild(a)
  11089. }
  11090. }
  11091. }), o.Path.include({
  11092. bindPopup: function (t, e) {
  11093. return t instanceof o.Popup ? this._popup = t : ((!this._popup || e) && (this._popup = new o.Popup(e, this)), this._popup.setContent(t)), this._popupHandlersAdded || (this.on("click", this._openPopup, this).on("remove", this.closePopup, this), this._popupHandlersAdded = !0), this
  11094. },
  11095. unbindPopup: function () {
  11096. return this._popup && (this._popup = null, this.off("click", this._openPopup).off("remove", this.closePopup), this._popupHandlersAdded = !1), this
  11097. },
  11098. openPopup: function (t) {
  11099. return this._popup && (t = t || this._latlng || this._latlngs[Math.floor(this._latlngs.length / 2)], this._openPopup({
  11100. latlng: t
  11101. })), this
  11102. },
  11103. closePopup: function () {
  11104. return this._popup && this._popup._close(), this
  11105. },
  11106. _openPopup: function (t) {
  11107. this._popup.setLatLng(t.latlng), this._map.openPopup(this._popup)
  11108. }
  11109. }), o.Browser.vml = !o.Browser.svg && function () {
  11110. try {
  11111. var t = e.createElement("div");
  11112. t.innerHTML = '<v:shape adj="1"/>';
  11113. var i = t.firstChild;
  11114. return i.style.behavior = "url(#default#VML)", i && "object" == typeof i.adj
  11115. } catch (n) {
  11116. return !1
  11117. }
  11118. }(), o.Path = o.Browser.svg || !o.Browser.vml ? o.Path : o.Path.extend({
  11119. statics: {
  11120. VML: !0,
  11121. CLIP_PADDING: .02
  11122. },
  11123. _createElement: function () {
  11124. try {
  11125. return e.namespaces.add("lvml", "urn:schemas-microsoft-com:vml"),
  11126. function (t) {
  11127. return e.createElement("<lvml:" + t + ' class="lvml">')
  11128. }
  11129. } catch (t) {
  11130. return function (t) {
  11131. return e.createElement("<" + t + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')
  11132. }
  11133. }
  11134. }(),
  11135. _initPath: function () {
  11136. var t = this._container = this._createElement("shape");
  11137. o.DomUtil.addClass(t, "leaflet-vml-shape" + (this.options.className ? " " + this.options.className : "")), this.options.clickable && o.DomUtil.addClass(t, "leaflet-clickable"), t.coordsize = "1 1", this._path = this._createElement("path"), t.appendChild(this._path), this._map._pathRoot.appendChild(t)
  11138. },
  11139. _initStyle: function () {
  11140. this._updateStyle()
  11141. },
  11142. _updateStyle: function () {
  11143. var t = this._stroke,
  11144. e = this._fill,
  11145. i = this.options,
  11146. n = this._container;
  11147. n.stroked = i.stroke, n.filled = i.fill, i.stroke ? (t || (t = this._stroke = this._createElement("stroke"), t.endcap = "round", n.appendChild(t)), t.weight = i.weight + "px", t.color = i.color, t.opacity = i.opacity, i.dashArray ? t.dashStyle = o.Util.isArray(i.dashArray) ? i.dashArray.join(" ") : i.dashArray.replace(/( *, *)/g, " ") : t.dashStyle = "", i.lineCap && (t.endcap = i.lineCap.replace("butt", "flat")), i.lineJoin && (t.joinstyle = i.lineJoin)) : t && (n.removeChild(t), this._stroke = null), i.fill ? (e || (e = this._fill = this._createElement("fill"), n.appendChild(e)), e.color = i.fillColor || i.color, e.opacity = i.fillOpacity) : e && (n.removeChild(e), this._fill = null)
  11148. },
  11149. _updatePath: function () {
  11150. var t = this._container.style;
  11151. t.display = "none", this._path.v = this.getPathString() + " ", t.display = ""
  11152. }
  11153. }), o.Map.include(o.Browser.svg || !o.Browser.vml ? {} : {
  11154. _initPathRoot: function () {
  11155. if (!this._pathRoot) {
  11156. var t = this._pathRoot = e.createElement("div");
  11157. t.className = "leaflet-vml-container", this._panes.overlayPane.appendChild(t), this.on("moveend", this._updatePathViewport), this._updatePathViewport()
  11158. }
  11159. }
  11160. }), o.Browser.canvas = function () {
  11161. return !!e.createElement("canvas").getContext
  11162. }(), o.Path = o.Path.SVG && !t.L_PREFER_CANVAS || !o.Browser.canvas ? o.Path : o.Path.extend({
  11163. statics: {
  11164. CANVAS: !0,
  11165. SVG: !1
  11166. },
  11167. redraw: function () {
  11168. return this._map && (this.projectLatlngs(), this._requestUpdate()), this
  11169. },
  11170. setStyle: function (t) {
  11171. return o.setOptions(this, t), this._map && (this._updateStyle(), this._requestUpdate()), this
  11172. },
  11173. onRemove: function (t) {
  11174. t.off("viewreset", this.projectLatlngs, this).off("moveend", this._updatePath, this), this.options.clickable && (this._map.off("click", this._onClick, this), this._map.off("mousemove", this._onMouseMove, this)), this._requestUpdate(), this.fire("remove"), this._map = null
  11175. },
  11176. _requestUpdate: function () {
  11177. this._map && !o.Path._updateRequest && (o.Path._updateRequest = o.Util.requestAnimFrame(this._fireMapMoveEnd, this._map))
  11178. },
  11179. _fireMapMoveEnd: function () {
  11180. o.Path._updateRequest = null, this.fire("moveend")
  11181. },
  11182. _initElements: function () {
  11183. this._map._initPathRoot(), this._ctx = this._map._canvasCtx
  11184. },
  11185. _updateStyle: function () {
  11186. var t = this.options;
  11187. t.stroke && (this._ctx.lineWidth = t.weight, this._ctx.strokeStyle = t.color), t.fill && (this._ctx.fillStyle = t.fillColor || t.color), t.lineCap && (this._ctx.lineCap = t.lineCap), t.lineJoin && (this._ctx.lineJoin = t.lineJoin)
  11188. },
  11189. _drawPath: function () {
  11190. var t, e, i, n, s, a;
  11191. for (this._ctx.beginPath(), t = 0, i = this._parts.length; i > t; t++) {
  11192. for (e = 0, n = this._parts[t].length; n > e; e++) s = this._parts[t][e], a = (0 === e ? "move" : "line") + "To", this._ctx[a](s.x, s.y);
  11193. this instanceof o.Polygon && this._ctx.closePath()
  11194. }
  11195. },
  11196. _checkIfEmpty: function () {
  11197. return !this._parts.length
  11198. },
  11199. _updatePath: function () {
  11200. if (!this._checkIfEmpty()) {
  11201. var t = this._ctx,
  11202. e = this.options;
  11203. this._drawPath(), t.save(), this._updateStyle(), e.fill && (t.globalAlpha = e.fillOpacity, t.fill(e.fillRule || "evenodd")), e.stroke && (t.globalAlpha = e.opacity, t.stroke()), t.restore()
  11204. }
  11205. },
  11206. _initEvents: function () {
  11207. this.options.clickable && (this._map.on("mousemove", this._onMouseMove, this), this._map.on("click dblclick contextmenu", this._fireMouseEvent, this))
  11208. },
  11209. _fireMouseEvent: function (t) {
  11210. this._containsPoint(t.layerPoint) && this.fire(t.type, t)
  11211. },
  11212. _onMouseMove: function (t) {
  11213. this._map && !this._map._animatingZoom && (this._containsPoint(t.layerPoint) ? (this._ctx.canvas.style.cursor = "pointer", this._mouseInside = !0, this.fire("mouseover", t)) : this._mouseInside && (this._ctx.canvas.style.cursor = "", this._mouseInside = !1, this.fire("mouseout", t)))
  11214. }
  11215. }), o.Map.include(o.Path.SVG && !t.L_PREFER_CANVAS || !o.Browser.canvas ? {} : {
  11216. _initPathRoot: function () {
  11217. var t, i = this._pathRoot;
  11218. i || (i = this._pathRoot = e.createElement("canvas"), i.style.position = "absolute", t = this._canvasCtx = i.getContext("2d"), t.lineCap = "round", t.lineJoin = "round", this._panes.overlayPane.appendChild(i), this.options.zoomAnimation && (this._pathRoot.className = "leaflet-zoom-animated", this.on("zoomanim", this._animatePathZoom), this.on("zoomend", this._endPathZoom)), this.on("moveend", this._updateCanvasViewport), this._updateCanvasViewport())
  11219. },
  11220. _updateCanvasViewport: function () {
  11221. if (!this._pathZooming) {
  11222. this._updatePathViewport();
  11223. var t = this._pathViewport,
  11224. e = t.min,
  11225. i = t.max.subtract(e),
  11226. n = this._pathRoot;
  11227. o.DomUtil.setPosition(n, e), n.width = i.x, n.height = i.y, n.getContext("2d").translate(-e.x, -e.y)
  11228. }
  11229. }
  11230. }), o.LineUtil = {
  11231. simplify: function (t, e) {
  11232. if (!e || !t.length) return t.slice();
  11233. var i = e * e;
  11234. return t = this._reducePoints(t, i), t = this._simplifyDP(t, i)
  11235. },
  11236. pointToSegmentDistance: function (t, e, i) {
  11237. return Math.sqrt(this._sqClosestPointOnSegment(t, e, i, !0))
  11238. },
  11239. closestPointOnSegment: function (t, e, i) {
  11240. return this._sqClosestPointOnSegment(t, e, i)
  11241. },
  11242. _simplifyDP: function (t, e) {
  11243. var n = t.length,
  11244. o = typeof Uint8Array != i + "" ? Uint8Array : Array,
  11245. s = new o(n);
  11246. s[0] = s[n - 1] = 1, this._simplifyDPStep(t, s, e, 0, n - 1);
  11247. var a, r = [];
  11248. for (a = 0; n > a; a++) s[a] && r.push(t[a]);
  11249. return r
  11250. },
  11251. _simplifyDPStep: function (t, e, i, n, o) {
  11252. var s, a, r, h = 0;
  11253. for (a = n + 1; o - 1 >= a; a++) r = this._sqClosestPointOnSegment(t[a], t[n], t[o], !0), r > h && (s = a, h = r);
  11254. h > i && (e[s] = 1, this._simplifyDPStep(t, e, i, n, s), this._simplifyDPStep(t, e, i, s, o))
  11255. },
  11256. _reducePoints: function (t, e) {
  11257. for (var i = [t[0]], n = 1, o = 0, s = t.length; s > n; n++) this._sqDist(t[n], t[o]) > e && (i.push(t[n]), o = n);
  11258. return s - 1 > o && i.push(t[s - 1]), i
  11259. },
  11260. clipSegment: function (t, e, i, n) {
  11261. var o, s, a, r = n ? this._lastCode : this._getBitCode(t, i),
  11262. h = this._getBitCode(e, i);
  11263. for (this._lastCode = h;;) {
  11264. if (!(r | h)) return [t, e];
  11265. if (r & h) return !1;
  11266. o = r || h, s = this._getEdgeIntersection(t, e, o, i), a = this._getBitCode(s, i), o === r ? (t = s, r = a) : (e = s, h = a)
  11267. }
  11268. },
  11269. _getEdgeIntersection: function (t, e, i, n) {
  11270. var s = e.x - t.x,
  11271. a = e.y - t.y,
  11272. r = n.min,
  11273. h = n.max;
  11274. return 8 & i ? new o.Point(t.x + s * (h.y - t.y) / a, h.y) : 4 & i ? new o.Point(t.x + s * (r.y - t.y) / a, r.y) : 2 & i ? new o.Point(h.x, t.y + a * (h.x - t.x) / s) : 1 & i ? new o.Point(r.x, t.y + a * (r.x - t.x) / s) : void 0
  11275. },
  11276. _getBitCode: function (t, e) {
  11277. var i = 0;
  11278. return t.x < e.min.x ? i |= 1 : t.x > e.max.x && (i |= 2), t.y < e.min.y ? i |= 4 : t.y > e.max.y && (i |= 8), i
  11279. },
  11280. _sqDist: function (t, e) {
  11281. var i = e.x - t.x,
  11282. n = e.y - t.y;
  11283. return i * i + n * n
  11284. },
  11285. _sqClosestPointOnSegment: function (t, e, i, n) {
  11286. var s, a = e.x,
  11287. r = e.y,
  11288. h = i.x - a,
  11289. l = i.y - r,
  11290. u = h * h + l * l;
  11291. return u > 0 && (s = ((t.x - a) * h + (t.y - r) * l) / u, s > 1 ? (a = i.x, r = i.y) : s > 0 && (a += h * s, r += l * s)), h = t.x - a, l = t.y - r, n ? h * h + l * l : new o.Point(a, r)
  11292. }
  11293. }, o.Polyline = o.Path.extend({
  11294. initialize: function (t, e) {
  11295. o.Path.prototype.initialize.call(this, e), this._latlngs = this._convertLatLngs(t)
  11296. },
  11297. options: {
  11298. smoothFactor: 1,
  11299. noClip: !1
  11300. },
  11301. projectLatlngs: function () {
  11302. this._originalPoints = [];
  11303. for (var t = 0, e = this._latlngs.length; e > t; t++) this._originalPoints[t] = this._map.latLngToLayerPoint(this._latlngs[t])
  11304. },
  11305. getPathString: function () {
  11306. for (var t = 0, e = this._parts.length, i = ""; e > t; t++) i += this._getPathPartStr(this._parts[t]);
  11307. return i
  11308. },
  11309. getLatLngs: function () {
  11310. return this._latlngs
  11311. },
  11312. setLatLngs: function (t) {
  11313. return this._latlngs = this._convertLatLngs(t), this.redraw()
  11314. },
  11315. addLatLng: function (t) {
  11316. return this._latlngs.push(o.latLng(t)), this.redraw()
  11317. },
  11318. spliceLatLngs: function () {
  11319. var t = [].splice.apply(this._latlngs, arguments);
  11320. return this._convertLatLngs(this._latlngs, !0), this.redraw(), t
  11321. },
  11322. closestLayerPoint: function (t) {
  11323. for (var e, i, n = 1 / 0, s = this._parts, a = null, r = 0, h = s.length; h > r; r++)
  11324. for (var l = s[r], u = 1, c = l.length; c > u; u++) {
  11325. e = l[u - 1], i = l[u];
  11326. var d = o.LineUtil._sqClosestPointOnSegment(t, e, i, !0);
  11327. n > d && (n = d, a = o.LineUtil._sqClosestPointOnSegment(t, e, i))
  11328. }
  11329. return a && (a.distance = Math.sqrt(n)), a
  11330. },
  11331. getBounds: function () {
  11332. return new o.LatLngBounds(this.getLatLngs())
  11333. },
  11334. _convertLatLngs: function (t, e) {
  11335. var i, n, s = e ? t : [];
  11336. for (i = 0, n = t.length; n > i; i++) {
  11337. if (o.Util.isArray(t[i]) && "number" != typeof t[i][0]) return;
  11338. s[i] = o.latLng(t[i])
  11339. }
  11340. return s
  11341. },
  11342. _initEvents: function () {
  11343. o.Path.prototype._initEvents.call(this)
  11344. },
  11345. _getPathPartStr: function (t) {
  11346. for (var e, i = o.Path.VML, n = 0, s = t.length, a = ""; s > n; n++) e = t[n], i && e._round(), a += (n ? "L" : "M") + e.x + " " + e.y;
  11347. return a
  11348. },
  11349. _clipPoints: function () {
  11350. var t, e, i, n = this._originalPoints,
  11351. s = n.length;
  11352. if (this.options.noClip) return void(this._parts = [n]);
  11353. this._parts = [];
  11354. var a = this._parts,
  11355. r = this._map._pathViewport,
  11356. h = o.LineUtil;
  11357. for (t = 0, e = 0; s - 1 > t; t++) i = h.clipSegment(n[t], n[t + 1], r, t), i && (a[e] = a[e] || [], a[e].push(i[0]), (i[1] !== n[t + 1] || t === s - 2) && (a[e].push(i[1]), e++))
  11358. },
  11359. _simplifyPoints: function () {
  11360. for (var t = this._parts, e = o.LineUtil, i = 0, n = t.length; n > i; i++) t[i] = e.simplify(t[i], this.options.smoothFactor)
  11361. },
  11362. _updatePath: function () {
  11363. this._map && (this._clipPoints(), this._simplifyPoints(), o.Path.prototype._updatePath.call(this))
  11364. }
  11365. }), o.polyline = function (t, e) {
  11366. return new o.Polyline(t, e)
  11367. }, o.PolyUtil = {}, o.PolyUtil.clipPolygon = function (t, e) {
  11368. var i, n, s, a, r, h, l, u, c, d = [1, 4, 2, 8],
  11369. p = o.LineUtil;
  11370. for (n = 0, l = t.length; l > n; n++) t[n]._code = p._getBitCode(t[n], e);
  11371. for (a = 0; 4 > a; a++) {
  11372. for (u = d[a], i = [], n = 0, l = t.length, s = l - 1; l > n; s = n++) r = t[n], h = t[s], r._code & u ? h._code & u || (c = p._getEdgeIntersection(h, r, u, e), c._code = p._getBitCode(c, e), i.push(c)) : (h._code & u && (c = p._getEdgeIntersection(h, r, u, e), c._code = p._getBitCode(c, e), i.push(c)), i.push(r));
  11373. t = i
  11374. }
  11375. return t
  11376. }, o.Polygon = o.Polyline.extend({
  11377. options: {
  11378. fill: !0
  11379. },
  11380. initialize: function (t, e) {
  11381. o.Polyline.prototype.initialize.call(this, t, e), this._initWithHoles(t)
  11382. },
  11383. _initWithHoles: function (t) {
  11384. var e, i, n;
  11385. if (t && o.Util.isArray(t[0]) && "number" != typeof t[0][0])
  11386. for (this._latlngs = this._convertLatLngs(t[0]), this._holes = t.slice(1), e = 0, i = this._holes.length; i > e; e++) n = this._holes[e] = this._convertLatLngs(this._holes[e]), n[0].equals(n[n.length - 1]) && n.pop();
  11387. t = this._latlngs, t.length >= 2 && t[0].equals(t[t.length - 1]) && t.pop()
  11388. },
  11389. projectLatlngs: function () {
  11390. if (o.Polyline.prototype.projectLatlngs.call(this), this._holePoints = [], this._holes) {
  11391. var t, e, i, n;
  11392. for (t = 0, i = this._holes.length; i > t; t++)
  11393. for (this._holePoints[t] = [], e = 0, n = this._holes[t].length; n > e; e++) this._holePoints[t][e] = this._map.latLngToLayerPoint(this._holes[t][e])
  11394. }
  11395. },
  11396. setLatLngs: function (t) {
  11397. return t && o.Util.isArray(t[0]) && "number" != typeof t[0][0] ? (this._initWithHoles(t), this.redraw()) : o.Polyline.prototype.setLatLngs.call(this, t)
  11398. },
  11399. _clipPoints: function () {
  11400. var t = this._originalPoints,
  11401. e = [];
  11402. if (this._parts = [t].concat(this._holePoints), !this.options.noClip) {
  11403. for (var i = 0, n = this._parts.length; n > i; i++) {
  11404. var s = o.PolyUtil.clipPolygon(this._parts[i], this._map._pathViewport);
  11405. s.length && e.push(s)
  11406. }
  11407. this._parts = e
  11408. }
  11409. },
  11410. _getPathPartStr: function (t) {
  11411. var e = o.Polyline.prototype._getPathPartStr.call(this, t);
  11412. return e + (o.Browser.svg ? "z" : "x")
  11413. }
  11414. }), o.polygon = function (t, e) {
  11415. return new o.Polygon(t, e)
  11416. },
  11417. function () {
  11418. function t(t) {
  11419. return o.FeatureGroup.extend({
  11420. initialize: function (t, e) {
  11421. this._layers = {}, this._options = e, this.setLatLngs(t)
  11422. },
  11423. setLatLngs: function (e) {
  11424. var i = 0,
  11425. n = e.length;
  11426. for (this.eachLayer(function (t) {
  11427. n > i ? t.setLatLngs(e[i++]) : this.removeLayer(t)
  11428. }, this); n > i;) this.addLayer(new t(e[i++], this._options));
  11429. return this
  11430. },
  11431. getLatLngs: function () {
  11432. var t = [];
  11433. return this.eachLayer(function (e) {
  11434. t.push(e.getLatLngs())
  11435. }), t
  11436. }
  11437. })
  11438. }
  11439. o.MultiPolyline = t(o.Polyline), o.MultiPolygon = t(o.Polygon), o.multiPolyline = function (t, e) {
  11440. return new o.MultiPolyline(t, e)
  11441. }, o.multiPolygon = function (t, e) {
  11442. return new o.MultiPolygon(t, e)
  11443. }
  11444. }(), o.Rectangle = o.Polygon.extend({
  11445. initialize: function (t, e) {
  11446. o.Polygon.prototype.initialize.call(this, this._boundsToLatLngs(t), e)
  11447. },
  11448. setBounds: function (t) {
  11449. this.setLatLngs(this._boundsToLatLngs(t))
  11450. },
  11451. _boundsToLatLngs: function (t) {
  11452. return t = o.latLngBounds(t), [t.getSouthWest(), t.getNorthWest(), t.getNorthEast(), t.getSouthEast()]
  11453. }
  11454. }), o.rectangle = function (t, e) {
  11455. return new o.Rectangle(t, e)
  11456. }, o.Circle = o.Path.extend({
  11457. initialize: function (t, e, i) {
  11458. o.Path.prototype.initialize.call(this, i), this._latlng = o.latLng(t), this._mRadius = e
  11459. },
  11460. options: {
  11461. fill: !0
  11462. },
  11463. setLatLng: function (t) {
  11464. return this._latlng = o.latLng(t), this.redraw()
  11465. },
  11466. setRadius: function (t) {
  11467. return this._mRadius = t, this.redraw()
  11468. },
  11469. projectLatlngs: function () {
  11470. var t = this._getLngRadius(),
  11471. e = this._latlng,
  11472. i = this._map.latLngToLayerPoint([e.lat, e.lng - t]);
  11473. this._point = this._map.latLngToLayerPoint(e), this._radius = Math.max(this._point.x - i.x, 1)
  11474. },
  11475. getBounds: function () {
  11476. var t = this._getLngRadius(),
  11477. e = this._mRadius / 40075017 * 360,
  11478. i = this._latlng;
  11479. return new o.LatLngBounds([i.lat - e, i.lng - t], [i.lat + e, i.lng + t])
  11480. },
  11481. getLatLng: function () {
  11482. return this._latlng
  11483. },
  11484. getPathString: function () {
  11485. var t = this._point,
  11486. e = this._radius;
  11487. return this._checkIfEmpty() ? "" : o.Browser.svg ? "M" + t.x + "," + (t.y - e) + "A" + e + "," + e + ",0,1,1," + (t.x - .1) + "," + (t.y - e) + " z" : (t._round(), e = Math.round(e), "AL " + t.x + "," + t.y + " " + e + "," + e + " 0,23592600")
  11488. },
  11489. getRadius: function () {
  11490. return this._mRadius
  11491. },
  11492. _getLatRadius: function () {
  11493. return this._mRadius / 40075017 * 360
  11494. },
  11495. _getLngRadius: function () {
  11496. return this._getLatRadius() / Math.cos(o.LatLng.DEG_TO_RAD * this._latlng.lat)
  11497. },
  11498. _checkIfEmpty: function () {
  11499. if (!this._map) return !1;
  11500. var t = this._map._pathViewport,
  11501. e = this._radius,
  11502. i = this._point;
  11503. return i.x - e > t.max.x || i.y - e > t.max.y || i.x + e < t.min.x || i.y + e < t.min.y
  11504. }
  11505. }), o.circle = function (t, e, i) {
  11506. return new o.Circle(t, e, i)
  11507. }, o.CircleMarker = o.Circle.extend({
  11508. options: {
  11509. radius: 10,
  11510. weight: 2
  11511. },
  11512. initialize: function (t, e) {
  11513. o.Circle.prototype.initialize.call(this, t, null, e), this._radius = this.options.radius
  11514. },
  11515. projectLatlngs: function () {
  11516. this._point = this._map.latLngToLayerPoint(this._latlng)
  11517. },
  11518. _updateStyle: function () {
  11519. o.Circle.prototype._updateStyle.call(this), this.setRadius(this.options.radius)
  11520. },
  11521. setLatLng: function (t) {
  11522. return o.Circle.prototype.setLatLng.call(this, t), this._popup && this._popup._isOpen && this._popup.setLatLng(t), this
  11523. },
  11524. setRadius: function (t) {
  11525. return this.options.radius = this._radius = t, this.redraw()
  11526. },
  11527. getRadius: function () {
  11528. return this._radius
  11529. }
  11530. }), o.circleMarker = function (t, e) {
  11531. return new o.CircleMarker(t, e)
  11532. }, o.Polyline.include(o.Path.CANVAS ? {
  11533. _containsPoint: function (t, e) {
  11534. var i, n, s, a, r, h, l, u = this.options.weight / 2;
  11535. for (o.Browser.touch && (u += 10), i = 0, a = this._parts.length; a > i; i++)
  11536. for (l = this._parts[i], n = 0, r = l.length, s = r - 1; r > n; s = n++)
  11537. if ((e || 0 !== n) && (h = o.LineUtil.pointToSegmentDistance(t, l[s], l[n]), u >= h)) return !0;
  11538. return !1
  11539. }
  11540. } : {}), o.Polygon.include(o.Path.CANVAS ? {
  11541. _containsPoint: function (t) {
  11542. var e, i, n, s, a, r, h, l, u = !1;
  11543. if (o.Polyline.prototype._containsPoint.call(this, t, !0)) return !0;
  11544. for (s = 0, h = this._parts.length; h > s; s++)
  11545. for (e = this._parts[s], a = 0, l = e.length, r = l - 1; l > a; r = a++) i = e[a], n = e[r], i.y > t.y != n.y > t.y && t.x < (n.x - i.x) * (t.y - i.y) / (n.y - i.y) + i.x && (u = !u);
  11546. return u
  11547. }
  11548. } : {}), o.Circle.include(o.Path.CANVAS ? {
  11549. _drawPath: function () {
  11550. var t = this._point;
  11551. this._ctx.beginPath(), this._ctx.arc(t.x, t.y, this._radius, 0, 2 * Math.PI, !1)
  11552. },
  11553. _containsPoint: function (t) {
  11554. var e = this._point,
  11555. i = this.options.stroke ? this.options.weight / 2 : 0;
  11556. return t.distanceTo(e) <= this._radius + i
  11557. }
  11558. } : {}), o.CircleMarker.include(o.Path.CANVAS ? {
  11559. _updateStyle: function () {
  11560. o.Path.prototype._updateStyle.call(this)
  11561. }
  11562. } : {}), o.GeoJSON = o.FeatureGroup.extend({
  11563. initialize: function (t, e) {
  11564. o.setOptions(this, e), this._layers = {}, t && this.addData(t)
  11565. },
  11566. addData: function (t) {
  11567. var e, i, n, s = o.Util.isArray(t) ? t : t.features;
  11568. if (s) {
  11569. for (e = 0, i = s.length; i > e; e++) n = s[e], (n.geometries || n.geometry || n.features || n.coordinates) && this.addData(s[e]);
  11570. return this
  11571. }
  11572. var a = this.options;
  11573. if (!a.filter || a.filter(t)) {
  11574. var r = o.GeoJSON.geometryToLayer(t, a.pointToLayer, a.coordsToLatLng, a);
  11575. return r.feature = o.GeoJSON.asFeature(t), r.defaultOptions = r.options, this.resetStyle(r), a.onEachFeature && a.onEachFeature(t, r), this.addLayer(r)
  11576. }
  11577. },
  11578. resetStyle: function (t) {
  11579. var e = this.options.style;
  11580. e && (o.Util.extend(t.options, t.defaultOptions), this._setLayerStyle(t, e))
  11581. },
  11582. setStyle: function (t) {
  11583. this.eachLayer(function (e) {
  11584. this._setLayerStyle(e, t)
  11585. }, this)
  11586. },
  11587. _setLayerStyle: function (t, e) {
  11588. "function" == typeof e && (e = e(t.feature)), t.setStyle && t.setStyle(e)
  11589. }
  11590. }), o.extend(o.GeoJSON, {
  11591. geometryToLayer: function (t, e, i, n) {
  11592. var s, a, r, h, l = "Feature" === t.type ? t.geometry : t,
  11593. u = l.coordinates,
  11594. c = [];
  11595. switch (i = i || this.coordsToLatLng, l.type) {
  11596. case "Point":
  11597. return s = i(u), e ? e(t, s) : new o.Marker(s);
  11598. case "MultiPoint":
  11599. for (r = 0, h = u.length; h > r; r++) s = i(u[r]), c.push(e ? e(t, s) : new o.Marker(s));
  11600. return new o.FeatureGroup(c);
  11601. case "LineString":
  11602. return a = this.coordsToLatLngs(u, 0, i), new o.Polyline(a, n);
  11603. case "Polygon":
  11604. if (2 === u.length && !u[1].length) throw new Error("Invalid GeoJSON object.");
  11605. return a = this.coordsToLatLngs(u, 1, i), new o.Polygon(a, n);
  11606. case "MultiLineString":
  11607. return a = this.coordsToLatLngs(u, 1, i), new o.MultiPolyline(a, n);
  11608. case "MultiPolygon":
  11609. return a = this.coordsToLatLngs(u, 2, i), new o.MultiPolygon(a, n);
  11610. case "GeometryCollection":
  11611. for (r = 0, h = l.geometries.length; h > r; r++) c.push(this.geometryToLayer({
  11612. geometry: l.geometries[r],
  11613. type: "Feature",
  11614. properties: t.properties
  11615. }, e, i, n));
  11616. return new o.FeatureGroup(c);
  11617. default:
  11618. throw new Error("Invalid GeoJSON object.")
  11619. }
  11620. },
  11621. coordsToLatLng: function (t) {
  11622. return new o.LatLng(t[1], t[0], t[2])
  11623. },
  11624. coordsToLatLngs: function (t, e, i) {
  11625. var n, o, s, a = [];
  11626. for (o = 0, s = t.length; s > o; o++) n = e ? this.coordsToLatLngs(t[o], e - 1, i) : (i || this.coordsToLatLng)(t[o]), a.push(n);
  11627. return a
  11628. },
  11629. latLngToCoords: function (t) {
  11630. var e = [t.lng, t.lat];
  11631. return t.alt !== i && e.push(t.alt), e
  11632. },
  11633. latLngsToCoords: function (t) {
  11634. for (var e = [], i = 0, n = t.length; n > i; i++) e.push(o.GeoJSON.latLngToCoords(t[i]));
  11635. return e
  11636. },
  11637. getFeature: function (t, e) {
  11638. return t.feature ? o.extend({}, t.feature, {
  11639. geometry: e
  11640. }) : o.GeoJSON.asFeature(e)
  11641. },
  11642. asFeature: function (t) {
  11643. return "Feature" === t.type ? t : {
  11644. type: "Feature",
  11645. properties: {},
  11646. geometry: t
  11647. }
  11648. }
  11649. });
  11650. var a = {
  11651. toGeoJSON: function () {
  11652. return o.GeoJSON.getFeature(this, {
  11653. type: "Point",
  11654. coordinates: o.GeoJSON.latLngToCoords(this.getLatLng())
  11655. })
  11656. }
  11657. };
  11658. o.Marker.include(a), o.Circle.include(a), o.CircleMarker.include(a), o.Polyline.include({
  11659. toGeoJSON: function () {
  11660. return o.GeoJSON.getFeature(this, {
  11661. type: "LineString",
  11662. coordinates: o.GeoJSON.latLngsToCoords(this.getLatLngs())
  11663. })
  11664. }
  11665. }), o.Polygon.include({
  11666. toGeoJSON: function () {
  11667. var t, e, i, n = [o.GeoJSON.latLngsToCoords(this.getLatLngs())];
  11668. if (n[0].push(n[0][0]), this._holes)
  11669. for (t = 0, e = this._holes.length; e > t; t++) i = o.GeoJSON.latLngsToCoords(this._holes[t]), i.push(i[0]), n.push(i);
  11670. return o.GeoJSON.getFeature(this, {
  11671. type: "Polygon",
  11672. coordinates: n
  11673. })
  11674. }
  11675. }),
  11676. function () {
  11677. function t(t) {
  11678. return function () {
  11679. var e = [];
  11680. return this.eachLayer(function (t) {
  11681. e.push(t.toGeoJSON().geometry.coordinates)
  11682. }), o.GeoJSON.getFeature(this, {
  11683. type: t,
  11684. coordinates: e
  11685. })
  11686. }
  11687. }
  11688. o.MultiPolyline.include({
  11689. toGeoJSON: t("MultiLineString")
  11690. }), o.MultiPolygon.include({
  11691. toGeoJSON: t("MultiPolygon")
  11692. }), o.LayerGroup.include({
  11693. toGeoJSON: function () {
  11694. var e, i = this.feature && this.feature.geometry,
  11695. n = [];
  11696. if (i && "MultiPoint" === i.type) return t("MultiPoint").call(this);
  11697. var s = i && "GeometryCollection" === i.type;
  11698. return this.eachLayer(function (t) {
  11699. t.toGeoJSON && (e = t.toGeoJSON(), n.push(s ? e.geometry : o.GeoJSON.asFeature(e)))
  11700. }), s ? o.GeoJSON.getFeature(this, {
  11701. geometries: n,
  11702. type: "GeometryCollection"
  11703. }) : {
  11704. type: "FeatureCollection",
  11705. features: n
  11706. }
  11707. }
  11708. })
  11709. }(), o.geoJson = function (t, e) {
  11710. return new o.GeoJSON(t, e)
  11711. }, o.DomEvent = {
  11712. addListener: function (t, e, i, n) {
  11713. var s, a, r, h = o.stamp(i),
  11714. l = "_leaflet_" + e + h;
  11715. return t[l] ? this : (s = function (e) {
  11716. return i.call(n || t, e || o.DomEvent._getEvent())
  11717. }, o.Browser.pointer && 0 === e.indexOf("touch") ? this.addPointerListener(t, e, s, h) : (o.Browser.touch && "dblclick" === e && this.addDoubleTapListener && this.addDoubleTapListener(t, s, h), "addEventListener" in t ? "mousewheel" === e ? (t.addEventListener("DOMMouseScroll", s, !1), t.addEventListener(e, s, !1)) : "mouseenter" === e || "mouseleave" === e ? (a = s, r = "mouseenter" === e ? "mouseover" : "mouseout", s = function (e) {
  11718. return o.DomEvent._checkMouse(t, e) ? a(e) : void 0
  11719. }, t.addEventListener(r, s, !1)) : "click" === e && o.Browser.android ? (a = s, s = function (t) {
  11720. return o.DomEvent._filterClick(t, a)
  11721. }, t.addEventListener(e, s, !1)) : t.addEventListener(e, s, !1) : "attachEvent" in t && t.attachEvent("on" + e, s), t[l] = s, this))
  11722. },
  11723. removeListener: function (t, e, i) {
  11724. var n = o.stamp(i),
  11725. s = "_leaflet_" + e + n,
  11726. a = t[s];
  11727. return a ? (o.Browser.pointer && 0 === e.indexOf("touch") ? this.removePointerListener(t, e, n) : o.Browser.touch && "dblclick" === e && this.removeDoubleTapListener ? this.removeDoubleTapListener(t, n) : "removeEventListener" in t ? "mousewheel" === e ? (t.removeEventListener("DOMMouseScroll", a, !1), t.removeEventListener(e, a, !1)) : "mouseenter" === e || "mouseleave" === e ? t.removeEventListener("mouseenter" === e ? "mouseover" : "mouseout", a, !1) : t.removeEventListener(e, a, !1) : "detachEvent" in t && t.detachEvent("on" + e, a), t[s] = null, this) : this
  11728. },
  11729. stopPropagation: function (t) {
  11730. return t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, o.DomEvent._skipped(t), this
  11731. },
  11732. disableScrollPropagation: function (t) {
  11733. var e = o.DomEvent.stopPropagation;
  11734. return o.DomEvent.on(t, "mousewheel", e).on(t, "MozMousePixelScroll", e)
  11735. },
  11736. disableClickPropagation: function (t) {
  11737. for (var e = o.DomEvent.stopPropagation, i = o.Draggable.START.length - 1; i >= 0; i--) o.DomEvent.on(t, o.Draggable.START[i], e);
  11738. return o.DomEvent.on(t, "click", o.DomEvent._fakeStop).on(t, "dblclick", e)
  11739. },
  11740. preventDefault: function (t) {
  11741. return t.preventDefault ? t.preventDefault() : t.returnValue = !1, this
  11742. },
  11743. stop: function (t) {
  11744. return o.DomEvent.preventDefault(t).stopPropagation(t)
  11745. },
  11746. getMousePosition: function (t, e) {
  11747. if (!e) return new o.Point(t.clientX, t.clientY);
  11748. var i = e.getBoundingClientRect();
  11749. return new o.Point(t.clientX - i.left - e.clientLeft, t.clientY - i.top - e.clientTop)
  11750. },
  11751. getWheelDelta: function (t) {
  11752. var e = 0;
  11753. return t.wheelDelta && (e = t.wheelDelta / 120), t.detail && (e = -t.detail / 3), e
  11754. },
  11755. _skipEvents: {},
  11756. _fakeStop: function (t) {
  11757. o.DomEvent._skipEvents[t.type] = !0
  11758. },
  11759. _skipped: function (t) {
  11760. var e = this._skipEvents[t.type];
  11761. return this._skipEvents[t.type] = !1, e
  11762. },
  11763. _checkMouse: function (t, e) {
  11764. var i = e.relatedTarget;
  11765. if (!i) return !0;
  11766. try {
  11767. for (; i && i !== t;) i = i.parentNode
  11768. } catch (n) {
  11769. return !1
  11770. }
  11771. return i !== t
  11772. },
  11773. _getEvent: function () {
  11774. var e = t.event;
  11775. if (!e)
  11776. for (var i = arguments.callee.caller; i && (e = i.arguments[0], !e || t.Event !== e.constructor);) i = i.caller;
  11777. return e
  11778. },
  11779. _filterClick: function (t, e) {
  11780. var i = t.timeStamp || t.originalEvent.timeStamp,
  11781. n = o.DomEvent._lastClick && i - o.DomEvent._lastClick;
  11782. return n && n > 100 && 500 > n || t.target._simulatedClick && !t._simulated ? void o.DomEvent.stop(t) : (o.DomEvent._lastClick = i, e(t))
  11783. }
  11784. }, o.DomEvent.on = o.DomEvent.addListener, o.DomEvent.off = o.DomEvent.removeListener, o.Draggable = o.Class.extend({
  11785. includes: o.Mixin.Events,
  11786. statics: {
  11787. START: o.Browser.touch ? ["touchstart", "mousedown"] : ["mousedown"],
  11788. END: {
  11789. mousedown: "mouseup",
  11790. touchstart: "touchend",
  11791. pointerdown: "touchend",
  11792. MSPointerDown: "touchend"
  11793. },
  11794. MOVE: {
  11795. mousedown: "mousemove",
  11796. touchstart: "touchmove",
  11797. pointerdown: "touchmove",
  11798. MSPointerDown: "touchmove"
  11799. }
  11800. },
  11801. initialize: function (t, e) {
  11802. this._element = t, this._dragStartTarget = e || t
  11803. },
  11804. enable: function () {
  11805. if (!this._enabled) {
  11806. for (var t = o.Draggable.START.length - 1; t >= 0; t--) o.DomEvent.on(this._dragStartTarget, o.Draggable.START[t], this._onDown, this);
  11807. this._enabled = !0
  11808. }
  11809. },
  11810. disable: function () {
  11811. if (this._enabled) {
  11812. for (var t = o.Draggable.START.length - 1; t >= 0; t--) o.DomEvent.off(this._dragStartTarget, o.Draggable.START[t], this._onDown, this);
  11813. this._enabled = !1, this._moved = !1
  11814. }
  11815. },
  11816. _onDown: function (t) {
  11817. if (this._moved = !1, !t.shiftKey && (1 === t.which || 1 === t.button || t.touches) && (o.DomEvent.stopPropagation(t), !o.Draggable._disabled && (o.DomUtil.disableImageDrag(), o.DomUtil.disableTextSelection(), !this._moving))) {
  11818. var i = t.touches ? t.touches[0] : t;
  11819. this._startPoint = new o.Point(i.clientX, i.clientY), this._startPos = this._newPos = o.DomUtil.getPosition(this._element), o.DomEvent.on(e, o.Draggable.MOVE[t.type], this._onMove, this).on(e, o.Draggable.END[t.type], this._onUp, this)
  11820. }
  11821. },
  11822. _onMove: function (t) {
  11823. if (t.touches && t.touches.length > 1) return void(this._moved = !0);
  11824. var i = t.touches && 1 === t.touches.length ? t.touches[0] : t,
  11825. n = new o.Point(i.clientX, i.clientY),
  11826. s = n.subtract(this._startPoint);
  11827. (s.x || s.y) && (o.Browser.touch && Math.abs(s.x) + Math.abs(s.y) < 3 || (o.DomEvent.preventDefault(t), this._moved || (this.fire("dragstart"), this._moved = !0, this._startPos = o.DomUtil.getPosition(this._element).subtract(s), o.DomUtil.addClass(e.body, "leaflet-dragging"), this._lastTarget = t.target || t.srcElement, o.DomUtil.addClass(this._lastTarget, "leaflet-drag-target")), this._newPos = this._startPos.add(s), this._moving = !0, o.Util.cancelAnimFrame(this._animRequest), this._animRequest = o.Util.requestAnimFrame(this._updatePosition, this, !0, this._dragStartTarget)))
  11828. },
  11829. _updatePosition: function () {
  11830. this.fire("predrag"), o.DomUtil.setPosition(this._element, this._newPos), this.fire("drag")
  11831. },
  11832. _onUp: function () {
  11833. o.DomUtil.removeClass(e.body, "leaflet-dragging"), this._lastTarget && (o.DomUtil.removeClass(this._lastTarget, "leaflet-drag-target"), this._lastTarget = null);
  11834. for (var t in o.Draggable.MOVE) o.DomEvent.off(e, o.Draggable.MOVE[t], this._onMove).off(e, o.Draggable.END[t], this._onUp);
  11835. o.DomUtil.enableImageDrag(), o.DomUtil.enableTextSelection(), this._moved && this._moving && (o.Util.cancelAnimFrame(this._animRequest), this.fire("dragend", {
  11836. distance: this._newPos.distanceTo(this._startPos)
  11837. })), this._moving = !1
  11838. }
  11839. }), o.Handler = o.Class.extend({
  11840. initialize: function (t) {
  11841. this._map = t
  11842. },
  11843. enable: function () {
  11844. this._enabled || (this._enabled = !0, this.addHooks())
  11845. },
  11846. disable: function () {
  11847. this._enabled && (this._enabled = !1, this.removeHooks())
  11848. },
  11849. enabled: function () {
  11850. return !!this._enabled
  11851. }
  11852. }), o.Map.mergeOptions({
  11853. dragging: !0,
  11854. inertia: !o.Browser.android23,
  11855. inertiaDeceleration: 3400,
  11856. inertiaMaxSpeed: 1 / 0,
  11857. inertiaThreshold: o.Browser.touch ? 32 : 18,
  11858. easeLinearity: .25,
  11859. worldCopyJump: !1
  11860. }), o.Map.Drag = o.Handler.extend({
  11861. addHooks: function () {
  11862. if (!this._draggable) {
  11863. var t = this._map;
  11864. this._draggable = new o.Draggable(t._mapPane, t._container), this._draggable.on({
  11865. dragstart: this._onDragStart,
  11866. drag: this._onDrag,
  11867. dragend: this._onDragEnd
  11868. }, this), t.options.worldCopyJump && (this._draggable.on("predrag", this._onPreDrag, this), t.on("viewreset", this._onViewReset, this), t.whenReady(this._onViewReset, this))
  11869. }
  11870. this._draggable.enable()
  11871. },
  11872. removeHooks: function () {
  11873. this._draggable.disable()
  11874. },
  11875. moved: function () {
  11876. return this._draggable && this._draggable._moved
  11877. },
  11878. _onDragStart: function () {
  11879. var t = this._map;
  11880. t._panAnim && t._panAnim.stop(), t.fire("movestart").fire("dragstart"), t.options.inertia && (this._positions = [], this._times = [])
  11881. },
  11882. _onDrag: function () {
  11883. if (this._map.options.inertia) {
  11884. var t = this._lastTime = +new Date,
  11885. e = this._lastPos = this._draggable._newPos;
  11886. this._positions.push(e), this._times.push(t), t - this._times[0] > 200 && (this._positions.shift(), this._times.shift())
  11887. }
  11888. this._map.fire("move").fire("drag")
  11889. },
  11890. _onViewReset: function () {
  11891. var t = this._map.getSize()._divideBy(2),
  11892. e = this._map.latLngToLayerPoint([0, 0]);
  11893. this._initialWorldOffset = e.subtract(t).x, this._worldWidth = this._map.project([0, 180]).x
  11894. },
  11895. _onPreDrag: function () {
  11896. var t = this._worldWidth,
  11897. e = Math.round(t / 2),
  11898. i = this._initialWorldOffset,
  11899. n = this._draggable._newPos.x,
  11900. o = (n - e + i) % t + e - i,
  11901. s = (n + e + i) % t - e - i,
  11902. a = Math.abs(o + i) < Math.abs(s + i) ? o : s;
  11903. this._draggable._newPos.x = a
  11904. },
  11905. _onDragEnd: function (t) {
  11906. var e = this._map,
  11907. i = e.options,
  11908. n = +new Date - this._lastTime,
  11909. s = !i.inertia || n > i.inertiaThreshold || !this._positions[0];
  11910. if (e.fire("dragend", t), s) e.fire("moveend");
  11911. else {
  11912. var a = this._lastPos.subtract(this._positions[0]),
  11913. r = (this._lastTime + n - this._times[0]) / 1e3,
  11914. h = i.easeLinearity,
  11915. l = a.multiplyBy(h / r),
  11916. u = l.distanceTo([0, 0]),
  11917. c = Math.min(i.inertiaMaxSpeed, u),
  11918. d = l.multiplyBy(c / u),
  11919. p = c / (i.inertiaDeceleration * h),
  11920. _ = d.multiplyBy(-p / 2).round();
  11921. _.x && _.y ? (_ = e._limitOffset(_, e.options.maxBounds), o.Util.requestAnimFrame(function () {
  11922. e.panBy(_, {
  11923. duration: p,
  11924. easeLinearity: h,
  11925. noMoveStart: !0
  11926. })
  11927. })) : e.fire("moveend")
  11928. }
  11929. }
  11930. }), o.Map.addInitHook("addHandler", "dragging", o.Map.Drag), o.Map.mergeOptions({
  11931. doubleClickZoom: !0
  11932. }), o.Map.DoubleClickZoom = o.Handler.extend({
  11933. addHooks: function () {
  11934. this._map.on("dblclick", this._onDoubleClick, this)
  11935. },
  11936. removeHooks: function () {
  11937. this._map.off("dblclick", this._onDoubleClick, this)
  11938. },
  11939. _onDoubleClick: function (t) {
  11940. var e = this._map,
  11941. i = e.getZoom() + (t.originalEvent.shiftKey ? -1 : 1);
  11942. "center" === e.options.doubleClickZoom ? e.setZoom(i) : e.setZoomAround(t.containerPoint, i)
  11943. }
  11944. }), o.Map.addInitHook("addHandler", "doubleClickZoom", o.Map.DoubleClickZoom), o.Map.mergeOptions({
  11945. scrollWheelZoom: !0
  11946. }), o.Map.ScrollWheelZoom = o.Handler.extend({
  11947. addHooks: function () {
  11948. o.DomEvent.on(this._map._container, "mousewheel", this._onWheelScroll, this), o.DomEvent.on(this._map._container, "MozMousePixelScroll", o.DomEvent.preventDefault), this._delta = 0
  11949. },
  11950. removeHooks: function () {
  11951. o.DomEvent.off(this._map._container, "mousewheel", this._onWheelScroll), o.DomEvent.off(this._map._container, "MozMousePixelScroll", o.DomEvent.preventDefault)
  11952. },
  11953. _onWheelScroll: function (t) {
  11954. var e = o.DomEvent.getWheelDelta(t);
  11955. this._delta += e, this._lastMousePos = this._map.mouseEventToContainerPoint(t), this._startTime || (this._startTime = +new Date);
  11956. var i = Math.max(40 - (+new Date - this._startTime), 0);
  11957. clearTimeout(this._timer), this._timer = setTimeout(o.bind(this._performZoom, this), i), o.DomEvent.preventDefault(t), o.DomEvent.stopPropagation(t)
  11958. },
  11959. _performZoom: function () {
  11960. var t = this._map,
  11961. e = this._delta,
  11962. i = t.getZoom();
  11963. e = e > 0 ? Math.ceil(e) : Math.floor(e), e = Math.max(Math.min(e, 4), -4), e = t._limitZoom(i + e) - i, this._delta = 0, this._startTime = null, e && ("center" === t.options.scrollWheelZoom ? t.setZoom(i + e) : t.setZoomAround(this._lastMousePos, i + e))
  11964. }
  11965. }), o.Map.addInitHook("addHandler", "scrollWheelZoom", o.Map.ScrollWheelZoom), o.extend(o.DomEvent, {
  11966. _touchstart: o.Browser.msPointer ? "MSPointerDown" : o.Browser.pointer ? "pointerdown" : "touchstart",
  11967. _touchend: o.Browser.msPointer ? "MSPointerUp" : o.Browser.pointer ? "pointerup" : "touchend",
  11968. addDoubleTapListener: function (t, i, n) {
  11969. function s(t) {
  11970. var e;
  11971. if (o.Browser.pointer ? (_.push(t.pointerId), e = _.length) : e = t.touches.length, !(e > 1)) {
  11972. var i = Date.now(),
  11973. n = i - (r || i);
  11974. h = t.touches ? t.touches[0] : t, l = n > 0 && u >= n, r = i
  11975. }
  11976. }
  11977. function a(t) {
  11978. if (o.Browser.pointer) {
  11979. var e = _.indexOf(t.pointerId);
  11980. if (-1 === e) return;
  11981. _.splice(e, 1)
  11982. }
  11983. if (l) {
  11984. if (o.Browser.pointer) {
  11985. var n, s = {};
  11986. for (var a in h) n = h[a], "function" == typeof n ? s[a] = n.bind(h) : s[a] = n;
  11987. h = s
  11988. }
  11989. h.type = "dblclick", i(h), r = null
  11990. }
  11991. }
  11992. var r, h, l = !1,
  11993. u = 250,
  11994. c = "_leaflet_",
  11995. d = this._touchstart,
  11996. p = this._touchend,
  11997. _ = [];
  11998. t[c + d + n] = s, t[c + p + n] = a;
  11999. var m = o.Browser.pointer ? e.documentElement : t;
  12000. return t.addEventListener(d, s, !1), m.addEventListener(p, a, !1), o.Browser.pointer && m.addEventListener(o.DomEvent.POINTER_CANCEL, a, !1), this
  12001. },
  12002. removeDoubleTapListener: function (t, i) {
  12003. var n = "_leaflet_";
  12004. return t.removeEventListener(this._touchstart, t[n + this._touchstart + i], !1), (o.Browser.pointer ? e.documentElement : t).removeEventListener(this._touchend, t[n + this._touchend + i], !1), o.Browser.pointer && e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL, t[n + this._touchend + i], !1), this
  12005. }
  12006. }), o.extend(o.DomEvent, {
  12007. POINTER_DOWN: o.Browser.msPointer ? "MSPointerDown" : "pointerdown",
  12008. POINTER_MOVE: o.Browser.msPointer ? "MSPointerMove" : "pointermove",
  12009. POINTER_UP: o.Browser.msPointer ? "MSPointerUp" : "pointerup",
  12010. POINTER_CANCEL: o.Browser.msPointer ? "MSPointerCancel" : "pointercancel",
  12011. _pointers: [],
  12012. _pointerDocumentListener: !1,
  12013. addPointerListener: function (t, e, i, n) {
  12014. switch (e) {
  12015. case "touchstart":
  12016. return this.addPointerListenerStart(t, e, i, n);
  12017. case "touchend":
  12018. return this.addPointerListenerEnd(t, e, i, n);
  12019. case "touchmove":
  12020. return this.addPointerListenerMove(t, e, i, n);
  12021. default:
  12022. throw "Unknown touch event type"
  12023. }
  12024. },
  12025. addPointerListenerStart: function (t, i, n, s) {
  12026. var a = "_leaflet_",
  12027. r = this._pointers,
  12028. h = function (t) {
  12029. "mouse" !== t.pointerType && t.pointerType !== t.MSPOINTER_TYPE_MOUSE && o.DomEvent.preventDefault(t);
  12030. for (var e = !1, i = 0; i < r.length; i++)
  12031. if (r[i].pointerId === t.pointerId) {
  12032. e = !0;
  12033. break
  12034. }
  12035. e || r.push(t), t.touches = r.slice(), t.changedTouches = [t], n(t)
  12036. };
  12037. if (t[a + "touchstart" + s] = h, t.addEventListener(this.POINTER_DOWN, h, !1), !this._pointerDocumentListener) {
  12038. var l = function (t) {
  12039. for (var e = 0; e < r.length; e++)
  12040. if (r[e].pointerId === t.pointerId) {
  12041. r.splice(e, 1);
  12042. break
  12043. }
  12044. };
  12045. e.documentElement.addEventListener(this.POINTER_UP, l, !1), e.documentElement.addEventListener(this.POINTER_CANCEL, l, !1), this._pointerDocumentListener = !0
  12046. }
  12047. return this
  12048. },
  12049. addPointerListenerMove: function (t, e, i, n) {
  12050. function o(t) {
  12051. if (t.pointerType !== t.MSPOINTER_TYPE_MOUSE && "mouse" !== t.pointerType || 0 !== t.buttons) {
  12052. for (var e = 0; e < a.length; e++)
  12053. if (a[e].pointerId === t.pointerId) {
  12054. a[e] = t;
  12055. break
  12056. }
  12057. t.touches = a.slice(), t.changedTouches = [t], i(t)
  12058. }
  12059. }
  12060. var s = "_leaflet_",
  12061. a = this._pointers;
  12062. return t[s + "touchmove" + n] = o, t.addEventListener(this.POINTER_MOVE, o, !1), this
  12063. },
  12064. addPointerListenerEnd: function (t, e, i, n) {
  12065. var o = "_leaflet_",
  12066. s = this._pointers,
  12067. a = function (t) {
  12068. for (var e = 0; e < s.length; e++)
  12069. if (s[e].pointerId === t.pointerId) {
  12070. s.splice(e, 1);
  12071. break
  12072. }
  12073. t.touches = s.slice(), t.changedTouches = [t], i(t)
  12074. };
  12075. return t[o + "touchend" + n] = a, t.addEventListener(this.POINTER_UP, a, !1), t.addEventListener(this.POINTER_CANCEL, a, !1), this
  12076. },
  12077. removePointerListener: function (t, e, i) {
  12078. var n = "_leaflet_",
  12079. o = t[n + e + i];
  12080. switch (e) {
  12081. case "touchstart":
  12082. t.removeEventListener(this.POINTER_DOWN, o, !1);
  12083. break;
  12084. case "touchmove":
  12085. t.removeEventListener(this.POINTER_MOVE, o, !1);
  12086. break;
  12087. case "touchend":
  12088. t.removeEventListener(this.POINTER_UP, o, !1), t.removeEventListener(this.POINTER_CANCEL, o, !1)
  12089. }
  12090. return this
  12091. }
  12092. }), o.Map.mergeOptions({
  12093. touchZoom: o.Browser.touch && !o.Browser.android23,
  12094. bounceAtZoomLimits: !0
  12095. }), o.Map.TouchZoom = o.Handler.extend({
  12096. addHooks: function () {
  12097. o.DomEvent.on(this._map._container, "touchstart", this._onTouchStart, this)
  12098. },
  12099. removeHooks: function () {
  12100. o.DomEvent.off(this._map._container, "touchstart", this._onTouchStart, this)
  12101. },
  12102. _onTouchStart: function (t) {
  12103. var i = this._map;
  12104. if (t.touches && 2 === t.touches.length && !i._animatingZoom && !this._zooming) {
  12105. var n = i.mouseEventToLayerPoint(t.touches[0]),
  12106. s = i.mouseEventToLayerPoint(t.touches[1]),
  12107. a = i._getCenterLayerPoint();
  12108. this._startCenter = n.add(s)._divideBy(2), this._startDist = n.distanceTo(s), this._moved = !1, this._zooming = !0, this._centerOffset = a.subtract(this._startCenter), i._panAnim && i._panAnim.stop(), o.DomEvent.on(e, "touchmove", this._onTouchMove, this).on(e, "touchend", this._onTouchEnd, this), o.DomEvent.preventDefault(t)
  12109. }
  12110. },
  12111. _onTouchMove: function (t) {
  12112. var e = this._map;
  12113. if (t.touches && 2 === t.touches.length && this._zooming) {
  12114. var i = e.mouseEventToLayerPoint(t.touches[0]),
  12115. n = e.mouseEventToLayerPoint(t.touches[1]);
  12116. this._scale = i.distanceTo(n) / this._startDist, this._delta = i._add(n)._divideBy(2)._subtract(this._startCenter), 1 !== this._scale && (e.options.bounceAtZoomLimits || !(e.getZoom() === e.getMinZoom() && this._scale < 1 || e.getZoom() === e.getMaxZoom() && this._scale > 1)) && (this._moved || (o.DomUtil.addClass(e._mapPane, "leaflet-touching"), e.fire("movestart").fire("zoomstart"), this._moved = !0), o.Util.cancelAnimFrame(this._animRequest), this._animRequest = o.Util.requestAnimFrame(this._updateOnMove, this, !0, this._map._container), o.DomEvent.preventDefault(t))
  12117. }
  12118. },
  12119. _updateOnMove: function () {
  12120. var t = this._map,
  12121. e = this._getScaleOrigin(),
  12122. i = t.layerPointToLatLng(e),
  12123. n = t.getScaleZoom(this._scale);
  12124. t._animateZoom(i, n, this._startCenter, this._scale, this._delta, !1, !0)
  12125. },
  12126. _onTouchEnd: function () {
  12127. if (!this._moved || !this._zooming) return void(this._zooming = !1);
  12128. var t = this._map;
  12129. this._zooming = !1, o.DomUtil.removeClass(t._mapPane, "leaflet-touching"), o.Util.cancelAnimFrame(this._animRequest), o.DomEvent.off(e, "touchmove", this._onTouchMove).off(e, "touchend", this._onTouchEnd);
  12130. var i = this._getScaleOrigin(),
  12131. n = t.layerPointToLatLng(i),
  12132. s = t.getZoom(),
  12133. a = t.getScaleZoom(this._scale) - s,
  12134. r = a > 0 ? Math.ceil(a) : Math.floor(a),
  12135. h = t._limitZoom(s + r),
  12136. l = t.getZoomScale(h) / this._scale;
  12137. t._animateZoom(n, h, i, l)
  12138. },
  12139. _getScaleOrigin: function () {
  12140. var t = this._centerOffset.subtract(this._delta).divideBy(this._scale);
  12141. return this._startCenter.add(t)
  12142. }
  12143. }), o.Map.addInitHook("addHandler", "touchZoom", o.Map.TouchZoom), o.Map.mergeOptions({
  12144. tap: !0,
  12145. tapTolerance: 15
  12146. }), o.Map.Tap = o.Handler.extend({
  12147. addHooks: function () {
  12148. o.DomEvent.on(this._map._container, "touchstart", this._onDown, this)
  12149. },
  12150. removeHooks: function () {
  12151. o.DomEvent.off(this._map._container, "touchstart", this._onDown, this)
  12152. },
  12153. _onDown: function (t) {
  12154. if (t.touches) {
  12155. if (o.DomEvent.preventDefault(t), this._fireClick = !0, t.touches.length > 1) return this._fireClick = !1, void clearTimeout(this._holdTimeout);
  12156. var i = t.touches[0],
  12157. n = i.target;
  12158. this._startPos = this._newPos = new o.Point(i.clientX, i.clientY), n.tagName && "a" === n.tagName.toLowerCase() && o.DomUtil.addClass(n, "leaflet-active"), this._holdTimeout = setTimeout(o.bind(function () {
  12159. this._isTapValid() && (this._fireClick = !1, this._onUp(), this._simulateEvent("contextmenu", i))
  12160. }, this), 1e3), o.DomEvent.on(e, "touchmove", this._onMove, this).on(e, "touchend", this._onUp, this)
  12161. }
  12162. },
  12163. _onUp: function (t) {
  12164. if (clearTimeout(this._holdTimeout), o.DomEvent.off(e, "touchmove", this._onMove, this).off(e, "touchend", this._onUp, this), this._fireClick && t && t.changedTouches) {
  12165. var i = t.changedTouches[0],
  12166. n = i.target;
  12167. n && n.tagName && "a" === n.tagName.toLowerCase() && o.DomUtil.removeClass(n, "leaflet-active"), this._isTapValid() && this._simulateEvent("click", i)
  12168. }
  12169. },
  12170. _isTapValid: function () {
  12171. return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance
  12172. },
  12173. _onMove: function (t) {
  12174. var e = t.touches[0];
  12175. this._newPos = new o.Point(e.clientX, e.clientY)
  12176. },
  12177. _simulateEvent: function (i, n) {
  12178. var o = e.createEvent("MouseEvents");
  12179. o._simulated = !0, n.target._simulatedClick = !0, o.initMouseEvent(i, !0, !0, t, 1, n.screenX, n.screenY, n.clientX, n.clientY, !1, !1, !1, !1, 0, null), n.target.dispatchEvent(o)
  12180. }
  12181. }), o.Browser.touch && !o.Browser.pointer && o.Map.addInitHook("addHandler", "tap", o.Map.Tap), o.Map.mergeOptions({
  12182. boxZoom: !0
  12183. }), o.Map.BoxZoom = o.Handler.extend({
  12184. initialize: function (t) {
  12185. this._map = t, this._container = t._container, this._pane = t._panes.overlayPane, this._moved = !1
  12186. },
  12187. addHooks: function () {
  12188. o.DomEvent.on(this._container, "mousedown", this._onMouseDown, this)
  12189. },
  12190. removeHooks: function () {
  12191. o.DomEvent.off(this._container, "mousedown", this._onMouseDown), this._moved = !1
  12192. },
  12193. moved: function () {
  12194. return this._moved
  12195. },
  12196. _onMouseDown: function (t) {
  12197. return this._moved = !1, !t.shiftKey || 1 !== t.which && 1 !== t.button ? !1 : (o.DomUtil.disableTextSelection(), o.DomUtil.disableImageDrag(), this._startLayerPoint = this._map.mouseEventToLayerPoint(t), void o.DomEvent.on(e, "mousemove", this._onMouseMove, this).on(e, "mouseup", this._onMouseUp, this).on(e, "keydown", this._onKeyDown, this))
  12198. },
  12199. _onMouseMove: function (t) {
  12200. this._moved || (this._box = o.DomUtil.create("div", "leaflet-zoom-box", this._pane), o.DomUtil.setPosition(this._box, this._startLayerPoint), this._container.style.cursor = "crosshair", this._map.fire("boxzoomstart"));
  12201. var e = this._startLayerPoint,
  12202. i = this._box,
  12203. n = this._map.mouseEventToLayerPoint(t),
  12204. s = n.subtract(e),
  12205. a = new o.Point(Math.min(n.x, e.x), Math.min(n.y, e.y));
  12206. o.DomUtil.setPosition(i, a), this._moved = !0, i.style.width = Math.max(0, Math.abs(s.x) - 4) + "px", i.style.height = Math.max(0, Math.abs(s.y) - 4) + "px"
  12207. },
  12208. _finish: function () {
  12209. this._moved && (this._pane.removeChild(this._box), this._container.style.cursor = ""), o.DomUtil.enableTextSelection(), o.DomUtil.enableImageDrag(), o.DomEvent.off(e, "mousemove", this._onMouseMove).off(e, "mouseup", this._onMouseUp).off(e, "keydown", this._onKeyDown)
  12210. },
  12211. _onMouseUp: function (t) {
  12212. this._finish();
  12213. var e = this._map,
  12214. i = e.mouseEventToLayerPoint(t);
  12215. if (!this._startLayerPoint.equals(i)) {
  12216. var n = new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint), e.layerPointToLatLng(i));
  12217. e.fitBounds(n), e.fire("boxzoomend", {
  12218. boxZoomBounds: n
  12219. })
  12220. }
  12221. },
  12222. _onKeyDown: function (t) {
  12223. 27 === t.keyCode && this._finish()
  12224. }
  12225. }), o.Map.addInitHook("addHandler", "boxZoom", o.Map.BoxZoom), o.Map.mergeOptions({
  12226. keyboard: !0,
  12227. keyboardPanOffset: 80,
  12228. keyboardZoomOffset: 1
  12229. }), o.Map.Keyboard = o.Handler.extend({
  12230. keyCodes: {
  12231. left: [37],
  12232. right: [39],
  12233. down: [40],
  12234. up: [38],
  12235. zoomIn: [187, 107, 61, 171],
  12236. zoomOut: [189, 109, 173]
  12237. },
  12238. initialize: function (t) {
  12239. this._map = t, this._setPanOffset(t.options.keyboardPanOffset), this._setZoomOffset(t.options.keyboardZoomOffset)
  12240. },
  12241. addHooks: function () {
  12242. var t = this._map._container; - 1 === t.tabIndex && (t.tabIndex = "0"), o.DomEvent.on(t, "focus", this._onFocus, this).on(t, "blur", this._onBlur, this).on(t, "mousedown", this._onMouseDown, this), this._map.on("focus", this._addHooks, this).on("blur", this._removeHooks, this)
  12243. },
  12244. removeHooks: function () {
  12245. this._removeHooks();
  12246. var t = this._map._container;
  12247. o.DomEvent.off(t, "focus", this._onFocus, this).off(t, "blur", this._onBlur, this).off(t, "mousedown", this._onMouseDown, this), this._map.off("focus", this._addHooks, this).off("blur", this._removeHooks, this)
  12248. },
  12249. _onMouseDown: function () {
  12250. if (!this._focused) {
  12251. var i = e.body,
  12252. n = e.documentElement,
  12253. o = i.scrollTop || n.scrollTop,
  12254. s = i.scrollLeft || n.scrollLeft;
  12255. this._map._container.focus(), t.scrollTo(s, o)
  12256. }
  12257. },
  12258. _onFocus: function () {
  12259. this._focused = !0, this._map.fire("focus")
  12260. },
  12261. _onBlur: function () {
  12262. this._focused = !1, this._map.fire("blur")
  12263. },
  12264. _setPanOffset: function (t) {
  12265. var e, i, n = this._panKeys = {},
  12266. o = this.keyCodes;
  12267. for (e = 0, i = o.left.length; i > e; e++) n[o.left[e]] = [-1 * t, 0];
  12268. for (e = 0, i = o.right.length; i > e; e++) n[o.right[e]] = [t, 0];
  12269. for (e = 0, i = o.down.length; i > e; e++) n[o.down[e]] = [0, t];
  12270. for (e = 0, i = o.up.length; i > e; e++) n[o.up[e]] = [0, -1 * t]
  12271. },
  12272. _setZoomOffset: function (t) {
  12273. var e, i, n = this._zoomKeys = {},
  12274. o = this.keyCodes;
  12275. for (e = 0, i = o.zoomIn.length; i > e; e++) n[o.zoomIn[e]] = t;
  12276. for (e = 0, i = o.zoomOut.length; i > e; e++) n[o.zoomOut[e]] = -t
  12277. },
  12278. _addHooks: function () {
  12279. o.DomEvent.on(e, "keydown", this._onKeyDown, this)
  12280. },
  12281. _removeHooks: function () {
  12282. o.DomEvent.off(e, "keydown", this._onKeyDown, this)
  12283. },
  12284. _onKeyDown: function (t) {
  12285. var e = t.keyCode,
  12286. i = this._map;
  12287. if (e in this._panKeys) {
  12288. if (i._panAnim && i._panAnim._inProgress) return;
  12289. i.panBy(this._panKeys[e]), i.options.maxBounds && i.panInsideBounds(i.options.maxBounds)
  12290. } else {
  12291. if (!(e in this._zoomKeys)) return;
  12292. i.setZoom(i.getZoom() + this._zoomKeys[e])
  12293. }
  12294. o.DomEvent.stop(t)
  12295. }
  12296. }), o.Map.addInitHook("addHandler", "keyboard", o.Map.Keyboard), o.Handler.MarkerDrag = o.Handler.extend({
  12297. initialize: function (t) {
  12298. this._marker = t
  12299. },
  12300. addHooks: function () {
  12301. var t = this._marker._icon;
  12302. this._draggable || (this._draggable = new o.Draggable(t, t)), this._draggable.on("dragstart", this._onDragStart, this).on("drag", this._onDrag, this).on("dragend", this._onDragEnd, this), this._draggable.enable(), o.DomUtil.addClass(this._marker._icon, "leaflet-marker-draggable")
  12303. },
  12304. removeHooks: function () {
  12305. this._draggable.off("dragstart", this._onDragStart, this).off("drag", this._onDrag, this).off("dragend", this._onDragEnd, this), this._draggable.disable(), o.DomUtil.removeClass(this._marker._icon, "leaflet-marker-draggable")
  12306. },
  12307. moved: function () {
  12308. return this._draggable && this._draggable._moved
  12309. },
  12310. _onDragStart: function () {
  12311. this._marker.closePopup().fire("movestart").fire("dragstart")
  12312. },
  12313. _onDrag: function () {
  12314. var t = this._marker,
  12315. e = t._shadow,
  12316. i = o.DomUtil.getPosition(t._icon),
  12317. n = t._map.layerPointToLatLng(i);
  12318. e && o.DomUtil.setPosition(e, i), t._latlng = n, t.fire("move", {
  12319. latlng: n
  12320. }).fire("drag")
  12321. },
  12322. _onDragEnd: function (t) {
  12323. this._marker.fire("moveend").fire("dragend", t)
  12324. }
  12325. }), o.Control = o.Class.extend({
  12326. options: {
  12327. position: "topright"
  12328. },
  12329. initialize: function (t) {
  12330. o.setOptions(this, t)
  12331. },
  12332. getPosition: function () {
  12333. return this.options.position
  12334. },
  12335. setPosition: function (t) {
  12336. var e = this._map;
  12337. return e && e.removeControl(this), this.options.position = t, e && e.addControl(this), this
  12338. },
  12339. getContainer: function () {
  12340. return this._container
  12341. },
  12342. addTo: function (t) {
  12343. this._map = t;
  12344. var e = this._container = this.onAdd(t),
  12345. i = this.getPosition(),
  12346. n = t._controlCorners[i];
  12347. return o.DomUtil.addClass(e, "leaflet-control"), -1 !== i.indexOf("bottom") ? n.insertBefore(e, n.firstChild) : n.appendChild(e), this
  12348. },
  12349. removeFrom: function (t) {
  12350. var e = this.getPosition(),
  12351. i = t._controlCorners[e];
  12352. return i.removeChild(this._container), this._map = null, this.onRemove && this.onRemove(t), this
  12353. },
  12354. _refocusOnMap: function () {
  12355. this._map && this._map.getContainer().focus()
  12356. }
  12357. }), o.control = function (t) {
  12358. return new o.Control(t)
  12359. }, o.Map.include({
  12360. addControl: function (t) {
  12361. return t.addTo(this), this
  12362. },
  12363. removeControl: function (t) {
  12364. return t.removeFrom(this), this
  12365. },
  12366. _initControlPos: function () {
  12367. function t(t, s) {
  12368. var a = i + t + " " + i + s;
  12369. e[t + s] = o.DomUtil.create("div", a, n)
  12370. }
  12371. var e = this._controlCorners = {},
  12372. i = "leaflet-",
  12373. n = this._controlContainer = o.DomUtil.create("div", i + "control-container", this._container);
  12374. t("top", "left"), t("top", "right"), t("bottom", "left"), t("bottom", "right")
  12375. },
  12376. _clearControlPos: function () {
  12377. this._container.removeChild(this._controlContainer)
  12378. }
  12379. }), o.Control.Zoom = o.Control.extend({
  12380. options: {
  12381. position: "topleft",
  12382. zoomInText: "+",
  12383. zoomInTitle: "放大",
  12384. zoomOutText: "-",
  12385. zoomOutTitle: "缩小"
  12386. },
  12387. onAdd: function (t) {
  12388. var e = "leaflet-control-zoom",
  12389. i = o.DomUtil.create("div", e + " leaflet-bar");
  12390. return this._map = t, this._zoomInButton = this._createButton(this.options.zoomInText, this.options.zoomInTitle, e + "-in", i, this._zoomIn, this), this._zoomOutButton = this._createButton(this.options.zoomOutText, this.options.zoomOutTitle, e + "-out", i, this._zoomOut, this), this._updateDisabled(), t.on("zoomend zoomlevelschange", this._updateDisabled, this), i
  12391. },
  12392. onRemove: function (t) {
  12393. t.off("zoomend zoomlevelschange", this._updateDisabled, this)
  12394. },
  12395. _zoomIn: function (t) {
  12396. this._map.zoomIn(t.shiftKey ? 3 : 1)
  12397. },
  12398. _zoomOut: function (t) {
  12399. this._map.zoomOut(t.shiftKey ? 3 : 1)
  12400. },
  12401. _createButton: function (t, e, i, n, s, a) {
  12402. var r = o.DomUtil.create("a", i, n);
  12403. r.innerHTML = t, r.href = "#", r.title = e;
  12404. var h = o.DomEvent.stopPropagation;
  12405. return o.DomEvent.on(r, "click", h).on(r, "mousedown", h).on(r, "dblclick", h).on(r, "click", o.DomEvent.preventDefault).on(r, "click", s, a).on(r, "click", this._refocusOnMap, a), r
  12406. },
  12407. _updateDisabled: function () {
  12408. var t = this._map,
  12409. e = "leaflet-disabled";
  12410. o.DomUtil.removeClass(this._zoomInButton, e), o.DomUtil.removeClass(this._zoomOutButton, e), t._zoom === t.getMinZoom() && o.DomUtil.addClass(this._zoomOutButton, e), t._zoom === t.getMaxZoom() && o.DomUtil.addClass(this._zoomInButton, e)
  12411. }
  12412. }), o.Map.mergeOptions({
  12413. zoomControl: !0
  12414. }), o.Map.addInitHook(function () {
  12415. this.options.zoomControl && (this.zoomControl = new o.Control.Zoom, this.addControl(this.zoomControl))
  12416. }), o.control.zoom = function (t) {
  12417. return new o.Control.Zoom(t)
  12418. }, o.Control.Attribution = o.Control.extend({
  12419. options: {
  12420. position: "bottomright",
  12421. prefix: '<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'
  12422. },
  12423. initialize: function (t) {
  12424. o.setOptions(this, t), this._attributions = {}
  12425. },
  12426. onAdd: function (t) {
  12427. this._container = o.DomUtil.create("div", "leaflet-control-attribution"), o.DomEvent.disableClickPropagation(this._container);
  12428. for (var e in t._layers) t._layers[e].getAttribution && this.addAttribution(t._layers[e].getAttribution());
  12429. return t.on("layeradd", this._onLayerAdd, this).on("layerremove", this._onLayerRemove, this), this._update(), this._container
  12430. },
  12431. onRemove: function (t) {
  12432. t.off("layeradd", this._onLayerAdd).off("layerremove", this._onLayerRemove)
  12433. },
  12434. setPrefix: function (t) {
  12435. return this.options.prefix = t, this._update(), this
  12436. },
  12437. addAttribution: function (t) {
  12438. return t ? (this._attributions[t] || (this._attributions[t] = 0), this._attributions[t]++, this._update(), this) : void 0
  12439. },
  12440. removeAttribution: function (t) {
  12441. return t ? (this._attributions[t] && (this._attributions[t]--, this._update()), this) : void 0
  12442. },
  12443. _update: function () {
  12444. if (this._map) {
  12445. var t = [];
  12446. for (var e in this._attributions) this._attributions[e] && t.push(e);
  12447. var i = [];
  12448. this.options.prefix && i.push(this.options.prefix), t.length && i.push(t.join(", ")), this._container.innerHTML = i.join(" | ")
  12449. }
  12450. },
  12451. _onLayerAdd: function (t) {
  12452. t.layer.getAttribution && this.addAttribution(t.layer.getAttribution())
  12453. },
  12454. _onLayerRemove: function (t) {
  12455. t.layer.getAttribution && this.removeAttribution(t.layer.getAttribution())
  12456. }
  12457. }), o.Map.mergeOptions({
  12458. attributionControl: !0
  12459. }), o.Map.addInitHook(function () {
  12460. this.options.attributionControl && (this.attributionControl = (new o.Control.Attribution).addTo(this))
  12461. }), o.control.attribution = function (t) {
  12462. return new o.Control.Attribution(t)
  12463. }, o.Control.Scale = o.Control.extend({
  12464. options: {
  12465. position: "bottomleft",
  12466. maxWidth: 100,
  12467. metric: !0,
  12468. imperial: !0,
  12469. updateWhenIdle: !1
  12470. },
  12471. onAdd: function (t) {
  12472. this._map = t;
  12473. var e = "leaflet-control-scale",
  12474. i = o.DomUtil.create("div", e),
  12475. n = this.options;
  12476. return this._addScales(n, e, i), t.on(n.updateWhenIdle ? "moveend" : "move", this._update, this), t.whenReady(this._update, this), i
  12477. },
  12478. onRemove: function (t) {
  12479. t.off(this.options.updateWhenIdle ? "moveend" : "move", this._update, this)
  12480. },
  12481. _addScales: function (t, e, i) {
  12482. t.metric && (this._mScale = o.DomUtil.create("div", e + "-line", i)), t.imperial && (this._iScale = o.DomUtil.create("div", e + "-line", i))
  12483. },
  12484. _update: function () {
  12485. var t = this._map.getBounds(),
  12486. e = t.getCenter().lat,
  12487. i = 6378137 * Math.PI * Math.cos(e * Math.PI / 180),
  12488. n = i * (t.getNorthEast().lng - t.getSouthWest().lng) / 180,
  12489. o = this._map.getSize(),
  12490. s = this.options,
  12491. a = 0;
  12492. o.x > 0 && (a = n * (s.maxWidth / o.x)), this._updateScales(s, a)
  12493. },
  12494. _updateScales: function (t, e) {
  12495. t.metric && e && this._updateMetric(e), t.imperial && e && this._updateImperial(e)
  12496. },
  12497. _updateMetric: function (t) {
  12498. var e = this._getRoundNum(t);
  12499. this._mScale.style.width = this._getScaleWidth(e / t) + "px", this._mScale.innerHTML = 1e3 > e ? e + " m" : e / 1e3 + " km"
  12500. },
  12501. _updateImperial: function (t) {
  12502. var e, i, n, o = 3.2808399 * t,
  12503. s = this._iScale;
  12504. o > 5280 ? (e = o / 5280, i = this._getRoundNum(e), s.style.width = this._getScaleWidth(i / e) + "px", s.innerHTML = i + " mi") : (n = this._getRoundNum(o), s.style.width = this._getScaleWidth(n / o) + "px", s.innerHTML = n + " ft")
  12505. },
  12506. _getScaleWidth: function (t) {
  12507. return Math.round(this.options.maxWidth * t) - 10
  12508. },
  12509. _getRoundNum: function (t) {
  12510. var e = Math.pow(10, (Math.floor(t) + "").length - 1),
  12511. i = t / e;
  12512. return i = i >= 10 ? 10 : i >= 5 ? 5 : i >= 3 ? 3 : i >= 2 ? 2 : 1, e * i
  12513. }
  12514. }), o.control.scale = function (t) {
  12515. return new o.Control.Scale(t)
  12516. }, o.Control.Layers = o.Control.extend({
  12517. options: {
  12518. collapsed: !0,
  12519. position: "topright",
  12520. autoZIndex: !0
  12521. },
  12522. initialize: function (t, e, i) {
  12523. o.setOptions(this, i), this._layers = {}, this._lastZIndex = 0, this._handlingClick = !1;
  12524. for (var n in t) this._addLayer(t[n], n);
  12525. for (n in e) this._addLayer(e[n], n, !0)
  12526. },
  12527. onAdd: function (t) {
  12528. return this._initLayout(), this._update(), t.on("layeradd", this._onLayerChange, this).on("layerremove", this._onLayerChange, this), this._container
  12529. },
  12530. onRemove: function (t) {
  12531. t.off("layeradd", this._onLayerChange, this).off("layerremove", this._onLayerChange, this)
  12532. },
  12533. addBaseLayer: function (t, e) {
  12534. return this._addLayer(t, e), this._update(), this
  12535. },
  12536. addOverlay: function (t, e) {
  12537. return this._addLayer(t, e, !0), this._update(), this
  12538. },
  12539. removeLayer: function (t) {
  12540. var e = o.stamp(t);
  12541. return delete this._layers[e], this._update(), this
  12542. },
  12543. _initLayout: function () {
  12544. var t = "leaflet-control-layers",
  12545. e = this._container = o.DomUtil.create("div", t);
  12546. e.setAttribute("aria-haspopup", !0), o.Browser.touch ? o.DomEvent.on(e, "click", o.DomEvent.stopPropagation) : o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);
  12547. var i = this._form = o.DomUtil.create("form", t + "-list");
  12548. if (this.options.collapsed) {
  12549. o.Browser.android || o.DomEvent.on(e, "mouseover", this._expand, this).on(e, "mouseout", this._collapse, this);
  12550. var n = this._layersLink = o.DomUtil.create("a", t + "-toggle", e);
  12551. n.href = "#", n.title = "Layers", o.Browser.touch ? o.DomEvent.on(n, "click", o.DomEvent.stop).on(n, "click", this._expand, this) : o.DomEvent.on(n, "focus", this._expand, this), o.DomEvent.on(i, "click", function () {
  12552. setTimeout(o.bind(this._onInputClick, this), 0)
  12553. }, this), this._map.on("click", this._collapse, this)
  12554. } else this._expand();
  12555. this._baseLayersList = o.DomUtil.create("div", t + "-base", i), this._separator = o.DomUtil.create("div", t + "-separator", i), this._overlaysList = o.DomUtil.create("div", t + "-overlays", i), e.appendChild(i)
  12556. },
  12557. _addLayer: function (t, e, i) {
  12558. var n = o.stamp(t);
  12559. this._layers[n] = {
  12560. layer: t,
  12561. name: e,
  12562. overlay: i
  12563. }, this.options.autoZIndex && t.setZIndex && (this._lastZIndex++, t.setZIndex(this._lastZIndex))
  12564. },
  12565. _update: function () {
  12566. if (this._container) {
  12567. this._baseLayersList.innerHTML = "", this._overlaysList.innerHTML = "";
  12568. var t, e, i = !1,
  12569. n = !1;
  12570. for (t in this._layers) e = this._layers[t], this._addItem(e), n = n || e.overlay, i = i || !e.overlay;
  12571. this._separator.style.display = n && i ? "" : "none"
  12572. }
  12573. },
  12574. _onLayerChange: function (t) {
  12575. var e = this._layers[o.stamp(t.layer)];
  12576. if (e) {
  12577. this._handlingClick || this._update();
  12578. var i = e.overlay ? "layeradd" === t.type ? "overlayadd" : "overlayremove" : "layeradd" === t.type ? "baselayerchange" : null;
  12579. i && this._map.fire(i, e)
  12580. }
  12581. },
  12582. _createRadioElement: function (t, i) {
  12583. var n = '<input type="radio" class="leaflet-control-layers-selector" name="' + t + '"';
  12584. i && (n += ' checked="checked"'), n += "/>";
  12585. var o = e.createElement("div");
  12586. return o.innerHTML = n, o.firstChild
  12587. },
  12588. _addItem: function (t) {
  12589. var i, n = e.createElement("label"),
  12590. s = this._map.hasLayer(t.layer);
  12591. t.overlay ? (i = e.createElement("input"), i.type = "checkbox", i.className = "leaflet-control-layers-selector", i.defaultChecked = s) : i = this._createRadioElement("leaflet-base-layers", s), i.layerId = o.stamp(t.layer), o.DomEvent.on(i, "click", this._onInputClick, this);
  12592. var a = e.createElement("span");
  12593. a.innerHTML = " " + t.name, n.appendChild(i), n.appendChild(a);
  12594. var r = t.overlay ? this._overlaysList : this._baseLayersList;
  12595. return r.appendChild(n), n
  12596. },
  12597. _onInputClick: function () {
  12598. var t, e, i, n = this._form.getElementsByTagName("input"),
  12599. o = n.length;
  12600. for (this._handlingClick = !0, t = 0; o > t; t++) e = n[t], i = this._layers[e.layerId], e.checked && !this._map.hasLayer(i.layer) ? this._map.addLayer(i.layer) : !e.checked && this._map.hasLayer(i.layer) && this._map.removeLayer(i.layer);
  12601. this._handlingClick = !1, this._refocusOnMap()
  12602. },
  12603. _expand: function () {
  12604. o.DomUtil.addClass(this._container, "leaflet-control-layers-expanded")
  12605. },
  12606. _collapse: function () {
  12607. this._container.className = this._container.className.replace(" leaflet-control-layers-expanded", "")
  12608. }
  12609. }), o.control.layers = function (t, e, i) {
  12610. return new o.Control.Layers(t, e, i)
  12611. }, o.PosAnimation = o.Class.extend({
  12612. includes: o.Mixin.Events,
  12613. run: function (t, e, i, n) {
  12614. this.stop(), this._el = t, this._inProgress = !0, this._newPos = e, this.fire("start"), t.style[o.DomUtil.TRANSITION] = "all " + (i || .25) + "s cubic-bezier(0,0," + (n || .5) + ",1)", o.DomEvent.on(t, o.DomUtil.TRANSITION_END, this._onTransitionEnd, this), o.DomUtil.setPosition(t, e), o.Util.falseFn(t.offsetWidth), this._stepTimer = setInterval(o.bind(this._onStep, this), 50)
  12615. },
  12616. stop: function () {
  12617. this._inProgress && (o.DomUtil.setPosition(this._el, this._getPos()), this._onTransitionEnd(), o.Util.falseFn(this._el.offsetWidth))
  12618. },
  12619. _onStep: function () {
  12620. var t = this._getPos();
  12621. return t ? (this._el._leaflet_pos = t, void this.fire("step")) : void this._onTransitionEnd()
  12622. },
  12623. _transformRe: /([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,
  12624. _getPos: function () {
  12625. var e, i, n, s = this._el,
  12626. a = t.getComputedStyle(s);
  12627. if (o.Browser.any3d) {
  12628. if (n = a[o.DomUtil.TRANSFORM].match(this._transformRe), !n) return;
  12629. e = parseFloat(n[1]), i = parseFloat(n[2])
  12630. } else e = parseFloat(a.left), i = parseFloat(a.top);
  12631. return new o.Point(e, i, !0)
  12632. },
  12633. _onTransitionEnd: function () {
  12634. o.DomEvent.off(this._el, o.DomUtil.TRANSITION_END, this._onTransitionEnd, this), this._inProgress && (this._inProgress = !1, this._el.style[o.DomUtil.TRANSITION] = "", this._el._leaflet_pos = this._newPos, clearInterval(this._stepTimer), this.fire("step").fire("end"))
  12635. }
  12636. }), o.Map.include({
  12637. setView: function (t, e, n) {
  12638. if (e = e === i ? this._zoom : this._limitZoom(e), t = this._limitCenter(o.latLng(t), e, this.options.maxBounds), n = n || {}, this._panAnim && this._panAnim.stop(), this._loaded && !n.reset && n !== !0) {
  12639. n.animate !== i && (n.zoom = o.extend({
  12640. animate: n.animate
  12641. }, n.zoom), n.pan = o.extend({
  12642. animate: n.animate
  12643. }, n.pan));
  12644. var s = this._zoom !== e ? this._tryAnimatedZoom && this._tryAnimatedZoom(t, e, n.zoom) : this._tryAnimatedPan(t, n.pan);
  12645. if (s) return clearTimeout(this._sizeTimer), this
  12646. }
  12647. return this._resetView(t, e), this
  12648. },
  12649. panBy: function (t, e) {
  12650. if (t = o.point(t).round(), e = e || {}, !t.x && !t.y) return this;
  12651. if (this._panAnim || (this._panAnim = new o.PosAnimation, this._panAnim.on({
  12652. step: this._onPanTransitionStep,
  12653. end: this._onPanTransitionEnd
  12654. }, this)), e.noMoveStart || this.fire("movestart"), e.animate !== !1) {
  12655. o.DomUtil.addClass(this._mapPane, "leaflet-pan-anim");
  12656. var i = this._getMapPanePos().subtract(t);
  12657. this._panAnim.run(this._mapPane, i, e.duration || .25, e.easeLinearity)
  12658. } else this._rawPanBy(t), this.fire("move").fire("moveend");
  12659. return this
  12660. },
  12661. _onPanTransitionStep: function () {
  12662. this.fire("move")
  12663. },
  12664. _onPanTransitionEnd: function () {
  12665. o.DomUtil.removeClass(this._mapPane, "leaflet-pan-anim"), this.fire("moveend")
  12666. },
  12667. _tryAnimatedPan: function (t, e) {
  12668. var i = this._getCenterOffset(t)._floor();
  12669. return (e && e.animate) === !0 || this.getSize().contains(i) ? (this.panBy(i, e), !0) : !1
  12670. }
  12671. }), o.PosAnimation = o.DomUtil.TRANSITION ? o.PosAnimation : o.PosAnimation.extend({
  12672. run: function (t, e, i, n) {
  12673. this.stop(), this._el = t, this._inProgress = !0, this._duration = i || .25, this._easeOutPower = 1 / Math.max(n || .5, .2), this._startPos = o.DomUtil.getPosition(t), this._offset = e.subtract(this._startPos), this._startTime = +new Date, this.fire("start"), this._animate()
  12674. },
  12675. stop: function () {
  12676. this._inProgress && (this._step(), this._complete())
  12677. },
  12678. _animate: function () {
  12679. this._animId = o.Util.requestAnimFrame(this._animate, this), this._step()
  12680. },
  12681. _step: function () {
  12682. var t = +new Date - this._startTime,
  12683. e = 1e3 * this._duration;
  12684. e > t ? this._runFrame(this._easeOut(t / e)) : (this._runFrame(1), this._complete())
  12685. },
  12686. _runFrame: function (t) {
  12687. var e = this._startPos.add(this._offset.multiplyBy(t));
  12688. o.DomUtil.setPosition(this._el, e), this.fire("step")
  12689. },
  12690. _complete: function () {
  12691. o.Util.cancelAnimFrame(this._animId), this._inProgress = !1, this.fire("end")
  12692. },
  12693. _easeOut: function (t) {
  12694. return 1 - Math.pow(1 - t, this._easeOutPower)
  12695. }
  12696. }), o.Map.mergeOptions({
  12697. zoomAnimation: !0,
  12698. zoomAnimationThreshold: 4
  12699. }), o.DomUtil.TRANSITION && o.Map.addInitHook(function () {
  12700. this._zoomAnimated = this.options.zoomAnimation && o.DomUtil.TRANSITION && o.Browser.any3d && !o.Browser.android23 && !o.Browser.mobileOpera, this._zoomAnimated && o.DomEvent.on(this._mapPane, o.DomUtil.TRANSITION_END, this._catchTransitionEnd, this)
  12701. }), o.Map.include(o.DomUtil.TRANSITION ? {
  12702. _catchTransitionEnd: function (t) {
  12703. this._animatingZoom && t.propertyName.indexOf("transform") >= 0 && this._onZoomTransitionEnd()
  12704. },
  12705. _nothingToAnimate: function () {
  12706. return !this._container.getElementsByClassName("leaflet-zoom-animated").length
  12707. },
  12708. _tryAnimatedZoom: function (t, e, i) {
  12709. if (this._animatingZoom) return !0;
  12710. if (i = i || {}, !this._zoomAnimated || i.animate === !1 || this._nothingToAnimate() || Math.abs(e - this._zoom) > this.options.zoomAnimationThreshold) return !1;
  12711. var n = this.getZoomScale(e),
  12712. o = this._getCenterOffset(t)._divideBy(1 - 1 / n),
  12713. s = this._getCenterLayerPoint()._add(o);
  12714. return i.animate === !0 || this.getSize().contains(o) ? (this.fire("movestart").fire("zoomstart"), this._animateZoom(t, e, s, n, null, !0), !0) : !1
  12715. },
  12716. _animateZoom: function (t, e, i, n, s, a, r) {
  12717. r || (this._animatingZoom = !0), o.DomUtil.addClass(this._mapPane, "leaflet-zoom-anim"), this._animateToCenter = t, this._animateToZoom = e, o.Draggable && (o.Draggable._disabled = !0), o.Util.requestAnimFrame(function () {
  12718. this.fire("zoomanim", {
  12719. center: t,
  12720. zoom: e,
  12721. origin: i,
  12722. scale: n,
  12723. delta: s,
  12724. backwards: a
  12725. }), setTimeout(o.bind(this._onZoomTransitionEnd, this), 250)
  12726. }, this)
  12727. },
  12728. _onZoomTransitionEnd: function () {
  12729. this._animatingZoom && (this._animatingZoom = !1, o.DomUtil.removeClass(this._mapPane, "leaflet-zoom-anim"), o.Util.requestAnimFrame(function () {
  12730. this._resetView(this._animateToCenter, this._animateToZoom, !0, !0), o.Draggable && (o.Draggable._disabled = !1)
  12731. }, this))
  12732. }
  12733. } : {}), o.TileLayer.include({
  12734. _animateZoom: function (t) {
  12735. this._animating || (this._animating = !0, this._prepareBgBuffer());
  12736. var e = this._bgBuffer,
  12737. i = o.DomUtil.TRANSFORM,
  12738. n = t.delta ? o.DomUtil.getTranslateString(t.delta) : e.style[i],
  12739. s = o.DomUtil.getScaleString(t.scale, t.origin);
  12740. e.style[i] = t.backwards ? s + " " + n : n + " " + s
  12741. },
  12742. _endZoomAnim: function () {
  12743. var t = this._tileContainer,
  12744. e = this._bgBuffer;
  12745. t.style.visibility = "", t.parentNode.appendChild(t), o.Util.falseFn(e.offsetWidth);
  12746. var i = this._map.getZoom();
  12747. (i > this.options.maxZoom || i < this.options.minZoom) && this._clearBgBuffer(), this._animating = !1
  12748. },
  12749. _clearBgBuffer: function () {
  12750. var t = this._map;
  12751. !t || t._animatingZoom || t.touchZoom._zooming || (this._bgBuffer.innerHTML = "", this._bgBuffer.style[o.DomUtil.TRANSFORM] = "")
  12752. },
  12753. _prepareBgBuffer: function () {
  12754. var t = this._tileContainer,
  12755. e = this._bgBuffer,
  12756. i = this._getLoadedTilesPercentage(e),
  12757. n = this._getLoadedTilesPercentage(t);
  12758. return e && i > .5 && .5 > n ? (t.style.visibility = "hidden", void this._stopLoadingImages(t)) : (e.style.visibility = "hidden", e.style[o.DomUtil.TRANSFORM] = "", this._tileContainer = e, e = this._bgBuffer = t, this._stopLoadingImages(e), void clearTimeout(this._clearBgBufferTimer))
  12759. },
  12760. _getLoadedTilesPercentage: function (t) {
  12761. var e, i, n = t.getElementsByTagName("img"),
  12762. o = 0;
  12763. for (e = 0, i = n.length; i > e; e++) n[e].complete && o++;
  12764. return o / i
  12765. },
  12766. _stopLoadingImages: function (t) {
  12767. var e, i, n, s = Array.prototype.slice.call(t.getElementsByTagName("img"));
  12768. for (e = 0, i = s.length; i > e; e++) n = s[e], n.complete || (n.onload = o.Util.falseFn, n.onerror = o.Util.falseFn, n.src = o.Util.emptyImageUrl, n.parentNode.removeChild(n))
  12769. }
  12770. }), o.Map.include({
  12771. _defaultLocateOptions: {
  12772. watch: !1,
  12773. setView: !1,
  12774. maxZoom: 1 / 0,
  12775. timeout: 1e4,
  12776. maximumAge: 0,
  12777. enableHighAccuracy: !1
  12778. },
  12779. locate: function (t) {
  12780. if (t = this._locateOptions = o.extend(this._defaultLocateOptions, t), !navigator.geolocation) return this._handleGeolocationError({
  12781. code: 0,
  12782. message: "Geolocation not supported."
  12783. }), this;
  12784. var e = o.bind(this._handleGeolocationResponse, this),
  12785. i = o.bind(this._handleGeolocationError, this);
  12786. return t.watch ? this._locationWatchId = navigator.geolocation.watchPosition(e, i, t) : navigator.geolocation.getCurrentPosition(e, i, t), this
  12787. },
  12788. stopLocate: function () {
  12789. return navigator.geolocation && navigator.geolocation.clearWatch(this._locationWatchId), this._locateOptions && (this._locateOptions.setView = !1), this
  12790. },
  12791. _handleGeolocationError: function (t) {
  12792. var e = t.code,
  12793. i = t.message || (1 === e ? "permission denied" : 2 === e ? "position unavailable" : "timeout");
  12794. this._locateOptions.setView && !this._loaded && this.fitWorld(), this.fire("locationerror", {
  12795. code: e,
  12796. message: "Geolocation error: " + i + "."
  12797. })
  12798. },
  12799. _handleGeolocationResponse: function (t) {
  12800. var e = t.coords.latitude,
  12801. i = t.coords.longitude,
  12802. n = new o.LatLng(e, i),
  12803. s = 180 * t.coords.accuracy / 40075017,
  12804. a = s / Math.cos(o.LatLng.DEG_TO_RAD * e),
  12805. r = o.latLngBounds([e - s, i - a], [e + s, i + a]),
  12806. h = this._locateOptions;
  12807. if (h.setView) {
  12808. var l = Math.min(this.getBoundsZoom(r), h.maxZoom);
  12809. this.setView(n, l)
  12810. }
  12811. var u = {
  12812. latlng: n,
  12813. bounds: r,
  12814. timestamp: t.timestamp
  12815. };
  12816. for (var c in t.coords) "number" == typeof t.coords[c] && (u[c] = t.coords[c]);
  12817. this.fire("locationfound", u)
  12818. }
  12819. })
  12820. }(window, document);
  12821. define("ViewModels/DistanceLegendViewModel", ["Cesium/Core/defined", "Cesium/Core/DeveloperError", "Cesium/Core/EllipsoidGeodesic", "Cesium/Core/Cartesian2", "Cesium/Core/getTimestamp", "Cesium/Core/EventHelper", "KnockoutES5", "Core/loadView", "leaflet"], function (defined, DeveloperError, EllipsoidGeodesic, Cartesian2, getTimestamp, EventHelper, Knockout, loadView, leaflet) {
  12822. "use strict";
  12823. var DistanceLegendViewModel = function (options) {
  12824. if (!defined(options) || !defined(options.terria)) {
  12825. throw new DeveloperError("options.terria is required.")
  12826. }
  12827. this.terria = options.terria;
  12828. this._removeSubscription = undefined;
  12829. this._lastLegendUpdate = undefined;
  12830. this.eventHelper = new EventHelper;
  12831. this.distanceLabel = undefined;
  12832. this.barWidth = undefined;
  12833. Knockout.track(this, ["distanceLabel", "barWidth"]);
  12834. this.eventHelper.add(this.terria.afterWidgetChanged, function () {
  12835. if (defined(this._removeSubscription)) {
  12836. this._removeSubscription();
  12837. this._removeSubscription = undefined
  12838. }
  12839. }, this);
  12840. var that = this;
  12841. function addUpdateSubscription() {
  12842. if (defined(that.terria)) {
  12843. var scene = that.terria.scene;
  12844. that._removeSubscription = scene.postRender.addEventListener(function () {
  12845. updateDistanceLegendCesium(this, scene)
  12846. }, that)
  12847. } else if (defined(that.terria.leaflet)) {
  12848. var map = that.terria.leaflet.map;
  12849. var potentialChangeCallback = function potentialChangeCallback() {
  12850. updateDistanceLegendLeaflet(that, map)
  12851. };
  12852. that._removeSubscription = function () {
  12853. map.off("zoomend", potentialChangeCallback);
  12854. map.off("moveend", potentialChangeCallback)
  12855. };
  12856. map.on("zoomend", potentialChangeCallback);
  12857. map.on("moveend", potentialChangeCallback);
  12858. updateDistanceLegendLeaflet(that, map)
  12859. }
  12860. }
  12861. addUpdateSubscription();
  12862. this.eventHelper.add(this.terria.afterWidgetChanged, function () {
  12863. addUpdateSubscription()
  12864. }, this)
  12865. };
  12866. DistanceLegendViewModel.prototype.destroy = function () {
  12867. this.eventHelper.removeAll()
  12868. };
  12869. DistanceLegendViewModel.prototype.show = function (container) {
  12870. var testing = '<div class="distance-legend" data-bind="visible: distanceLabel && barWidth">' + '<div class="distance-legend-label" data-bind="text: distanceLabel"></div>' + "<div class=\"distance-legend-scale-bar\" data-bind=\"style: { width: barWidth + 'px', left: (5 + (125 - barWidth) / 2) + 'px' }\"></div>" + "</div>";
  12871. loadView(testing, container, this)
  12872. };
  12873. DistanceLegendViewModel.create = function (options) {
  12874. var result = new DistanceLegendViewModel(options);
  12875. result.show(options.container);
  12876. return result
  12877. };
  12878. var geodesic = new EllipsoidGeodesic;
  12879. var distances = [1, 2, 3, 5, 10, 20, 30, 50, 100, 200, 300, 500, 1e3, 2e3, 3e3, 5e3, 1e4, 2e4, 3e4, 5e4, 1e5, 2e5, 3e5, 5e5, 1e6, 2e6, 3e6, 5e6, 1e7, 2e7, 3e7, 5e7];
  12880. function updateDistanceLegendCesium(viewModel, scene) {
  12881. var now = getTimestamp();
  12882. if (now < viewModel._lastLegendUpdate + 250) {
  12883. return
  12884. }
  12885. viewModel._lastLegendUpdate = now;
  12886. var width = scene.canvas.clientWidth;
  12887. var height = scene.canvas.clientHeight;
  12888. var left = scene.camera.getPickRay(new Cartesian2(width / 2 | 0, height - 1));
  12889. var right = scene.camera.getPickRay(new Cartesian2(1 + width / 2 | 0, height - 1));
  12890. var globe = scene.globe;
  12891. var leftPosition = globe.pick(left, scene);
  12892. var rightPosition = globe.pick(right, scene);
  12893. if (!defined(leftPosition) || !defined(rightPosition)) {
  12894. viewModel.barWidth = undefined;
  12895. viewModel.distanceLabel = undefined;
  12896. return
  12897. }
  12898. var leftCartographic = globe.ellipsoid.cartesianToCartographic(leftPosition);
  12899. var rightCartographic = globe.ellipsoid.cartesianToCartographic(rightPosition);
  12900. geodesic.setEndPoints(leftCartographic, rightCartographic);
  12901. var pixelDistance = geodesic.surfaceDistance;
  12902. var maxBarWidth = 100;
  12903. var distance;
  12904. for (var i = distances.length - 1; !defined(distance) && i >= 0; --i) {
  12905. if (distances[i] / pixelDistance < maxBarWidth) {
  12906. distance = distances[i]
  12907. }
  12908. }
  12909. if (defined(distance)) {
  12910. var label;
  12911. if (distance >= 1e3) {
  12912. label = (distance / 1e3).toString() + " km"
  12913. } else {
  12914. label = distance.toString() + " m"
  12915. }
  12916. viewModel.barWidth = distance / pixelDistance | 0;
  12917. viewModel.distanceLabel = label
  12918. } else {
  12919. viewModel.barWidth = undefined;
  12920. viewModel.distanceLabel = undefined
  12921. }
  12922. }
  12923. function updateDistanceLegendLeaflet(viewModel, map) {
  12924. var halfHeight = map.getSize().y / 2;
  12925. var maxPixelWidth = 100;
  12926. var maxMeters = map.containerPointToLatLng([0, halfHeight]).distanceTo(map.containerPointToLatLng([maxPixelWidth, halfHeight]));
  12927. var meters = leaflet.control.scale()._getRoundNum(maxMeters);
  12928. var label = meters < 1e3 ? meters + " m" : meters / 1e3 + " km";
  12929. viewModel.barWidth = meters / maxMeters * maxPixelWidth;
  12930. viewModel.distanceLabel = label
  12931. }
  12932. return DistanceLegendViewModel
  12933. });
  12934. define("ViewModels/UserInterfaceControl", ["Cesium/Core/defined", "Cesium/Core/defineProperties", "Cesium/Core/DeveloperError", "KnockoutES5"], function (defined, defineProperties, DeveloperError, Knockout) {
  12935. "use strict";
  12936. var UserInterfaceControl = function (terria) {
  12937. if (!defined(terria)) {
  12938. throw new DeveloperError("terria is required")
  12939. }
  12940. this._terria = terria;
  12941. this.name = "Unnamed Control";
  12942. this.text = undefined;
  12943. this.svgIcon = undefined;
  12944. this.svgHeight = undefined;
  12945. this.svgWidth = undefined;
  12946. this.cssClass = undefined;
  12947. this.isActive = false;
  12948. Knockout.track(this, ["name", "svgIcon", "svgHeight", "svgWidth", "cssClass", "isActive"])
  12949. };
  12950. defineProperties(UserInterfaceControl.prototype, {
  12951. terria: {
  12952. get: function () {
  12953. return this._terria
  12954. }
  12955. },
  12956. hasText: {
  12957. get: function () {
  12958. return defined(this.text) && typeof this.text === "string"
  12959. }
  12960. }
  12961. });
  12962. UserInterfaceControl.prototype.activate = function () {
  12963. throw new DeveloperError("activate must be implemented in the derived class.")
  12964. };
  12965. return UserInterfaceControl
  12966. });
  12967. define("ViewModels/NavigationControl", ["ViewModels/UserInterfaceControl"], function (UserInterfaceControl) {
  12968. "use strict";
  12969. var NavigationControl = function (terria) {
  12970. UserInterfaceControl.apply(this, arguments)
  12971. };
  12972. NavigationControl.prototype = Object.create(UserInterfaceControl.prototype);
  12973. return NavigationControl
  12974. });
  12975. define("SvgPaths/svgReset", [], function () {
  12976. "use strict";
  12977. return "M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z"
  12978. });
  12979. define("ViewModels/ResetViewNavigationControl", ["Cesium/Core/defined", "Cesium/Scene/Camera", "Cesium/Core/Rectangle", "Cesium/Core/Cartographic", "ViewModels/NavigationControl", "SvgPaths/svgReset"], function (defined, Camera, Rectangle, Cartographic, NavigationControl, svgReset) {
  12980. "use strict";
  12981. var ResetViewNavigationControl = function (terria) {
  12982. NavigationControl.apply(this, arguments);
  12983. this.name = "Reset View";
  12984. this.svgIcon = svgReset;
  12985. this.svgHeight = 15;
  12986. this.svgWidth = 15;
  12987. this.cssClass = "navigation-control-icon-reset"
  12988. };
  12989. ResetViewNavigationControl.prototype = Object.create(NavigationControl.prototype);
  12990. ResetViewNavigationControl.prototype.resetView = function () {
  12991. var scene = this.terria.scene;
  12992. var sscc = scene.screenSpaceCameraController;
  12993. if (!sscc.enableInputs) {
  12994. return
  12995. }
  12996. this.isActive = true;
  12997. var camera = scene.camera;
  12998. if (defined(this.terria.trackedEntity)) {
  12999. var trackedEntity = this.terria.trackedEntity;
  13000. this.terria.trackedEntity = undefined;
  13001. this.terria.trackedEntity = trackedEntity
  13002. } else {
  13003. if (this.terria.options.defaultResetView) {
  13004. if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Cartographic) {
  13005. camera.flyTo({
  13006. destination: scene.globe.ellipsoid.cartographicToCartesian(this.terria.options.defaultResetView)
  13007. })
  13008. } else if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof Rectangle) {
  13009. try {
  13010. Rectangle.validate(this.terria.options.defaultResetView);
  13011. camera.flyTo({
  13012. destination: this.terria.options.defaultResetView
  13013. })
  13014. } catch (e) {
  13015. console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!")
  13016. }
  13017. }
  13018. } else if (typeof camera.flyHome === "function") {
  13019. camera.flyHome(1)
  13020. } else {
  13021. camera.flyTo({
  13022. destination: Camera.DEFAULT_VIEW_RECTANGLE,
  13023. duration: 1
  13024. })
  13025. }
  13026. }
  13027. this.isActive = false
  13028. };
  13029. ResetViewNavigationControl.prototype.activate = function () {
  13030. this.resetView()
  13031. };
  13032. return ResetViewNavigationControl
  13033. });
  13034. define("Core/Utils", ["Cesium/Core/defined", "Cesium/Core/Ray", "Cesium/Core/Cartesian3", "Cesium/Core/Cartographic", "Cesium/Core/ReferenceFrame", "Cesium/Scene/SceneMode"], function (defined, Ray, Cartesian3, Cartographic, ReferenceFrame, SceneMode) {
  13035. "use strict";
  13036. var Utils = {};
  13037. var unprojectedScratch = new Cartographic;
  13038. var rayScratch = new Ray;
  13039. Utils.getCameraFocus = function (terria, inWorldCoordinates, result) {
  13040. var scene = terria.scene;
  13041. var camera = scene.camera;
  13042. if (scene.mode == SceneMode.MORPHING) {
  13043. return undefined
  13044. }
  13045. if (!defined(result)) {
  13046. result = new Cartesian3
  13047. }
  13048. if (defined(terria.trackedEntity)) {
  13049. result = terria.trackedEntity.position.getValue(terria.clock.currentTime, result)
  13050. } else {
  13051. rayScratch.origin = camera.positionWC;
  13052. rayScratch.direction = camera.directionWC;
  13053. result = scene.globe.pick(rayScratch, scene, result)
  13054. }
  13055. if (!defined(result)) {
  13056. return undefined
  13057. }
  13058. if (scene.mode == SceneMode.SCENE2D || scene.mode == SceneMode.COLUMBUS_VIEW) {
  13059. result = camera.worldToCameraCoordinatesPoint(result, result);
  13060. if (inWorldCoordinates) {
  13061. result = scene.globe.ellipsoid.cartographicToCartesian(scene.mapProjection.unproject(result, unprojectedScratch), result)
  13062. }
  13063. } else {
  13064. if (!inWorldCoordinates) {
  13065. result = camera.worldToCameraCoordinatesPoint(result, result)
  13066. }
  13067. }
  13068. return result
  13069. };
  13070. return Utils
  13071. });
  13072. define("ViewModels/ZoomNavigationControl", ["Cesium/Core/defined", "Cesium/Core/Ray", "Cesium/Core/IntersectionTests", "Cesium/Core/Cartesian3", "Cesium/Scene/SceneMode", "ViewModels/NavigationControl", "Core/Utils"], function (defined, Ray, IntersectionTests, Cartesian3, SceneMode, NavigationControl, Utils) {
  13073. "use strict";
  13074. var ZoomNavigationControl = function (terria, zoomIn) {
  13075. NavigationControl.apply(this, arguments);
  13076. this.name = zoomIn ? "放大" : "缩小";
  13077. this.text = zoomIn ? "+" : "-";
  13078. this.cssClass = "navigation-control-icon-zoom-" + (zoomIn ? "in" : "out");
  13079. this.relativeAmount = 2;
  13080. if (zoomIn) {
  13081. this.relativeAmount = 1 / this.relativeAmount
  13082. }
  13083. };
  13084. ZoomNavigationControl.prototype.relativeAmount = 1;
  13085. ZoomNavigationControl.prototype = Object.create(NavigationControl.prototype);
  13086. ZoomNavigationControl.prototype.activate = function () {
  13087. this.zoom(this.relativeAmount)
  13088. };
  13089. var cartesian3Scratch = new Cartesian3;
  13090. ZoomNavigationControl.prototype.zoom = function (relativeAmount) {
  13091. this.isActive = true;
  13092. if (defined(this.terria)) {
  13093. var scene = this.terria.scene;
  13094. var sscc = scene.screenSpaceCameraController;
  13095. if (!sscc.enableInputs || !sscc.enableZoom) {
  13096. return
  13097. }
  13098. var camera = scene.camera;
  13099. var orientation;
  13100. switch (scene.mode) {
  13101. case SceneMode.MORPHING:
  13102. break;
  13103. case SceneMode.SCENE2D:
  13104. camera.zoomIn(camera.positionCartographic.height * (1 - this.relativeAmount));
  13105. break;
  13106. default:
  13107. var focus;
  13108. if (defined(this.terria.trackedEntity)) {
  13109. focus = new Cartesian3
  13110. } else {
  13111. focus = Utils.getCameraFocus(this.terria, false)
  13112. }
  13113. if (!defined(focus)) {
  13114. var ray = new Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)), camera.directionWC);
  13115. focus = IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid);
  13116. orientation = {
  13117. heading: camera.heading,
  13118. pitch: camera.pitch,
  13119. roll: camera.roll
  13120. }
  13121. } else {
  13122. orientation = {
  13123. direction: camera.direction,
  13124. up: camera.up
  13125. }
  13126. }
  13127. var direction = Cartesian3.subtract(camera.position, focus, cartesian3Scratch);
  13128. var movementVector = Cartesian3.multiplyByScalar(direction, relativeAmount, direction);
  13129. var endPosition = Cartesian3.add(focus, movementVector, focus);
  13130. if (defined(this.terria.trackedEntity) || scene.mode == SceneMode.COLUMBUS_VIEW) {
  13131. camera.position = endPosition
  13132. } else {
  13133. camera.flyTo({
  13134. destination: endPosition,
  13135. orientation: orientation,
  13136. duration: .5,
  13137. convert: false
  13138. })
  13139. }
  13140. }
  13141. }
  13142. this.isActive = false
  13143. };
  13144. return ZoomNavigationControl
  13145. });
  13146. define("SvgPaths/svgCompassOuterRing", [], function () {
  13147. "use strict";
  13148. return "m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z"
  13149. });
  13150. define("SvgPaths/svgCompassGyro", [], function () {
  13151. "use strict";
  13152. return "m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z"
  13153. });
  13154. define("SvgPaths/svgCompassRotationMarker", [], function () {
  13155. "use strict";
  13156. return "M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z"
  13157. });
  13158. define("ViewModels/NavigationViewModel", ["Cesium/Core/defined", "Cesium/Core/Math", "Cesium/Core/getTimestamp", "Cesium/Core/EventHelper", "Cesium/Core/Transforms", "Cesium/Scene/SceneMode", "Cesium/Core/Cartesian2", "Cesium/Core/Cartesian3", "Cesium/Core/Matrix4", "Cesium/Core/BoundingSphere", "Cesium/Core/HeadingPitchRange", "KnockoutES5", "Core/loadView", "ViewModels/ResetViewNavigationControl", "ViewModels/ZoomNavigationControl", "SvgPaths/svgCompassOuterRing", "SvgPaths/svgCompassGyro", "SvgPaths/svgCompassRotationMarker", "Core/Utils"], function (defined, CesiumMath, getTimestamp, EventHelper, Transforms, SceneMode, Cartesian2, Cartesian3, Matrix4, BoundingSphere, HeadingPitchRange, Knockout, loadView, ResetViewNavigationControl, ZoomNavigationControl, svgCompassOuterRing, svgCompassGyro, svgCompassRotationMarker, Utils) {
  13159. "use strict";
  13160. var NavigationViewModel = function (options) {
  13161. this.terria = options.terria;
  13162. this.eventHelper = new EventHelper;
  13163. this.controls = options.controls;
  13164. if (!defined(this.controls)) {
  13165. this.controls = [new ZoomNavigationControl(this.terria, true), new ZoomNavigationControl(this.terria, false)]
  13166. }
  13167. this.svgCompassOuterRing = svgCompassOuterRing;
  13168. this.svgCompassGyro = svgCompassGyro;
  13169. this.svgCompassRotationMarker = svgCompassRotationMarker;
  13170. this.showCompass = defined(this.terria);
  13171. this.heading = this.showCompass ? this.terria.scene.camera.heading : 0;
  13172. this.isOrbiting = false;
  13173. this.orbitCursorAngle = 0;
  13174. this.orbitCursorOpacity = 0;
  13175. this.orbitLastTimestamp = 0;
  13176. this.orbitFrame = undefined;
  13177. this.orbitIsLook = false;
  13178. this.orbitMouseMoveFunction = undefined;
  13179. this.orbitMouseUpFunction = undefined;
  13180. this.isRotating = false;
  13181. this.rotateInitialCursorAngle = undefined;
  13182. this.rotateFrame = undefined;
  13183. this.rotateIsLook = false;
  13184. this.rotateMouseMoveFunction = undefined;
  13185. this.rotateMouseUpFunction = undefined;
  13186. this._unsubcribeFromPostRender = undefined;
  13187. Knockout.track(this, ["controls", "showCompass", "heading", "isOrbiting", "orbitCursorAngle", "isRotating"]);
  13188. var that = this;
  13189. function widgetChange() {
  13190. if (defined(that.terria)) {
  13191. if (that._unsubcribeFromPostRender) {
  13192. that._unsubcribeFromPostRender();
  13193. that._unsubcribeFromPostRender = undefined
  13194. }
  13195. that.showCompass = true;
  13196. that._unsubcribeFromPostRender = that.terria.scene.postRender.addEventListener(function () {
  13197. that.heading = that.terria.scene.camera.heading
  13198. })
  13199. } else {
  13200. if (that._unsubcribeFromPostRender) {
  13201. that._unsubcribeFromPostRender();
  13202. that._unsubcribeFromPostRender = undefined
  13203. }
  13204. that.showCompass = false
  13205. }
  13206. }
  13207. this.eventHelper.add(this.terria.afterWidgetChanged, widgetChange, this);
  13208. widgetChange()
  13209. };
  13210. NavigationViewModel.prototype.destroy = function () {
  13211. this.eventHelper.removeAll()
  13212. };
  13213. NavigationViewModel.prototype.show = function (container) {
  13214. var testing = '<div class="compass" data-bind="visible: showCompass, event: { mousedown: handleMouseDown, dblclick: handleDoubleClick }">' + '<div class="compass-outer-ring-background"></div>' + " <div class=\"compass-rotation-marker\" data-bind=\"visible: isOrbiting, style: { transform: 'rotate(-' + orbitCursorAngle + 'rad)', '-webkit-transform': 'rotate(-' + orbitCursorAngle + 'rad)', opacity: orbitCursorOpacity }, cesiumSvgPath: { path: svgCompassRotationMarker, width: 145, height: 145 }\"></div>" + " <div class=\"compass-outer-ring\" title=\"Click and drag to rotate the camera\" data-bind=\"style: { transform: 'rotate(-' + heading + 'rad)', '-webkit-transform': 'rotate(-' + heading + 'rad)' }, cesiumSvgPath: { path: svgCompassOuterRing, width: 145, height: 145 }\"></div>" + ' <div class="compass-gyro-background"></div>' + ' <div class="compass-gyro" data-bind="cesiumSvgPath: { path: svgCompassGyro, width: 145, height: 145 }, css: { \'compass-gyro-active\': isOrbiting }"></div>' + "</div>" + '<div class="navigation-controls">' + "<!-- ko foreach: controls -->" + "<div data-bind=\"click: activate, attr: { title: $data.name }, css: $root.isLastControl($data) ? 'navigation-control-last' : 'navigation-control' \">" + " <!-- ko if: $data.hasText -->" + " <div data-bind=\"text: $data.text, css: $data.isActive ? 'navigation-control-icon-active ' + $data.cssClass : $data.cssClass\"></div>" + " <!-- /ko -->" + " <!-- ko ifnot: $data.hasText -->" + " <div data-bind=\"cesiumSvgPath: { path: $data.svgIcon, width: $data.svgWidth, height: $data.svgHeight }, css: $data.isActive ? 'navigation-control-icon-active ' + $data.cssClass : $data.cssClass\"></div>" + " <!-- /ko -->" + " </div>" + " <!-- /ko -->" + "</div>";
  13215. loadView(testing, container, this)
  13216. };
  13217. NavigationViewModel.prototype.add = function (control) {
  13218. this.controls.push(control)
  13219. };
  13220. NavigationViewModel.prototype.remove = function (control) {
  13221. this.controls.remove(control)
  13222. };
  13223. NavigationViewModel.prototype.isLastControl = function (control) {
  13224. return control === this.controls[this.controls.length - 1]
  13225. };
  13226. var vectorScratch = new Cartesian2;
  13227. NavigationViewModel.prototype.handleMouseDown = function (viewModel, e) {
  13228. var scene = this.terria.scene;
  13229. if (scene.mode == SceneMode.MORPHING) {
  13230. return true
  13231. }
  13232. var compassElement = e.currentTarget;
  13233. var compassRectangle = e.currentTarget.getBoundingClientRect();
  13234. var maxDistance = compassRectangle.width / 2;
  13235. var center = new Cartesian2((compassRectangle.right - compassRectangle.left) / 2, (compassRectangle.bottom - compassRectangle.top) / 2);
  13236. var clickLocation = new Cartesian2(e.clientX - compassRectangle.left, e.clientY - compassRectangle.top);
  13237. var vector = Cartesian2.subtract(clickLocation, center, vectorScratch);
  13238. var distanceFromCenter = Cartesian2.magnitude(vector);
  13239. var distanceFraction = distanceFromCenter / maxDistance;
  13240. var nominalTotalRadius = 145;
  13241. var norminalGyroRadius = 50;
  13242. if (distanceFraction < norminalGyroRadius / nominalTotalRadius) {
  13243. orbit(this, compassElement, vector)
  13244. } else if (distanceFraction < 1) {
  13245. rotate(this, compassElement, vector)
  13246. } else {
  13247. return true
  13248. }
  13249. };
  13250. var oldTransformScratch = new Matrix4;
  13251. var newTransformScratch = new Matrix4;
  13252. var centerScratch = new Cartesian3;
  13253. NavigationViewModel.prototype.handleDoubleClick = function (viewModel, e) {
  13254. var scene = viewModel.terria.scene;
  13255. var camera = scene.camera;
  13256. var sscc = scene.screenSpaceCameraController;
  13257. if (scene.mode == SceneMode.MORPHING || !sscc.enableInputs) {
  13258. return true
  13259. }
  13260. if (scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableTranslate) {
  13261. return
  13262. }
  13263. if (scene.mode == SceneMode.SCENE3D || scene.mode == SceneMode.COLUMBUS_VIEW) {
  13264. if (!sscc.enableLook) {
  13265. return
  13266. }
  13267. if (scene.mode == SceneMode.SCENE3D) {
  13268. //if (!sscc.enableRotate) {
  13269. // return
  13270. //}
  13271. }
  13272. }
  13273. //debugger
  13274. var center = Utils.getCameraFocus(viewModel.terria, true, centerScratch);
  13275. //var center = Cesium.Cartesian3.fromDegrees(onemapUrlConfig.globalSettingData.center.lng, onemapUrlConfig.globalSettingData.center.lat, onemapUrlConfig.globalSettingData.alt)
  13276. if (!center) {
  13277. return
  13278. }
  13279. if (!defined(center)) {
  13280. this.controls[1].resetView();
  13281. return
  13282. }
  13283. var cameraPosition = scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic, new Cartesian3);
  13284. var surfaceNormal = scene.globe.ellipsoid.geodeticSurfaceNormal(center);
  13285. var focusBoundingSphere = new BoundingSphere(center, 0);
  13286. //debugger;
  13287. camera.flyToBoundingSphere(focusBoundingSphere, {
  13288. offset: new HeadingPitchRange(0, -90, Cartesian3.distance(cameraPosition, center)),
  13289. //offset: new HeadingPitchRange(0, -90, onemapUrlConfig.globalSettingData.alt),
  13290. duration: 1.5
  13291. })
  13292. };
  13293. NavigationViewModel.create = function (options) {
  13294. var result = new NavigationViewModel(options);
  13295. result.show(options.container);
  13296. return result
  13297. };
  13298. function orbit(viewModel, compassElement, cursorVector) {
  13299. var scene = viewModel.terria.scene;
  13300. var sscc = scene.screenSpaceCameraController;
  13301. if (scene.mode == SceneMode.MORPHING || !sscc.enableInputs) {
  13302. return
  13303. }
  13304. switch (scene.mode) {
  13305. case SceneMode.COLUMBUS_VIEW:
  13306. if (sscc.enableLook) {
  13307. break
  13308. }
  13309. if (!sscc.enableTranslate || !sscc.enableTilt) {
  13310. return
  13311. }
  13312. break;
  13313. case SceneMode.SCENE3D:
  13314. if (sscc.enableLook) {
  13315. break
  13316. }
  13317. if (!sscc.enableTilt || !sscc.enableRotate) {
  13318. return
  13319. }
  13320. break;
  13321. case SceneMode.SCENE2D:
  13322. if (!sscc.enableTranslate) {
  13323. return
  13324. }
  13325. break
  13326. }
  13327. document.removeEventListener("mousemove", viewModel.orbitMouseMoveFunction, false);
  13328. document.removeEventListener("mouseup", viewModel.orbitMouseUpFunction, false);
  13329. if (defined(viewModel.orbitTickFunction)) {
  13330. viewModel.terria.clock.onTick.removeEventListener(viewModel.orbitTickFunction)
  13331. }
  13332. viewModel.orbitMouseMoveFunction = undefined;
  13333. viewModel.orbitMouseUpFunction = undefined;
  13334. viewModel.orbitTickFunction = undefined;
  13335. viewModel.isOrbiting = true;
  13336. viewModel.orbitLastTimestamp = getTimestamp();
  13337. var camera = scene.camera;
  13338. if (defined(viewModel.terria.trackedEntity)) {
  13339. viewModel.orbitFrame = undefined;
  13340. viewModel.orbitIsLook = false
  13341. } else {
  13342. var center = Utils.getCameraFocus(viewModel.terria, true, centerScratch);
  13343. if (!defined(center)) {
  13344. viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch);
  13345. viewModel.orbitIsLook = true
  13346. } else {
  13347. viewModel.orbitFrame = Transforms.eastNorthUpToFixedFrame(center, scene.globe.ellipsoid, newTransformScratch);
  13348. viewModel.orbitIsLook = false
  13349. }
  13350. }
  13351. viewModel.orbitTickFunction = function (e) {
  13352. var timestamp = getTimestamp();
  13353. var deltaT = timestamp - viewModel.orbitLastTimestamp;
  13354. var rate = (viewModel.orbitCursorOpacity - .5) * 2.5 / 1e3;
  13355. var distance = deltaT * rate;
  13356. var angle = viewModel.orbitCursorAngle + CesiumMath.PI_OVER_TWO;
  13357. var x = Math.cos(angle) * distance;
  13358. var y = Math.sin(angle) * distance;
  13359. var oldTransform;
  13360. if (defined(viewModel.orbitFrame)) {
  13361. oldTransform = Matrix4.clone(camera.transform, oldTransformScratch);
  13362. camera.lookAtTransform(viewModel.orbitFrame)
  13363. }
  13364. if (scene.mode == SceneMode.SCENE2D) {
  13365. camera.move(new Cartesian3(x, y, 0), Math.max(scene.canvas.clientWidth, scene.canvas.clientHeight) / 100 * camera.positionCartographic.height * distance)
  13366. } else {
  13367. if (viewModel.orbitIsLook) {
  13368. camera.look(Cartesian3.UNIT_Z, -x);
  13369. camera.look(camera.right, -y)
  13370. } else {
  13371. camera.rotateLeft(x);
  13372. camera.rotateUp(y)
  13373. }
  13374. }
  13375. if (defined(viewModel.orbitFrame)) {
  13376. camera.lookAtTransform(oldTransform)
  13377. }
  13378. viewModel.orbitLastTimestamp = timestamp
  13379. };
  13380. function updateAngleAndOpacity(vector, compassWidth) {
  13381. var angle = Math.atan2(-vector.y, vector.x);
  13382. viewModel.orbitCursorAngle = CesiumMath.zeroToTwoPi(angle - CesiumMath.PI_OVER_TWO);
  13383. var distance = Cartesian2.magnitude(vector);
  13384. var maxDistance = compassWidth / 2;
  13385. var distanceFraction = Math.min(distance / maxDistance, 1);
  13386. var easedOpacity = .5 * distanceFraction * distanceFraction + .5;
  13387. viewModel.orbitCursorOpacity = easedOpacity
  13388. }
  13389. viewModel.orbitMouseMoveFunction = function (e) {
  13390. var compassRectangle = compassElement.getBoundingClientRect();
  13391. var center = new Cartesian2((compassRectangle.right - compassRectangle.left) / 2, (compassRectangle.bottom - compassRectangle.top) / 2);
  13392. var clickLocation = new Cartesian2(e.clientX - compassRectangle.left, e.clientY - compassRectangle.top);
  13393. var vector = Cartesian2.subtract(clickLocation, center, vectorScratch);
  13394. updateAngleAndOpacity(vector, compassRectangle.width)
  13395. };
  13396. viewModel.orbitMouseUpFunction = function (e) {
  13397. viewModel.isOrbiting = false;
  13398. document.removeEventListener("mousemove", viewModel.orbitMouseMoveFunction, false);
  13399. document.removeEventListener("mouseup", viewModel.orbitMouseUpFunction, false);
  13400. if (defined(viewModel.orbitTickFunction)) {
  13401. viewModel.terria.clock.onTick.removeEventListener(viewModel.orbitTickFunction)
  13402. }
  13403. viewModel.orbitMouseMoveFunction = undefined;
  13404. viewModel.orbitMouseUpFunction = undefined;
  13405. viewModel.orbitTickFunction = undefined
  13406. };
  13407. document.addEventListener("mousemove", viewModel.orbitMouseMoveFunction, false);
  13408. document.addEventListener("mouseup", viewModel.orbitMouseUpFunction, false);
  13409. viewModel.terria.clock.onTick.addEventListener(viewModel.orbitTickFunction);
  13410. updateAngleAndOpacity(cursorVector, compassElement.getBoundingClientRect().width)
  13411. }
  13412. function rotate(viewModel, compassElement, cursorVector) {
  13413. var scene = viewModel.terria.scene;
  13414. var camera = scene.camera;
  13415. var sscc = scene.screenSpaceCameraController;
  13416. if (scene.mode == SceneMode.MORPHING || scene.mode == SceneMode.SCENE2D || !sscc.enableInputs) {
  13417. return
  13418. }
  13419. if (!sscc.enableLook && (scene.mode == SceneMode.COLUMBUS_VIEW || scene.mode == SceneMode.SCENE3D && !sscc.enableRotate)) {
  13420. return
  13421. }
  13422. document.removeEventListener("mousemove", viewModel.rotateMouseMoveFunction, false);
  13423. document.removeEventListener("mouseup", viewModel.rotateMouseUpFunction, false);
  13424. viewModel.rotateMouseMoveFunction = undefined;
  13425. viewModel.rotateMouseUpFunction = undefined;
  13426. viewModel.isRotating = true;
  13427. viewModel.rotateInitialCursorAngle = Math.atan2(-cursorVector.y, cursorVector.x);
  13428. if (defined(viewModel.terria.trackedEntity)) {
  13429. viewModel.rotateFrame = undefined;
  13430. viewModel.rotateIsLook = false
  13431. } else {
  13432. var viewCenter = Utils.getCameraFocus(viewModel.terria, true, centerScratch);
  13433. if (!defined(viewCenter) || scene.mode == SceneMode.COLUMBUS_VIEW && !sscc.enableLook && !sscc.enableTranslate) {
  13434. viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(camera.positionWC, scene.globe.ellipsoid, newTransformScratch);
  13435. viewModel.rotateIsLook = true
  13436. } else {
  13437. viewModel.rotateFrame = Transforms.eastNorthUpToFixedFrame(viewCenter, scene.globe.ellipsoid, newTransformScratch);
  13438. viewModel.rotateIsLook = false
  13439. }
  13440. }
  13441. var oldTransform;
  13442. if (defined(viewModel.rotateFrame)) {
  13443. oldTransform = Matrix4.clone(camera.transform, oldTransformScratch);
  13444. camera.lookAtTransform(viewModel.rotateFrame)
  13445. }
  13446. viewModel.rotateInitialCameraAngle = -camera.heading;
  13447. if (defined(viewModel.rotateFrame)) {
  13448. camera.lookAtTransform(oldTransform)
  13449. }
  13450. viewModel.rotateMouseMoveFunction = function (e) {
  13451. var compassRectangle = compassElement.getBoundingClientRect();
  13452. var center = new Cartesian2((compassRectangle.right - compassRectangle.left) / 2, (compassRectangle.bottom - compassRectangle.top) / 2);
  13453. var clickLocation = new Cartesian2(e.clientX - compassRectangle.left, e.clientY - compassRectangle.top);
  13454. var vector = Cartesian2.subtract(clickLocation, center, vectorScratch);
  13455. var angle = Math.atan2(-vector.y, vector.x);
  13456. var angleDifference = angle - viewModel.rotateInitialCursorAngle;
  13457. var newCameraAngle = CesiumMath.zeroToTwoPi(viewModel.rotateInitialCameraAngle - angleDifference);
  13458. var camera = viewModel.terria.scene.camera;
  13459. var oldTransform;
  13460. if (defined(viewModel.rotateFrame)) {
  13461. oldTransform = Matrix4.clone(camera.transform, oldTransformScratch);
  13462. camera.lookAtTransform(viewModel.rotateFrame)
  13463. }
  13464. var currentCameraAngle = -camera.heading;
  13465. camera.rotateRight(newCameraAngle - currentCameraAngle);
  13466. if (defined(viewModel.rotateFrame)) {
  13467. camera.lookAtTransform(oldTransform)
  13468. }
  13469. };
  13470. viewModel.rotateMouseUpFunction = function (e) {
  13471. viewModel.isRotating = false;
  13472. document.removeEventListener("mousemove", viewModel.rotateMouseMoveFunction, false);
  13473. document.removeEventListener("mouseup", viewModel.rotateMouseUpFunction, false);
  13474. viewModel.rotateMouseMoveFunction = undefined;
  13475. viewModel.rotateMouseUpFunction = undefined
  13476. };
  13477. document.addEventListener("mousemove", viewModel.rotateMouseMoveFunction, false);
  13478. document.addEventListener("mouseup", viewModel.rotateMouseUpFunction, false)
  13479. }
  13480. return NavigationViewModel
  13481. });
  13482. define("CesiumNavigation", ["Cesium/Core/defined", "Cesium/Core/defineProperties", "Cesium/Core/Event", "KnockoutES5", "Core/registerKnockoutBindings", "ViewModels/DistanceLegendViewModel", "ViewModels/NavigationViewModel"], function (defined, defineProperties, CesiumEvent, Knockout, registerKnockoutBindings, DistanceLegendViewModel, NavigationViewModel) {
  13483. "use strict";
  13484. var CesiumNavigation = function (viewerCesiumWidget) {
  13485. initialize.apply(this, arguments);
  13486. this._onDestroyListeners = []
  13487. };
  13488. CesiumNavigation.prototype.distanceLegendViewModel = undefined;
  13489. CesiumNavigation.prototype.navigationViewModel = undefined;
  13490. CesiumNavigation.prototype.navigationDiv = undefined;
  13491. CesiumNavigation.prototype.distanceLegendDiv = undefined;
  13492. CesiumNavigation.prototype.terria = undefined;
  13493. CesiumNavigation.prototype.container = undefined;
  13494. CesiumNavigation.prototype._onDestroyListeners = undefined;
  13495. CesiumNavigation.prototype.destroy = function () {
  13496. if (defined(this.navigationViewModel)) {
  13497. this.navigationViewModel.destroy()
  13498. }
  13499. if (defined(this.distanceLegendViewModel)) {
  13500. this.distanceLegendViewModel.destroy()
  13501. }
  13502. if (defined(this.navigationDiv)) {
  13503. this.navigationDiv.parentNode.removeChild(this.navigationDiv)
  13504. }
  13505. delete this.navigationDiv;
  13506. if (defined(this.distanceLegendDiv)) {
  13507. this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv)
  13508. }
  13509. delete this.distanceLegendDiv;
  13510. if (defined(this.container)) {
  13511. this.container.parentNode.removeChild(this.container)
  13512. }
  13513. delete this.container;
  13514. for (var i = 0; i < this._onDestroyListeners.length; i++) {
  13515. this._onDestroyListeners[i]()
  13516. }
  13517. };
  13518. CesiumNavigation.prototype.addOnDestroyListener = function (callback) {
  13519. if (typeof callback === "function") {
  13520. this._onDestroyListeners.push(callback)
  13521. }
  13522. };
  13523. function initialize(viewerCesiumWidget, options) {
  13524. if (!defined(viewerCesiumWidget)) {
  13525. throw new DeveloperError("CesiumWidget or Viewer is required.")
  13526. }
  13527. var cesiumWidget = defined(viewerCesiumWidget.cesiumWidget) ? viewerCesiumWidget.cesiumWidget : viewerCesiumWidget;
  13528. var container = document.createElement("div");
  13529. container.className = "cesium-widget-cesiumNavigationContainer";
  13530. cesiumWidget.container.appendChild(container);
  13531. this.terria = viewerCesiumWidget;
  13532. this.terria.options = options;
  13533. this.terria.afterWidgetChanged = new CesiumEvent;
  13534. this.terria.beforeWidgetChanged = new CesiumEvent;
  13535. this.container = container;
  13536. this.navigationDiv = document.createElement("div");
  13537. this.navigationDiv.setAttribute("id", "navigationDiv");
  13538. this.distanceLegendDiv = document.createElement("div");
  13539. this.navigationDiv.setAttribute("id", "distanceLegendDiv");
  13540. container.appendChild(this.navigationDiv);
  13541. container.appendChild(this.distanceLegendDiv);
  13542. registerKnockoutBindings();
  13543. this.distanceLegendViewModel = DistanceLegendViewModel.create({
  13544. container: this.distanceLegendDiv,
  13545. terria: this.terria,
  13546. mapElement: container
  13547. });
  13548. this.navigationViewModel = NavigationViewModel.create({
  13549. container: this.navigationDiv,
  13550. terria: this.terria
  13551. })
  13552. }
  13553. return CesiumNavigation
  13554. });
  13555. define("dummy/require-less/less/dummy", [], function () {});
  13556. define("viewerCesiumNavigationMixin", ["Cesium/Core/defined", "Cesium/Core/defineProperties", "Cesium/Core/DeveloperError", "CesiumNavigation", "dummy/require-less/less/dummy"], function (defined, defineProperties, DeveloperError, CesiumNavigation) {
  13557. "use strict";
  13558. function viewerCesiumNavigationMixin(viewer, options) {
  13559. if (!defined(viewer)) {
  13560. throw new DeveloperError("viewer is required.")
  13561. }
  13562. var cesiumNavigation = init(viewer, options);
  13563. cesiumNavigation.addOnDestroyListener(function (viewer) {
  13564. return function () {
  13565. delete viewer.cesiumNavigation
  13566. }
  13567. }(viewer));
  13568. defineProperties(viewer, {
  13569. cesiumNavigation: {
  13570. configurable: true,
  13571. get: function () {
  13572. return viewer.cesiumWidget.cesiumNavigation
  13573. }
  13574. }
  13575. })
  13576. }
  13577. viewerCesiumNavigationMixin.mixinWidget = function (cesiumWidget, options) {
  13578. return init.apply(undefined, arguments)
  13579. };
  13580. var init = function (viewerCesiumWidget, options) {
  13581. var cesiumNavigation = new CesiumNavigation(viewerCesiumWidget, options);
  13582. var cesiumWidget = defined(viewerCesiumWidget.cesiumWidget) ? viewerCesiumWidget.cesiumWidget : viewerCesiumWidget;
  13583. defineProperties(cesiumWidget, {
  13584. cesiumNavigation: {
  13585. configurable: true,
  13586. get: function () {
  13587. return cesiumNavigation
  13588. }
  13589. }
  13590. });
  13591. cesiumNavigation.addOnDestroyListener(function (cesiumWidget) {
  13592. return function () {
  13593. delete cesiumWidget.cesiumNavigation
  13594. }
  13595. }(cesiumWidget));
  13596. return cesiumNavigation
  13597. };
  13598. return viewerCesiumNavigationMixin
  13599. });
  13600. //(function(c) {
  13601. // var d = document,
  13602. // a = "appendChild",
  13603. // i = "styleSheet",
  13604. // s = d.createElement("style");
  13605. // s.type = "text/css";
  13606. // d.getElementsByTagName("head")[0][a](s);
  13607. // s[i] ? s[i].cssText = c : s[a](d.createTextNode(c))
  13608. //})(".distance-legend{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8);padding-left:5px;padding-right:5px;right:25px;bottom:30px;height:30px;width:125px;border:1px solid rgba(255,255,255,.1);box-sizing:content-box}.distance-legend-label{display:inline-block;font-family:'Roboto',sans-serif;font-size:14px;font-weight:lighter;line-height:30px;color:#fff;width:125px;text-align:center}.distance-legend-scale-bar{border-left:1px solid #fff;border-right:1px solid #fff;border-bottom:1px solid #fff;position:absolute;height:10px;top:15px}@media print{.distance-legend{display:none}}@media screen and (max-width:700px),screen and (max-height:420px){.distance-legend{display:none}}.navigation-controls{position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-control{cursor:pointer;border-bottom:1px solid #555}.naviagation-control:active{color:#fff}.navigation-control-last{cursor:pointer;border-bottom:0}.navigation-control-icon-zoom-in{padding-bottom:4px}.navigation-control-icon-zoom-in,.navigation-control-icon-zoom-out{position:relative;text-align:center;font-size:20px;color:#fff}.navigation-control-icon-reset{position:relative;left:10px;width:10px;height:10px;fill:rgba(255,255,255,.8);padding-top:6px;padding-bottom:6px;box-sizing:content-box}.compass,.compass-outer-ring{position:absolute;width:95px;height:95px}.compass{pointer-events:auto;right:0;overflow:hidden;top:100px}.compass-outer-ring{top:0;fill:rgba(255,255,255,.5)}.compass-outer-ring-background{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:44px;border:12px solid rgba(47,53,60,.8);box-sizing:content-box}.compass-gyro{pointer-events:none;position:absolute;top:0;width:95px;height:95px;fill:#ccc}.compass-gyro-active,.compass-gyro-background:hover+.compass-gyro{fill:#68adfe}.compass-gyro-background{position:absolute;top:30px;left:30px;width:33px;height:33px;border-radius:33px;background-color:rgba(47,53,60,.8);border:1px solid rgba(255,255,255,.2);box-sizing:content-box}.compass-rotation-marker{position:absolute;top:0;width:95px;height:95px;fill:#68adfe}@media screen and (max-width:700px),screen and (max-height:420px){.compass,.navigation-controls{display:none}}@media print{.compass,.navigation-controls{display:none}}");
  13609. define("Cesium/Core/defined", function () {
  13610. return Cesium["defined"]
  13611. });
  13612. define("Cesium/Core/defineProperties", function () {
  13613. return Cesium["defineProperties"]
  13614. });
  13615. define("Cesium/Core/defaultValue", function () {
  13616. return Cesium["defaultValue"]
  13617. });
  13618. define("Cesium/Core/Event", function () {
  13619. return Cesium["Event"]
  13620. });
  13621. define("Cesium/Widgets/getElement", function () {
  13622. return Cesium["getElement"]
  13623. });
  13624. define("Cesium/Widgets/SvgPathBindingHandler", function () {
  13625. return Cesium["SvgPathBindingHandler"]
  13626. });
  13627. define("Cesium/Core/Ray", function () {
  13628. return Cesium["Ray"]
  13629. });
  13630. define("Cesium/Core/Cartesian3", function () {
  13631. return Cesium["Cartesian3"]
  13632. });
  13633. define("Cesium/Core/Cartographic", function () {
  13634. return Cesium["Cartographic"]
  13635. });
  13636. define("Cesium/Core/ReferenceFrame", function () {
  13637. return Cesium["ReferenceFrame"]
  13638. });
  13639. define("Cesium/Scene/SceneMode", function () {
  13640. return Cesium["SceneMode"]
  13641. });
  13642. define("Cesium/Core/DeveloperError", function () {
  13643. return Cesium["DeveloperError"]
  13644. });
  13645. define("Cesium/Core/EllipsoidGeodesic", function () {
  13646. return Cesium["EllipsoidGeodesic"]
  13647. });
  13648. define("Cesium/Core/Cartesian2", function () {
  13649. return Cesium["Cartesian2"]
  13650. });
  13651. define("Cesium/Core/getTimestamp", function () {
  13652. return Cesium["getTimestamp"]
  13653. });
  13654. define("Cesium/Core/EventHelper", function () {
  13655. return Cesium["EventHelper"]
  13656. });
  13657. define("Cesium/Core/Math", function () {
  13658. return Cesium["Math"]
  13659. });
  13660. define("Cesium/Core/Transforms", function () {
  13661. return Cesium["Transforms"]
  13662. });
  13663. define("Cesium/Core/Matrix4", function () {
  13664. return Cesium["Matrix4"]
  13665. });
  13666. define("Cesium/Core/BoundingSphere", function () {
  13667. return Cesium["BoundingSphere"]
  13668. });
  13669. define("Cesium/Core/HeadingPitchRange", function () {
  13670. return Cesium["HeadingPitchRange"]
  13671. });
  13672. define("Cesium/Scene/Camera", function () {
  13673. return Cesium["Camera"]
  13674. });
  13675. define("Cesium/Core/Rectangle", function () {
  13676. return Cesium["Rectangle"]
  13677. });
  13678. define("Cesium/Core/IntersectionTests", function () {
  13679. return Cesium["IntersectionTests"]
  13680. });
  13681. return require("viewerCesiumNavigationMixin")
  13682. });