echarts.min.js 1.2 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742
  1. !function(t, e) {
  2. "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.echarts = {})
  3. }(this, function(t) {
  4. "use strict";
  5. function e(t) {
  6. if (null == t || "object" != typeof t)
  7. return t;
  8. var i = t
  9. , n = Jv.call(t);
  10. if ("[object Array]" === n) {
  11. i = [];
  12. for (var o = 0, a = t.length; o < a; o++)
  13. i[o] = e(t[o])
  14. } else if (Kv[n]) {
  15. var r = t.constructor;
  16. if (t.constructor.from)
  17. i = r.from(t);
  18. else {
  19. i = new r(t.length);
  20. for (var o = 0, a = t.length; o < a; o++)
  21. i[o] = e(t[o])
  22. }
  23. } else if (!$v[n] && !k(t) && !w(t)) {
  24. i = {};
  25. for (var s in t)
  26. t.hasOwnProperty(s) && (i[s] = e(t[s]))
  27. }
  28. return i
  29. }
  30. function i(t, n, o) {
  31. if (!_(n) || !_(t))
  32. return o ? e(n) : t;
  33. for (var a in n)
  34. if (n.hasOwnProperty(a)) {
  35. var r = t[a]
  36. , s = n[a];
  37. !_(s) || !_(r) || v(s) || v(r) || w(s) || w(r) || b(s) || b(r) || k(s) || k(r) ? !o && a in t || (t[a] = e(n[a], !0)) : i(r, s, o)
  38. }
  39. return t
  40. }
  41. function n(t, e) {
  42. for (var n = t[0], o = 1, a = t.length; o < a; o++)
  43. n = i(n, t[o], e);
  44. return n
  45. }
  46. function o(t, e) {
  47. for (var i in e)
  48. e.hasOwnProperty(i) && (t[i] = e[i]);
  49. return t
  50. }
  51. function a(t, e, i) {
  52. for (var n in e)
  53. e.hasOwnProperty(n) && (i ? null != e[n] : null == t[n]) && (t[n] = e[n]);
  54. return t
  55. }
  56. function r() {
  57. return Uv || (Uv = ay().getContext("2d")),
  58. Uv
  59. }
  60. function s(t, e) {
  61. if (t) {
  62. if (t.indexOf)
  63. return t.indexOf(e);
  64. for (var i = 0, n = t.length; i < n; i++)
  65. if (t[i] === e)
  66. return i
  67. }
  68. return -1
  69. }
  70. function l(t, e) {
  71. function i() {}
  72. var n = t.prototype;
  73. i.prototype = e.prototype,
  74. t.prototype = new i;
  75. for (var o in n)
  76. t.prototype[o] = n[o];
  77. t.prototype.constructor = t,
  78. t.superClass = e
  79. }
  80. function h(t, e, i) {
  81. a(t = "prototype"in t ? t.prototype : t, e = "prototype"in e ? e.prototype : e, i)
  82. }
  83. function u(t) {
  84. if (t)
  85. return "string" != typeof t && "number" == typeof t.length
  86. }
  87. function c(t, e, i) {
  88. if (t && e)
  89. if (t.forEach && t.forEach === ty)
  90. t.forEach(e, i);
  91. else if (t.length === +t.length)
  92. for (var n = 0, o = t.length; n < o; n++)
  93. e.call(i, t[n], n, t);
  94. else
  95. for (var a in t)
  96. t.hasOwnProperty(a) && e.call(i, t[a], a, t)
  97. }
  98. function d(t, e, i) {
  99. if (t && e) {
  100. if (t.map && t.map === ny)
  101. return t.map(e, i);
  102. for (var n = [], o = 0, a = t.length; o < a; o++)
  103. n.push(e.call(i, t[o], o, t));
  104. return n
  105. }
  106. }
  107. function f(t, e, i, n) {
  108. if (t && e) {
  109. if (t.reduce && t.reduce === oy)
  110. return t.reduce(e, i, n);
  111. for (var o = 0, a = t.length; o < a; o++)
  112. i = e.call(n, i, t[o], o, t);
  113. return i
  114. }
  115. }
  116. function g(t, e, i) {
  117. if (t && e) {
  118. if (t.filter && t.filter === ey)
  119. return t.filter(e, i);
  120. for (var n = [], o = 0, a = t.length; o < a; o++)
  121. e.call(i, t[o], o, t) && n.push(t[o]);
  122. return n
  123. }
  124. }
  125. function p(t, e) {
  126. var i = iy.call(arguments, 2);
  127. return function() {
  128. return t.apply(e, i.concat(iy.call(arguments)))
  129. }
  130. }
  131. function m(t) {
  132. var e = iy.call(arguments, 1);
  133. return function() {
  134. return t.apply(this, e.concat(iy.call(arguments)))
  135. }
  136. }
  137. function v(t) {
  138. return "[object Array]" === Jv.call(t)
  139. }
  140. function y(t) {
  141. return "function" == typeof t
  142. }
  143. function x(t) {
  144. return "[object String]" === Jv.call(t)
  145. }
  146. function _(t) {
  147. var e = typeof t;
  148. return "function" === e || !!t && "object" == e
  149. }
  150. function b(t) {
  151. return !!$v[Jv.call(t)]
  152. }
  153. function w(t) {
  154. return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument
  155. }
  156. function S(t) {
  157. return t !== t
  158. }
  159. function M(t) {
  160. for (var e = 0, i = arguments.length; e < i; e++)
  161. if (null != arguments[e])
  162. return arguments[e]
  163. }
  164. function I(t, e) {
  165. return null != t ? t : e
  166. }
  167. function T(t, e, i) {
  168. return null != t ? t : null != e ? e : i
  169. }
  170. function A() {
  171. return Function.call.apply(iy, arguments)
  172. }
  173. function C(t) {
  174. if ("number" == typeof t)
  175. return [t, t, t, t];
  176. var e = t.length;
  177. return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t
  178. }
  179. function D(t, e) {
  180. if (!t)
  181. throw new Error(e)
  182. }
  183. function L(t) {
  184. t[ry] = !0
  185. }
  186. function k(t) {
  187. return t[ry]
  188. }
  189. function P(t) {
  190. t && c(t, function(t, e) {
  191. this.set(e, t)
  192. }, this)
  193. }
  194. function O(t) {
  195. return new P(t)
  196. }
  197. function z() {}
  198. function N(t, e) {
  199. var i = new hy(2);
  200. return null == t && (t = 0),
  201. null == e && (e = 0),
  202. i[0] = t,
  203. i[1] = e,
  204. i
  205. }
  206. function E(t, e) {
  207. return t[0] = e[0],
  208. t[1] = e[1],
  209. t
  210. }
  211. function R(t) {
  212. var e = new hy(2);
  213. return e[0] = t[0],
  214. e[1] = t[1],
  215. e
  216. }
  217. function V(t, e, i) {
  218. return t[0] = e,
  219. t[1] = i,
  220. t
  221. }
  222. function B(t, e, i) {
  223. return t[0] = e[0] + i[0],
  224. t[1] = e[1] + i[1],
  225. t
  226. }
  227. function G(t, e, i, n) {
  228. return t[0] = e[0] + i[0] * n,
  229. t[1] = e[1] + i[1] * n,
  230. t
  231. }
  232. function W(t, e, i) {
  233. return t[0] = e[0] - i[0],
  234. t[1] = e[1] - i[1],
  235. t
  236. }
  237. function H(t) {
  238. return Math.sqrt(F(t))
  239. }
  240. function F(t) {
  241. return t[0] * t[0] + t[1] * t[1]
  242. }
  243. function Z(t, e, i) {
  244. return t[0] = e[0] * i,
  245. t[1] = e[1] * i,
  246. t
  247. }
  248. function U(t, e) {
  249. var i = H(e);
  250. return 0 === i ? (t[0] = 0,
  251. t[1] = 0) : (t[0] = e[0] / i,
  252. t[1] = e[1] / i),
  253. t
  254. }
  255. function j(t, e) {
  256. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]))
  257. }
  258. function X(t, e) {
  259. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1])
  260. }
  261. function q(t, e, i, n) {
  262. return t[0] = e[0] + n * (i[0] - e[0]),
  263. t[1] = e[1] + n * (i[1] - e[1]),
  264. t
  265. }
  266. function Y(t, e, i) {
  267. var n = e[0]
  268. , o = e[1];
  269. return t[0] = i[0] * n + i[2] * o + i[4],
  270. t[1] = i[1] * n + i[3] * o + i[5],
  271. t
  272. }
  273. function $(t, e, i) {
  274. return t[0] = Math.min(e[0], i[0]),
  275. t[1] = Math.min(e[1], i[1]),
  276. t
  277. }
  278. function K(t, e, i) {
  279. return t[0] = Math.max(e[0], i[0]),
  280. t[1] = Math.max(e[1], i[1]),
  281. t
  282. }
  283. function J() {
  284. this.on("mousedown", this._dragStart, this),
  285. this.on("mousemove", this._drag, this),
  286. this.on("mouseup", this._dragEnd, this),
  287. this.on("globalout", this._dragEnd, this)
  288. }
  289. function Q(t, e) {
  290. return {
  291. target: t,
  292. topTarget: e && e.topTarget
  293. }
  294. }
  295. function tt(t, e, i) {
  296. return {
  297. type: t,
  298. event: i,
  299. target: e.target,
  300. topTarget: e.topTarget,
  301. cancelBubble: !1,
  302. offsetX: i.zrX,
  303. offsetY: i.zrY,
  304. gestureEvent: i.gestureEvent,
  305. pinchX: i.pinchX,
  306. pinchY: i.pinchY,
  307. pinchScale: i.pinchScale,
  308. wheelDelta: i.zrDelta,
  309. zrByTouch: i.zrByTouch,
  310. which: i.which
  311. }
  312. }
  313. function et() {}
  314. function it(t, e, i) {
  315. if (t[t.rectHover ? "rectContain" : "contain"](e, i)) {
  316. for (var n, o = t; o; ) {
  317. if (o.clipPath && !o.clipPath.contain(e, i))
  318. return !1;
  319. o.silent && (n = !0),
  320. o = o.parent
  321. }
  322. return !n || vy
  323. }
  324. return !1
  325. }
  326. function nt() {
  327. var t = new _y(6);
  328. return ot(t),
  329. t
  330. }
  331. function ot(t) {
  332. return t[0] = 1,
  333. t[1] = 0,
  334. t[2] = 0,
  335. t[3] = 1,
  336. t[4] = 0,
  337. t[5] = 0,
  338. t
  339. }
  340. function at(t, e) {
  341. return t[0] = e[0],
  342. t[1] = e[1],
  343. t[2] = e[2],
  344. t[3] = e[3],
  345. t[4] = e[4],
  346. t[5] = e[5],
  347. t
  348. }
  349. function rt(t, e, i) {
  350. var n = e[0] * i[0] + e[2] * i[1]
  351. , o = e[1] * i[0] + e[3] * i[1]
  352. , a = e[0] * i[2] + e[2] * i[3]
  353. , r = e[1] * i[2] + e[3] * i[3]
  354. , s = e[0] * i[4] + e[2] * i[5] + e[4]
  355. , l = e[1] * i[4] + e[3] * i[5] + e[5];
  356. return t[0] = n,
  357. t[1] = o,
  358. t[2] = a,
  359. t[3] = r,
  360. t[4] = s,
  361. t[5] = l,
  362. t
  363. }
  364. function st(t, e, i) {
  365. return t[0] = e[0],
  366. t[1] = e[1],
  367. t[2] = e[2],
  368. t[3] = e[3],
  369. t[4] = e[4] + i[0],
  370. t[5] = e[5] + i[1],
  371. t
  372. }
  373. function lt(t, e, i) {
  374. var n = e[0]
  375. , o = e[2]
  376. , a = e[4]
  377. , r = e[1]
  378. , s = e[3]
  379. , l = e[5]
  380. , h = Math.sin(i)
  381. , u = Math.cos(i);
  382. return t[0] = n * u + r * h,
  383. t[1] = -n * h + r * u,
  384. t[2] = o * u + s * h,
  385. t[3] = -o * h + u * s,
  386. t[4] = u * a + h * l,
  387. t[5] = u * l - h * a,
  388. t
  389. }
  390. function ht(t, e, i) {
  391. var n = i[0]
  392. , o = i[1];
  393. return t[0] = e[0] * n,
  394. t[1] = e[1] * o,
  395. t[2] = e[2] * n,
  396. t[3] = e[3] * o,
  397. t[4] = e[4] * n,
  398. t[5] = e[5] * o,
  399. t
  400. }
  401. function ut(t, e) {
  402. var i = e[0]
  403. , n = e[2]
  404. , o = e[4]
  405. , a = e[1]
  406. , r = e[3]
  407. , s = e[5]
  408. , l = i * r - a * n;
  409. return l ? (l = 1 / l,
  410. t[0] = r * l,
  411. t[1] = -a * l,
  412. t[2] = -n * l,
  413. t[3] = i * l,
  414. t[4] = (n * s - r * o) * l,
  415. t[5] = (a * o - i * s) * l,
  416. t) : null
  417. }
  418. function ct(t) {
  419. return t > Sy || t < -Sy
  420. }
  421. function dt(t) {
  422. this._target = t.target,
  423. this._life = t.life || 1e3,
  424. this._delay = t.delay || 0,
  425. this._initialized = !1,
  426. this.loop = null != t.loop && t.loop,
  427. this.gap = t.gap || 0,
  428. this.easing = t.easing || "Linear",
  429. this.onframe = t.onframe,
  430. this.ondestroy = t.ondestroy,
  431. this.onrestart = t.onrestart,
  432. this._pausedTime = 0,
  433. this._paused = !1
  434. }
  435. function ft(t) {
  436. return (t = Math.round(t)) < 0 ? 0 : t > 255 ? 255 : t
  437. }
  438. function gt(t) {
  439. return (t = Math.round(t)) < 0 ? 0 : t > 360 ? 360 : t
  440. }
  441. function pt(t) {
  442. return t < 0 ? 0 : t > 1 ? 1 : t
  443. }
  444. function mt(t) {
  445. return ft(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 * 255 : parseInt(t, 10))
  446. }
  447. function vt(t) {
  448. return pt(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t))
  449. }
  450. function yt(t, e, i) {
  451. return i < 0 ? i += 1 : i > 1 && (i -= 1),
  452. 6 * i < 1 ? t + (e - t) * i * 6 : 2 * i < 1 ? e : 3 * i < 2 ? t + (e - t) * (2 / 3 - i) * 6 : t
  453. }
  454. function xt(t, e, i) {
  455. return t + (e - t) * i
  456. }
  457. function _t(t, e, i, n, o) {
  458. return t[0] = e,
  459. t[1] = i,
  460. t[2] = n,
  461. t[3] = o,
  462. t
  463. }
  464. function bt(t, e) {
  465. return t[0] = e[0],
  466. t[1] = e[1],
  467. t[2] = e[2],
  468. t[3] = e[3],
  469. t
  470. }
  471. function wt(t, e) {
  472. Ny && bt(Ny, e),
  473. Ny = zy.put(t, Ny || e.slice())
  474. }
  475. function St(t, e) {
  476. if (t) {
  477. e = e || [];
  478. var i = zy.get(t);
  479. if (i)
  480. return bt(e, i);
  481. var n = (t += "").replace(/ /g, "").toLowerCase();
  482. if (n in Oy)
  483. return bt(e, Oy[n]),
  484. wt(t, e),
  485. e;
  486. if ("#" !== n.charAt(0)) {
  487. var o = n.indexOf("(")
  488. , a = n.indexOf(")");
  489. if (-1 !== o && a + 1 === n.length) {
  490. var r = n.substr(0, o)
  491. , s = n.substr(o + 1, a - (o + 1)).split(",")
  492. , l = 1;
  493. switch (r) {
  494. case "rgba":
  495. if (4 !== s.length)
  496. return void _t(e, 0, 0, 0, 1);
  497. l = vt(s.pop());
  498. case "rgb":
  499. return 3 !== s.length ? void _t(e, 0, 0, 0, 1) : (_t(e, mt(s[0]), mt(s[1]), mt(s[2]), l),
  500. wt(t, e),
  501. e);
  502. case "hsla":
  503. return 4 !== s.length ? void _t(e, 0, 0, 0, 1) : (s[3] = vt(s[3]),
  504. Mt(s, e),
  505. wt(t, e),
  506. e);
  507. case "hsl":
  508. return 3 !== s.length ? void _t(e, 0, 0, 0, 1) : (Mt(s, e),
  509. wt(t, e),
  510. e);
  511. default:
  512. return
  513. }
  514. }
  515. _t(e, 0, 0, 0, 1)
  516. } else {
  517. if (4 === n.length)
  518. return (h = parseInt(n.substr(1), 16)) >= 0 && h <= 4095 ? (_t(e, (3840 & h) >> 4 | (3840 & h) >> 8, 240 & h | (240 & h) >> 4, 15 & h | (15 & h) << 4, 1),
  519. wt(t, e),
  520. e) : void _t(e, 0, 0, 0, 1);
  521. if (7 === n.length) {
  522. var h = parseInt(n.substr(1), 16);
  523. return h >= 0 && h <= 16777215 ? (_t(e, (16711680 & h) >> 16, (65280 & h) >> 8, 255 & h, 1),
  524. wt(t, e),
  525. e) : void _t(e, 0, 0, 0, 1)
  526. }
  527. }
  528. }
  529. }
  530. function Mt(t, e) {
  531. var i = (parseFloat(t[0]) % 360 + 360) % 360 / 360
  532. , n = vt(t[1])
  533. , o = vt(t[2])
  534. , a = o <= .5 ? o * (n + 1) : o + n - o * n
  535. , r = 2 * o - a;
  536. return e = e || [],
  537. _t(e, ft(255 * yt(r, a, i + 1 / 3)), ft(255 * yt(r, a, i)), ft(255 * yt(r, a, i - 1 / 3)), 1),
  538. 4 === t.length && (e[3] = t[3]),
  539. e
  540. }
  541. function It(t) {
  542. if (t) {
  543. var e, i, n = t[0] / 255, o = t[1] / 255, a = t[2] / 255, r = Math.min(n, o, a), s = Math.max(n, o, a), l = s - r, h = (s + r) / 2;
  544. if (0 === l)
  545. e = 0,
  546. i = 0;
  547. else {
  548. i = h < .5 ? l / (s + r) : l / (2 - s - r);
  549. var u = ((s - n) / 6 + l / 2) / l
  550. , c = ((s - o) / 6 + l / 2) / l
  551. , d = ((s - a) / 6 + l / 2) / l;
  552. n === s ? e = d - c : o === s ? e = 1 / 3 + u - d : a === s && (e = 2 / 3 + c - u),
  553. e < 0 && (e += 1),
  554. e > 1 && (e -= 1)
  555. }
  556. var f = [360 * e, i, h];
  557. return null != t[3] && f.push(t[3]),
  558. f
  559. }
  560. }
  561. function Tt(t, e) {
  562. var i = St(t);
  563. if (i) {
  564. for (var n = 0; n < 3; n++)
  565. i[n] = e < 0 ? i[n] * (1 - e) | 0 : (255 - i[n]) * e + i[n] | 0;
  566. return Pt(i, 4 === i.length ? "rgba" : "rgb")
  567. }
  568. }
  569. function At(t) {
  570. var e = St(t);
  571. if (e)
  572. return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1)
  573. }
  574. function Ct(t, e, i) {
  575. if (e && e.length && t >= 0 && t <= 1) {
  576. i = i || [];
  577. var n = t * (e.length - 1)
  578. , o = Math.floor(n)
  579. , a = Math.ceil(n)
  580. , r = e[o]
  581. , s = e[a]
  582. , l = n - o;
  583. return i[0] = ft(xt(r[0], s[0], l)),
  584. i[1] = ft(xt(r[1], s[1], l)),
  585. i[2] = ft(xt(r[2], s[2], l)),
  586. i[3] = pt(xt(r[3], s[3], l)),
  587. i
  588. }
  589. }
  590. function Dt(t, e, i) {
  591. if (e && e.length && t >= 0 && t <= 1) {
  592. var n = t * (e.length - 1)
  593. , o = Math.floor(n)
  594. , a = Math.ceil(n)
  595. , r = St(e[o])
  596. , s = St(e[a])
  597. , l = n - o
  598. , h = Pt([ft(xt(r[0], s[0], l)), ft(xt(r[1], s[1], l)), ft(xt(r[2], s[2], l)), pt(xt(r[3], s[3], l))], "rgba");
  599. return i ? {
  600. color: h,
  601. leftIndex: o,
  602. rightIndex: a,
  603. value: n
  604. } : h
  605. }
  606. }
  607. function Lt(t, e, i, n) {
  608. if (t = St(t))
  609. return t = It(t),
  610. null != e && (t[0] = gt(e)),
  611. null != i && (t[1] = vt(i)),
  612. null != n && (t[2] = vt(n)),
  613. Pt(Mt(t), "rgba")
  614. }
  615. function kt(t, e) {
  616. if ((t = St(t)) && null != e)
  617. return t[3] = pt(e),
  618. Pt(t, "rgba")
  619. }
  620. function Pt(t, e) {
  621. if (t && t.length) {
  622. var i = t[0] + "," + t[1] + "," + t[2];
  623. return "rgba" !== e && "hsva" !== e && "hsla" !== e || (i += "," + t[3]),
  624. e + "(" + i + ")"
  625. }
  626. }
  627. function Ot(t, e) {
  628. return t[e]
  629. }
  630. function zt(t, e, i) {
  631. t[e] = i
  632. }
  633. function Nt(t, e, i) {
  634. return (e - t) * i + t
  635. }
  636. function Et(t, e, i) {
  637. return i > .5 ? e : t
  638. }
  639. function Rt(t, e, i, n, o) {
  640. var a = t.length;
  641. if (1 == o)
  642. for (s = 0; s < a; s++)
  643. n[s] = Nt(t[s], e[s], i);
  644. else
  645. for (var r = a && t[0].length, s = 0; s < a; s++)
  646. for (var l = 0; l < r; l++)
  647. n[s][l] = Nt(t[s][l], e[s][l], i)
  648. }
  649. function Vt(t, e, i) {
  650. var n = t.length
  651. , o = e.length;
  652. if (n !== o)
  653. if (n > o)
  654. t.length = o;
  655. else
  656. for (r = n; r < o; r++)
  657. t.push(1 === i ? e[r] : By.call(e[r]));
  658. for (var a = t[0] && t[0].length, r = 0; r < t.length; r++)
  659. if (1 === i)
  660. isNaN(t[r]) && (t[r] = e[r]);
  661. else
  662. for (var s = 0; s < a; s++)
  663. isNaN(t[r][s]) && (t[r][s] = e[r][s])
  664. }
  665. function Bt(t, e, i) {
  666. if (t === e)
  667. return !0;
  668. var n = t.length;
  669. if (n !== e.length)
  670. return !1;
  671. if (1 === i) {
  672. for (a = 0; a < n; a++)
  673. if (t[a] !== e[a])
  674. return !1
  675. } else
  676. for (var o = t[0].length, a = 0; a < n; a++)
  677. for (var r = 0; r < o; r++)
  678. if (t[a][r] !== e[a][r])
  679. return !1;
  680. return !0
  681. }
  682. function Gt(t, e, i, n, o, a, r, s, l) {
  683. var h = t.length;
  684. if (1 == l)
  685. for (c = 0; c < h; c++)
  686. s[c] = Wt(t[c], e[c], i[c], n[c], o, a, r);
  687. else
  688. for (var u = t[0].length, c = 0; c < h; c++)
  689. for (var d = 0; d < u; d++)
  690. s[c][d] = Wt(t[c][d], e[c][d], i[c][d], n[c][d], o, a, r)
  691. }
  692. function Wt(t, e, i, n, o, a, r) {
  693. var s = .5 * (i - t)
  694. , l = .5 * (n - e);
  695. return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e
  696. }
  697. function Ht(t) {
  698. if (u(t)) {
  699. var e = t.length;
  700. if (u(t[0])) {
  701. for (var i = [], n = 0; n < e; n++)
  702. i.push(By.call(t[n]));
  703. return i
  704. }
  705. return By.call(t)
  706. }
  707. return t
  708. }
  709. function Ft(t) {
  710. return t[0] = Math.floor(t[0]),
  711. t[1] = Math.floor(t[1]),
  712. t[2] = Math.floor(t[2]),
  713. "rgba(" + t.join(",") + ")"
  714. }
  715. function Zt(t) {
  716. var e = t[t.length - 1].value;
  717. return u(e && e[0]) ? 2 : 1
  718. }
  719. function Ut(t, e, i, n, o, a) {
  720. var r = t._getter
  721. , s = t._setter
  722. , l = "spline" === e
  723. , h = n.length;
  724. if (h) {
  725. var c, d = u(n[0].value), f = !1, g = !1, p = d ? Zt(n) : 0;
  726. n.sort(function(t, e) {
  727. return t.time - e.time
  728. }),
  729. c = n[h - 1].time;
  730. for (var m = [], v = [], y = n[0].value, x = !0, _ = 0; _ < h; _++) {
  731. m.push(n[_].time / c);
  732. var b = n[_].value;
  733. if (d && Bt(b, y, p) || !d && b === y || (x = !1),
  734. y = b,
  735. "string" == typeof b) {
  736. var w = St(b);
  737. w ? (b = w,
  738. f = !0) : g = !0
  739. }
  740. v.push(b)
  741. }
  742. if (a || !x) {
  743. for (var S = v[h - 1], _ = 0; _ < h - 1; _++)
  744. d ? Vt(v[_], S, p) : !isNaN(v[_]) || isNaN(S) || g || f || (v[_] = S);
  745. d && Vt(r(t._target, o), S, p);
  746. var M, I, T, A, C, D, L = 0, k = 0;
  747. if (f)
  748. var P = [0, 0, 0, 0];
  749. var O = new dt({
  750. target: t._target,
  751. life: c,
  752. loop: t._loop,
  753. delay: t._delay,
  754. onframe: function(t, e) {
  755. var i;
  756. if (e < 0)
  757. i = 0;
  758. else if (e < k) {
  759. for (i = M = Math.min(L + 1, h - 1); i >= 0 && !(m[i] <= e); i--)
  760. ;
  761. i = Math.min(i, h - 2)
  762. } else {
  763. for (i = L; i < h && !(m[i] > e); i++)
  764. ;
  765. i = Math.min(i - 1, h - 2)
  766. }
  767. L = i,
  768. k = e;
  769. var n = m[i + 1] - m[i];
  770. if (0 !== n)
  771. if (I = (e - m[i]) / n,
  772. l)
  773. if (A = v[i],
  774. T = v[0 === i ? i : i - 1],
  775. C = v[i > h - 2 ? h - 1 : i + 1],
  776. D = v[i > h - 3 ? h - 1 : i + 2],
  777. d)
  778. Gt(T, A, C, D, I, I * I, I * I * I, r(t, o), p);
  779. else {
  780. if (f)
  781. a = Gt(T, A, C, D, I, I * I, I * I * I, P, 1),
  782. a = Ft(P);
  783. else {
  784. if (g)
  785. return Et(A, C, I);
  786. a = Wt(T, A, C, D, I, I * I, I * I * I)
  787. }
  788. s(t, o, a)
  789. }
  790. else if (d)
  791. Rt(v[i], v[i + 1], I, r(t, o), p);
  792. else {
  793. var a;
  794. if (f)
  795. Rt(v[i], v[i + 1], I, P, 1),
  796. a = Ft(P);
  797. else {
  798. if (g)
  799. return Et(v[i], v[i + 1], I);
  800. a = Nt(v[i], v[i + 1], I)
  801. }
  802. s(t, o, a)
  803. }
  804. },
  805. ondestroy: i
  806. });
  807. return e && "spline" !== e && (O.easing = e),
  808. O
  809. }
  810. }
  811. }
  812. function jt(t, e, i, n) {
  813. i < 0 && (t += i,
  814. i = -i),
  815. n < 0 && (e += n,
  816. n = -n),
  817. this.x = t,
  818. this.y = e,
  819. this.width = i,
  820. this.height = n
  821. }
  822. function Xt(t) {
  823. for (var e = 0; t >= Ky; )
  824. e |= 1 & t,
  825. t >>= 1;
  826. return t + e
  827. }
  828. function qt(t, e, i, n) {
  829. var o = e + 1;
  830. if (o === i)
  831. return 1;
  832. if (n(t[o++], t[e]) < 0) {
  833. for (; o < i && n(t[o], t[o - 1]) < 0; )
  834. o++;
  835. Yt(t, e, o)
  836. } else
  837. for (; o < i && n(t[o], t[o - 1]) >= 0; )
  838. o++;
  839. return o - e
  840. }
  841. function Yt(t, e, i) {
  842. for (i--; e < i; ) {
  843. var n = t[e];
  844. t[e++] = t[i],
  845. t[i--] = n
  846. }
  847. }
  848. function $t(t, e, i, n, o) {
  849. for (n === e && n++; n < i; n++) {
  850. for (var a, r = t[n], s = e, l = n; s < l; )
  851. o(r, t[a = s + l >>> 1]) < 0 ? l = a : s = a + 1;
  852. var h = n - s;
  853. switch (h) {
  854. case 3:
  855. t[s + 3] = t[s + 2];
  856. case 2:
  857. t[s + 2] = t[s + 1];
  858. case 1:
  859. t[s + 1] = t[s];
  860. break;
  861. default:
  862. for (; h > 0; )
  863. t[s + h] = t[s + h - 1],
  864. h--
  865. }
  866. t[s] = r
  867. }
  868. }
  869. function Kt(t, e, i, n, o, a) {
  870. var r = 0
  871. , s = 0
  872. , l = 1;
  873. if (a(t, e[i + o]) > 0) {
  874. for (s = n - o; l < s && a(t, e[i + o + l]) > 0; )
  875. r = l,
  876. (l = 1 + (l << 1)) <= 0 && (l = s);
  877. l > s && (l = s),
  878. r += o,
  879. l += o
  880. } else {
  881. for (s = o + 1; l < s && a(t, e[i + o - l]) <= 0; )
  882. r = l,
  883. (l = 1 + (l << 1)) <= 0 && (l = s);
  884. l > s && (l = s);
  885. var h = r;
  886. r = o - l,
  887. l = o - h
  888. }
  889. for (r++; r < l; ) {
  890. var u = r + (l - r >>> 1);
  891. a(t, e[i + u]) > 0 ? r = u + 1 : l = u
  892. }
  893. return l
  894. }
  895. function Jt(t, e, i, n, o, a) {
  896. var r = 0
  897. , s = 0
  898. , l = 1;
  899. if (a(t, e[i + o]) < 0) {
  900. for (s = o + 1; l < s && a(t, e[i + o - l]) < 0; )
  901. r = l,
  902. (l = 1 + (l << 1)) <= 0 && (l = s);
  903. l > s && (l = s);
  904. var h = r;
  905. r = o - l,
  906. l = o - h
  907. } else {
  908. for (s = n - o; l < s && a(t, e[i + o + l]) >= 0; )
  909. r = l,
  910. (l = 1 + (l << 1)) <= 0 && (l = s);
  911. l > s && (l = s),
  912. r += o,
  913. l += o
  914. }
  915. for (r++; r < l; ) {
  916. var u = r + (l - r >>> 1);
  917. a(t, e[i + u]) < 0 ? l = u : r = u + 1
  918. }
  919. return l
  920. }
  921. function Qt(t, e) {
  922. function i(i) {
  923. var s = a[i]
  924. , h = r[i]
  925. , u = a[i + 1]
  926. , c = r[i + 1];
  927. r[i] = h + c,
  928. i === l - 3 && (a[i + 1] = a[i + 2],
  929. r[i + 1] = r[i + 2]),
  930. l--;
  931. var d = Jt(t[u], t, s, h, 0, e);
  932. s += d,
  933. 0 !== (h -= d) && 0 !== (c = Kt(t[s + h - 1], t, u, c, c - 1, e)) && (h <= c ? n(s, h, u, c) : o(s, h, u, c))
  934. }
  935. function n(i, n, o, a) {
  936. var r = 0;
  937. for (r = 0; r < n; r++)
  938. h[r] = t[i + r];
  939. var l = 0
  940. , u = o
  941. , c = i;
  942. if (t[c++] = t[u++],
  943. 0 != --a)
  944. if (1 !== n) {
  945. for (var d, f, g, p = s; ; ) {
  946. d = 0,
  947. f = 0,
  948. g = !1;
  949. do {
  950. if (e(t[u], h[l]) < 0) {
  951. if (t[c++] = t[u++],
  952. f++,
  953. d = 0,
  954. 0 == --a) {
  955. g = !0;
  956. break
  957. }
  958. } else if (t[c++] = h[l++],
  959. d++,
  960. f = 0,
  961. 1 == --n) {
  962. g = !0;
  963. break
  964. }
  965. } while ((d | f) < p);
  966. if (g)
  967. break;
  968. do {
  969. if (0 !== (d = Jt(t[u], h, l, n, 0, e))) {
  970. for (r = 0; r < d; r++)
  971. t[c + r] = h[l + r];
  972. if (c += d,
  973. l += d,
  974. (n -= d) <= 1) {
  975. g = !0;
  976. break
  977. }
  978. }
  979. if (t[c++] = t[u++],
  980. 0 == --a) {
  981. g = !0;
  982. break
  983. }
  984. if (0 !== (f = Kt(h[l], t, u, a, 0, e))) {
  985. for (r = 0; r < f; r++)
  986. t[c + r] = t[u + r];
  987. if (c += f,
  988. u += f,
  989. 0 === (a -= f)) {
  990. g = !0;
  991. break
  992. }
  993. }
  994. if (t[c++] = h[l++],
  995. 1 == --n) {
  996. g = !0;
  997. break
  998. }
  999. p--
  1000. } while (d >= Jy || f >= Jy);
  1001. if (g)
  1002. break;
  1003. p < 0 && (p = 0),
  1004. p += 2
  1005. }
  1006. if ((s = p) < 1 && (s = 1),
  1007. 1 === n) {
  1008. for (r = 0; r < a; r++)
  1009. t[c + r] = t[u + r];
  1010. t[c + a] = h[l]
  1011. } else {
  1012. if (0 === n)
  1013. throw new Error;
  1014. for (r = 0; r < n; r++)
  1015. t[c + r] = h[l + r]
  1016. }
  1017. } else {
  1018. for (r = 0; r < a; r++)
  1019. t[c + r] = t[u + r];
  1020. t[c + a] = h[l]
  1021. }
  1022. else
  1023. for (r = 0; r < n; r++)
  1024. t[c + r] = h[l + r]
  1025. }
  1026. function o(i, n, o, a) {
  1027. var r = 0;
  1028. for (r = 0; r < a; r++)
  1029. h[r] = t[o + r];
  1030. var l = i + n - 1
  1031. , u = a - 1
  1032. , c = o + a - 1
  1033. , d = 0
  1034. , f = 0;
  1035. if (t[c--] = t[l--],
  1036. 0 != --n)
  1037. if (1 !== a) {
  1038. for (var g = s; ; ) {
  1039. var p = 0
  1040. , m = 0
  1041. , v = !1;
  1042. do {
  1043. if (e(h[u], t[l]) < 0) {
  1044. if (t[c--] = t[l--],
  1045. p++,
  1046. m = 0,
  1047. 0 == --n) {
  1048. v = !0;
  1049. break
  1050. }
  1051. } else if (t[c--] = h[u--],
  1052. m++,
  1053. p = 0,
  1054. 1 == --a) {
  1055. v = !0;
  1056. break
  1057. }
  1058. } while ((p | m) < g);
  1059. if (v)
  1060. break;
  1061. do {
  1062. if (0 != (p = n - Jt(h[u], t, i, n, n - 1, e))) {
  1063. for (n -= p,
  1064. f = (c -= p) + 1,
  1065. d = (l -= p) + 1,
  1066. r = p - 1; r >= 0; r--)
  1067. t[f + r] = t[d + r];
  1068. if (0 === n) {
  1069. v = !0;
  1070. break
  1071. }
  1072. }
  1073. if (t[c--] = h[u--],
  1074. 1 == --a) {
  1075. v = !0;
  1076. break
  1077. }
  1078. if (0 != (m = a - Kt(t[l], h, 0, a, a - 1, e))) {
  1079. for (a -= m,
  1080. f = (c -= m) + 1,
  1081. d = (u -= m) + 1,
  1082. r = 0; r < m; r++)
  1083. t[f + r] = h[d + r];
  1084. if (a <= 1) {
  1085. v = !0;
  1086. break
  1087. }
  1088. }
  1089. if (t[c--] = t[l--],
  1090. 0 == --n) {
  1091. v = !0;
  1092. break
  1093. }
  1094. g--
  1095. } while (p >= Jy || m >= Jy);
  1096. if (v)
  1097. break;
  1098. g < 0 && (g = 0),
  1099. g += 2
  1100. }
  1101. if ((s = g) < 1 && (s = 1),
  1102. 1 === a) {
  1103. for (f = (c -= n) + 1,
  1104. d = (l -= n) + 1,
  1105. r = n - 1; r >= 0; r--)
  1106. t[f + r] = t[d + r];
  1107. t[c] = h[u]
  1108. } else {
  1109. if (0 === a)
  1110. throw new Error;
  1111. for (d = c - (a - 1),
  1112. r = 0; r < a; r++)
  1113. t[d + r] = h[r]
  1114. }
  1115. } else {
  1116. for (f = (c -= n) + 1,
  1117. d = (l -= n) + 1,
  1118. r = n - 1; r >= 0; r--)
  1119. t[f + r] = t[d + r];
  1120. t[c] = h[u]
  1121. }
  1122. else
  1123. for (d = c - (a - 1),
  1124. r = 0; r < a; r++)
  1125. t[d + r] = h[r]
  1126. }
  1127. var a, r, s = Jy, l = 0, h = [];
  1128. a = [],
  1129. r = [],
  1130. this.mergeRuns = function() {
  1131. for (; l > 1; ) {
  1132. var t = l - 2;
  1133. if (t >= 1 && r[t - 1] <= r[t] + r[t + 1] || t >= 2 && r[t - 2] <= r[t] + r[t - 1])
  1134. r[t - 1] < r[t + 1] && t--;
  1135. else if (r[t] > r[t + 1])
  1136. break;
  1137. i(t)
  1138. }
  1139. }
  1140. ,
  1141. this.forceMergeRuns = function() {
  1142. for (; l > 1; ) {
  1143. var t = l - 2;
  1144. t > 0 && r[t - 1] < r[t + 1] && t--,
  1145. i(t)
  1146. }
  1147. }
  1148. ,
  1149. this.pushRun = function(t, e) {
  1150. a[l] = t,
  1151. r[l] = e,
  1152. l += 1
  1153. }
  1154. }
  1155. function te(t, e, i, n) {
  1156. i || (i = 0),
  1157. n || (n = t.length);
  1158. var o = n - i;
  1159. if (!(o < 2)) {
  1160. var a = 0;
  1161. if (o < Ky)
  1162. return a = qt(t, i, n, e),
  1163. void $t(t, i, n, i + a, e);
  1164. var r = new Qt(t,e)
  1165. , s = Xt(o);
  1166. do {
  1167. if ((a = qt(t, i, n, e)) < s) {
  1168. var l = o;
  1169. l > s && (l = s),
  1170. $t(t, i, i + l, i + a, e),
  1171. a = l
  1172. }
  1173. r.pushRun(i, a),
  1174. r.mergeRuns(),
  1175. o -= a,
  1176. i += a
  1177. } while (0 !== o);
  1178. r.forceMergeRuns()
  1179. }
  1180. }
  1181. function ee(t, e) {
  1182. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel
  1183. }
  1184. function ie(t, e, i) {
  1185. var n = null == e.x ? 0 : e.x
  1186. , o = null == e.x2 ? 1 : e.x2
  1187. , a = null == e.y ? 0 : e.y
  1188. , r = null == e.y2 ? 0 : e.y2;
  1189. return e.global || (n = n * i.width + i.x,
  1190. o = o * i.width + i.x,
  1191. a = a * i.height + i.y,
  1192. r = r * i.height + i.y),
  1193. t.createLinearGradient(n, a, o, r)
  1194. }
  1195. function ne(t, e, i) {
  1196. var n = i.width
  1197. , o = i.height
  1198. , a = Math.min(n, o)
  1199. , r = null == e.x ? .5 : e.x
  1200. , s = null == e.y ? .5 : e.y
  1201. , l = null == e.r ? .5 : e.r;
  1202. return e.global || (r = r * n + i.x,
  1203. s = s * o + i.y,
  1204. l *= a),
  1205. t.createRadialGradient(r, s, 0, r, s, l)
  1206. }
  1207. function oe() {
  1208. return !1
  1209. }
  1210. function ae(t, e, i) {
  1211. var n = ay()
  1212. , o = e.getWidth()
  1213. , a = e.getHeight()
  1214. , r = n.style;
  1215. return r.position = "absolute",
  1216. r.left = 0,
  1217. r.top = 0,
  1218. r.width = o + "px",
  1219. r.height = a + "px",
  1220. n.width = o * i,
  1221. n.height = a * i,
  1222. n.setAttribute("data-zr-dom-id", t),
  1223. n
  1224. }
  1225. function re(t) {
  1226. if ("string" == typeof t) {
  1227. var e = lx.get(t);
  1228. return e && e.image
  1229. }
  1230. return t
  1231. }
  1232. function se(t, e, i, n, o) {
  1233. if (t) {
  1234. if ("string" == typeof t) {
  1235. if (e && e.__zrImageSrc === t || !i)
  1236. return e;
  1237. var a = lx.get(t)
  1238. , r = {
  1239. hostEl: i,
  1240. cb: n,
  1241. cbPayload: o
  1242. };
  1243. return a ? !he(e = a.image) && a.pending.push(r) : (!e && (e = new Image),
  1244. e.onload = le,
  1245. lx.put(t, e.__cachedImgObj = {
  1246. image: e,
  1247. pending: [r]
  1248. }),
  1249. e.src = e.__zrImageSrc = t),
  1250. e
  1251. }
  1252. return t
  1253. }
  1254. return e
  1255. }
  1256. function le() {
  1257. var t = this.__cachedImgObj;
  1258. this.onload = this.__cachedImgObj = null;
  1259. for (var e = 0; e < t.pending.length; e++) {
  1260. var i = t.pending[e]
  1261. , n = i.cb;
  1262. n && n(this, i.cbPayload),
  1263. i.hostEl.dirty()
  1264. }
  1265. t.pending.length = 0
  1266. }
  1267. function he(t) {
  1268. return t && t.width && t.height
  1269. }
  1270. function ue(t, e) {
  1271. var i = t + ":" + (e = e || fx);
  1272. if (hx[i])
  1273. return hx[i];
  1274. for (var n = (t + "").split("\n"), o = 0, a = 0, r = n.length; a < r; a++)
  1275. o = Math.max(gx(n[a], e).width, o);
  1276. return ux > cx && (ux = 0,
  1277. hx = {}),
  1278. ux++,
  1279. hx[i] = o,
  1280. o
  1281. }
  1282. function ce(t, e, i, n, o, a, r) {
  1283. return a ? fe(t, e, i, n, o, a, r) : de(t, e, i, n, o, r)
  1284. }
  1285. function de(t, e, i, n, o, a) {
  1286. var r = we(t, e, o, a)
  1287. , s = ue(t, e);
  1288. o && (s += o[1] + o[3]);
  1289. var l = r.outerHeight
  1290. , h = new jt(ge(0, s, i),pe(0, l, n),s,l);
  1291. return h.lineHeight = r.lineHeight,
  1292. h
  1293. }
  1294. function fe(t, e, i, n, o, a, r) {
  1295. var s = Se(t, {
  1296. rich: a,
  1297. truncate: r,
  1298. font: e,
  1299. textAlign: i,
  1300. textPadding: o
  1301. })
  1302. , l = s.outerWidth
  1303. , h = s.outerHeight;
  1304. return new jt(ge(0, l, i),pe(0, h, n),l,h)
  1305. }
  1306. function ge(t, e, i) {
  1307. return "right" === i ? t -= e : "center" === i && (t -= e / 2),
  1308. t
  1309. }
  1310. function pe(t, e, i) {
  1311. return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e),
  1312. t
  1313. }
  1314. function me(t, e, i) {
  1315. var n = e.x
  1316. , o = e.y
  1317. , a = e.height
  1318. , r = e.width
  1319. , s = a / 2
  1320. , l = "left"
  1321. , h = "top";
  1322. switch (t) {
  1323. case "left":
  1324. n -= i,
  1325. o += s,
  1326. l = "right",
  1327. h = "middle";
  1328. break;
  1329. case "right":
  1330. n += i + r,
  1331. o += s,
  1332. h = "middle";
  1333. break;
  1334. case "top":
  1335. n += r / 2,
  1336. o -= i,
  1337. l = "center",
  1338. h = "bottom";
  1339. break;
  1340. case "bottom":
  1341. n += r / 2,
  1342. o += a + i,
  1343. l = "center";
  1344. break;
  1345. case "inside":
  1346. n += r / 2,
  1347. o += s,
  1348. l = "center",
  1349. h = "middle";
  1350. break;
  1351. case "insideLeft":
  1352. n += i,
  1353. o += s,
  1354. h = "middle";
  1355. break;
  1356. case "insideRight":
  1357. n += r - i,
  1358. o += s,
  1359. l = "right",
  1360. h = "middle";
  1361. break;
  1362. case "insideTop":
  1363. n += r / 2,
  1364. o += i,
  1365. l = "center";
  1366. break;
  1367. case "insideBottom":
  1368. n += r / 2,
  1369. o += a - i,
  1370. l = "center",
  1371. h = "bottom";
  1372. break;
  1373. case "insideTopLeft":
  1374. n += i,
  1375. o += i;
  1376. break;
  1377. case "insideTopRight":
  1378. n += r - i,
  1379. o += i,
  1380. l = "right";
  1381. break;
  1382. case "insideBottomLeft":
  1383. n += i,
  1384. o += a - i,
  1385. h = "bottom";
  1386. break;
  1387. case "insideBottomRight":
  1388. n += r - i,
  1389. o += a - i,
  1390. l = "right",
  1391. h = "bottom"
  1392. }
  1393. return {
  1394. x: n,
  1395. y: o,
  1396. textAlign: l,
  1397. textVerticalAlign: h
  1398. }
  1399. }
  1400. function ve(t, e, i, n, o) {
  1401. if (!e)
  1402. return "";
  1403. var a = (t + "").split("\n");
  1404. o = ye(e, i, n, o);
  1405. for (var r = 0, s = a.length; r < s; r++)
  1406. a[r] = xe(a[r], o);
  1407. return a.join("\n")
  1408. }
  1409. function ye(t, e, i, n) {
  1410. (n = o({}, n)).font = e;
  1411. var i = I(i, "...");
  1412. n.maxIterations = I(n.maxIterations, 2);
  1413. var a = n.minChar = I(n.minChar, 0);
  1414. n.cnCharWidth = ue("国", e);
  1415. var r = n.ascCharWidth = ue("a", e);
  1416. n.placeholder = I(n.placeholder, "");
  1417. for (var s = t = Math.max(0, t - 1), l = 0; l < a && s >= r; l++)
  1418. s -= r;
  1419. var h = ue(i);
  1420. return h > s && (i = "",
  1421. h = 0),
  1422. s = t - h,
  1423. n.ellipsis = i,
  1424. n.ellipsisWidth = h,
  1425. n.contentWidth = s,
  1426. n.containerWidth = t,
  1427. n
  1428. }
  1429. function xe(t, e) {
  1430. var i = e.containerWidth
  1431. , n = e.font
  1432. , o = e.contentWidth;
  1433. if (!i)
  1434. return "";
  1435. var a = ue(t, n);
  1436. if (a <= i)
  1437. return t;
  1438. for (var r = 0; ; r++) {
  1439. if (a <= o || r >= e.maxIterations) {
  1440. t += e.ellipsis;
  1441. break
  1442. }
  1443. var s = 0 === r ? _e(t, o, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * o / a) : 0;
  1444. a = ue(t = t.substr(0, s), n)
  1445. }
  1446. return "" === t && (t = e.placeholder),
  1447. t
  1448. }
  1449. function _e(t, e, i, n) {
  1450. for (var o = 0, a = 0, r = t.length; a < r && o < e; a++) {
  1451. var s = t.charCodeAt(a);
  1452. o += 0 <= s && s <= 127 ? i : n
  1453. }
  1454. return a
  1455. }
  1456. function be(t) {
  1457. return ue("国", t)
  1458. }
  1459. function we(t, e, i, n) {
  1460. null != t && (t += "");
  1461. var o = be(e)
  1462. , a = t ? t.split("\n") : []
  1463. , r = a.length * o
  1464. , s = r;
  1465. if (i && (s += i[0] + i[2]),
  1466. t && n) {
  1467. var l = n.outerHeight
  1468. , h = n.outerWidth;
  1469. if (null != l && s > l)
  1470. t = "",
  1471. a = [];
  1472. else if (null != h)
  1473. for (var u = ye(h - (i ? i[1] + i[3] : 0), e, n.ellipsis, {
  1474. minChar: n.minChar,
  1475. placeholder: n.placeholder
  1476. }), c = 0, d = a.length; c < d; c++)
  1477. a[c] = xe(a[c], u)
  1478. }
  1479. return {
  1480. lines: a,
  1481. height: r,
  1482. outerHeight: s,
  1483. lineHeight: o
  1484. }
  1485. }
  1486. function Se(t, e) {
  1487. var i = {
  1488. lines: [],
  1489. width: 0,
  1490. height: 0
  1491. };
  1492. if (null != t && (t += ""),
  1493. !t)
  1494. return i;
  1495. for (var n, o = dx.lastIndex = 0; null != (n = dx.exec(t)); ) {
  1496. var a = n.index;
  1497. a > o && Me(i, t.substring(o, a)),
  1498. Me(i, n[2], n[1]),
  1499. o = dx.lastIndex
  1500. }
  1501. o < t.length && Me(i, t.substring(o, t.length));
  1502. var r = i.lines
  1503. , s = 0
  1504. , l = 0
  1505. , h = []
  1506. , u = e.textPadding
  1507. , c = e.truncate
  1508. , d = c && c.outerWidth
  1509. , f = c && c.outerHeight;
  1510. u && (null != d && (d -= u[1] + u[3]),
  1511. null != f && (f -= u[0] + u[2]));
  1512. for (L = 0; L < r.length; L++) {
  1513. for (var g = r[L], p = 0, m = 0, v = 0; v < g.tokens.length; v++) {
  1514. var y = (k = g.tokens[v]).styleName && e.rich[k.styleName] || {}
  1515. , x = k.textPadding = y.textPadding
  1516. , _ = k.font = y.font || e.font
  1517. , b = k.textHeight = I(y.textHeight, be(_));
  1518. if (x && (b += x[0] + x[2]),
  1519. k.height = b,
  1520. k.lineHeight = T(y.textLineHeight, e.textLineHeight, b),
  1521. k.textAlign = y && y.textAlign || e.textAlign,
  1522. k.textVerticalAlign = y && y.textVerticalAlign || "middle",
  1523. null != f && s + k.lineHeight > f)
  1524. return {
  1525. lines: [],
  1526. width: 0,
  1527. height: 0
  1528. };
  1529. k.textWidth = ue(k.text, _);
  1530. var w = y.textWidth
  1531. , S = null == w || "auto" === w;
  1532. if ("string" == typeof w && "%" === w.charAt(w.length - 1))
  1533. k.percentWidth = w,
  1534. h.push(k),
  1535. w = 0;
  1536. else {
  1537. if (S) {
  1538. w = k.textWidth;
  1539. var M = y.textBackgroundColor
  1540. , A = M && M.image;
  1541. A && he(A = re(A)) && (w = Math.max(w, A.width * b / A.height))
  1542. }
  1543. var C = x ? x[1] + x[3] : 0;
  1544. w += C;
  1545. var D = null != d ? d - m : null;
  1546. null != D && D < w && (!S || D < C ? (k.text = "",
  1547. k.textWidth = w = 0) : (k.text = ve(k.text, D - C, _, c.ellipsis, {
  1548. minChar: c.minChar
  1549. }),
  1550. k.textWidth = ue(k.text, _),
  1551. w = k.textWidth + C))
  1552. }
  1553. m += k.width = w,
  1554. y && (p = Math.max(p, k.lineHeight))
  1555. }
  1556. g.width = m,
  1557. g.lineHeight = p,
  1558. s += p,
  1559. l = Math.max(l, m)
  1560. }
  1561. i.outerWidth = i.width = I(e.textWidth, l),
  1562. i.outerHeight = i.height = I(e.textHeight, s),
  1563. u && (i.outerWidth += u[1] + u[3],
  1564. i.outerHeight += u[0] + u[2]);
  1565. for (var L = 0; L < h.length; L++) {
  1566. var k = h[L]
  1567. , P = k.percentWidth;
  1568. k.width = parseInt(P, 10) / 100 * l
  1569. }
  1570. return i
  1571. }
  1572. function Me(t, e, i) {
  1573. for (var n = "" === e, o = e.split("\n"), a = t.lines, r = 0; r < o.length; r++) {
  1574. var s = o[r]
  1575. , l = {
  1576. styleName: i,
  1577. text: s,
  1578. isLineHolder: !s && !n
  1579. };
  1580. if (r)
  1581. a.push({
  1582. tokens: [l]
  1583. });
  1584. else {
  1585. var h = (a[a.length - 1] || (a[0] = {
  1586. tokens: []
  1587. })).tokens
  1588. , u = h.length;
  1589. 1 === u && h[0].isLineHolder ? h[0] = l : (s || !u || n) && h.push(l)
  1590. }
  1591. }
  1592. }
  1593. function Ie(t) {
  1594. return (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + "px", t.fontFamily || "sans-serif"].join(" ") || t.textFont || t.font
  1595. }
  1596. function Te(t, e) {
  1597. var i, n, o, a, r = e.x, s = e.y, l = e.width, h = e.height, u = e.r;
  1598. l < 0 && (r += l,
  1599. l = -l),
  1600. h < 0 && (s += h,
  1601. h = -h),
  1602. "number" == typeof u ? i = n = o = a = u : u instanceof Array ? 1 === u.length ? i = n = o = a = u[0] : 2 === u.length ? (i = o = u[0],
  1603. n = a = u[1]) : 3 === u.length ? (i = u[0],
  1604. n = a = u[1],
  1605. o = u[2]) : (i = u[0],
  1606. n = u[1],
  1607. o = u[2],
  1608. a = u[3]) : i = n = o = a = 0;
  1609. var c;
  1610. i + n > l && (i *= l / (c = i + n),
  1611. n *= l / c),
  1612. o + a > l && (o *= l / (c = o + a),
  1613. a *= l / c),
  1614. n + o > h && (n *= h / (c = n + o),
  1615. o *= h / c),
  1616. i + a > h && (i *= h / (c = i + a),
  1617. a *= h / c),
  1618. t.moveTo(r + i, s),
  1619. t.lineTo(r + l - n, s),
  1620. 0 !== n && t.quadraticCurveTo(r + l, s, r + l, s + n),
  1621. t.lineTo(r + l, s + h - o),
  1622. 0 !== o && t.quadraticCurveTo(r + l, s + h, r + l - o, s + h),
  1623. t.lineTo(r + a, s + h),
  1624. 0 !== a && t.quadraticCurveTo(r, s + h, r, s + h - a),
  1625. t.lineTo(r, s + i),
  1626. 0 !== i && t.quadraticCurveTo(r, s, r + i, s)
  1627. }
  1628. function Ae(t) {
  1629. return Ce(t),
  1630. c(t.rich, Ce),
  1631. t
  1632. }
  1633. function Ce(t) {
  1634. if (t) {
  1635. t.font = Ie(t);
  1636. var e = t.textAlign;
  1637. "middle" === e && (e = "center"),
  1638. t.textAlign = null == e || mx[e] ? e : "left";
  1639. var i = t.textVerticalAlign || t.textBaseline;
  1640. "center" === i && (i = "middle"),
  1641. t.textVerticalAlign = null == i || vx[i] ? i : "top",
  1642. t.textPadding && (t.textPadding = C(t.textPadding))
  1643. }
  1644. }
  1645. function De(t, e, i, n, o) {
  1646. n.rich ? ke(t, e, i, n, o) : Le(t, e, i, n, o)
  1647. }
  1648. function Le(t, e, i, n, o) {
  1649. var a = Be(e, "font", n.font || fx)
  1650. , r = n.textPadding
  1651. , s = t.__textCotentBlock;
  1652. s && !t.__dirty || (s = t.__textCotentBlock = we(i, a, r, n.truncate));
  1653. var l = s.outerHeight
  1654. , h = s.lines
  1655. , u = s.lineHeight
  1656. , c = Ve(l, n, o)
  1657. , d = c.baseX
  1658. , f = c.baseY
  1659. , g = c.textAlign
  1660. , p = c.textVerticalAlign;
  1661. Oe(e, n, o, d, f);
  1662. var m = pe(f, l, p)
  1663. , v = d
  1664. , y = m
  1665. , x = Ne(n);
  1666. if (x || r) {
  1667. var _ = ue(i, a);
  1668. r && (_ += r[1] + r[3]);
  1669. var b = ge(d, _, g);
  1670. x && Ee(t, e, n, b, m, _, l),
  1671. r && (v = Fe(d, g, r),
  1672. y += r[0])
  1673. }
  1674. Be(e, "textAlign", g || "left"),
  1675. Be(e, "textBaseline", "middle"),
  1676. Be(e, "shadowBlur", n.textShadowBlur || 0),
  1677. Be(e, "shadowColor", n.textShadowColor || "transparent"),
  1678. Be(e, "shadowOffsetX", n.textShadowOffsetX || 0),
  1679. Be(e, "shadowOffsetY", n.textShadowOffsetY || 0),
  1680. y += u / 2;
  1681. var w = n.textStrokeWidth
  1682. , S = Ge(n.textStroke, w)
  1683. , M = We(n.textFill);
  1684. S && (Be(e, "lineWidth", w),
  1685. Be(e, "strokeStyle", S)),
  1686. M && Be(e, "fillStyle", M);
  1687. for (var I = 0; I < h.length; I++)
  1688. S && e.strokeText(h[I], v, y),
  1689. M && e.fillText(h[I], v, y),
  1690. y += u
  1691. }
  1692. function ke(t, e, i, n, o) {
  1693. var a = t.__textCotentBlock;
  1694. a && !t.__dirty || (a = t.__textCotentBlock = Se(i, n)),
  1695. Pe(t, e, a, n, o)
  1696. }
  1697. function Pe(t, e, i, n, o) {
  1698. var a = i.width
  1699. , r = i.outerWidth
  1700. , s = i.outerHeight
  1701. , l = n.textPadding
  1702. , h = Ve(s, n, o)
  1703. , u = h.baseX
  1704. , c = h.baseY
  1705. , d = h.textAlign
  1706. , f = h.textVerticalAlign;
  1707. Oe(e, n, o, u, c);
  1708. var g = ge(u, r, d)
  1709. , p = pe(c, s, f)
  1710. , m = g
  1711. , v = p;
  1712. l && (m += l[3],
  1713. v += l[0]);
  1714. var y = m + a;
  1715. Ne(n) && Ee(t, e, n, g, p, r, s);
  1716. for (var x = 0; x < i.lines.length; x++) {
  1717. for (var _, b = i.lines[x], w = b.tokens, S = w.length, M = b.lineHeight, I = b.width, T = 0, A = m, C = y, D = S - 1; T < S && (!(_ = w[T]).textAlign || "left" === _.textAlign); )
  1718. ze(t, e, _, n, M, v, A, "left"),
  1719. I -= _.width,
  1720. A += _.width,
  1721. T++;
  1722. for (; D >= 0 && "right" === (_ = w[D]).textAlign; )
  1723. ze(t, e, _, n, M, v, C, "right"),
  1724. I -= _.width,
  1725. C -= _.width,
  1726. D--;
  1727. for (A += (a - (A - m) - (y - C) - I) / 2; T <= D; )
  1728. ze(t, e, _ = w[T], n, M, v, A + _.width / 2, "center"),
  1729. A += _.width,
  1730. T++;
  1731. v += M
  1732. }
  1733. }
  1734. function Oe(t, e, i, n, o) {
  1735. if (i && e.textRotation) {
  1736. var a = e.textOrigin;
  1737. "center" === a ? (n = i.width / 2 + i.x,
  1738. o = i.height / 2 + i.y) : a && (n = a[0] + i.x,
  1739. o = a[1] + i.y),
  1740. t.translate(n, o),
  1741. t.rotate(-e.textRotation),
  1742. t.translate(-n, -o)
  1743. }
  1744. }
  1745. function ze(t, e, i, n, o, a, r, s) {
  1746. var l = n.rich[i.styleName] || {}
  1747. , h = i.textVerticalAlign
  1748. , u = a + o / 2;
  1749. "top" === h ? u = a + i.height / 2 : "bottom" === h && (u = a + o - i.height / 2),
  1750. !i.isLineHolder && Ne(l) && Ee(t, e, l, "right" === s ? r - i.width : "center" === s ? r - i.width / 2 : r, u - i.height / 2, i.width, i.height);
  1751. var c = i.textPadding;
  1752. c && (r = Fe(r, s, c),
  1753. u -= i.height / 2 - c[2] - i.textHeight / 2),
  1754. Be(e, "shadowBlur", T(l.textShadowBlur, n.textShadowBlur, 0)),
  1755. Be(e, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"),
  1756. Be(e, "shadowOffsetX", T(l.textShadowOffsetX, n.textShadowOffsetX, 0)),
  1757. Be(e, "shadowOffsetY", T(l.textShadowOffsetY, n.textShadowOffsetY, 0)),
  1758. Be(e, "textAlign", s),
  1759. Be(e, "textBaseline", "middle"),
  1760. Be(e, "font", i.font || fx);
  1761. var d = Ge(l.textStroke || n.textStroke, g)
  1762. , f = We(l.textFill || n.textFill)
  1763. , g = I(l.textStrokeWidth, n.textStrokeWidth);
  1764. d && (Be(e, "lineWidth", g),
  1765. Be(e, "strokeStyle", d),
  1766. e.strokeText(i.text, r, u)),
  1767. f && (Be(e, "fillStyle", f),
  1768. e.fillText(i.text, r, u))
  1769. }
  1770. function Ne(t) {
  1771. return t.textBackgroundColor || t.textBorderWidth && t.textBorderColor
  1772. }
  1773. function Ee(t, e, i, n, o, a, r) {
  1774. var s = i.textBackgroundColor
  1775. , l = i.textBorderWidth
  1776. , h = i.textBorderColor
  1777. , u = x(s);
  1778. if (Be(e, "shadowBlur", i.textBoxShadowBlur || 0),
  1779. Be(e, "shadowColor", i.textBoxShadowColor || "transparent"),
  1780. Be(e, "shadowOffsetX", i.textBoxShadowOffsetX || 0),
  1781. Be(e, "shadowOffsetY", i.textBoxShadowOffsetY || 0),
  1782. u || l && h) {
  1783. e.beginPath();
  1784. var c = i.textBorderRadius;
  1785. c ? Te(e, {
  1786. x: n,
  1787. y: o,
  1788. width: a,
  1789. height: r,
  1790. r: c
  1791. }) : e.rect(n, o, a, r),
  1792. e.closePath()
  1793. }
  1794. if (u)
  1795. Be(e, "fillStyle", s),
  1796. e.fill();
  1797. else if (_(s)) {
  1798. var d = s.image;
  1799. (d = se(d, null, t, Re, s)) && he(d) && e.drawImage(d, n, o, a, r)
  1800. }
  1801. l && h && (Be(e, "lineWidth", l),
  1802. Be(e, "strokeStyle", h),
  1803. e.stroke())
  1804. }
  1805. function Re(t, e) {
  1806. e.image = t
  1807. }
  1808. function Ve(t, e, i) {
  1809. var n = e.x || 0
  1810. , o = e.y || 0
  1811. , a = e.textAlign
  1812. , r = e.textVerticalAlign;
  1813. if (i) {
  1814. var s = e.textPosition;
  1815. if (s instanceof Array)
  1816. n = i.x + He(s[0], i.width),
  1817. o = i.y + He(s[1], i.height);
  1818. else {
  1819. var l = me(s, i, e.textDistance);
  1820. n = l.x,
  1821. o = l.y,
  1822. a = a || l.textAlign,
  1823. r = r || l.textVerticalAlign
  1824. }
  1825. var h = e.textOffset;
  1826. h && (n += h[0],
  1827. o += h[1])
  1828. }
  1829. return {
  1830. baseX: n,
  1831. baseY: o,
  1832. textAlign: a,
  1833. textVerticalAlign: r
  1834. }
  1835. }
  1836. function Be(t, e, i) {
  1837. return t[e] = i,
  1838. t[e]
  1839. }
  1840. function Ge(t, e) {
  1841. return null == t || e <= 0 || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  1842. }
  1843. function We(t) {
  1844. return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  1845. }
  1846. function He(t, e) {
  1847. return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t
  1848. }
  1849. function Fe(t, e, i) {
  1850. return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3]
  1851. }
  1852. function Ze(t, e) {
  1853. return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding)
  1854. }
  1855. function Ue(t) {
  1856. t = t || {},
  1857. jy.call(this, t);
  1858. for (var e in t)
  1859. t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]);
  1860. this.style = new ex(t.style,this),
  1861. this._rect = null,
  1862. this.__clipPaths = []
  1863. }
  1864. function je(t) {
  1865. Ue.call(this, t)
  1866. }
  1867. function Xe(t) {
  1868. return parseInt(t, 10)
  1869. }
  1870. function qe(t) {
  1871. return !!t && (!!t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh)
  1872. }
  1873. function Ye(t) {
  1874. t.__unusedCount++
  1875. }
  1876. function $e(t) {
  1877. 1 == t.__unusedCount && t.clear()
  1878. }
  1879. function Ke(t, e, i) {
  1880. return _x.copy(t.getBoundingRect()),
  1881. t.transform && _x.applyTransform(t.transform),
  1882. bx.width = e,
  1883. bx.height = i,
  1884. !_x.intersect(bx)
  1885. }
  1886. function Je(t, e) {
  1887. if (t == e)
  1888. return !1;
  1889. if (!t || !e || t.length !== e.length)
  1890. return !0;
  1891. for (var i = 0; i < t.length; i++)
  1892. if (t[i] !== e[i])
  1893. return !0
  1894. }
  1895. function Qe(t, e) {
  1896. for (var i = 0; i < t.length; i++) {
  1897. var n = t[i];
  1898. n.setTransform(e),
  1899. e.beginPath(),
  1900. n.buildPath(e, n.shape),
  1901. e.clip(),
  1902. n.restoreTransform(e)
  1903. }
  1904. }
  1905. function ti(t, e) {
  1906. var i = document.createElement("div");
  1907. return i.style.cssText = ["position:relative", "overflow:hidden", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";",
  1908. i
  1909. }
  1910. function ei(t) {
  1911. return t.getBoundingClientRect ? t.getBoundingClientRect() : {
  1912. left: 0,
  1913. top: 0
  1914. }
  1915. }
  1916. function ii(t, e, i, n) {
  1917. return i = i || {},
  1918. n || !Yv.canvasSupported ? ni(t, e, i) : Yv.browser.firefox && null != e.layerX && e.layerX !== e.offsetX ? (i.zrX = e.layerX,
  1919. i.zrY = e.layerY) : null != e.offsetX ? (i.zrX = e.offsetX,
  1920. i.zrY = e.offsetY) : ni(t, e, i),
  1921. i
  1922. }
  1923. function ni(t, e, i) {
  1924. var n = ei(t);
  1925. i.zrX = e.clientX - n.left,
  1926. i.zrY = e.clientY - n.top
  1927. }
  1928. function oi(t, e, i) {
  1929. if (null != (e = e || window.event).zrX)
  1930. return e;
  1931. var n = e.type;
  1932. if (n && n.indexOf("touch") >= 0) {
  1933. var o = "touchend" != n ? e.targetTouches[0] : e.changedTouches[0];
  1934. o && ii(t, o, e, i)
  1935. } else
  1936. ii(t, e, e, i),
  1937. e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3;
  1938. var a = e.button;
  1939. return null == e.which && void 0 !== a && Mx.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0),
  1940. e
  1941. }
  1942. function ai(t, e, i) {
  1943. Sx ? t.addEventListener(e, i) : t.attachEvent("on" + e, i)
  1944. }
  1945. function ri(t, e, i) {
  1946. Sx ? t.removeEventListener(e, i) : t.detachEvent("on" + e, i)
  1947. }
  1948. function si(t) {
  1949. return t.which > 1
  1950. }
  1951. function li(t) {
  1952. var e = t[1][0] - t[0][0]
  1953. , i = t[1][1] - t[0][1];
  1954. return Math.sqrt(e * e + i * i)
  1955. }
  1956. function hi(t) {
  1957. return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2]
  1958. }
  1959. function ui(t) {
  1960. return "mousewheel" === t && Yv.browser.firefox ? "DOMMouseScroll" : t
  1961. }
  1962. function ci(t, e, i) {
  1963. var n = t._gestureMgr;
  1964. "start" === i && n.clear();
  1965. var o = n.recognize(e, t.handler.findHover(e.zrX, e.zrY, null).target, t.dom);
  1966. if ("end" === i && n.clear(),
  1967. o) {
  1968. var a = o.type;
  1969. e.gestureEvent = a,
  1970. t.handler.dispatchToElement({
  1971. target: o.target
  1972. }, a, o.event)
  1973. }
  1974. }
  1975. function di(t) {
  1976. t._touching = !0,
  1977. clearTimeout(t._touchTimer),
  1978. t._touchTimer = setTimeout(function() {
  1979. t._touching = !1
  1980. }, 700)
  1981. }
  1982. function fi(t) {
  1983. var e = t.pointerType;
  1984. return "pen" === e || "touch" === e
  1985. }
  1986. function gi(t) {
  1987. function e(t, e) {
  1988. return function() {
  1989. if (!e._touching)
  1990. return t.apply(e, arguments)
  1991. }
  1992. }
  1993. c(Lx, function(e) {
  1994. t._handlers[e] = p(Ox[e], t)
  1995. }),
  1996. c(Px, function(e) {
  1997. t._handlers[e] = p(Ox[e], t)
  1998. }),
  1999. c(Dx, function(i) {
  2000. t._handlers[i] = e(Ox[i], t)
  2001. })
  2002. }
  2003. function pi(t) {
  2004. function e(e, i) {
  2005. c(e, function(e) {
  2006. ai(t, ui(e), i._handlers[e])
  2007. }, i)
  2008. }
  2009. my.call(this),
  2010. this.dom = t,
  2011. this._touching = !1,
  2012. this._touchTimer,
  2013. this._gestureMgr = new Ax,
  2014. this._handlers = {},
  2015. gi(this),
  2016. Yv.pointerEventsSupported ? e(Px, this) : (Yv.touchEventsSupported && e(Lx, this),
  2017. e(Dx, this))
  2018. }
  2019. function mi(t, e) {
  2020. var i = new Bx(Xv(),t,e);
  2021. return Rx[i.id] = i,
  2022. i
  2023. }
  2024. function vi(t, e) {
  2025. Ex[t] = e
  2026. }
  2027. function yi(t) {
  2028. delete Rx[t]
  2029. }
  2030. function xi(t) {
  2031. return t.replace(/^\s+/, "").replace(/\s+$/, "")
  2032. }
  2033. function _i(t, e, i, n) {
  2034. var o = e[1] - e[0]
  2035. , a = i[1] - i[0];
  2036. if (0 === o)
  2037. return 0 === a ? i[0] : (i[0] + i[1]) / 2;
  2038. if (n)
  2039. if (o > 0) {
  2040. if (t <= e[0])
  2041. return i[0];
  2042. if (t >= e[1])
  2043. return i[1]
  2044. } else {
  2045. if (t >= e[0])
  2046. return i[0];
  2047. if (t <= e[1])
  2048. return i[1]
  2049. }
  2050. else {
  2051. if (t === e[0])
  2052. return i[0];
  2053. if (t === e[1])
  2054. return i[1]
  2055. }
  2056. return (t - e[0]) / o * a + i[0]
  2057. }
  2058. function bi(t, e) {
  2059. switch (t) {
  2060. case "center":
  2061. case "middle":
  2062. t = "50%";
  2063. break;
  2064. case "left":
  2065. case "top":
  2066. t = "0%";
  2067. break;
  2068. case "right":
  2069. case "bottom":
  2070. t = "100%"
  2071. }
  2072. return "string" == typeof t ? xi(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? NaN : +t
  2073. }
  2074. function wi(t, e, i) {
  2075. return null == e && (e = 10),
  2076. e = Math.min(Math.max(0, e), 20),
  2077. t = (+t).toFixed(e),
  2078. i ? t : +t
  2079. }
  2080. function Si(t) {
  2081. return t.sort(function(t, e) {
  2082. return t - e
  2083. }),
  2084. t
  2085. }
  2086. function Mi(t) {
  2087. if (t = +t,
  2088. isNaN(t))
  2089. return 0;
  2090. for (var e = 1, i = 0; Math.round(t * e) / e !== t; )
  2091. e *= 10,
  2092. i++;
  2093. return i
  2094. }
  2095. function Ii(t) {
  2096. var e = t.toString()
  2097. , i = e.indexOf("e");
  2098. if (i > 0) {
  2099. var n = +e.slice(i + 1);
  2100. return n < 0 ? -n : 0
  2101. }
  2102. var o = e.indexOf(".");
  2103. return o < 0 ? 0 : e.length - 1 - o
  2104. }
  2105. function Ti(t, e) {
  2106. var i = Math.log
  2107. , n = Math.LN10
  2108. , o = Math.floor(i(t[1] - t[0]) / n)
  2109. , a = Math.round(i(Math.abs(e[1] - e[0])) / n)
  2110. , r = Math.min(Math.max(-o + a, 0), 20);
  2111. return isFinite(r) ? r : 20
  2112. }
  2113. function Ai(t, e, i) {
  2114. if (!t[e])
  2115. return 0;
  2116. var n = f(t, function(t, e) {
  2117. return t + (isNaN(e) ? 0 : e)
  2118. }, 0);
  2119. if (0 === n)
  2120. return 0;
  2121. for (var o = Math.pow(10, i), a = d(t, function(t) {
  2122. return (isNaN(t) ? 0 : t) / n * o * 100
  2123. }), r = 100 * o, s = d(a, function(t) {
  2124. return Math.floor(t)
  2125. }), l = f(s, function(t, e) {
  2126. return t + e
  2127. }, 0), h = d(a, function(t, e) {
  2128. return t - s[e]
  2129. }); l < r; ) {
  2130. for (var u = Number.NEGATIVE_INFINITY, c = null, g = 0, p = h.length; g < p; ++g)
  2131. h[g] > u && (u = h[g],
  2132. c = g);
  2133. ++s[c],
  2134. h[c] = 0,
  2135. ++l
  2136. }
  2137. return s[e] / o
  2138. }
  2139. function Ci(t) {
  2140. var e = 2 * Math.PI;
  2141. return (t % e + e) % e
  2142. }
  2143. function Di(t) {
  2144. return t > -Wx && t < Wx
  2145. }
  2146. function Li(t) {
  2147. if (t instanceof Date)
  2148. return t;
  2149. if ("string" == typeof t) {
  2150. var e = Fx.exec(t);
  2151. if (!e)
  2152. return new Date(NaN);
  2153. if (e[8]) {
  2154. var i = +e[4] || 0;
  2155. return "Z" !== e[8].toUpperCase() && (i -= e[8].slice(0, 3)),
  2156. new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, i, +(e[5] || 0), +e[6] || 0, +e[7] || 0))
  2157. }
  2158. return new Date(+e[1],+(e[2] || 1) - 1,+e[3] || 1,+e[4] || 0,+(e[5] || 0),+e[6] || 0,+e[7] || 0)
  2159. }
  2160. return null == t ? new Date(NaN) : new Date(Math.round(t))
  2161. }
  2162. function ki(t) {
  2163. return Math.pow(10, Pi(t))
  2164. }
  2165. function Pi(t) {
  2166. return Math.floor(Math.log(t) / Math.LN10)
  2167. }
  2168. function Oi(t, e) {
  2169. var i, n = Pi(t), o = Math.pow(10, n), a = t / o;
  2170. return i = e ? a < 1.5 ? 1 : a < 2.5 ? 2 : a < 4 ? 3 : a < 7 ? 5 : 10 : a < 1 ? 1 : a < 2 ? 2 : a < 3 ? 3 : a < 5 ? 5 : 10,
  2171. t = i * o,
  2172. n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t
  2173. }
  2174. function zi(t) {
  2175. function e(t, i, n) {
  2176. return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] == (n ? -1 : 1) || !n && e(t, i, 1))
  2177. }
  2178. t.sort(function(t, i) {
  2179. return e(t, i, 0) ? -1 : 1
  2180. });
  2181. for (var i = -1 / 0, n = 1, o = 0; o < t.length; ) {
  2182. for (var a = t[o].interval, r = t[o].close, s = 0; s < 2; s++)
  2183. a[s] <= i && (a[s] = i,
  2184. r[s] = s ? 1 : 1 - n),
  2185. i = a[s],
  2186. n = r[s];
  2187. a[0] === a[1] && r[0] * r[1] != 1 ? t.splice(o, 1) : o++
  2188. }
  2189. return t
  2190. }
  2191. function Ni(t) {
  2192. return t - parseFloat(t) >= 0
  2193. }
  2194. function Ei(t) {
  2195. return isNaN(t) ? "-" : (t = (t + "").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length > 1 ? "." + t[1] : "")
  2196. }
  2197. function Ri(t, e) {
  2198. return t = (t || "").toLowerCase().replace(/-(.)/g, function(t, e) {
  2199. return e.toUpperCase()
  2200. }),
  2201. e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)),
  2202. t
  2203. }
  2204. function Vi(t) {
  2205. return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")
  2206. }
  2207. function Bi(t, e, i) {
  2208. v(e) || (e = [e]);
  2209. var n = e.length;
  2210. if (!n)
  2211. return "";
  2212. for (var o = e[0].$vars || [], a = 0; a < o.length; a++) {
  2213. var r = jx[a]
  2214. , s = Xx(r, 0);
  2215. t = t.replace(Xx(r), i ? Vi(s) : s)
  2216. }
  2217. for (var l = 0; l < n; l++)
  2218. for (var h = 0; h < o.length; h++) {
  2219. s = e[l][o[h]];
  2220. t = t.replace(Xx(jx[h], l), i ? Vi(s) : s)
  2221. }
  2222. return t
  2223. }
  2224. function Gi(t, e, i) {
  2225. return c(e, function(e, n) {
  2226. t = t.replace("{" + n + "}", i ? Vi(e) : e)
  2227. }),
  2228. t
  2229. }
  2230. function Wi(t, e) {
  2231. return t ? '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + Vi(t) + ";" + (e || "") + '"></span>' : ""
  2232. }
  2233. function Hi(t, e, i) {
  2234. "week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "MM-dd\nyyyy");
  2235. var n = Li(e)
  2236. , o = i ? "UTC" : ""
  2237. , a = n["get" + o + "FullYear"]()
  2238. , r = n["get" + o + "Month"]() + 1
  2239. , s = n["get" + o + "Date"]()
  2240. , l = n["get" + o + "Hours"]()
  2241. , h = n["get" + o + "Minutes"]()
  2242. , u = n["get" + o + "Seconds"]();
  2243. return t = t.replace("MM", qx(r)).replace("M", r).replace("yyyy", a).replace("yy", a % 100).replace("dd", qx(s)).replace("d", s).replace("hh", qx(l)).replace("h", l).replace("mm", qx(h)).replace("m", h).replace("ss", qx(u)).replace("s", u)
  2244. }
  2245. function Fi(t) {
  2246. return t ? t.charAt(0).toUpperCase() + t.substr(1) : t
  2247. }
  2248. function Zi(t, e, i) {
  2249. return t[t_ + e] = i
  2250. }
  2251. function Ui(t, e) {
  2252. return t[t_ + e]
  2253. }
  2254. function ji(t, e) {
  2255. return t.hasOwnProperty(t_ + e)
  2256. }
  2257. function Xi(t) {
  2258. var e = {
  2259. main: "",
  2260. sub: ""
  2261. };
  2262. return t && (t = t.split(Jx),
  2263. e.main = t[0] || "",
  2264. e.sub = t[1] || ""),
  2265. e
  2266. }
  2267. function qi(t) {
  2268. D(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal')
  2269. }
  2270. function Yi(t, e) {
  2271. t.$constructor = t,
  2272. t.extend = function(t) {
  2273. var e = this
  2274. , i = function() {
  2275. t.$constructor ? t.$constructor.apply(this, arguments) : e.apply(this, arguments)
  2276. };
  2277. return o(i.prototype, t),
  2278. i.extend = this.extend,
  2279. i.superCall = $i,
  2280. i.superApply = Ki,
  2281. l(i, this),
  2282. i.superClass = e,
  2283. i
  2284. }
  2285. }
  2286. function $i(t, e) {
  2287. var i = A(arguments, 2);
  2288. return this.superClass.prototype[e].apply(t, i)
  2289. }
  2290. function Ki(t, e, i) {
  2291. return this.superClass.prototype[e].apply(t, i)
  2292. }
  2293. function Ji(t, e) {
  2294. function i(t) {
  2295. var e = n[t.main];
  2296. return e && e[Qx] || ((e = n[t.main] = {})[Qx] = !0),
  2297. e
  2298. }
  2299. e = e || {};
  2300. var n = {};
  2301. if (t.registerClass = function(t, e) {
  2302. return e && (qi(e),
  2303. (e = Xi(e)).sub ? e.sub !== Qx && (i(e)[e.sub] = t) : n[e.main] = t),
  2304. t
  2305. }
  2306. ,
  2307. t.getClass = function(t, e, i) {
  2308. var o = n[t];
  2309. if (o && o[Qx] && (o = e ? o[e] : null),
  2310. i && !o)
  2311. throw new Error(e ? "Component " + t + "." + (e || "") + " not exists. Load it first." : t + ".type should be specified.");
  2312. return o
  2313. }
  2314. ,
  2315. t.getClassesByMainType = function(t) {
  2316. t = Xi(t);
  2317. var e = []
  2318. , i = n[t.main];
  2319. return i && i[Qx] ? c(i, function(t, i) {
  2320. i !== Qx && e.push(t)
  2321. }) : e.push(i),
  2322. e
  2323. }
  2324. ,
  2325. t.hasClass = function(t) {
  2326. return t = Xi(t),
  2327. !!n[t.main]
  2328. }
  2329. ,
  2330. t.getAllClassMainTypes = function() {
  2331. var t = [];
  2332. return c(n, function(e, i) {
  2333. t.push(i)
  2334. }),
  2335. t
  2336. }
  2337. ,
  2338. t.hasSubTypes = function(t) {
  2339. t = Xi(t);
  2340. var e = n[t.main];
  2341. return e && e[Qx]
  2342. }
  2343. ,
  2344. t.parseClassType = Xi,
  2345. e.registerWhenExtend) {
  2346. var o = t.extend;
  2347. o && (t.extend = function(e) {
  2348. var i = o.call(this, e);
  2349. return t.registerClass(i, e.type)
  2350. }
  2351. )
  2352. }
  2353. return t
  2354. }
  2355. function Qi(t) {
  2356. return t > -l_ && t < l_
  2357. }
  2358. function tn(t) {
  2359. return t > l_ || t < -l_
  2360. }
  2361. function en(t, e, i, n, o) {
  2362. var a = 1 - o;
  2363. return a * a * (a * t + 3 * o * e) + o * o * (o * n + 3 * a * i)
  2364. }
  2365. function nn(t, e, i, n, o) {
  2366. var a = 1 - o;
  2367. return 3 * (((e - t) * a + 2 * (i - e) * o) * a + (n - i) * o * o)
  2368. }
  2369. function on(t, e, i, n, o, a) {
  2370. var r = n + 3 * (e - i) - t
  2371. , s = 3 * (i - 2 * e + t)
  2372. , l = 3 * (e - t)
  2373. , h = t - o
  2374. , u = s * s - 3 * r * l
  2375. , c = s * l - 9 * r * h
  2376. , d = l * l - 3 * s * h
  2377. , f = 0;
  2378. if (Qi(u) && Qi(c))
  2379. Qi(s) ? a[0] = 0 : (M = -l / s) >= 0 && M <= 1 && (a[f++] = M);
  2380. else {
  2381. var g = c * c - 4 * u * d;
  2382. if (Qi(g)) {
  2383. var p = c / u
  2384. , m = -p / 2;
  2385. (M = -s / r + p) >= 0 && M <= 1 && (a[f++] = M),
  2386. m >= 0 && m <= 1 && (a[f++] = m)
  2387. } else if (g > 0) {
  2388. var v = s_(g)
  2389. , y = u * s + 1.5 * r * (-c + v)
  2390. , x = u * s + 1.5 * r * (-c - v);
  2391. (M = (-s - ((y = y < 0 ? -r_(-y, c_) : r_(y, c_)) + (x = x < 0 ? -r_(-x, c_) : r_(x, c_)))) / (3 * r)) >= 0 && M <= 1 && (a[f++] = M)
  2392. } else {
  2393. var _ = (2 * u * s - 3 * r * c) / (2 * s_(u * u * u))
  2394. , b = Math.acos(_) / 3
  2395. , w = s_(u)
  2396. , S = Math.cos(b)
  2397. , M = (-s - 2 * w * S) / (3 * r)
  2398. , m = (-s + w * (S + u_ * Math.sin(b))) / (3 * r)
  2399. , I = (-s + w * (S - u_ * Math.sin(b))) / (3 * r);
  2400. M >= 0 && M <= 1 && (a[f++] = M),
  2401. m >= 0 && m <= 1 && (a[f++] = m),
  2402. I >= 0 && I <= 1 && (a[f++] = I)
  2403. }
  2404. }
  2405. return f
  2406. }
  2407. function an(t, e, i, n, o) {
  2408. var a = 6 * i - 12 * e + 6 * t
  2409. , r = 9 * e + 3 * n - 3 * t - 9 * i
  2410. , s = 3 * e - 3 * t
  2411. , l = 0;
  2412. if (Qi(r))
  2413. tn(a) && (c = -s / a) >= 0 && c <= 1 && (o[l++] = c);
  2414. else {
  2415. var h = a * a - 4 * r * s;
  2416. if (Qi(h))
  2417. o[0] = -a / (2 * r);
  2418. else if (h > 0) {
  2419. var u = s_(h)
  2420. , c = (-a + u) / (2 * r)
  2421. , d = (-a - u) / (2 * r);
  2422. c >= 0 && c <= 1 && (o[l++] = c),
  2423. d >= 0 && d <= 1 && (o[l++] = d)
  2424. }
  2425. }
  2426. return l
  2427. }
  2428. function rn(t, e, i, n, o, a) {
  2429. var r = (e - t) * o + t
  2430. , s = (i - e) * o + e
  2431. , l = (n - i) * o + i
  2432. , h = (s - r) * o + r
  2433. , u = (l - s) * o + s
  2434. , c = (u - h) * o + h;
  2435. a[0] = t,
  2436. a[1] = r,
  2437. a[2] = h,
  2438. a[3] = c,
  2439. a[4] = c,
  2440. a[5] = u,
  2441. a[6] = l,
  2442. a[7] = n
  2443. }
  2444. function sn(t, e, i, n, o, a, r, s, l, h, u) {
  2445. var c, d, f, g, p, m = .005, v = 1 / 0;
  2446. d_[0] = l,
  2447. d_[1] = h;
  2448. for (var y = 0; y < 1; y += .05)
  2449. f_[0] = en(t, i, o, r, y),
  2450. f_[1] = en(e, n, a, s, y),
  2451. (g = fy(d_, f_)) < v && (c = y,
  2452. v = g);
  2453. v = 1 / 0;
  2454. for (var x = 0; x < 32 && !(m < h_); x++)
  2455. d = c - m,
  2456. f = c + m,
  2457. f_[0] = en(t, i, o, r, d),
  2458. f_[1] = en(e, n, a, s, d),
  2459. g = fy(f_, d_),
  2460. d >= 0 && g < v ? (c = d,
  2461. v = g) : (g_[0] = en(t, i, o, r, f),
  2462. g_[1] = en(e, n, a, s, f),
  2463. p = fy(g_, d_),
  2464. f <= 1 && p < v ? (c = f,
  2465. v = p) : m *= .5);
  2466. return u && (u[0] = en(t, i, o, r, c),
  2467. u[1] = en(e, n, a, s, c)),
  2468. s_(v)
  2469. }
  2470. function ln(t, e, i, n) {
  2471. var o = 1 - n;
  2472. return o * (o * t + 2 * n * e) + n * n * i
  2473. }
  2474. function hn(t, e, i, n) {
  2475. return 2 * ((1 - n) * (e - t) + n * (i - e))
  2476. }
  2477. function un(t, e, i, n, o) {
  2478. var a = t - 2 * e + i
  2479. , r = 2 * (e - t)
  2480. , s = t - n
  2481. , l = 0;
  2482. if (Qi(a))
  2483. tn(r) && (c = -s / r) >= 0 && c <= 1 && (o[l++] = c);
  2484. else {
  2485. var h = r * r - 4 * a * s;
  2486. if (Qi(h))
  2487. (c = -r / (2 * a)) >= 0 && c <= 1 && (o[l++] = c);
  2488. else if (h > 0) {
  2489. var u = s_(h)
  2490. , c = (-r + u) / (2 * a)
  2491. , d = (-r - u) / (2 * a);
  2492. c >= 0 && c <= 1 && (o[l++] = c),
  2493. d >= 0 && d <= 1 && (o[l++] = d)
  2494. }
  2495. }
  2496. return l
  2497. }
  2498. function cn(t, e, i) {
  2499. var n = t + i - 2 * e;
  2500. return 0 === n ? .5 : (t - e) / n
  2501. }
  2502. function dn(t, e, i, n, o) {
  2503. var a = (e - t) * n + t
  2504. , r = (i - e) * n + e
  2505. , s = (r - a) * n + a;
  2506. o[0] = t,
  2507. o[1] = a,
  2508. o[2] = s,
  2509. o[3] = s,
  2510. o[4] = r,
  2511. o[5] = i
  2512. }
  2513. function fn(t, e, i, n, o, a, r, s, l) {
  2514. var h, u = .005, c = 1 / 0;
  2515. d_[0] = r,
  2516. d_[1] = s;
  2517. for (var d = 0; d < 1; d += .05)
  2518. f_[0] = ln(t, i, o, d),
  2519. f_[1] = ln(e, n, a, d),
  2520. (m = fy(d_, f_)) < c && (h = d,
  2521. c = m);
  2522. c = 1 / 0;
  2523. for (var f = 0; f < 32 && !(u < h_); f++) {
  2524. var g = h - u
  2525. , p = h + u;
  2526. f_[0] = ln(t, i, o, g),
  2527. f_[1] = ln(e, n, a, g);
  2528. var m = fy(f_, d_);
  2529. if (g >= 0 && m < c)
  2530. h = g,
  2531. c = m;
  2532. else {
  2533. g_[0] = ln(t, i, o, p),
  2534. g_[1] = ln(e, n, a, p);
  2535. var v = fy(g_, d_);
  2536. p <= 1 && v < c ? (h = p,
  2537. c = v) : u *= .5
  2538. }
  2539. }
  2540. return l && (l[0] = ln(t, i, o, h),
  2541. l[1] = ln(e, n, a, h)),
  2542. s_(c)
  2543. }
  2544. function gn(t, e, i) {
  2545. if (0 !== t.length) {
  2546. var n, o = t[0], a = o[0], r = o[0], s = o[1], l = o[1];
  2547. for (n = 1; n < t.length; n++)
  2548. o = t[n],
  2549. a = p_(a, o[0]),
  2550. r = m_(r, o[0]),
  2551. s = p_(s, o[1]),
  2552. l = m_(l, o[1]);
  2553. e[0] = a,
  2554. e[1] = s,
  2555. i[0] = r,
  2556. i[1] = l
  2557. }
  2558. }
  2559. function pn(t, e, i, n, o, a) {
  2560. o[0] = p_(t, i),
  2561. o[1] = p_(e, n),
  2562. a[0] = m_(t, i),
  2563. a[1] = m_(e, n)
  2564. }
  2565. function mn(t, e, i, n, o, a, r, s, l, h) {
  2566. var u, c = an, d = en, f = c(t, i, o, r, S_);
  2567. for (l[0] = 1 / 0,
  2568. l[1] = 1 / 0,
  2569. h[0] = -1 / 0,
  2570. h[1] = -1 / 0,
  2571. u = 0; u < f; u++) {
  2572. var g = d(t, i, o, r, S_[u]);
  2573. l[0] = p_(g, l[0]),
  2574. h[0] = m_(g, h[0])
  2575. }
  2576. for (f = c(e, n, a, s, M_),
  2577. u = 0; u < f; u++) {
  2578. var p = d(e, n, a, s, M_[u]);
  2579. l[1] = p_(p, l[1]),
  2580. h[1] = m_(p, h[1])
  2581. }
  2582. l[0] = p_(t, l[0]),
  2583. h[0] = m_(t, h[0]),
  2584. l[0] = p_(r, l[0]),
  2585. h[0] = m_(r, h[0]),
  2586. l[1] = p_(e, l[1]),
  2587. h[1] = m_(e, h[1]),
  2588. l[1] = p_(s, l[1]),
  2589. h[1] = m_(s, h[1])
  2590. }
  2591. function vn(t, e, i, n, o, a, r, s) {
  2592. var l = cn
  2593. , h = ln
  2594. , u = m_(p_(l(t, i, o), 1), 0)
  2595. , c = m_(p_(l(e, n, a), 1), 0)
  2596. , d = h(t, i, o, u)
  2597. , f = h(e, n, a, c);
  2598. r[0] = p_(t, o, d),
  2599. r[1] = p_(e, a, f),
  2600. s[0] = m_(t, o, d),
  2601. s[1] = m_(e, a, f)
  2602. }
  2603. function yn(t, e, i, n, o, a, r, s, l) {
  2604. var h = $
  2605. , u = K
  2606. , c = Math.abs(o - a);
  2607. if (c % x_ < 1e-4 && c > 1e-4)
  2608. return s[0] = t - i,
  2609. s[1] = e - n,
  2610. l[0] = t + i,
  2611. void (l[1] = e + n);
  2612. if (__[0] = y_(o) * i + t,
  2613. __[1] = v_(o) * n + e,
  2614. b_[0] = y_(a) * i + t,
  2615. b_[1] = v_(a) * n + e,
  2616. h(s, __, b_),
  2617. u(l, __, b_),
  2618. (o %= x_) < 0 && (o += x_),
  2619. (a %= x_) < 0 && (a += x_),
  2620. o > a && !r ? a += x_ : o < a && r && (o += x_),
  2621. r) {
  2622. var d = a;
  2623. a = o,
  2624. o = d
  2625. }
  2626. for (var f = 0; f < a; f += Math.PI / 2)
  2627. f > o && (w_[0] = y_(f) * i + t,
  2628. w_[1] = v_(f) * n + e,
  2629. h(s, w_, s),
  2630. u(l, w_, l))
  2631. }
  2632. function xn(t, e, i, n, o, a, r) {
  2633. if (0 === o)
  2634. return !1;
  2635. var s = o
  2636. , l = 0
  2637. , h = t;
  2638. if (r > e + s && r > n + s || r < e - s && r < n - s || a > t + s && a > i + s || a < t - s && a < i - s)
  2639. return !1;
  2640. if (t === i)
  2641. return Math.abs(a - t) <= s / 2;
  2642. var u = (l = (e - n) / (t - i)) * a - r + (h = (t * n - i * e) / (t - i));
  2643. return u * u / (l * l + 1) <= s / 2 * s / 2
  2644. }
  2645. function _n(t, e, i, n, o, a, r, s, l, h, u) {
  2646. if (0 === l)
  2647. return !1;
  2648. var c = l;
  2649. return !(u > e + c && u > n + c && u > a + c && u > s + c || u < e - c && u < n - c && u < a - c && u < s - c || h > t + c && h > i + c && h > o + c && h > r + c || h < t - c && h < i - c && h < o - c && h < r - c) && sn(t, e, i, n, o, a, r, s, h, u, null) <= c / 2
  2650. }
  2651. function bn(t, e, i, n, o, a, r, s, l) {
  2652. if (0 === r)
  2653. return !1;
  2654. var h = r;
  2655. return !(l > e + h && l > n + h && l > a + h || l < e - h && l < n - h && l < a - h || s > t + h && s > i + h && s > o + h || s < t - h && s < i - h && s < o - h) && fn(t, e, i, n, o, a, s, l, null) <= h / 2
  2656. }
  2657. function wn(t) {
  2658. return (t %= V_) < 0 && (t += V_),
  2659. t
  2660. }
  2661. function Sn(t, e, i, n, o, a, r, s, l) {
  2662. if (0 === r)
  2663. return !1;
  2664. var h = r;
  2665. s -= t,
  2666. l -= e;
  2667. var u = Math.sqrt(s * s + l * l);
  2668. if (u - h > i || u + h < i)
  2669. return !1;
  2670. if (Math.abs(n - o) % B_ < 1e-4)
  2671. return !0;
  2672. if (a) {
  2673. var c = n;
  2674. n = wn(o),
  2675. o = wn(c)
  2676. } else
  2677. n = wn(n),
  2678. o = wn(o);
  2679. n > o && (o += B_);
  2680. var d = Math.atan2(l, s);
  2681. return d < 0 && (d += B_),
  2682. d >= n && d <= o || d + B_ >= n && d + B_ <= o
  2683. }
  2684. function Mn(t, e, i, n, o, a) {
  2685. if (a > e && a > n || a < e && a < n)
  2686. return 0;
  2687. if (n === e)
  2688. return 0;
  2689. var r = n < e ? 1 : -1
  2690. , s = (a - e) / (n - e);
  2691. return 1 !== s && 0 !== s || (r = n < e ? .5 : -.5),
  2692. s * (i - t) + t > o ? r : 0
  2693. }
  2694. function In(t, e) {
  2695. return Math.abs(t - e) < W_
  2696. }
  2697. function Tn() {
  2698. var t = F_[0];
  2699. F_[0] = F_[1],
  2700. F_[1] = t
  2701. }
  2702. function An(t, e, i, n, o, a, r, s, l, h) {
  2703. if (h > e && h > n && h > a && h > s || h < e && h < n && h < a && h < s)
  2704. return 0;
  2705. var u = on(e, n, a, s, h, H_);
  2706. if (0 === u)
  2707. return 0;
  2708. for (var c, d, f = 0, g = -1, p = 0; p < u; p++) {
  2709. var m = H_[p]
  2710. , v = 0 === m || 1 === m ? .5 : 1;
  2711. en(t, i, o, r, m) < l || (g < 0 && (g = an(e, n, a, s, F_),
  2712. F_[1] < F_[0] && g > 1 && Tn(),
  2713. c = en(e, n, a, s, F_[0]),
  2714. g > 1 && (d = en(e, n, a, s, F_[1]))),
  2715. 2 == g ? m < F_[0] ? f += c < e ? v : -v : m < F_[1] ? f += d < c ? v : -v : f += s < d ? v : -v : m < F_[0] ? f += c < e ? v : -v : f += s < c ? v : -v)
  2716. }
  2717. return f
  2718. }
  2719. function Cn(t, e, i, n, o, a, r, s) {
  2720. if (s > e && s > n && s > a || s < e && s < n && s < a)
  2721. return 0;
  2722. var l = un(e, n, a, s, H_);
  2723. if (0 === l)
  2724. return 0;
  2725. var h = cn(e, n, a);
  2726. if (h >= 0 && h <= 1) {
  2727. for (var u = 0, c = ln(e, n, a, h), d = 0; d < l; d++) {
  2728. f = 0 === H_[d] || 1 === H_[d] ? .5 : 1;
  2729. (g = ln(t, i, o, H_[d])) < r || (H_[d] < h ? u += c < e ? f : -f : u += a < c ? f : -f)
  2730. }
  2731. return u
  2732. }
  2733. var f = 0 === H_[0] || 1 === H_[0] ? .5 : 1
  2734. , g = ln(t, i, o, H_[0]);
  2735. return g < r ? 0 : a < e ? f : -f
  2736. }
  2737. function Dn(t, e, i, n, o, a, r, s) {
  2738. if ((s -= e) > i || s < -i)
  2739. return 0;
  2740. h = Math.sqrt(i * i - s * s);
  2741. H_[0] = -h,
  2742. H_[1] = h;
  2743. var l = Math.abs(n - o);
  2744. if (l < 1e-4)
  2745. return 0;
  2746. if (l % G_ < 1e-4) {
  2747. n = 0,
  2748. o = G_;
  2749. g = a ? 1 : -1;
  2750. return r >= H_[0] + t && r <= H_[1] + t ? g : 0
  2751. }
  2752. if (a) {
  2753. var h = n;
  2754. n = wn(o),
  2755. o = wn(h)
  2756. } else
  2757. n = wn(n),
  2758. o = wn(o);
  2759. n > o && (o += G_);
  2760. for (var u = 0, c = 0; c < 2; c++) {
  2761. var d = H_[c];
  2762. if (d + t > r) {
  2763. var f = Math.atan2(s, d)
  2764. , g = a ? 1 : -1;
  2765. f < 0 && (f = G_ + f),
  2766. (f >= n && f <= o || f + G_ >= n && f + G_ <= o) && (f > Math.PI / 2 && f < 1.5 * Math.PI && (g = -g),
  2767. u += g)
  2768. }
  2769. }
  2770. return u
  2771. }
  2772. function Ln(t, e, i, n, o) {
  2773. for (var a = 0, r = 0, s = 0, l = 0, h = 0, u = 0; u < t.length; ) {
  2774. var c = t[u++];
  2775. switch (c === I_.M && u > 1 && (i || (a += Mn(r, s, l, h, n, o))),
  2776. 1 == u && (l = r = t[u],
  2777. h = s = t[u + 1]),
  2778. c) {
  2779. case I_.M:
  2780. r = l = t[u++],
  2781. s = h = t[u++];
  2782. break;
  2783. case I_.L:
  2784. if (i) {
  2785. if (xn(r, s, t[u], t[u + 1], e, n, o))
  2786. return !0
  2787. } else
  2788. a += Mn(r, s, t[u], t[u + 1], n, o) || 0;
  2789. r = t[u++],
  2790. s = t[u++];
  2791. break;
  2792. case I_.C:
  2793. if (i) {
  2794. if (_n(r, s, t[u++], t[u++], t[u++], t[u++], t[u], t[u + 1], e, n, o))
  2795. return !0
  2796. } else
  2797. a += An(r, s, t[u++], t[u++], t[u++], t[u++], t[u], t[u + 1], n, o) || 0;
  2798. r = t[u++],
  2799. s = t[u++];
  2800. break;
  2801. case I_.Q:
  2802. if (i) {
  2803. if (bn(r, s, t[u++], t[u++], t[u], t[u + 1], e, n, o))
  2804. return !0
  2805. } else
  2806. a += Cn(r, s, t[u++], t[u++], t[u], t[u + 1], n, o) || 0;
  2807. r = t[u++],
  2808. s = t[u++];
  2809. break;
  2810. case I_.A:
  2811. var d = t[u++]
  2812. , f = t[u++]
  2813. , g = t[u++]
  2814. , p = t[u++]
  2815. , m = t[u++]
  2816. , v = t[u++]
  2817. , y = (t[u++],
  2818. 1 - t[u++])
  2819. , x = Math.cos(m) * g + d
  2820. , _ = Math.sin(m) * p + f;
  2821. u > 1 ? a += Mn(r, s, x, _, n, o) : (l = x,
  2822. h = _);
  2823. var b = (n - d) * p / g + d;
  2824. if (i) {
  2825. if (Sn(d, f, p, m, m + v, y, e, b, o))
  2826. return !0
  2827. } else
  2828. a += Dn(d, f, p, m, m + v, y, b, o);
  2829. r = Math.cos(m + v) * g + d,
  2830. s = Math.sin(m + v) * p + f;
  2831. break;
  2832. case I_.R:
  2833. l = r = t[u++],
  2834. h = s = t[u++];
  2835. var x = l + t[u++]
  2836. , _ = h + t[u++];
  2837. if (i) {
  2838. if (xn(l, h, x, h, e, n, o) || xn(x, h, x, _, e, n, o) || xn(x, _, l, _, e, n, o) || xn(l, _, l, h, e, n, o))
  2839. return !0
  2840. } else
  2841. a += Mn(x, h, x, _, n, o),
  2842. a += Mn(l, _, l, h, n, o);
  2843. break;
  2844. case I_.Z:
  2845. if (i) {
  2846. if (xn(r, s, l, h, e, n, o))
  2847. return !0
  2848. } else
  2849. a += Mn(r, s, l, h, n, o);
  2850. r = l,
  2851. s = h
  2852. }
  2853. }
  2854. return i || In(s, h) || (a += Mn(r, s, l, h, n, o) || 0),
  2855. 0 !== a
  2856. }
  2857. function kn(t, e, i) {
  2858. return Ln(t, 0, !1, e, i)
  2859. }
  2860. function Pn(t, e, i, n) {
  2861. return Ln(t, e, !0, i, n)
  2862. }
  2863. function On(t) {
  2864. Ue.call(this, t),
  2865. this.path = null
  2866. }
  2867. function zn(t, e, i, n, o, a, r, s, l, h, u) {
  2868. var c = l * (eb / 180)
  2869. , d = tb(c) * (t - i) / 2 + Q_(c) * (e - n) / 2
  2870. , f = -1 * Q_(c) * (t - i) / 2 + tb(c) * (e - n) / 2
  2871. , g = d * d / (r * r) + f * f / (s * s);
  2872. g > 1 && (r *= J_(g),
  2873. s *= J_(g));
  2874. var p = (o === a ? -1 : 1) * J_((r * r * (s * s) - r * r * (f * f) - s * s * (d * d)) / (r * r * (f * f) + s * s * (d * d))) || 0
  2875. , m = p * r * f / s
  2876. , v = p * -s * d / r
  2877. , y = (t + i) / 2 + tb(c) * m - Q_(c) * v
  2878. , x = (e + n) / 2 + Q_(c) * m + tb(c) * v
  2879. , _ = ob([1, 0], [(d - m) / r, (f - v) / s])
  2880. , b = [(d - m) / r, (f - v) / s]
  2881. , w = [(-1 * d - m) / r, (-1 * f - v) / s]
  2882. , S = ob(b, w);
  2883. nb(b, w) <= -1 && (S = eb),
  2884. nb(b, w) >= 1 && (S = 0),
  2885. 0 === a && S > 0 && (S -= 2 * eb),
  2886. 1 === a && S < 0 && (S += 2 * eb),
  2887. u.addData(h, y, x, r, s, _, S, c, a)
  2888. }
  2889. function Nn(t) {
  2890. if (!t)
  2891. return [];
  2892. var e, i = t.replace(/-/g, " -").replace(/ /g, " ").replace(/ /g, ",").replace(/,,/g, ",");
  2893. for (e = 0; e < K_.length; e++)
  2894. i = i.replace(new RegExp(K_[e],"g"), "|" + K_[e]);
  2895. var n, o = i.split("|"), a = 0, r = 0, s = new R_, l = R_.CMD;
  2896. for (e = 1; e < o.length; e++) {
  2897. var h, u = o[e], c = u.charAt(0), d = 0, f = u.slice(1).replace(/e,-/g, "e-").split(",");
  2898. f.length > 0 && "" === f[0] && f.shift();
  2899. for (var g = 0; g < f.length; g++)
  2900. f[g] = parseFloat(f[g]);
  2901. for (; d < f.length && !isNaN(f[d]) && !isNaN(f[0]); ) {
  2902. var p, m, v, y, x, _, b, w = a, S = r;
  2903. switch (c) {
  2904. case "l":
  2905. a += f[d++],
  2906. r += f[d++],
  2907. h = l.L,
  2908. s.addData(h, a, r);
  2909. break;
  2910. case "L":
  2911. a = f[d++],
  2912. r = f[d++],
  2913. h = l.L,
  2914. s.addData(h, a, r);
  2915. break;
  2916. case "m":
  2917. a += f[d++],
  2918. r += f[d++],
  2919. h = l.M,
  2920. s.addData(h, a, r),
  2921. c = "l";
  2922. break;
  2923. case "M":
  2924. a = f[d++],
  2925. r = f[d++],
  2926. h = l.M,
  2927. s.addData(h, a, r),
  2928. c = "L";
  2929. break;
  2930. case "h":
  2931. a += f[d++],
  2932. h = l.L,
  2933. s.addData(h, a, r);
  2934. break;
  2935. case "H":
  2936. a = f[d++],
  2937. h = l.L,
  2938. s.addData(h, a, r);
  2939. break;
  2940. case "v":
  2941. r += f[d++],
  2942. h = l.L,
  2943. s.addData(h, a, r);
  2944. break;
  2945. case "V":
  2946. r = f[d++],
  2947. h = l.L,
  2948. s.addData(h, a, r);
  2949. break;
  2950. case "C":
  2951. h = l.C,
  2952. s.addData(h, f[d++], f[d++], f[d++], f[d++], f[d++], f[d++]),
  2953. a = f[d - 2],
  2954. r = f[d - 1];
  2955. break;
  2956. case "c":
  2957. h = l.C,
  2958. s.addData(h, f[d++] + a, f[d++] + r, f[d++] + a, f[d++] + r, f[d++] + a, f[d++] + r),
  2959. a += f[d - 2],
  2960. r += f[d - 1];
  2961. break;
  2962. case "S":
  2963. p = a,
  2964. m = r;
  2965. var M = s.len()
  2966. , I = s.data;
  2967. n === l.C && (p += a - I[M - 4],
  2968. m += r - I[M - 3]),
  2969. h = l.C,
  2970. w = f[d++],
  2971. S = f[d++],
  2972. a = f[d++],
  2973. r = f[d++],
  2974. s.addData(h, p, m, w, S, a, r);
  2975. break;
  2976. case "s":
  2977. p = a,
  2978. m = r;
  2979. var M = s.len()
  2980. , I = s.data;
  2981. n === l.C && (p += a - I[M - 4],
  2982. m += r - I[M - 3]),
  2983. h = l.C,
  2984. w = a + f[d++],
  2985. S = r + f[d++],
  2986. a += f[d++],
  2987. r += f[d++],
  2988. s.addData(h, p, m, w, S, a, r);
  2989. break;
  2990. case "Q":
  2991. w = f[d++],
  2992. S = f[d++],
  2993. a = f[d++],
  2994. r = f[d++],
  2995. h = l.Q,
  2996. s.addData(h, w, S, a, r);
  2997. break;
  2998. case "q":
  2999. w = f[d++] + a,
  3000. S = f[d++] + r,
  3001. a += f[d++],
  3002. r += f[d++],
  3003. h = l.Q,
  3004. s.addData(h, w, S, a, r);
  3005. break;
  3006. case "T":
  3007. p = a,
  3008. m = r;
  3009. var M = s.len()
  3010. , I = s.data;
  3011. n === l.Q && (p += a - I[M - 4],
  3012. m += r - I[M - 3]),
  3013. a = f[d++],
  3014. r = f[d++],
  3015. h = l.Q,
  3016. s.addData(h, p, m, a, r);
  3017. break;
  3018. case "t":
  3019. p = a,
  3020. m = r;
  3021. var M = s.len()
  3022. , I = s.data;
  3023. n === l.Q && (p += a - I[M - 4],
  3024. m += r - I[M - 3]),
  3025. a += f[d++],
  3026. r += f[d++],
  3027. h = l.Q,
  3028. s.addData(h, p, m, a, r);
  3029. break;
  3030. case "A":
  3031. v = f[d++],
  3032. y = f[d++],
  3033. x = f[d++],
  3034. _ = f[d++],
  3035. b = f[d++],
  3036. zn(w = a, S = r, a = f[d++], r = f[d++], _, b, v, y, x, h = l.A, s);
  3037. break;
  3038. case "a":
  3039. v = f[d++],
  3040. y = f[d++],
  3041. x = f[d++],
  3042. _ = f[d++],
  3043. b = f[d++],
  3044. zn(w = a, S = r, a += f[d++], r += f[d++], _, b, v, y, x, h = l.A, s)
  3045. }
  3046. }
  3047. "z" !== c && "Z" !== c || (h = l.Z,
  3048. s.addData(h)),
  3049. n = h
  3050. }
  3051. return s.toStatic(),
  3052. s
  3053. }
  3054. function En(t, e) {
  3055. var i = Nn(t);
  3056. return e = e || {},
  3057. e.buildPath = function(t) {
  3058. if (t.setData)
  3059. t.setData(i.data),
  3060. (e = t.getContext()) && t.rebuildPath(e);
  3061. else {
  3062. var e = t;
  3063. i.rebuildPath(e)
  3064. }
  3065. }
  3066. ,
  3067. e.applyTransform = function(t) {
  3068. $_(i, t),
  3069. this.dirty(!0)
  3070. }
  3071. ,
  3072. e
  3073. }
  3074. function Rn(t, e) {
  3075. return new On(En(t, e))
  3076. }
  3077. function Vn(t, e) {
  3078. return On.extend(En(t, e))
  3079. }
  3080. function Bn(t, e, i, n, o, a, r) {
  3081. var s = .5 * (i - t)
  3082. , l = .5 * (n - e);
  3083. return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e
  3084. }
  3085. function Gn(t, e, i) {
  3086. var n = e.points
  3087. , o = e.smooth;
  3088. if (n && n.length >= 2) {
  3089. if (o && "spline" !== o) {
  3090. var a = db(n, o, i, e.smoothConstraint);
  3091. t.moveTo(n[0][0], n[0][1]);
  3092. for (var r = n.length, s = 0; s < (i ? r : r - 1); s++) {
  3093. var l = a[2 * s]
  3094. , h = a[2 * s + 1]
  3095. , u = n[(s + 1) % r];
  3096. t.bezierCurveTo(l[0], l[1], h[0], h[1], u[0], u[1])
  3097. }
  3098. } else {
  3099. "spline" === o && (n = cb(n, i)),
  3100. t.moveTo(n[0][0], n[0][1]);
  3101. for (var s = 1, c = n.length; s < c; s++)
  3102. t.lineTo(n[s][0], n[s][1])
  3103. }
  3104. i && t.closePath()
  3105. }
  3106. }
  3107. function Wn(t, e, i) {
  3108. var n = t.cpx2
  3109. , o = t.cpy2;
  3110. return null === n || null === o ? [(i ? nn : en)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? nn : en)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(i ? hn : ln)(t.x1, t.cpx1, t.x2, e), (i ? hn : ln)(t.y1, t.cpy1, t.y2, e)]
  3111. }
  3112. function Hn(t) {
  3113. return On.extend(t)
  3114. }
  3115. function Fn(t, e, i, n) {
  3116. var o = Rn(t, e)
  3117. , a = o.getBoundingRect();
  3118. return i && ("center" === n && (i = Un(i, a)),
  3119. jn(o, i)),
  3120. o
  3121. }
  3122. function Zn(t, e, i) {
  3123. var n = new je({
  3124. style: {
  3125. image: t,
  3126. x: e.x,
  3127. y: e.y,
  3128. width: e.width,
  3129. height: e.height
  3130. },
  3131. onload: function(t) {
  3132. if ("center" === i) {
  3133. var o = {
  3134. width: t.width,
  3135. height: t.height
  3136. };
  3137. n.setStyle(Un(e, o))
  3138. }
  3139. }
  3140. });
  3141. return n
  3142. }
  3143. function Un(t, e) {
  3144. var i, n = e.width / e.height, o = t.height * n;
  3145. return i = o <= t.width ? t.height : (o = t.width) / n,
  3146. {
  3147. x: t.x + t.width / 2 - o / 2,
  3148. y: t.y + t.height / 2 - i / 2,
  3149. width: o,
  3150. height: i
  3151. }
  3152. }
  3153. function jn(t, e) {
  3154. if (t.applyTransform) {
  3155. var i = t.getBoundingRect().calculateTransform(e);
  3156. t.applyTransform(i)
  3157. }
  3158. }
  3159. function Xn(t) {
  3160. var e = t.shape
  3161. , i = t.style.lineWidth;
  3162. return Mb(2 * e.x1) === Mb(2 * e.x2) && (e.x1 = e.x2 = Yn(e.x1, i, !0)),
  3163. Mb(2 * e.y1) === Mb(2 * e.y2) && (e.y1 = e.y2 = Yn(e.y1, i, !0)),
  3164. t
  3165. }
  3166. function qn(t) {
  3167. var e = t.shape
  3168. , i = t.style.lineWidth
  3169. , n = e.x
  3170. , o = e.y
  3171. , a = e.width
  3172. , r = e.height;
  3173. return e.x = Yn(e.x, i, !0),
  3174. e.y = Yn(e.y, i, !0),
  3175. e.width = Math.max(Yn(n + a, i, !1) - e.x, 0 === a ? 0 : 1),
  3176. e.height = Math.max(Yn(o + r, i, !1) - e.y, 0 === r ? 0 : 1),
  3177. t
  3178. }
  3179. function Yn(t, e, i) {
  3180. var n = Mb(2 * t);
  3181. return (n + Mb(e)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2
  3182. }
  3183. function $n(t) {
  3184. return null != t && "none" != t
  3185. }
  3186. function Kn(t) {
  3187. return "string" == typeof t ? Tt(t, -.1) : t
  3188. }
  3189. function Jn(t) {
  3190. if (t.__hoverStlDirty) {
  3191. var e = t.style.stroke
  3192. , i = t.style.fill
  3193. , n = t.__hoverStl;
  3194. n.fill = n.fill || ($n(i) ? Kn(i) : null),
  3195. n.stroke = n.stroke || ($n(e) ? Kn(e) : null);
  3196. var o = {};
  3197. for (var a in n)
  3198. null != n[a] && (o[a] = t.style[a]);
  3199. t.__normalStl = o,
  3200. t.__hoverStlDirty = !1
  3201. }
  3202. }
  3203. function Qn(t) {
  3204. if (!t.__isHover) {
  3205. if (Jn(t),
  3206. t.useHoverLayer)
  3207. t.__zr && t.__zr.addHover(t, t.__hoverStl);
  3208. else {
  3209. var e = t.style
  3210. , i = e.insideRollbackOpt;
  3211. i && vo(e),
  3212. e.extendFrom(t.__hoverStl),
  3213. i && (mo(e, e.insideOriginalTextPosition, i),
  3214. null == e.textFill && (e.textFill = i.autoColor)),
  3215. t.dirty(!1),
  3216. t.z2 += 1
  3217. }
  3218. t.__isHover = !0
  3219. }
  3220. }
  3221. function to(t) {
  3222. if (t.__isHover) {
  3223. var e = t.__normalStl;
  3224. t.useHoverLayer ? t.__zr && t.__zr.removeHover(t) : (e && t.setStyle(e),
  3225. t.z2 -= 1),
  3226. t.__isHover = !1
  3227. }
  3228. }
  3229. function eo(t) {
  3230. "group" === t.type ? t.traverse(function(t) {
  3231. "group" !== t.type && Qn(t)
  3232. }) : Qn(t)
  3233. }
  3234. function io(t) {
  3235. "group" === t.type ? t.traverse(function(t) {
  3236. "group" !== t.type && to(t)
  3237. }) : to(t)
  3238. }
  3239. function no(t, e) {
  3240. t.__hoverStl = t.hoverStyle || e || {},
  3241. t.__hoverStlDirty = !0,
  3242. t.__isHover && Jn(t)
  3243. }
  3244. function oo(t) {
  3245. this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasis && eo(this)
  3246. }
  3247. function ao(t) {
  3248. this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasis && io(this)
  3249. }
  3250. function ro() {
  3251. this.__isEmphasis = !0,
  3252. eo(this)
  3253. }
  3254. function so() {
  3255. this.__isEmphasis = !1,
  3256. io(this)
  3257. }
  3258. function lo(t, e, i) {
  3259. t.__hoverSilentOnTouch = i && i.hoverSilentOnTouch,
  3260. "group" === t.type ? t.traverse(function(t) {
  3261. "group" !== t.type && no(t, e)
  3262. }) : no(t, e),
  3263. t.on("mouseover", oo).on("mouseout", ao),
  3264. t.on("emphasis", ro).on("normal", so)
  3265. }
  3266. function ho(t, e, i, n, o, a, r) {
  3267. var s = (o = o || Ab).labelFetcher
  3268. , l = o.labelDataIndex
  3269. , h = o.labelDimIndex
  3270. , u = i.getShallow("show")
  3271. , c = n.getShallow("show")
  3272. , d = u || c ? I(s ? s.getFormattedLabel(l, "normal", null, h) : null, o.defaultText) : null
  3273. , f = u ? d : null
  3274. , g = c ? I(s ? s.getFormattedLabel(l, "emphasis", null, h) : null, d) : null;
  3275. null == f && null == g || (uo(t, i, a, o),
  3276. uo(e, n, r, o, !0)),
  3277. t.text = f,
  3278. e.text = g
  3279. }
  3280. function uo(t, e, i, n, a) {
  3281. return co(t, e, n, a),
  3282. i && o(t, i),
  3283. t.host && t.host.dirty && t.host.dirty(!1),
  3284. t
  3285. }
  3286. function co(t, e, i, n) {
  3287. if ((i = i || Ab).isRectText) {
  3288. var o = e.getShallow("position") || (n ? null : "inside");
  3289. "outside" === o && (o = "top"),
  3290. t.textPosition = o,
  3291. t.textOffset = e.getShallow("offset");
  3292. var a = e.getShallow("rotate");
  3293. null != a && (a *= Math.PI / 180),
  3294. t.textRotation = a,
  3295. t.textDistance = I(e.getShallow("distance"), n ? null : 5)
  3296. }
  3297. var r, s = e.ecModel, l = s && s.option.textStyle, h = fo(e);
  3298. if (h) {
  3299. r = {};
  3300. for (var u in h)
  3301. if (h.hasOwnProperty(u)) {
  3302. var c = e.getModel(["rich", u]);
  3303. go(r[u] = {}, c, l, i, n)
  3304. }
  3305. }
  3306. return t.rich = r,
  3307. go(t, e, l, i, n, !0),
  3308. i.forceRich && !i.textStyle && (i.textStyle = {}),
  3309. t
  3310. }
  3311. function fo(t) {
  3312. for (var e; t && t !== t.ecModel; ) {
  3313. var i = (t.option || Ab).rich;
  3314. if (i) {
  3315. e = e || {};
  3316. for (var n in i)
  3317. i.hasOwnProperty(n) && (e[n] = 1)
  3318. }
  3319. t = t.parentModel
  3320. }
  3321. return e
  3322. }
  3323. function go(t, e, i, n, o, a) {
  3324. if (i = !o && i || Ab,
  3325. t.textFill = po(e.getShallow("color"), n) || i.color,
  3326. t.textStroke = po(e.getShallow("textBorderColor"), n) || i.textBorderColor,
  3327. t.textStrokeWidth = I(e.getShallow("textBorderWidth"), i.textBorderWidth),
  3328. !o) {
  3329. if (a) {
  3330. var r = t.textPosition;
  3331. t.insideRollback = mo(t, r, n),
  3332. t.insideOriginalTextPosition = r,
  3333. t.insideRollbackOpt = n
  3334. }
  3335. null == t.textFill && (t.textFill = n.autoColor)
  3336. }
  3337. t.fontStyle = e.getShallow("fontStyle") || i.fontStyle,
  3338. t.fontWeight = e.getShallow("fontWeight") || i.fontWeight,
  3339. t.fontSize = e.getShallow("fontSize") || i.fontSize,
  3340. t.fontFamily = e.getShallow("fontFamily") || i.fontFamily,
  3341. t.textAlign = e.getShallow("align"),
  3342. t.textVerticalAlign = e.getShallow("verticalAlign") || e.getShallow("baseline"),
  3343. t.textLineHeight = e.getShallow("lineHeight"),
  3344. t.textWidth = e.getShallow("width"),
  3345. t.textHeight = e.getShallow("height"),
  3346. t.textTag = e.getShallow("tag"),
  3347. a && n.disableBox || (t.textBackgroundColor = po(e.getShallow("backgroundColor"), n),
  3348. t.textPadding = e.getShallow("padding"),
  3349. t.textBorderColor = po(e.getShallow("borderColor"), n),
  3350. t.textBorderWidth = e.getShallow("borderWidth"),
  3351. t.textBorderRadius = e.getShallow("borderRadius"),
  3352. t.textBoxShadowColor = e.getShallow("shadowColor"),
  3353. t.textBoxShadowBlur = e.getShallow("shadowBlur"),
  3354. t.textBoxShadowOffsetX = e.getShallow("shadowOffsetX"),
  3355. t.textBoxShadowOffsetY = e.getShallow("shadowOffsetY")),
  3356. t.textShadowColor = e.getShallow("textShadowColor") || i.textShadowColor,
  3357. t.textShadowBlur = e.getShallow("textShadowBlur") || i.textShadowBlur,
  3358. t.textShadowOffsetX = e.getShallow("textShadowOffsetX") || i.textShadowOffsetX,
  3359. t.textShadowOffsetY = e.getShallow("textShadowOffsetY") || i.textShadowOffsetY
  3360. }
  3361. function po(t, e) {
  3362. return "auto" !== t ? t : e && e.autoColor ? e.autoColor : null
  3363. }
  3364. function mo(t, e, i) {
  3365. var n, o = i.useInsideStyle;
  3366. return null == t.textFill && !1 !== o && (!0 === o || i.isRectText && e && "string" == typeof e && e.indexOf("inside") >= 0) && (n = {
  3367. textFill: null,
  3368. textStroke: t.textStroke,
  3369. textStrokeWidth: t.textStrokeWidth
  3370. },
  3371. t.textFill = "#fff",
  3372. null == t.textStroke && (t.textStroke = i.autoColor,
  3373. null == t.textStrokeWidth && (t.textStrokeWidth = 2))),
  3374. n
  3375. }
  3376. function vo(t) {
  3377. var e = t.insideRollback;
  3378. e && (t.textFill = e.textFill,
  3379. t.textStroke = e.textStroke,
  3380. t.textStrokeWidth = e.textStrokeWidth)
  3381. }
  3382. function yo(t, e) {
  3383. var i = e || e.getModel("textStyle");
  3384. return [t.fontStyle || i && i.getShallow("fontStyle") || "", t.fontWeight || i && i.getShallow("fontWeight") || "", (t.fontSize || i && i.getShallow("fontSize") || 12) + "px", t.fontFamily || i && i.getShallow("fontFamily") || "sans-serif"].join(" ")
  3385. }
  3386. function xo(t, e, i, n, o, a) {
  3387. if ("function" == typeof o && (a = o,
  3388. o = null),
  3389. n && n.isAnimationEnabled()) {
  3390. var r = t ? "Update" : ""
  3391. , s = n.getShallow("animationDuration" + r)
  3392. , l = n.getShallow("animationEasing" + r)
  3393. , h = n.getShallow("animationDelay" + r);
  3394. "function" == typeof h && (h = h(o, n.getAnimationDelayParams ? n.getAnimationDelayParams(e, o) : null)),
  3395. "function" == typeof s && (s = s(o)),
  3396. s > 0 ? e.animateTo(i, s, h || 0, l, a, !!a) : (e.stopAnimation(),
  3397. e.attr(i),
  3398. a && a())
  3399. } else
  3400. e.stopAnimation(),
  3401. e.attr(i),
  3402. a && a()
  3403. }
  3404. function _o(t, e, i, n, o) {
  3405. xo(!0, t, e, i, n, o)
  3406. }
  3407. function bo(t, e, i, n, o) {
  3408. xo(!1, t, e, i, n, o)
  3409. }
  3410. function wo(t, e) {
  3411. for (var i = ot([]); t && t !== e; )
  3412. rt(i, t.getLocalTransform(), i),
  3413. t = t.parent;
  3414. return i
  3415. }
  3416. function So(t, e, i) {
  3417. return e && !u(e) && (e = My.getLocalTransform(e)),
  3418. i && (e = ut([], e)),
  3419. Y([], t, e)
  3420. }
  3421. function Mo(t, e, i) {
  3422. var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0])
  3423. , o = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2])
  3424. , a = ["left" === t ? -n : "right" === t ? n : 0, "top" === t ? -o : "bottom" === t ? o : 0];
  3425. return a = So(a, e, i),
  3426. Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top"
  3427. }
  3428. function Io(t, e, i, n) {
  3429. function a(t) {
  3430. var e = {
  3431. position: R(t.position),
  3432. rotation: t.rotation
  3433. };
  3434. return t.shape && (e.shape = o({}, t.shape)),
  3435. e
  3436. }
  3437. if (t && e) {
  3438. var r = function(t) {
  3439. var e = {};
  3440. return t.traverse(function(t) {
  3441. !t.isGroup && t.anid && (e[t.anid] = t)
  3442. }),
  3443. e
  3444. }(t);
  3445. e.traverse(function(t) {
  3446. if (!t.isGroup && t.anid) {
  3447. var e = r[t.anid];
  3448. if (e) {
  3449. var n = a(t);
  3450. t.attr(a(e)),
  3451. _o(t, n, i, t.dataIndex)
  3452. }
  3453. }
  3454. })
  3455. }
  3456. }
  3457. function To(t, e) {
  3458. return d(t, function(t) {
  3459. var i = t[0];
  3460. i = Ib(i, e.x),
  3461. i = Tb(i, e.x + e.width);
  3462. var n = t[1];
  3463. return n = Ib(n, e.y),
  3464. n = Tb(n, e.y + e.height),
  3465. [i, n]
  3466. })
  3467. }
  3468. function Ao(t, e, i) {
  3469. var n = (e = o({
  3470. rectHover: !0
  3471. }, e)).style = {
  3472. strokeNoScale: !0
  3473. };
  3474. if (i = i || {
  3475. x: -1,
  3476. y: -1,
  3477. width: 2,
  3478. height: 2
  3479. },
  3480. t)
  3481. return 0 === t.indexOf("image://") ? (n.image = t.slice(8),
  3482. a(n, i),
  3483. new je(e)) : Fn(t.replace("path://", ""), e, i, "center")
  3484. }
  3485. function Co(t, e, i) {
  3486. this.parentModel = e,
  3487. this.ecModel = i,
  3488. this.option = t
  3489. }
  3490. function Do(t, e, i) {
  3491. for (var n = 0; n < e.length && (!e[n] || null != (t = t && "object" == typeof t ? t[e[n]] : null)); n++)
  3492. ;
  3493. return null == t && i && (t = i.get(e)),
  3494. t
  3495. }
  3496. function Lo(t, e) {
  3497. var i = Ui(t, "getParent");
  3498. return i ? i.call(t, e) : t.parentModel
  3499. }
  3500. function ko(t) {
  3501. return t instanceof Array ? t : null == t ? [] : [t]
  3502. }
  3503. function Po(t, e) {
  3504. if (t)
  3505. for (var i = t.emphasis = t.emphasis || {}, n = t.normal = t.normal || {}, o = 0, a = e.length; o < a; o++) {
  3506. var r = e[o];
  3507. !i.hasOwnProperty(r) && n.hasOwnProperty(r) && (i[r] = n[r])
  3508. }
  3509. }
  3510. function Oo(t) {
  3511. return t && (null == t.value ? t : t.value)
  3512. }
  3513. function zo(t) {
  3514. return Eb(t) && !(t instanceof Array)
  3515. }
  3516. function No(t, e) {
  3517. var i = e && e.type;
  3518. return "ordinal" === i ? t : ("time" === i && "number" != typeof t && null != t && "-" !== t && (t = +Li(t)),
  3519. null == t || "" === t ? NaN : +t)
  3520. }
  3521. function Eo(t, e) {
  3522. e = (e || []).slice();
  3523. var i = d(t || [], function(t, e) {
  3524. return {
  3525. exist: t
  3526. }
  3527. });
  3528. return Nb(e, function(t, n) {
  3529. if (Eb(t)) {
  3530. for (o = 0; o < i.length; o++)
  3531. if (!i[o].option && null != t.id && i[o].exist.id === t.id + "")
  3532. return i[o].option = t,
  3533. void (e[n] = null);
  3534. for (var o = 0; o < i.length; o++) {
  3535. var a = i[o].exist;
  3536. if (!(i[o].option || null != a.id && null != t.id || null == t.name || Vo(t) || Vo(a) || a.name !== t.name + ""))
  3537. return i[o].option = t,
  3538. void (e[n] = null)
  3539. }
  3540. }
  3541. }),
  3542. Nb(e, function(t, e) {
  3543. if (Eb(t)) {
  3544. for (var n = 0; n < i.length; n++) {
  3545. var o = i[n].exist;
  3546. if (!i[n].option && !Vo(o) && null == t.id) {
  3547. i[n].option = t;
  3548. break
  3549. }
  3550. }
  3551. n >= i.length && i.push({
  3552. option: t
  3553. })
  3554. }
  3555. }),
  3556. i
  3557. }
  3558. function Ro(t) {
  3559. var e = O();
  3560. Nb(t, function(t, i) {
  3561. var n = t.exist;
  3562. n && e.set(n.id, t)
  3563. }),
  3564. Nb(t, function(t, i) {
  3565. var n = t.option;
  3566. D(!n || null == n.id || !e.get(n.id) || e.get(n.id) === t, "id duplicates: " + (n && n.id)),
  3567. n && null != n.id && e.set(n.id, t),
  3568. !t.keyInfo && (t.keyInfo = {})
  3569. }),
  3570. Nb(t, function(t, i) {
  3571. var n = t.exist
  3572. , o = t.option
  3573. , a = t.keyInfo;
  3574. if (Eb(o)) {
  3575. if (a.name = null != o.name ? o.name + "" : n ? n.name : "\0-",
  3576. n)
  3577. a.id = n.id;
  3578. else if (null != o.id)
  3579. a.id = o.id + "";
  3580. else {
  3581. var r = 0;
  3582. do {
  3583. a.id = "\0" + a.name + "\0" + r++
  3584. } while (e.get(a.id))
  3585. }
  3586. e.set(a.id, t)
  3587. }
  3588. })
  3589. }
  3590. function Vo(t) {
  3591. return Eb(t) && t.id && 0 === (t.id + "").indexOf("\0_ec_\0")
  3592. }
  3593. function Bo(t, e) {
  3594. function i(t, e, i) {
  3595. for (var n = 0, o = t.length; n < o; n++)
  3596. for (var a = t[n].seriesId, r = ko(t[n].dataIndex), s = i && i[a], l = 0, h = r.length; l < h; l++) {
  3597. var u = r[l];
  3598. s && s[u] ? s[u] = null : (e[a] || (e[a] = {}))[u] = 1
  3599. }
  3600. }
  3601. function n(t, e) {
  3602. var i = [];
  3603. for (var o in t)
  3604. if (t.hasOwnProperty(o) && null != t[o])
  3605. if (e)
  3606. i.push(+o);
  3607. else {
  3608. var a = n(t[o], !0);
  3609. a.length && i.push({
  3610. seriesId: o,
  3611. dataIndex: a
  3612. })
  3613. }
  3614. return i
  3615. }
  3616. var o = {}
  3617. , a = {};
  3618. return i(t || [], o),
  3619. i(e || [], a, o),
  3620. [n(o), n(a)]
  3621. }
  3622. function Go(t, e) {
  3623. return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? v(e.dataIndex) ? d(e.dataIndex, function(e) {
  3624. return t.indexOfRawIndex(e)
  3625. }) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? v(e.name) ? d(e.name, function(e) {
  3626. return t.indexOfName(e)
  3627. }) : t.indexOfName(e.name) : void 0
  3628. }
  3629. function Wo(t, e, i) {
  3630. if (x(e)) {
  3631. var n = {};
  3632. n[e + "Index"] = 0,
  3633. e = n
  3634. }
  3635. var o = i && i.defaultMainType;
  3636. !o || Uo(e, o + "Index") || Uo(e, o + "Id") || Uo(e, o + "Name") || (e[o + "Index"] = 0);
  3637. var a = {};
  3638. return Nb(e, function(n, o) {
  3639. var n = e[o];
  3640. if ("dataIndex" !== o && "dataIndexInside" !== o) {
  3641. var r = o.match(/^(\w+)(Index|Id|Name)$/) || []
  3642. , l = r[1]
  3643. , h = (r[2] || "").toLowerCase();
  3644. if (!(!l || !h || null == n || "index" === h && "none" === n || i && i.includeMainTypes && s(i.includeMainTypes, l) < 0)) {
  3645. var u = {
  3646. mainType: l
  3647. };
  3648. "index" === h && "all" === n || (u[h] = n);
  3649. var c = t.queryComponents(u);
  3650. a[l + "Models"] = c,
  3651. a[l + "Model"] = c[0]
  3652. }
  3653. } else
  3654. a[o] = n
  3655. }),
  3656. a
  3657. }
  3658. function Ho(t, e) {
  3659. var i = t.dimensions;
  3660. e = t.getDimension(e);
  3661. for (var n = 0; n < i.length; n++) {
  3662. var o = t.getDimensionInfo(i[n]);
  3663. if (o.name === e)
  3664. return o.coordDim
  3665. }
  3666. }
  3667. function Fo(t, e) {
  3668. var i = [];
  3669. return Nb(t.dimensions, function(n) {
  3670. var o = t.getDimensionInfo(n);
  3671. o.coordDim === e && (i[o.coordDimIndex] = o.name)
  3672. }),
  3673. i
  3674. }
  3675. function Zo(t, e) {
  3676. var i = [];
  3677. return Nb(t.dimensions, function(n) {
  3678. var o = t.getDimensionInfo(n)
  3679. , a = o.otherDims[e];
  3680. null != a && !1 !== a && (i[a] = o.name)
  3681. }),
  3682. i
  3683. }
  3684. function Uo(t, e) {
  3685. return t && t.hasOwnProperty(e)
  3686. }
  3687. function jo(t) {
  3688. return [t || "", Gb++, Math.random()].join(Wb)
  3689. }
  3690. function Xo(t, e, i, n, o) {
  3691. var a = 0
  3692. , r = 0;
  3693. null == n && (n = 1 / 0),
  3694. null == o && (o = 1 / 0);
  3695. var s = 0;
  3696. e.eachChild(function(l, h) {
  3697. var u, c, d = l.position, f = l.getBoundingRect(), g = e.childAt(h + 1), p = g && g.getBoundingRect();
  3698. if ("horizontal" === t) {
  3699. var m = f.width + (p ? -p.x + f.x : 0);
  3700. (u = a + m) > n || l.newline ? (a = 0,
  3701. u = m,
  3702. r += s + i,
  3703. s = f.height) : s = Math.max(s, f.height)
  3704. } else {
  3705. var v = f.height + (p ? -p.y + f.y : 0);
  3706. (c = r + v) > o || l.newline ? (a += s + i,
  3707. r = 0,
  3708. c = v,
  3709. s = f.width) : s = Math.max(s, f.width)
  3710. }
  3711. l.newline || (d[0] = a,
  3712. d[1] = r,
  3713. "horizontal" === t ? a = u + i : r = c + i)
  3714. })
  3715. }
  3716. function qo(t, e, i) {
  3717. var n = e.width
  3718. , o = e.height
  3719. , a = bi(t.x, n)
  3720. , r = bi(t.y, o)
  3721. , s = bi(t.x2, n)
  3722. , l = bi(t.y2, o);
  3723. return (isNaN(a) || isNaN(parseFloat(t.x))) && (a = 0),
  3724. (isNaN(s) || isNaN(parseFloat(t.x2))) && (s = n),
  3725. (isNaN(r) || isNaN(parseFloat(t.y))) && (r = 0),
  3726. (isNaN(l) || isNaN(parseFloat(t.y2))) && (l = o),
  3727. i = Ux(i || 0),
  3728. {
  3729. width: Math.max(s - a - i[1] - i[3], 0),
  3730. height: Math.max(l - r - i[0] - i[2], 0)
  3731. }
  3732. }
  3733. function Yo(t, e, i) {
  3734. i = Ux(i || 0);
  3735. var n = e.width
  3736. , o = e.height
  3737. , a = bi(t.left, n)
  3738. , r = bi(t.top, o)
  3739. , s = bi(t.right, n)
  3740. , l = bi(t.bottom, o)
  3741. , h = bi(t.width, n)
  3742. , u = bi(t.height, o)
  3743. , c = i[2] + i[0]
  3744. , d = i[1] + i[3]
  3745. , f = t.aspect;
  3746. switch (isNaN(h) && (h = n - s - d - a),
  3747. isNaN(u) && (u = o - l - c - r),
  3748. null != f && (isNaN(h) && isNaN(u) && (f > n / o ? h = .8 * n : u = .8 * o),
  3749. isNaN(h) && (h = f * u),
  3750. isNaN(u) && (u = h / f)),
  3751. isNaN(a) && (a = n - s - h - d),
  3752. isNaN(r) && (r = o - l - u - c),
  3753. t.left || t.right) {
  3754. case "center":
  3755. a = n / 2 - h / 2 - i[3];
  3756. break;
  3757. case "right":
  3758. a = n - h - d
  3759. }
  3760. switch (t.top || t.bottom) {
  3761. case "middle":
  3762. case "center":
  3763. r = o / 2 - u / 2 - i[0];
  3764. break;
  3765. case "bottom":
  3766. r = o - u - c
  3767. }
  3768. a = a || 0,
  3769. r = r || 0,
  3770. isNaN(h) && (h = n - d - a - (s || 0)),
  3771. isNaN(u) && (u = o - c - r - (l || 0));
  3772. var g = new jt(a + i[3],r + i[0],h,u);
  3773. return g.margin = i,
  3774. g
  3775. }
  3776. function $o(t, e, i, n, o) {
  3777. var r = !o || !o.hv || o.hv[0]
  3778. , s = !o || !o.hv || o.hv[1]
  3779. , l = o && o.boundingMode || "all";
  3780. if (r || s) {
  3781. var h;
  3782. if ("raw" === l)
  3783. h = "group" === t.type ? new jt(0,0,+e.width || 0,+e.height || 0) : t.getBoundingRect();
  3784. else if (h = t.getBoundingRect(),
  3785. t.needLocalTransform()) {
  3786. var u = t.getLocalTransform();
  3787. (h = h.clone()).applyTransform(u)
  3788. }
  3789. e = Yo(a({
  3790. width: h.width,
  3791. height: h.height
  3792. }, e), i, n);
  3793. var c = t.position
  3794. , d = r ? e.x - h.x : 0
  3795. , f = s ? e.y - h.y : 0;
  3796. t.attr("position", "raw" === l ? [d, f] : [c[0] + d, c[1] + f])
  3797. }
  3798. }
  3799. function Ko(t, e) {
  3800. return null != t[Zb[e][0]] || null != t[Zb[e][1]] && null != t[Zb[e][2]]
  3801. }
  3802. function Jo(t, e, i) {
  3803. function n(i, n) {
  3804. var r = {}
  3805. , l = 0
  3806. , h = {}
  3807. , u = 0;
  3808. if (Hb(i, function(e) {
  3809. h[e] = t[e]
  3810. }),
  3811. Hb(i, function(t) {
  3812. o(e, t) && (r[t] = h[t] = e[t]),
  3813. a(r, t) && l++,
  3814. a(h, t) && u++
  3815. }),
  3816. s[n])
  3817. return a(e, i[1]) ? h[i[2]] = null : a(e, i[2]) && (h[i[1]] = null),
  3818. h;
  3819. if (2 !== u && l) {
  3820. if (l >= 2)
  3821. return r;
  3822. for (var c = 0; c < i.length; c++) {
  3823. var d = i[c];
  3824. if (!o(r, d) && o(t, d)) {
  3825. r[d] = t[d];
  3826. break
  3827. }
  3828. }
  3829. return r
  3830. }
  3831. return h
  3832. }
  3833. function o(t, e) {
  3834. return t.hasOwnProperty(e)
  3835. }
  3836. function a(t, e) {
  3837. return null != t[e] && "auto" !== t[e]
  3838. }
  3839. function r(t, e, i) {
  3840. Hb(t, function(t) {
  3841. e[t] = i[t]
  3842. })
  3843. }
  3844. !_(i) && (i = {});
  3845. var s = i.ignoreSize;
  3846. !v(s) && (s = [s, s]);
  3847. var l = n(Zb[0], 0)
  3848. , h = n(Zb[1], 1);
  3849. r(Zb[0], t, l),
  3850. r(Zb[1], t, h)
  3851. }
  3852. function Qo(t) {
  3853. return ta({}, t)
  3854. }
  3855. function ta(t, e) {
  3856. return e && t && Hb(Fb, function(i) {
  3857. e.hasOwnProperty(i) && (t[i] = e[i])
  3858. }),
  3859. t
  3860. }
  3861. function ea(t, n) {
  3862. c(n, function(n, o) {
  3863. qb.hasClass(o) || ("object" == typeof n ? t[o] = t[o] ? i(t[o], n, !1) : e(n) : null == t[o] && (t[o] = n))
  3864. })
  3865. }
  3866. function ia(t) {
  3867. t = t,
  3868. this.option = {},
  3869. this.option[ow] = 1,
  3870. this._componentsMap = O({
  3871. series: []
  3872. }),
  3873. this._seriesIndices = null,
  3874. ea(t, this._theme.option),
  3875. i(t, $b, !1),
  3876. this.mergeOption(t)
  3877. }
  3878. function na(t, e) {
  3879. v(e) || (e = e ? [e] : []);
  3880. var i = {};
  3881. return Jb(e, function(e) {
  3882. i[e] = (t.get(e) || []).slice()
  3883. }),
  3884. i
  3885. }
  3886. function oa(t, e, i) {
  3887. return e.type ? e.type : i ? i.subType : qb.determineSubType(t, e)
  3888. }
  3889. function aa(t) {
  3890. return tw(t, function(t) {
  3891. return t.componentIndex
  3892. }) || []
  3893. }
  3894. function ra(t, e) {
  3895. return e.hasOwnProperty("subType") ? Qb(t, function(t) {
  3896. return t.subType === e.subType
  3897. }) : t
  3898. }
  3899. function sa(t) {}
  3900. function la(t) {
  3901. c(rw, function(e) {
  3902. this[e] = p(t[e], t)
  3903. }, this)
  3904. }
  3905. function ha() {
  3906. this._coordinateSystems = []
  3907. }
  3908. function ua(t) {
  3909. this._api = t,
  3910. this._timelineOptions = [],
  3911. this._mediaList = [],
  3912. this._mediaDefault,
  3913. this._currentMediaIndices = [],
  3914. this._optionBackup,
  3915. this._newBaseOption
  3916. }
  3917. function ca(t, e, i) {
  3918. var n, o, a = [], r = [], s = t.timeline;
  3919. if (t.baseOption && (o = t.baseOption),
  3920. (s || t.options) && (o = o || {},
  3921. a = (t.options || []).slice()),
  3922. t.media) {
  3923. o = o || {};
  3924. var l = t.media;
  3925. lw(l, function(t) {
  3926. t && t.option && (t.query ? r.push(t) : n || (n = t))
  3927. })
  3928. }
  3929. return o || (o = t),
  3930. o.timeline || (o.timeline = s),
  3931. lw([o].concat(a).concat(d(r, function(t) {
  3932. return t.option
  3933. })), function(t) {
  3934. lw(e, function(e) {
  3935. e(t, i)
  3936. })
  3937. }),
  3938. {
  3939. baseOption: o,
  3940. timelineOptions: a,
  3941. mediaDefault: n,
  3942. mediaList: r
  3943. }
  3944. }
  3945. function da(t, e, i) {
  3946. var n = {
  3947. width: e,
  3948. height: i,
  3949. aspectratio: e / i
  3950. }
  3951. , o = !0;
  3952. return c(t, function(t, e) {
  3953. var i = e.match(dw);
  3954. if (i && i[1] && i[2]) {
  3955. var a = i[1]
  3956. , r = i[2].toLowerCase();
  3957. fa(n[r], t, a) || (o = !1)
  3958. }
  3959. }),
  3960. o
  3961. }
  3962. function fa(t, e, i) {
  3963. return "min" === i ? t >= e : "max" === i ? t <= e : t === e
  3964. }
  3965. function ga(t, e) {
  3966. return t.join(",") === e.join(",")
  3967. }
  3968. function pa(t, e) {
  3969. lw(e = e || {}, function(e, i) {
  3970. if (null != e) {
  3971. var n = t[i];
  3972. if (qb.hasClass(i)) {
  3973. e = ko(e);
  3974. var o = Eo(n = ko(n), e);
  3975. t[i] = uw(o, function(t) {
  3976. return t.option && t.exist ? cw(t.exist, t.option, !0) : t.exist || t.option
  3977. })
  3978. } else
  3979. t[i] = cw(n, e, !0)
  3980. }
  3981. })
  3982. }
  3983. function ma(t) {
  3984. var e = t && t.itemStyle;
  3985. if (e)
  3986. for (var n = 0, o = pw.length; n < o; n++) {
  3987. var a = pw[n]
  3988. , r = e.normal
  3989. , s = e.emphasis;
  3990. r && r[a] && (t[a] = t[a] || {},
  3991. t[a].normal ? i(t[a].normal, r[a]) : t[a].normal = r[a],
  3992. r[a] = null),
  3993. s && s[a] && (t[a] = t[a] || {},
  3994. t[a].emphasis ? i(t[a].emphasis, s[a]) : t[a].emphasis = s[a],
  3995. s[a] = null)
  3996. }
  3997. }
  3998. function va(t, e) {
  3999. var i = gw(t) && t[e]
  4000. , n = gw(i) && i.textStyle;
  4001. if (n)
  4002. for (var o = 0, a = Rb.length; o < a; o++) {
  4003. var e = Rb[o];
  4004. n.hasOwnProperty(e) && (i[e] = n[e])
  4005. }
  4006. }
  4007. function ya(t) {
  4008. gw(t) && (va(t, "normal"),
  4009. va(t, "emphasis"))
  4010. }
  4011. function xa(t) {
  4012. if (gw(t)) {
  4013. ma(t),
  4014. ya(t.label),
  4015. ya(t.upperLabel),
  4016. ya(t.edgeLabel);
  4017. var e = t.markPoint;
  4018. ma(e),
  4019. ya(e && e.label);
  4020. var i = t.markLine;
  4021. ma(t.markLine),
  4022. ya(i && i.label);
  4023. var n = t.markArea;
  4024. ya(n && n.label),
  4025. va(t, "axisLabel"),
  4026. va(t, "title"),
  4027. va(t, "detail");
  4028. var o = t.data;
  4029. if (o)
  4030. for (r = 0; r < o.length; r++)
  4031. ma(o[r]),
  4032. ya(o[r] && o[r].label);
  4033. if ((e = t.markPoint) && e.data)
  4034. for (var a = e.data, r = 0; r < a.length; r++)
  4035. ma(a[r]),
  4036. ya(a[r] && a[r].label);
  4037. if ((i = t.markLine) && i.data)
  4038. for (var s = i.data, r = 0; r < s.length; r++)
  4039. v(s[r]) ? (ma(s[r][0]),
  4040. ya(s[r][0] && s[r][0].label),
  4041. ma(s[r][1]),
  4042. ya(s[r][1] && s[r][1].label)) : (ma(s[r]),
  4043. ya(s[r] && s[r].label))
  4044. }
  4045. }
  4046. function _a(t) {
  4047. return v(t) ? t : t ? [t] : []
  4048. }
  4049. function ba(t) {
  4050. return (v(t) ? t[0] : t) || {}
  4051. }
  4052. function wa(t, e) {
  4053. e = e.split(",");
  4054. for (var i = t, n = 0; n < e.length && null != (i = i && i[e[n]]); n++)
  4055. ;
  4056. return i
  4057. }
  4058. function Sa(t, e, i, n) {
  4059. e = e.split(",");
  4060. for (var o, a = t, r = 0; r < e.length - 1; r++)
  4061. null == a[o = e[r]] && (a[o] = {}),
  4062. a = a[o];
  4063. (n || null == a[e[r]]) && (a[e[r]] = i)
  4064. }
  4065. function Ma(t) {
  4066. c(vw, function(e) {
  4067. e[0]in t && !(e[1]in t) && (t[e[1]] = t[e[0]])
  4068. })
  4069. }
  4070. function Ia() {
  4071. this.group = new $y,
  4072. this.uid = jo("viewChart")
  4073. }
  4074. function Ta(t, e) {
  4075. if (t && (t.trigger(e),
  4076. "group" === t.type))
  4077. for (var i = 0; i < t.childCount(); i++)
  4078. Ta(t.childAt(i), e)
  4079. }
  4080. function Aa(t, e, i) {
  4081. var n = Go(t, e);
  4082. null != n ? c(ko(n), function(e) {
  4083. Ta(t.getItemGraphicEl(e), i)
  4084. }) : t.eachItemGraphicEl(function(t) {
  4085. Ta(t, i)
  4086. })
  4087. }
  4088. function Ca(t, e, i) {
  4089. function n() {
  4090. u = (new Date).getTime(),
  4091. c = null,
  4092. t.apply(r, s || [])
  4093. }
  4094. var o, a, r, s, l, h = 0, u = 0, c = null;
  4095. e = e || 0;
  4096. var d = function() {
  4097. o = (new Date).getTime(),
  4098. r = this,
  4099. s = arguments;
  4100. var t = l || e
  4101. , d = l || i;
  4102. l = null,
  4103. a = o - (d ? h : u) - t,
  4104. clearTimeout(c),
  4105. d ? c = setTimeout(n, t) : a >= 0 ? n() : c = setTimeout(n, -a),
  4106. h = o
  4107. };
  4108. return d.clear = function() {
  4109. c && (clearTimeout(c),
  4110. c = null)
  4111. }
  4112. ,
  4113. d.debounceNextCall = function(t) {
  4114. l = t
  4115. }
  4116. ,
  4117. d
  4118. }
  4119. function Da(t, e, i, n) {
  4120. var o = t[e];
  4121. if (o) {
  4122. var a = o[Iw] || o
  4123. , r = o[Aw];
  4124. if (o[Tw] !== i || r !== n) {
  4125. if (null == i || !n)
  4126. return t[e] = a;
  4127. (o = t[e] = Ca(a, i, "debounce" === n))[Iw] = a,
  4128. o[Aw] = n,
  4129. o[Tw] = i
  4130. }
  4131. return o
  4132. }
  4133. }
  4134. function La(t, e) {
  4135. var i = t[e];
  4136. i && i[Iw] && (t[e] = i[Iw])
  4137. }
  4138. function ka(t) {
  4139. return function(e, i, n) {
  4140. e = e && e.toLowerCase(),
  4141. my.prototype[t].call(this, e, i, n)
  4142. }
  4143. }
  4144. function Pa() {
  4145. my.call(this)
  4146. }
  4147. function Oa(t, i, n) {
  4148. function o(t, e) {
  4149. return t.prio - e.prio
  4150. }
  4151. n = n || {},
  4152. "string" == typeof i && (i = Yw[i]),
  4153. this.id,
  4154. this.group,
  4155. this._dom = t;
  4156. var a = "canvas"
  4157. , r = this._zr = mi(t, {
  4158. renderer: n.renderer || a,
  4159. devicePixelRatio: n.devicePixelRatio,
  4160. width: n.width,
  4161. height: n.height
  4162. });
  4163. this._throttledZrFlush = Ca(p(r.flush, r), 17),
  4164. (i = e(i)) && _w(i, !0),
  4165. this._theme = i,
  4166. this._chartsViews = [],
  4167. this._chartsMap = {},
  4168. this._componentsViews = [],
  4169. this._componentsMap = {},
  4170. this._coordSysMgr = new ha,
  4171. this._api = Ya(this),
  4172. my.call(this),
  4173. this._messageCenter = new Pa,
  4174. this._initEvents(),
  4175. this.resize = p(this.resize, this),
  4176. this._pendingActions = [],
  4177. te(qw, o),
  4178. te(Uw, o),
  4179. r.animation.on("frame", this._onframe, this),
  4180. L(this)
  4181. }
  4182. function za(t, e, i) {
  4183. var n, o = this._model, a = this._coordSysMgr.getCoordinateSystems();
  4184. e = Wo(o, e);
  4185. for (var r = 0; r < a.length; r++) {
  4186. var s = a[r];
  4187. if (s[t] && null != (n = s[t](o, e, i)))
  4188. return n
  4189. }
  4190. }
  4191. function Na(t, e, i, n, o) {
  4192. function a(n) {
  4193. n && n.__alive && n[e] && n[e](n.__model, r, t._api, i)
  4194. }
  4195. var r = t._model;
  4196. if (n) {
  4197. var s = {};
  4198. s[n + "Id"] = i[n + "Id"],
  4199. s[n + "Index"] = i[n + "Index"],
  4200. s[n + "Name"] = i[n + "Name"];
  4201. var l = {
  4202. mainType: n,
  4203. query: s
  4204. };
  4205. o && (l.subType = o),
  4206. r && r.eachComponent(l, function(e, i) {
  4207. a(t["series" === n ? "_chartsMap" : "_componentsMap"][e.__viewId])
  4208. }, t)
  4209. } else
  4210. Dw(t._componentsViews.concat(t._chartsViews), a)
  4211. }
  4212. function Ea(t, e) {
  4213. var i = t.type
  4214. , n = t.escapeConnect
  4215. , r = Fw[i]
  4216. , s = r.actionInfo
  4217. , l = (s.update || "update").split(":")
  4218. , h = l.pop();
  4219. l = null != l[0] && Lw(l[0]),
  4220. this[Rw] = !0;
  4221. var u = [t]
  4222. , c = !1;
  4223. t.batch && (c = !0,
  4224. u = d(t.batch, function(e) {
  4225. return e = a(o({}, e), t),
  4226. e.batch = null,
  4227. e
  4228. }));
  4229. var f, g = [], p = "highlight" === i || "downplay" === i;
  4230. Dw(u, function(t) {
  4231. f = r.action(t, this._model, this._api),
  4232. (f = f || o({}, t)).type = s.event || f.type,
  4233. g.push(f),
  4234. p ? Na(this, h, t, "series") : l && Na(this, h, t, l.main, l.sub)
  4235. }, this),
  4236. "none" === h || p || l || (this[Vw] ? (Ww.prepareAndUpdate.call(this, t),
  4237. this[Vw] = !1) : Ww[h].call(this, t)),
  4238. f = c ? {
  4239. type: s.event || i,
  4240. escapeConnect: n,
  4241. batch: g
  4242. } : g[0],
  4243. this[Rw] = !1,
  4244. !e && this._messageCenter.trigger(f.type, f)
  4245. }
  4246. function Ra(t) {
  4247. for (var e = this._pendingActions; e.length; ) {
  4248. var i = e.shift();
  4249. Ea.call(this, i, t)
  4250. }
  4251. }
  4252. function Va(t) {
  4253. !t && this.trigger("updated")
  4254. }
  4255. function Ba(t, e, i) {
  4256. var n = this._api;
  4257. Dw(this._componentsViews, function(o) {
  4258. var a = o.__model;
  4259. o[t](a, e, n, i),
  4260. qa(a, o)
  4261. }, this),
  4262. e.eachSeries(function(o, a) {
  4263. var r = this._chartsMap[o.__viewId];
  4264. r[t](o, e, n, i),
  4265. qa(o, r),
  4266. Xa(o, r)
  4267. }, this),
  4268. ja(this._zr, e),
  4269. Dw(Xw, function(t) {
  4270. t(e, n)
  4271. })
  4272. }
  4273. function Ga(t, e) {
  4274. for (var i = "component" === t, n = i ? this._componentsViews : this._chartsViews, o = i ? this._componentsMap : this._chartsMap, a = this._zr, r = 0; r < n.length; r++)
  4275. n[r].__alive = !1;
  4276. e[i ? "eachComponent" : "eachSeries"](function(t, r) {
  4277. if (i) {
  4278. if ("series" === t)
  4279. return
  4280. } else
  4281. r = t;
  4282. var s = "_ec_" + r.id + "_" + r.type
  4283. , l = o[s];
  4284. if (!l) {
  4285. var h = Lw(r.type)
  4286. , u = i ? ww.getClass(h.main, h.sub) : Ia.getClass(h.sub);
  4287. if (!u)
  4288. return;
  4289. (l = new u).init(e, this._api),
  4290. o[s] = l,
  4291. n.push(l),
  4292. a.add(l.group)
  4293. }
  4294. r.__viewId = l.__id = s,
  4295. l.__alive = !0,
  4296. l.__model = r,
  4297. l.group.__ecComponentInfo = {
  4298. mainType: r.mainType,
  4299. index: r.componentIndex
  4300. }
  4301. }, this);
  4302. for (r = 0; r < n.length; ) {
  4303. var s = n[r];
  4304. s.__alive ? r++ : (a.remove(s.group),
  4305. s.dispose(e, this._api),
  4306. n.splice(r, 1),
  4307. delete o[s.__id],
  4308. s.__id = s.group.__ecComponentInfo = null)
  4309. }
  4310. }
  4311. function Wa(t, e) {
  4312. Dw(Uw, function(i) {
  4313. i.func(t, e)
  4314. })
  4315. }
  4316. function Ha(t) {
  4317. var e = {};
  4318. t.eachSeries(function(t) {
  4319. var i = t.get("stack")
  4320. , n = t.getData();
  4321. if (i && "list" === n.type) {
  4322. var o = e[i];
  4323. e.hasOwnProperty(i) && o && (n.stackedOn = o),
  4324. e[i] = n
  4325. }
  4326. })
  4327. }
  4328. function Fa(t, e) {
  4329. var i = this._api;
  4330. Dw(qw, function(n) {
  4331. n.isLayout && n.func(t, i, e)
  4332. })
  4333. }
  4334. function Za(t, e, i) {
  4335. var n = this._api;
  4336. t.clearColorPalette(),
  4337. t.eachSeries(function(t) {
  4338. t.clearColorPalette()
  4339. }),
  4340. Dw(qw, function(o) {
  4341. (!i || !o.isLayout) && o.func(t, n, e)
  4342. })
  4343. }
  4344. function Ua(t, e) {
  4345. var i = this._api;
  4346. Dw(this._componentsViews, function(n) {
  4347. var o = n.__model;
  4348. n.render(o, t, i, e),
  4349. qa(o, n)
  4350. }, this),
  4351. Dw(this._chartsViews, function(t) {
  4352. t.__alive = !1
  4353. }, this),
  4354. t.eachSeries(function(n, o) {
  4355. var a = this._chartsMap[n.__viewId];
  4356. a.__alive = !0,
  4357. a.render(n, t, i, e),
  4358. a.group.silent = !!n.get("silent"),
  4359. qa(n, a),
  4360. Xa(n, a)
  4361. }, this),
  4362. ja(this._zr, t),
  4363. Dw(this._chartsViews, function(e) {
  4364. e.__alive || e.remove(t, i)
  4365. }, this)
  4366. }
  4367. function ja(t, e) {
  4368. var i = t.storage
  4369. , n = 0;
  4370. i.traverse(function(t) {
  4371. t.isGroup || n++
  4372. }),
  4373. n > e.get("hoverLayerThreshold") && !Yv.node && i.traverse(function(t) {
  4374. t.isGroup || (t.useHoverLayer = !0)
  4375. })
  4376. }
  4377. function Xa(t, e) {
  4378. var i = 0;
  4379. e.group.traverse(function(t) {
  4380. "group" === t.type || t.ignore || i++
  4381. });
  4382. var n = +t.get("progressive")
  4383. , o = i > t.get("progressiveThreshold") && n && !Yv.node;
  4384. o && e.group.traverse(function(t) {
  4385. t.isGroup || (t.progressive = o ? Math.floor(i++ / n) : -1,
  4386. o && t.stopAnimation(!0))
  4387. });
  4388. var a = t.get("blendMode") || null;
  4389. e.group.traverse(function(t) {
  4390. t.isGroup || t.setStyle("blend", a)
  4391. })
  4392. }
  4393. function qa(t, e) {
  4394. var i = t.get("z")
  4395. , n = t.get("zlevel");
  4396. e.group.traverse(function(t) {
  4397. "group" !== t.type && (null != i && (t.z = i),
  4398. null != n && (t.zlevel = n))
  4399. })
  4400. }
  4401. function Ya(t) {
  4402. var e = t._coordSysMgr;
  4403. return o(new la(t), {
  4404. getCoordinateSystems: p(e.getCoordinateSystems, e),
  4405. getComponentByElement: function(e) {
  4406. for (; e; ) {
  4407. var i = e.__ecComponentInfo;
  4408. if (null != i)
  4409. return t._model.getComponent(i.mainType, i.index);
  4410. e = e.parent
  4411. }
  4412. }
  4413. })
  4414. }
  4415. function $a(t) {
  4416. function e(t, e) {
  4417. for (var n = 0; n < t.length; n++)
  4418. t[n][i] = e
  4419. }
  4420. var i = "__connectUpdateStatus";
  4421. c(Zw, function(n, o) {
  4422. t._messageCenter.on(o, function(n) {
  4423. if (Jw[t.group] && 0 !== t[i]) {
  4424. if (n && n.escapeConnect)
  4425. return;
  4426. var o = t.makeActionFromEvent(n)
  4427. , a = [];
  4428. c(Kw, function(e) {
  4429. e !== t && e.group === t.group && a.push(e)
  4430. }),
  4431. e(a, 0),
  4432. Dw(a, function(t) {
  4433. 1 !== t[i] && t.dispatchAction(o)
  4434. }),
  4435. e(a, 2)
  4436. }
  4437. })
  4438. })
  4439. }
  4440. function Ka(t) {
  4441. Jw[t] = !1
  4442. }
  4443. function Ja(t) {
  4444. var e;
  4445. return e = t.getAttribute ? t.getAttribute(eS) : t[eS],
  4446. Kw[e]
  4447. }
  4448. function Qa(t) {
  4449. jw.push(t)
  4450. }
  4451. function tr(t, e) {
  4452. "function" == typeof t && (e = t,
  4453. t = Ow),
  4454. Uw.push({
  4455. prio: t,
  4456. func: e
  4457. })
  4458. }
  4459. function er(t, e, i) {
  4460. "function" == typeof e && (i = e,
  4461. e = "");
  4462. var n = _(t) ? t.type : [t, t = {
  4463. event: e
  4464. }][0];
  4465. t.event = (t.event || n).toLowerCase(),
  4466. e = t.event,
  4467. D(Bw.test(n) && Bw.test(e)),
  4468. Fw[n] || (Fw[n] = {
  4469. action: i,
  4470. actionInfo: t
  4471. }),
  4472. Zw[e] = n
  4473. }
  4474. function ir(t, e) {
  4475. ha.register(t, e)
  4476. }
  4477. function nr(t, e) {
  4478. "function" == typeof t && (e = t,
  4479. t = zw),
  4480. qw.push({
  4481. prio: t,
  4482. func: e,
  4483. isLayout: !0
  4484. })
  4485. }
  4486. function or(t, e) {
  4487. "function" == typeof t && (e = t,
  4488. t = Nw),
  4489. qw.push({
  4490. prio: t,
  4491. func: e
  4492. })
  4493. }
  4494. function ar(t, e) {
  4495. $w[t] = e
  4496. }
  4497. function rr(t) {
  4498. return qb.extend(t)
  4499. }
  4500. function sr(t) {
  4501. return ww.extend(t)
  4502. }
  4503. function lr(t) {
  4504. return bw.extend(t)
  4505. }
  4506. function hr(t) {
  4507. return Ia.extend(t)
  4508. }
  4509. function ur(t) {
  4510. return t
  4511. }
  4512. function cr(t, e, i, n, o) {
  4513. this._old = t,
  4514. this._new = e,
  4515. this._oldKeyGetter = i || ur,
  4516. this._newKeyGetter = n || ur,
  4517. this.context = o
  4518. }
  4519. function dr(t, e, i, n, o) {
  4520. for (var a = 0; a < t.length; a++) {
  4521. var r = "_ec_" + o[n](t[a], a)
  4522. , s = e[r];
  4523. null == s ? (i.push(r),
  4524. e[r] = a) : (s.length || (e[r] = s = [s]),
  4525. s.push(a))
  4526. }
  4527. }
  4528. function fr(t, e) {
  4529. c(sS.concat(e.__wrappedMethods || []), function(i) {
  4530. e.hasOwnProperty(i) && (t[i] = e[i])
  4531. }),
  4532. t.__wrappedMethods = e.__wrappedMethods
  4533. }
  4534. function gr(t) {
  4535. this._array = t || []
  4536. }
  4537. function pr(t) {
  4538. return v(t) || (t = [t]),
  4539. t
  4540. }
  4541. function mr(t, e) {
  4542. var i = t.dimensions
  4543. , n = new lS(d(i, t.getDimensionInfo, t),t.hostModel);
  4544. fr(n, t);
  4545. for (var o = n._storage = {}, a = t._storage, r = 0; r < i.length; r++) {
  4546. var l = i[r]
  4547. , h = a[l];
  4548. s(e, l) >= 0 ? o[l] = new h.constructor(a[l].length) : o[l] = a[l]
  4549. }
  4550. return n
  4551. }
  4552. function vr(t, i, n) {
  4553. function o(t, e, i) {
  4554. gS[e] ? t.otherDims[e] = i : (t.coordDim = e,
  4555. t.coordDimIndex = i,
  4556. h.set(e, !0))
  4557. }
  4558. function a(t, e, i) {
  4559. if (i || null != e.get(t)) {
  4560. for (var n = 0; null != e.get(t + n); )
  4561. n++;
  4562. t += n
  4563. }
  4564. return e.set(t, !0),
  4565. t
  4566. }
  4567. i = i || [],
  4568. n = n || {},
  4569. t = (t || []).slice();
  4570. var r = (n.dimsDef || []).slice()
  4571. , s = O(n.encodeDef)
  4572. , l = O()
  4573. , h = O()
  4574. , u = []
  4575. , c = n.dimCount;
  4576. if (null == c) {
  4577. var d = yr(i[0]);
  4578. c = Math.max(v(d) && d.length || 1, t.length, r.length),
  4579. cS(t, function(t) {
  4580. var e = t.dimsDef;
  4581. e && (c = Math.max(c, e.length))
  4582. })
  4583. }
  4584. for (var f = 0; f < c; f++) {
  4585. var g = dS(r[f]) ? {
  4586. name: r[f]
  4587. } : r[f] || {}
  4588. , p = g.name
  4589. , m = u[f] = {
  4590. otherDims: {}
  4591. };
  4592. null != p && null == l.get(p) && (m.name = m.tooltipName = p,
  4593. l.set(p, f)),
  4594. null != g.type && (m.type = g.type)
  4595. }
  4596. s.each(function(t, e) {
  4597. t = s.set(e, ko(t).slice()),
  4598. cS(t, function(i, n) {
  4599. dS(i) && (i = l.get(i)),
  4600. null != i && i < c && (t[n] = i,
  4601. o(u[i], e, n))
  4602. })
  4603. });
  4604. var y = 0;
  4605. cS(t, function(t, i) {
  4606. var n, t, a, r;
  4607. dS(t) ? (n = t,
  4608. t = {}) : (n = t.name,
  4609. t = e(t),
  4610. a = t.dimsDef,
  4611. r = t.otherDims,
  4612. t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null);
  4613. var l = ko(s.get(n));
  4614. if (!l.length)
  4615. for (var h = 0; h < (a && a.length || 1); h++) {
  4616. for (; y < u.length && null != u[y].coordDim; )
  4617. y++;
  4618. y < u.length && l.push(y++)
  4619. }
  4620. cS(l, function(e, i) {
  4621. var s = u[e];
  4622. o(fS(s, t), n, i),
  4623. null == s.name && a && (s.name = s.tooltipName = a[i]),
  4624. r && fS(s.otherDims, r)
  4625. })
  4626. });
  4627. for (var x = n.extraPrefix || "value", _ = 0; _ < c; _++)
  4628. null == (m = u[_] = u[_] || {}).coordDim && (m.coordDim = a(x, h, n.extraFromZero),
  4629. m.coordDimIndex = 0,
  4630. m.isExtraCoord = !0),
  4631. null == m.name && (m.name = a(m.coordDim, l)),
  4632. null == m.type && pS(i, _) && (m.type = "ordinal");
  4633. return u
  4634. }
  4635. function yr(t) {
  4636. return v(t) ? t : _(t) ? t.value : t
  4637. }
  4638. function xr(t) {
  4639. for (var e = 0; e < t.length && null == t[e]; )
  4640. e++;
  4641. return t[e]
  4642. }
  4643. function _r(t) {
  4644. var e = xr(t);
  4645. return null != e && !v(Oo(e))
  4646. }
  4647. function br(t, e, i) {
  4648. t = t || [];
  4649. var n = e.get("coordinateSystem")
  4650. , o = mS[n]
  4651. , a = ha.get(n)
  4652. , r = {
  4653. encodeDef: e.get("encode"),
  4654. dimsDef: e.get("dimensions")
  4655. }
  4656. , l = o && o(t, e, i, r)
  4657. , h = l && l.dimensions;
  4658. h || (h = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"],
  4659. h = vr(h, t, r));
  4660. var u = l ? l.categoryIndex : -1
  4661. , c = new lS(h,e)
  4662. , d = Mr(l, t)
  4663. , f = {}
  4664. , g = u >= 0 && _r(t) ? function(t, e, i, n) {
  4665. return zo(t) && (c.hasItemOption = !0),
  4666. n === u ? i : No(Oo(t), h[n])
  4667. }
  4668. : function(t, e, i, n) {
  4669. var o = Oo(t)
  4670. , a = No(o && o[n], h[n]);
  4671. zo(t) && (c.hasItemOption = !0);
  4672. var r = l && l.categoryAxesModels;
  4673. return r && r[e] && "string" == typeof a && (f[e] = f[e] || r[e].getCategories(),
  4674. (a = s(f[e], a)) < 0 && !isNaN(a) && (a = +a)),
  4675. a
  4676. }
  4677. ;
  4678. return c.hasItemOption = !1,
  4679. c.initData(t, d, g),
  4680. c
  4681. }
  4682. function wr(t) {
  4683. return "category" !== t && "time" !== t
  4684. }
  4685. function Sr(t) {
  4686. return "category" === t ? "ordinal" : "time" === t ? "time" : "float"
  4687. }
  4688. function Mr(t, e) {
  4689. var i, n = [], o = t && t.dimensions[t.categoryIndex];
  4690. if (o && (i = t.categoryAxesModels[o.name]),
  4691. i) {
  4692. var a = i.getCategories();
  4693. if (a) {
  4694. var r = e.length;
  4695. if (v(e[0]) && e[0].length > 1) {
  4696. n = [];
  4697. for (var s = 0; s < r; s++)
  4698. n[s] = a[e[s][t.categoryIndex || 0]]
  4699. } else
  4700. n = a.slice(0)
  4701. }
  4702. }
  4703. return n
  4704. }
  4705. function Ir(t) {
  4706. this._setting = t || {},
  4707. this._extent = [1 / 0, -1 / 0],
  4708. this._interval = 0,
  4709. this.init && this.init.apply(this, arguments)
  4710. }
  4711. function Tr(t, e, i, n) {
  4712. var o = {}
  4713. , a = t[1] - t[0]
  4714. , r = o.interval = Oi(a / e, !0);
  4715. null != i && r < i && (r = o.interval = i),
  4716. null != n && r > n && (r = o.interval = n);
  4717. var s = o.intervalPrecision = Ar(r);
  4718. return Dr(o.niceTickExtent = [_S(Math.ceil(t[0] / r) * r, s), _S(Math.floor(t[1] / r) * r, s)], t),
  4719. o
  4720. }
  4721. function Ar(t) {
  4722. return Ii(t) + 2
  4723. }
  4724. function Cr(t, e, i) {
  4725. t[e] = Math.max(Math.min(t[e], i[1]), i[0])
  4726. }
  4727. function Dr(t, e) {
  4728. !isFinite(t[0]) && (t[0] = e[0]),
  4729. !isFinite(t[1]) && (t[1] = e[1]),
  4730. Cr(t, 0, e),
  4731. Cr(t, 1, e),
  4732. t[0] > t[1] && (t[0] = t[1])
  4733. }
  4734. function Lr(t, e, i, n) {
  4735. var o = [];
  4736. if (!t)
  4737. return o;
  4738. e[0] < i[0] && o.push(e[0]);
  4739. for (var a = i[0]; a <= i[1] && (o.push(a),
  4740. (a = _S(a + t, n)) !== o[o.length - 1]); )
  4741. if (o.length > 1e4)
  4742. return [];
  4743. return e[1] > (o.length ? o[o.length - 1] : i[1]) && o.push(e[1]),
  4744. o
  4745. }
  4746. function kr(t, e) {
  4747. return PS(t, kS(e))
  4748. }
  4749. function Pr(t, e) {
  4750. var i, n, o, a = t.type, r = e.getMin(), s = e.getMax(), l = null != r, h = null != s, u = t.getExtent();
  4751. return "ordinal" === a ? i = (e.get("data") || []).length : (v(n = e.get("boundaryGap")) || (n = [n || 0, n || 0]),
  4752. "boolean" == typeof n[0] && (n = [0, 0]),
  4753. n[0] = bi(n[0], 1),
  4754. n[1] = bi(n[1], 1),
  4755. o = u[1] - u[0] || Math.abs(u[0])),
  4756. null == r && (r = "ordinal" === a ? i ? 0 : NaN : u[0] - n[0] * o),
  4757. null == s && (s = "ordinal" === a ? i ? i - 1 : NaN : u[1] + n[1] * o),
  4758. "dataMin" === r ? r = u[0] : "function" == typeof r && (r = r({
  4759. min: u[0],
  4760. max: u[1]
  4761. })),
  4762. "dataMax" === s ? s = u[1] : "function" == typeof s && (s = s({
  4763. min: u[0],
  4764. max: u[1]
  4765. })),
  4766. (null == r || !isFinite(r)) && (r = NaN),
  4767. (null == s || !isFinite(s)) && (s = NaN),
  4768. t.setBlank(S(r) || S(s)),
  4769. e.getNeedCrossZero() && (r > 0 && s > 0 && !l && (r = 0),
  4770. r < 0 && s < 0 && !h && (s = 0)),
  4771. [r, s]
  4772. }
  4773. function Or(t, e) {
  4774. var i = Pr(t, e)
  4775. , n = null != e.getMin()
  4776. , o = null != e.getMax()
  4777. , a = e.get("splitNumber");
  4778. "log" === t.type && (t.base = e.get("logBase"));
  4779. var r = t.type;
  4780. t.setExtent(i[0], i[1]),
  4781. t.niceExtent({
  4782. splitNumber: a,
  4783. fixMin: n,
  4784. fixMax: o,
  4785. minInterval: "interval" === r || "time" === r ? e.get("minInterval") : null,
  4786. maxInterval: "interval" === r || "time" === r ? e.get("maxInterval") : null
  4787. });
  4788. var s = e.get("interval");
  4789. null != s && t.setInterval && t.setInterval(s)
  4790. }
  4791. function zr(t, e) {
  4792. if (e = e || t.get("type"))
  4793. switch (e) {
  4794. case "category":
  4795. return new xS(t.getCategories(),[1 / 0, -1 / 0]);
  4796. case "value":
  4797. return new wS;
  4798. default:
  4799. return (Ir.getClass(e) || wS).create(t)
  4800. }
  4801. }
  4802. function Nr(t, e, i, n, o) {
  4803. var a, r = 0, s = 0, l = (n - o) / 180 * Math.PI, h = 1;
  4804. e.length > 40 && (h = Math.floor(e.length / 40));
  4805. for (var u = 0; u < t.length; u += h) {
  4806. var c = t[u]
  4807. , d = ce(e[u], i, "center", "top");
  4808. d.x += c * Math.cos(l),
  4809. d.y += c * Math.sin(l),
  4810. d.width *= 1.3,
  4811. d.height *= 1.3,
  4812. a ? a.intersect(d) ? (s++,
  4813. r = Math.max(r, s)) : (a.union(d),
  4814. s = 0) : a = d.clone()
  4815. }
  4816. return 0 === r && h > 1 ? h : (r + 1) * h - 1
  4817. }
  4818. function Er(t, e) {
  4819. var i = t.scale
  4820. , n = i.getTicksLabels()
  4821. , o = i.getTicks();
  4822. return "string" == typeof e ? (e = function(t) {
  4823. return function(e) {
  4824. return t.replace("{value}", null != e ? e : "")
  4825. }
  4826. }(e),
  4827. d(n, e)) : "function" == typeof e ? d(o, function(i, n) {
  4828. return e(Rr(t, i), n)
  4829. }, this) : n
  4830. }
  4831. function Rr(t, e) {
  4832. return "category" === t.type ? t.scale.getLabel(e) : e
  4833. }
  4834. function Vr(t) {
  4835. return _(t) && null != t.value ? t.value : t + ""
  4836. }
  4837. function Br(t, e) {
  4838. if ("image" !== this.type) {
  4839. var i = this.style
  4840. , n = this.shape;
  4841. n && "line" === n.symbolType ? i.stroke = t : this.__isEmptyBrush ? (i.stroke = t,
  4842. i.fill = e || "#fff") : (i.fill && (i.fill = t),
  4843. i.stroke && (i.stroke = t)),
  4844. this.dirty(!1)
  4845. }
  4846. }
  4847. function Gr(t, e, i, n, o, a, r) {
  4848. var s = 0 === t.indexOf("empty");
  4849. s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
  4850. var l;
  4851. return l = 0 === t.indexOf("image://") ? Zn(t.slice(8), new jt(e,i,n,o), r ? "center" : "cover") : 0 === t.indexOf("path://") ? Fn(t.slice(7), {}, new jt(e,i,n,o), r ? "center" : "cover") : new US({
  4852. shape: {
  4853. symbolType: t,
  4854. x: e,
  4855. y: i,
  4856. width: n,
  4857. height: o
  4858. }
  4859. }),
  4860. l.__isEmptyBrush = s,
  4861. l.setColor = Br,
  4862. l.setColor(a),
  4863. l
  4864. }
  4865. function Wr(t, e) {
  4866. var i = (t[1] - t[0]) / e / 2;
  4867. t[0] += i,
  4868. t[1] -= i
  4869. }
  4870. function Hr(t) {
  4871. return t ? d(Xr(t, "attribute"), function(t) {
  4872. return {
  4873. id: Ur(t, "id"),
  4874. title: Ur(t, "title"),
  4875. type: Ur(t, "type")
  4876. }
  4877. }) : []
  4878. }
  4879. function Fr(t, e) {
  4880. return t ? d(Xr(t, "node"), function(t) {
  4881. var i = {
  4882. id: Ur(t, "id"),
  4883. name: Ur(t, "label"),
  4884. itemStyle: {
  4885. normal: {}
  4886. }
  4887. }
  4888. , n = jr(t, "viz:size")
  4889. , o = jr(t, "viz:position")
  4890. , a = jr(t, "viz:color")
  4891. , r = jr(t, "attvalues");
  4892. if (n && (i.symbolSize = parseFloat(Ur(n, "value"))),
  4893. o && (i.x = parseFloat(Ur(o, "x")),
  4894. i.y = parseFloat(Ur(o, "y"))),
  4895. a && (i.itemStyle.normal.color = "rgb(" + [0 | Ur(a, "r"), 0 | Ur(a, "g"), 0 | Ur(a, "b")].join(",") + ")"),
  4896. r) {
  4897. var s = Xr(r, "attvalue");
  4898. i.attributes = {};
  4899. for (var l = 0; l < s.length; l++) {
  4900. var h = s[l]
  4901. , u = Ur(h, "for")
  4902. , c = Ur(h, "value")
  4903. , d = e[u];
  4904. if (d) {
  4905. switch (d.type) {
  4906. case "integer":
  4907. case "long":
  4908. c = parseInt(c, 10);
  4909. break;
  4910. case "float":
  4911. case "double":
  4912. c = parseFloat(c);
  4913. break;
  4914. case "boolean":
  4915. c = "true" == c.toLowerCase()
  4916. }
  4917. i.attributes[u] = c
  4918. }
  4919. }
  4920. }
  4921. return i
  4922. }) : []
  4923. }
  4924. function Zr(t) {
  4925. return t ? d(Xr(t, "edge"), function(t) {
  4926. var e = {
  4927. id: Ur(t, "id"),
  4928. name: Ur(t, "label"),
  4929. source: Ur(t, "source"),
  4930. target: Ur(t, "target"),
  4931. lineStyle: {
  4932. normal: {}
  4933. }
  4934. }
  4935. , i = e.lineStyle.normal
  4936. , n = jr(t, "viz:thickness")
  4937. , o = jr(t, "viz:color");
  4938. return n && (i.width = parseFloat(n.getAttribute("value"))),
  4939. o && (i.color = "rgb(" + [0 | Ur(o, "r"), 0 | Ur(o, "g"), 0 | Ur(o, "b")].join(",") + ")"),
  4940. e
  4941. }) : []
  4942. }
  4943. function Ur(t, e) {
  4944. return t.getAttribute(e)
  4945. }
  4946. function jr(t, e) {
  4947. for (var i = t.firstChild; i; ) {
  4948. if (1 == i.nodeType && i.nodeName.toLowerCase() == e.toLowerCase())
  4949. return i;
  4950. i = i.nextSibling
  4951. }
  4952. return null
  4953. }
  4954. function Xr(t, e) {
  4955. for (var i = t.firstChild, n = []; i; )
  4956. i.nodeName.toLowerCase() == e.toLowerCase() && n.push(i),
  4957. i = i.nextSibling;
  4958. return n
  4959. }
  4960. function qr(t) {
  4961. var e, i = Zo(t, "label");
  4962. if (i.length)
  4963. e = i[0];
  4964. else
  4965. for (var n, o = t.dimensions.slice(); o.length && (e = o.pop(),
  4966. "ordinal" === (n = t.getDimensionInfo(e).type) || "time" === n); )
  4967. ;
  4968. return e
  4969. }
  4970. function Yr(t, e) {
  4971. var i = t.getItemVisual(e, "symbolSize");
  4972. return i instanceof Array ? i.slice() : [+i, +i]
  4973. }
  4974. function $r(t) {
  4975. return [t[0] / 2, t[1] / 2]
  4976. }
  4977. function Kr(t, e, i) {
  4978. $y.call(this),
  4979. this.updateData(t, e, i)
  4980. }
  4981. function Jr(t, e) {
  4982. this.parent.drift(t, e)
  4983. }
  4984. function Qr(t) {
  4985. this.group = new $y,
  4986. this._symbolCtor = t || Kr
  4987. }
  4988. function ts(t, e, i) {
  4989. var n = t.getItemLayout(e);
  4990. return n && !isNaN(n[0]) && !isNaN(n[1]) && !(i && i(e)) && "none" !== t.getItemVisual(e, "symbol")
  4991. }
  4992. function es(t) {
  4993. return t >= 0 ? 1 : -1
  4994. }
  4995. function is(t, e, i) {
  4996. for (var n, o = t.getBaseAxis(), a = t.getOtherAxis(o), r = o.onZero ? 0 : a.scale.getExtent()[0], s = a.dim, l = "x" === s || "radius" === s ? 1 : 0, h = e.stackedOn, u = e.get(s, i); h && es(h.get(s, i)) === es(u); ) {
  4997. n = h;
  4998. break
  4999. }
  5000. var c = [];
  5001. return c[l] = e.get(o.dim, i),
  5002. c[1 - l] = n ? n.get(s, i, !0) : r,
  5003. t.dataToPoint(c)
  5004. }
  5005. function ns(t, e) {
  5006. var i = [];
  5007. return e.diff(t).add(function(t) {
  5008. i.push({
  5009. cmd: "+",
  5010. idx: t
  5011. })
  5012. }).update(function(t, e) {
  5013. i.push({
  5014. cmd: "=",
  5015. idx: e,
  5016. idx1: t
  5017. })
  5018. }).remove(function(t) {
  5019. i.push({
  5020. cmd: "-",
  5021. idx: t
  5022. })
  5023. }).execute(),
  5024. i
  5025. }
  5026. function os(t) {
  5027. return isNaN(t[0]) || isNaN(t[1])
  5028. }
  5029. function as(t, e, i, n, o, a, r, s, l, h, u) {
  5030. for (var c = 0, d = i, f = 0; f < n; f++) {
  5031. var g = e[d];
  5032. if (d >= o || d < 0)
  5033. break;
  5034. if (os(g)) {
  5035. if (u) {
  5036. d += a;
  5037. continue
  5038. }
  5039. break
  5040. }
  5041. if (d === i)
  5042. t[a > 0 ? "moveTo" : "lineTo"](g[0], g[1]),
  5043. uM(dM, g);
  5044. else if (l > 0) {
  5045. var p = d + a
  5046. , m = e[p];
  5047. if (u)
  5048. for (; m && os(e[p]); )
  5049. m = e[p += a];
  5050. var v = .5
  5051. , y = e[c];
  5052. if (!(m = e[p]) || os(m))
  5053. uM(fM, g);
  5054. else {
  5055. os(m) && !u && (m = g),
  5056. W(cM, m, y);
  5057. var x, _;
  5058. if ("x" === h || "y" === h) {
  5059. var b = "x" === h ? 0 : 1;
  5060. x = Math.abs(g[b] - y[b]),
  5061. _ = Math.abs(g[b] - m[b])
  5062. } else
  5063. x = dy(g, y),
  5064. _ = dy(g, m);
  5065. hM(fM, g, cM, -l * (1 - (v = _ / (_ + x))))
  5066. }
  5067. sM(dM, dM, s),
  5068. lM(dM, dM, r),
  5069. sM(fM, fM, s),
  5070. lM(fM, fM, r),
  5071. t.bezierCurveTo(dM[0], dM[1], fM[0], fM[1], g[0], g[1]),
  5072. hM(dM, g, cM, l * v)
  5073. } else
  5074. t.lineTo(g[0], g[1]);
  5075. c = d,
  5076. d += a
  5077. }
  5078. return f
  5079. }
  5080. function rs(t, e) {
  5081. var i = [1 / 0, 1 / 0]
  5082. , n = [-1 / 0, -1 / 0];
  5083. if (e)
  5084. for (var o = 0; o < t.length; o++) {
  5085. var a = t[o];
  5086. a[0] < i[0] && (i[0] = a[0]),
  5087. a[1] < i[1] && (i[1] = a[1]),
  5088. a[0] > n[0] && (n[0] = a[0]),
  5089. a[1] > n[1] && (n[1] = a[1])
  5090. }
  5091. return {
  5092. min: e ? i : n,
  5093. max: e ? n : i
  5094. }
  5095. }
  5096. function ss(t, e) {
  5097. if (t.length === e.length) {
  5098. for (var i = 0; i < t.length; i++) {
  5099. var n = t[i]
  5100. , o = e[i];
  5101. if (n[0] !== o[0] || n[1] !== o[1])
  5102. return
  5103. }
  5104. return !0
  5105. }
  5106. }
  5107. function ls(t) {
  5108. return "number" == typeof t ? t : t ? .3 : 0
  5109. }
  5110. function hs(t) {
  5111. var e = t.getGlobalExtent();
  5112. if (t.onBand) {
  5113. var i = t.getBandWidth() / 2 - 1
  5114. , n = e[1] > e[0] ? 1 : -1;
  5115. e[0] += n * i,
  5116. e[1] -= n * i
  5117. }
  5118. return e
  5119. }
  5120. function us(t) {
  5121. return t >= 0 ? 1 : -1
  5122. }
  5123. function cs(t, e) {
  5124. var i = t.getBaseAxis()
  5125. , n = t.getOtherAxis(i)
  5126. , o = 0;
  5127. if (!i.onZero) {
  5128. var a = n.scale.getExtent();
  5129. a[0] > 0 ? o = a[0] : a[1] < 0 && (o = a[1])
  5130. }
  5131. var r = n.dim
  5132. , s = "x" === r || "radius" === r ? 1 : 0;
  5133. return e.mapArray([r], function(n, a) {
  5134. for (var l, h = e.stackedOn; h && us(h.get(r, a)) === us(n); ) {
  5135. l = h;
  5136. break
  5137. }
  5138. var u = [];
  5139. return u[s] = e.get(i.dim, a),
  5140. u[1 - s] = l ? l.get(r, a, !0) : o,
  5141. t.dataToPoint(u)
  5142. }, !0)
  5143. }
  5144. function ds(t, e, i) {
  5145. var n = hs(t.getAxis("x"))
  5146. , o = hs(t.getAxis("y"))
  5147. , a = t.getBaseAxis().isHorizontal()
  5148. , r = Math.min(n[0], n[1])
  5149. , s = Math.min(o[0], o[1])
  5150. , l = Math.max(n[0], n[1]) - r
  5151. , h = Math.max(o[0], o[1]) - s
  5152. , u = i.get("lineStyle.normal.width") || 2
  5153. , c = i.get("clipOverflow") ? u / 2 : Math.max(l, h);
  5154. a ? (s -= c,
  5155. h += 2 * c) : (r -= c,
  5156. l += 2 * c);
  5157. var d = new pb({
  5158. shape: {
  5159. x: r,
  5160. y: s,
  5161. width: l,
  5162. height: h
  5163. }
  5164. });
  5165. return e && (d.shape[a ? "width" : "height"] = 0,
  5166. bo(d, {
  5167. shape: {
  5168. width: l,
  5169. height: h
  5170. }
  5171. }, i)),
  5172. d
  5173. }
  5174. function fs(t, e, i) {
  5175. var n = t.getAngleAxis()
  5176. , o = t.getRadiusAxis().getExtent()
  5177. , a = n.getExtent()
  5178. , r = Math.PI / 180
  5179. , s = new hb({
  5180. shape: {
  5181. cx: t.cx,
  5182. cy: t.cy,
  5183. r0: o[0],
  5184. r: o[1],
  5185. startAngle: -a[0] * r,
  5186. endAngle: -a[1] * r,
  5187. clockwise: n.inverse
  5188. }
  5189. });
  5190. return e && (s.shape.endAngle = -a[0] * r,
  5191. bo(s, {
  5192. shape: {
  5193. endAngle: -a[1] * r
  5194. }
  5195. }, i)),
  5196. s
  5197. }
  5198. function gs(t, e, i) {
  5199. return "polar" === t.type ? fs(t, e, i) : ds(t, e, i)
  5200. }
  5201. function ps(t, e, i) {
  5202. for (var n = e.getBaseAxis(), o = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], r = 0; r < t.length - 1; r++) {
  5203. var s = t[r + 1]
  5204. , l = t[r];
  5205. a.push(l);
  5206. var h = [];
  5207. switch (i) {
  5208. case "end":
  5209. h[o] = s[o],
  5210. h[1 - o] = l[1 - o],
  5211. a.push(h);
  5212. break;
  5213. case "middle":
  5214. var u = (l[o] + s[o]) / 2
  5215. , c = [];
  5216. h[o] = c[o] = u,
  5217. h[1 - o] = l[1 - o],
  5218. c[1 - o] = s[1 - o],
  5219. a.push(h),
  5220. a.push(c);
  5221. break;
  5222. default:
  5223. h[o] = l[o],
  5224. h[1 - o] = s[1 - o],
  5225. a.push(h)
  5226. }
  5227. }
  5228. return t[r] && a.push(t[r]),
  5229. a
  5230. }
  5231. function ms(t, e) {
  5232. var i = t.getVisual("visualMeta");
  5233. if (i && i.length && t.count()) {
  5234. for (var n, o = i.length - 1; o >= 0; o--)
  5235. if (i[o].dimension < 2) {
  5236. n = i[o];
  5237. break
  5238. }
  5239. if (n && "cartesian2d" === e.type) {
  5240. var a = n.dimension
  5241. , r = t.dimensions[a]
  5242. , s = e.getAxis(r)
  5243. , l = d(n.stops, function(t) {
  5244. return {
  5245. coord: s.toGlobalCoord(s.dataToCoord(t.value)),
  5246. color: t.color
  5247. }
  5248. })
  5249. , h = l.length
  5250. , u = n.outerColors.slice();
  5251. h && l[0].coord > l[h - 1].coord && (l.reverse(),
  5252. u.reverse());
  5253. var f = l[0].coord - 10
  5254. , g = l[h - 1].coord + 10
  5255. , p = g - f;
  5256. if (p < .001)
  5257. return "transparent";
  5258. c(l, function(t) {
  5259. t.offset = (t.coord - f) / p
  5260. }),
  5261. l.push({
  5262. offset: h ? l[h - 1].offset : .5,
  5263. color: u[1] || "transparent"
  5264. }),
  5265. l.unshift({
  5266. offset: h ? l[0].offset : .5,
  5267. color: u[0] || "transparent"
  5268. });
  5269. var m = new wb(0,0,0,0,l,!0);
  5270. return m[r] = f,
  5271. m[r + "2"] = g,
  5272. m
  5273. }
  5274. }
  5275. }
  5276. function vs(t) {
  5277. return this._axes[t]
  5278. }
  5279. function ys(t) {
  5280. _M.call(this, t)
  5281. }
  5282. function xs(t, e) {
  5283. return e.type || (e.data ? "category" : "value")
  5284. }
  5285. function _s(t, e, i) {
  5286. return t.getCoordSysModel() === e
  5287. }
  5288. function bs(t, e) {
  5289. var i = e * Math.PI / 180
  5290. , n = t.plain()
  5291. , o = n.width
  5292. , a = n.height
  5293. , r = o * Math.cos(i) + a * Math.sin(i)
  5294. , s = o * Math.sin(i) + a * Math.cos(i);
  5295. return new jt(n.x,n.y,r,s)
  5296. }
  5297. function ws(t) {
  5298. var e, i = t.model, n = i.getFormattedLabels(), o = i.getModel("axisLabel"), a = 1, r = n.length;
  5299. r > 40 && (a = Math.ceil(r / 40));
  5300. for (var s = 0; s < r; s += a)
  5301. if (!t.isLabelIgnored(s)) {
  5302. var l = bs(o.getTextRect(n[s]), o.get("rotate") || 0);
  5303. e ? e.union(l) : e = l
  5304. }
  5305. return e
  5306. }
  5307. function Ss(t, e, i) {
  5308. this._coordsMap = {},
  5309. this._coordsList = [],
  5310. this._axesMap = {},
  5311. this._axesList = [],
  5312. this._initCartesian(t, e, i),
  5313. this.model = t
  5314. }
  5315. function Ms(t, e, i) {
  5316. var n = t[e];
  5317. if (i.onZero) {
  5318. var o = i.onZeroAxisIndex;
  5319. if (null == o) {
  5320. for (var a in n)
  5321. if (n.hasOwnProperty(a)) {
  5322. var r = n[a];
  5323. if (r && !Is(r)) {
  5324. o = +a;
  5325. break
  5326. }
  5327. }
  5328. null == o && (i.onZero = !1),
  5329. i.onZeroAxisIndex = o
  5330. } else
  5331. (r = n[o]) && Is(r) && (i.onZero = !1)
  5332. }
  5333. }
  5334. function Is(t) {
  5335. return "category" === t.type || "time" === t.type || !DM(t)
  5336. }
  5337. function Ts(t, e) {
  5338. var i = t.getExtent()
  5339. , n = i[0] + i[1];
  5340. t.toGlobalCoord = "x" === t.dim ? function(t) {
  5341. return t + e
  5342. }
  5343. : function(t) {
  5344. return n - t + e
  5345. }
  5346. ,
  5347. t.toLocalCoord = "x" === t.dim ? function(t) {
  5348. return t - e
  5349. }
  5350. : function(t) {
  5351. return n - t + e
  5352. }
  5353. }
  5354. function As(t, e) {
  5355. return d(PM, function(e) {
  5356. var i = t.getReferringComponents(e)[0];
  5357. return i
  5358. })
  5359. }
  5360. function Cs(t) {
  5361. return "cartesian2d" === t.get("coordinateSystem")
  5362. }
  5363. function Ds(t) {
  5364. var e = {
  5365. componentType: t.mainType
  5366. };
  5367. return e[t.mainType + "Index"] = t.componentIndex,
  5368. e
  5369. }
  5370. function Ls(t, e, i, n) {
  5371. var o, a, r = Ci(i - t.rotation), s = n[0] > n[1], l = "start" === e && !s || "start" !== e && s;
  5372. return Di(r - OM / 2) ? (a = l ? "bottom" : "top",
  5373. o = "center") : Di(r - 1.5 * OM) ? (a = l ? "top" : "bottom",
  5374. o = "center") : (a = "middle",
  5375. o = r < 1.5 * OM && r > OM / 2 ? l ? "left" : "right" : l ? "right" : "left"),
  5376. {
  5377. rotation: r,
  5378. textAlign: o,
  5379. textVerticalAlign: a
  5380. }
  5381. }
  5382. function ks(t) {
  5383. var e = t.get("tooltip");
  5384. return t.get("silent") || !(t.get("triggerEvent") || e && e.show)
  5385. }
  5386. function Ps(t, e, i) {
  5387. var n = t.get("axisLabel.showMinLabel")
  5388. , o = t.get("axisLabel.showMaxLabel");
  5389. e = e || [],
  5390. i = i || [];
  5391. var a = e[0]
  5392. , r = e[1]
  5393. , s = e[e.length - 1]
  5394. , l = e[e.length - 2]
  5395. , h = i[0]
  5396. , u = i[1]
  5397. , c = i[i.length - 1]
  5398. , d = i[i.length - 2];
  5399. !1 === n ? (Os(a),
  5400. Os(h)) : zs(a, r) && (n ? (Os(r),
  5401. Os(u)) : (Os(a),
  5402. Os(h))),
  5403. !1 === o ? (Os(s),
  5404. Os(c)) : zs(l, s) && (o ? (Os(l),
  5405. Os(d)) : (Os(s),
  5406. Os(c)))
  5407. }
  5408. function Os(t) {
  5409. t && (t.ignore = !0)
  5410. }
  5411. function zs(t, e, i) {
  5412. var n = t && t.getBoundingRect().clone()
  5413. , o = e && e.getBoundingRect().clone();
  5414. if (n && o) {
  5415. var a = ot([]);
  5416. return lt(a, a, -t.rotation),
  5417. n.applyTransform(rt([], a, t.getLocalTransform())),
  5418. o.applyTransform(rt([], a, e.getLocalTransform())),
  5419. n.intersect(o)
  5420. }
  5421. }
  5422. function Ns(t) {
  5423. return "middle" === t || "center" === t
  5424. }
  5425. function Es(t, e, i) {
  5426. var n = e.axis;
  5427. if (e.get("axisTick.show") && !n.scale.isBlank()) {
  5428. for (var o = e.getModel("axisTick"), r = o.getModel("lineStyle"), s = o.get("length"), l = VM(o, i.labelInterval), h = n.getTicksCoords(o.get("alignWithLabel")), u = n.scale.getTicks(), c = e.get("axisLabel.showMinLabel"), d = e.get("axisLabel.showMaxLabel"), f = [], g = [], p = t._transform, m = [], v = h.length, y = 0; y < v; y++)
  5429. if (!RM(n, y, l, v, c, d)) {
  5430. var x = h[y];
  5431. f[0] = x,
  5432. f[1] = 0,
  5433. g[0] = x,
  5434. g[1] = i.tickDirection * s,
  5435. p && (Y(f, f, p),
  5436. Y(g, g, p));
  5437. var _ = new mb(Xn({
  5438. anid: "tick_" + u[y],
  5439. shape: {
  5440. x1: f[0],
  5441. y1: f[1],
  5442. x2: g[0],
  5443. y2: g[1]
  5444. },
  5445. style: a(r.getLineStyle(), {
  5446. stroke: e.get("axisLine.lineStyle.color")
  5447. }),
  5448. z2: 2,
  5449. silent: !0
  5450. }));
  5451. t.group.add(_),
  5452. m.push(_)
  5453. }
  5454. return m
  5455. }
  5456. }
  5457. function Rs(t, e, i) {
  5458. var n = e.axis;
  5459. if (M(i.axisLabelShow, e.get("axisLabel.show")) && !n.scale.isBlank()) {
  5460. var o = e.getModel("axisLabel")
  5461. , a = o.get("margin")
  5462. , r = n.scale.getTicks()
  5463. , s = e.getFormattedLabels()
  5464. , l = (M(i.labelRotate, o.get("rotate")) || 0) * OM / 180
  5465. , h = EM(i.rotation, l, i.labelDirection)
  5466. , u = e.get("data")
  5467. , d = []
  5468. , f = ks(e)
  5469. , g = e.get("triggerEvent")
  5470. , p = e.get("axisLabel.showMinLabel")
  5471. , m = e.get("axisLabel.showMaxLabel");
  5472. return c(r, function(l, c) {
  5473. if (!RM(n, c, i.labelInterval, r.length, p, m)) {
  5474. var v = o;
  5475. u && u[l] && u[l].textStyle && (v = new Co(u[l].textStyle,o,e.ecModel));
  5476. var y = v.getTextColor() || e.get("axisLine.lineStyle.color")
  5477. , x = [n.dataToCoord(l), i.labelOffset + i.labelDirection * a]
  5478. , _ = n.scale.getLabel(l)
  5479. , b = new ab({
  5480. anid: "label_" + l,
  5481. position: x,
  5482. rotation: h.rotation,
  5483. silent: f,
  5484. z2: 10
  5485. });
  5486. uo(b.style, v, {
  5487. text: s[c],
  5488. textAlign: v.getShallow("align", !0) || h.textAlign,
  5489. textVerticalAlign: v.getShallow("verticalAlign", !0) || v.getShallow("baseline", !0) || h.textVerticalAlign,
  5490. textFill: "function" == typeof y ? y("category" === n.type ? _ : "value" === n.type ? l + "" : l, c) : y
  5491. }),
  5492. g && (b.eventData = Ds(e),
  5493. b.eventData.targetType = "axisLabel",
  5494. b.eventData.value = _),
  5495. t._dumbGroup.add(b),
  5496. b.updateTransform(),
  5497. d.push(b),
  5498. t.group.add(b),
  5499. b.decomposeTransform()
  5500. }
  5501. }),
  5502. d
  5503. }
  5504. }
  5505. function Vs(t, e) {
  5506. var i = {
  5507. axesInfo: {},
  5508. seriesInvolved: !1,
  5509. coordSysAxesInfo: {},
  5510. coordSysMap: {}
  5511. };
  5512. return Bs(i, t, e),
  5513. i.seriesInvolved && Ws(i, t),
  5514. i
  5515. }
  5516. function Bs(t, e, i) {
  5517. var n = e.getComponent("tooltip")
  5518. , o = e.getComponent("axisPointer")
  5519. , a = o.get("link", !0) || []
  5520. , r = [];
  5521. BM(i.getCoordinateSystems(), function(i) {
  5522. function s(n, s, l) {
  5523. var c = l.model.getModel("axisPointer", o)
  5524. , d = c.get("show");
  5525. if (d && ("auto" !== d || n || Xs(c))) {
  5526. null == s && (s = c.get("triggerTooltip"));
  5527. var f = (c = n ? Gs(l, u, o, e, n, s) : c).get("snap")
  5528. , g = qs(l.model)
  5529. , p = s || f || "category" === l.type
  5530. , m = t.axesInfo[g] = {
  5531. key: g,
  5532. axis: l,
  5533. coordSys: i,
  5534. axisPointerModel: c,
  5535. triggerTooltip: s,
  5536. involveSeries: p,
  5537. snap: f,
  5538. useHandle: Xs(c),
  5539. seriesModels: []
  5540. };
  5541. h[g] = m,
  5542. t.seriesInvolved |= p;
  5543. var v = Hs(a, l);
  5544. if (null != v) {
  5545. var y = r[v] || (r[v] = {
  5546. axesInfo: {}
  5547. });
  5548. y.axesInfo[g] = m,
  5549. y.mapper = a[v].mapper,
  5550. m.linkGroup = y
  5551. }
  5552. }
  5553. }
  5554. if (i.axisPointerEnabled) {
  5555. var l = qs(i.model)
  5556. , h = t.coordSysAxesInfo[l] = {};
  5557. t.coordSysMap[l] = i;
  5558. var u = i.model.getModel("tooltip", n);
  5559. if (BM(i.getAxes(), GM(s, !1, null)),
  5560. i.getTooltipAxes && n && u.get("show")) {
  5561. var c = "axis" === u.get("trigger")
  5562. , d = "cross" === u.get("axisPointer.type")
  5563. , f = i.getTooltipAxes(u.get("axisPointer.axis"));
  5564. (c || d) && BM(f.baseAxes, GM(s, !d || "cross", c)),
  5565. d && BM(f.otherAxes, GM(s, "cross", !1))
  5566. }
  5567. }
  5568. })
  5569. }
  5570. function Gs(t, i, n, o, r, s) {
  5571. var l = i.getModel("axisPointer")
  5572. , h = {};
  5573. BM(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function(t) {
  5574. h[t] = e(l.get(t))
  5575. }),
  5576. h.snap = "category" !== t.type && !!s,
  5577. "cross" === l.get("type") && (h.type = "line");
  5578. var u = h.label || (h.label = {});
  5579. if (null == u.show && (u.show = !1),
  5580. "cross" === r && (u.show = !0,
  5581. !s)) {
  5582. var c = h.lineStyle = l.get("crossStyle");
  5583. c && a(u, c.textStyle)
  5584. }
  5585. return t.model.getModel("axisPointer", new Co(h,n,o))
  5586. }
  5587. function Ws(t, e) {
  5588. e.eachSeries(function(e) {
  5589. var i = e.coordinateSystem
  5590. , n = e.get("tooltip.trigger", !0)
  5591. , o = e.get("tooltip.show", !0);
  5592. i && "none" !== n && !1 !== n && "item" !== n && !1 !== o && !1 !== e.get("axisPointer.show", !0) && BM(t.coordSysAxesInfo[qs(i.model)], function(t) {
  5593. var n = t.axis;
  5594. i.getAxis(n.dim) === n && (t.seriesModels.push(e),
  5595. null == t.seriesDataCount && (t.seriesDataCount = 0),
  5596. t.seriesDataCount += e.getData().count())
  5597. })
  5598. }, this)
  5599. }
  5600. function Hs(t, e) {
  5601. for (var i = e.model, n = e.dim, o = 0; o < t.length; o++) {
  5602. var a = t[o] || {};
  5603. if (Fs(a[n + "AxisId"], i.id) || Fs(a[n + "AxisIndex"], i.componentIndex) || Fs(a[n + "AxisName"], i.name))
  5604. return o
  5605. }
  5606. }
  5607. function Fs(t, e) {
  5608. return "all" === t || v(t) && s(t, e) >= 0 || t === e
  5609. }
  5610. function Zs(t) {
  5611. var e = Us(t);
  5612. if (e) {
  5613. var i = e.axisPointerModel
  5614. , n = e.axis.scale
  5615. , o = i.option
  5616. , a = i.get("status")
  5617. , r = i.get("value");
  5618. null != r && (r = n.parse(r));
  5619. var s = Xs(i);
  5620. null == a && (o.status = s ? "show" : "hide");
  5621. var l = n.getExtent().slice();
  5622. l[0] > l[1] && l.reverse(),
  5623. (null == r || r > l[1]) && (r = l[1]),
  5624. r < l[0] && (r = l[0]),
  5625. o.value = r,
  5626. s && (o.status = e.axis.scale.isBlank() ? "hide" : "show")
  5627. }
  5628. }
  5629. function Us(t) {
  5630. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  5631. return e && e.axesInfo[qs(t)]
  5632. }
  5633. function js(t) {
  5634. var e = Us(t);
  5635. return e && e.axisPointerModel
  5636. }
  5637. function Xs(t) {
  5638. return !!t.get("handle.show")
  5639. }
  5640. function qs(t) {
  5641. return t.type + "||" + t.id
  5642. }
  5643. function Ys(t, e, i, n, o, a) {
  5644. var r = WM.getAxisPointerClass(t.axisPointerClass);
  5645. if (r) {
  5646. var s = js(e);
  5647. s ? (t._axisPointer || (t._axisPointer = new r)).render(e, s, n, a) : $s(t, n)
  5648. }
  5649. }
  5650. function $s(t, e, i) {
  5651. var n = t._axisPointer;
  5652. n && n.dispose(e, i),
  5653. t._axisPointer = null
  5654. }
  5655. function Ks(t, e, i) {
  5656. i = i || {};
  5657. var n = t.coordinateSystem
  5658. , o = e.axis
  5659. , a = {}
  5660. , r = o.position
  5661. , s = o.onZero ? "onZero" : r
  5662. , l = o.dim
  5663. , h = n.getRect()
  5664. , u = [h.x, h.x + h.width, h.y, h.y + h.height]
  5665. , c = {
  5666. left: 0,
  5667. right: 1,
  5668. top: 0,
  5669. bottom: 1,
  5670. onZero: 2
  5671. }
  5672. , d = e.get("offset") || 0
  5673. , f = "x" === l ? [u[2] - d, u[3] + d] : [u[0] - d, u[1] + d];
  5674. if (o.onZero) {
  5675. var g = n.getAxis("x" === l ? "y" : "x", o.onZeroAxisIndex)
  5676. , p = g.toGlobalCoord(g.dataToCoord(0));
  5677. f[c.onZero] = Math.max(Math.min(p, f[1]), f[0])
  5678. }
  5679. a.position = ["y" === l ? f[c[s]] : u[0], "x" === l ? f[c[s]] : u[3]],
  5680. a.rotation = Math.PI / 2 * ("x" === l ? 0 : 1);
  5681. var m = {
  5682. top: -1,
  5683. bottom: 1,
  5684. left: -1,
  5685. right: 1
  5686. };
  5687. a.labelDirection = a.tickDirection = a.nameDirection = m[r],
  5688. a.labelOffset = o.onZero ? f[c[r]] - f[c.onZero] : 0,
  5689. e.get("axisTick.inside") && (a.tickDirection = -a.tickDirection),
  5690. M(i.labelInside, e.get("axisLabel.inside")) && (a.labelDirection = -a.labelDirection);
  5691. var v = e.get("axisLabel.rotate");
  5692. return a.labelRotate = "top" === s ? -v : v,
  5693. a.labelInterval = o.getLabelInterval(),
  5694. a.z2 = 1,
  5695. a
  5696. }
  5697. function Js(t) {
  5698. return t.get("stack") || qM + t.seriesIndex
  5699. }
  5700. function Qs(t) {
  5701. return t.dim + t.index
  5702. }
  5703. function tl(t, e) {
  5704. return el(d(t, function(t) {
  5705. var e = t.getData()
  5706. , i = t.coordinateSystem.getBaseAxis()
  5707. , n = i.getExtent()
  5708. , o = "category" === i.type ? i.getBandWidth() : Math.abs(n[1] - n[0]) / e.count();
  5709. return {
  5710. bandWidth: o,
  5711. barWidth: bi(t.get("barWidth"), o),
  5712. barMaxWidth: bi(t.get("barMaxWidth"), o),
  5713. barGap: t.get("barGap"),
  5714. barCategoryGap: t.get("barCategoryGap"),
  5715. axisKey: Qs(i),
  5716. stackId: Js(t)
  5717. }
  5718. }), e)
  5719. }
  5720. function el(t, e) {
  5721. var i = {};
  5722. c(t, function(t, e) {
  5723. var n = t.axisKey
  5724. , o = t.bandWidth
  5725. , a = i[n] || {
  5726. bandWidth: o,
  5727. remainedWidth: o,
  5728. autoWidthCount: 0,
  5729. categoryGap: "20%",
  5730. gap: "30%",
  5731. stacks: {}
  5732. }
  5733. , r = a.stacks;
  5734. i[n] = a;
  5735. var s = t.stackId;
  5736. r[s] || a.autoWidthCount++,
  5737. r[s] = r[s] || {
  5738. width: 0,
  5739. maxWidth: 0
  5740. };
  5741. var l = t.barWidth;
  5742. l && !r[s].width && (r[s].width = l,
  5743. l = Math.min(a.remainedWidth, l),
  5744. a.remainedWidth -= l);
  5745. var h = t.barMaxWidth;
  5746. h && (r[s].maxWidth = h);
  5747. var u = t.barGap;
  5748. null != u && (a.gap = u);
  5749. var c = t.barCategoryGap;
  5750. null != c && (a.categoryGap = c)
  5751. });
  5752. var n = {};
  5753. return c(i, function(t, e) {
  5754. n[e] = {};
  5755. var i = t.stacks
  5756. , o = t.bandWidth
  5757. , a = bi(t.categoryGap, o)
  5758. , r = bi(t.gap, 1)
  5759. , s = t.remainedWidth
  5760. , l = t.autoWidthCount
  5761. , h = (s - a) / (l + (l - 1) * r);
  5762. h = Math.max(h, 0),
  5763. c(i, function(t, e) {
  5764. var i = t.maxWidth;
  5765. i && i < h && (i = Math.min(i, s),
  5766. t.width && (i = Math.min(i, t.width)),
  5767. s -= i,
  5768. t.width = i,
  5769. l--)
  5770. }),
  5771. h = (s - a) / (l + (l - 1) * r),
  5772. h = Math.max(h, 0);
  5773. var u, d = 0;
  5774. c(i, function(t, e) {
  5775. t.width || (t.width = h),
  5776. u = t,
  5777. d += t.width * (1 + r)
  5778. }),
  5779. u && (d -= u.width * r);
  5780. var f = -d / 2;
  5781. c(i, function(t, i) {
  5782. n[e][i] = n[e][i] || {
  5783. offset: f,
  5784. width: t.width
  5785. },
  5786. f += t.width * (1 + r)
  5787. })
  5788. }),
  5789. n
  5790. }
  5791. function il(t, e, i) {
  5792. var n = tl(g(e.getSeriesByType(t), function(t) {
  5793. return !e.isSeriesFiltered(t) && t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type
  5794. }))
  5795. , o = {}
  5796. , a = {};
  5797. e.eachSeriesByType(t, function(t) {
  5798. if ("cartesian2d" === t.coordinateSystem.type) {
  5799. var e = t.getData()
  5800. , i = t.coordinateSystem
  5801. , r = i.getBaseAxis()
  5802. , s = Js(t)
  5803. , l = n[Qs(r)][s]
  5804. , h = l.offset
  5805. , u = l.width
  5806. , c = i.getOtherAxis(r)
  5807. , d = t.get("barMinHeight") || 0
  5808. , f = r.onZero ? c.toGlobalCoord(c.dataToCoord(0)) : c.getGlobalExtent()[0]
  5809. , g = [t.coordDimToDataDim("x")[0], t.coordDimToDataDim("y")[0]]
  5810. , p = e.mapArray(g, function(t, e) {
  5811. return i.dataToPoint([t, e])
  5812. }, !0);
  5813. o[s] = o[s] || [],
  5814. a[s] = a[s] || [],
  5815. e.setLayout({
  5816. offset: h,
  5817. size: u
  5818. }),
  5819. e.each(t.coordDimToDataDim(c.dim)[0], function(t, i) {
  5820. if (!isNaN(t)) {
  5821. o[s][i] || (o[s][i] = {
  5822. p: f,
  5823. n: f
  5824. },
  5825. a[s][i] = {
  5826. p: f,
  5827. n: f
  5828. });
  5829. var n, r, l, g, m = t >= 0 ? "p" : "n", v = p[i], y = o[s][i][m], x = a[s][i][m];
  5830. c.isHorizontal() ? (n = y,
  5831. r = v[1] + h,
  5832. l = v[0] - x,
  5833. g = u,
  5834. a[s][i][m] += l,
  5835. Math.abs(l) < d && (l = (l < 0 ? -1 : 1) * d),
  5836. o[s][i][m] += l) : (n = v[0] + h,
  5837. r = y,
  5838. l = u,
  5839. g = v[1] - x,
  5840. a[s][i][m] += g,
  5841. Math.abs(g) < d && (g = (g <= 0 ? -1 : 1) * d),
  5842. o[s][i][m] += g),
  5843. e.setItemLayout(i, {
  5844. x: n,
  5845. y: r,
  5846. width: l,
  5847. height: g
  5848. })
  5849. }
  5850. }, !0)
  5851. }
  5852. }, this)
  5853. }
  5854. function nl(t, e, i, n, o, a, r) {
  5855. ho(t, e, i.getModel("label.normal"), i.getModel("label.emphasis"), {
  5856. labelFetcher: o,
  5857. labelDataIndex: a,
  5858. defaultText: o.getRawValue(a),
  5859. isRectText: !0,
  5860. autoColor: n
  5861. }),
  5862. ol(t),
  5863. ol(e)
  5864. }
  5865. function ol(t, e) {
  5866. "outside" === t.textPosition && (t.textPosition = e)
  5867. }
  5868. function al(t, e, i) {
  5869. i.style.text = null,
  5870. _o(i, {
  5871. shape: {
  5872. width: 0
  5873. }
  5874. }, e, t, function() {
  5875. i.parent && i.parent.remove(i)
  5876. })
  5877. }
  5878. function rl(t, e, i) {
  5879. i.style.text = null,
  5880. _o(i, {
  5881. shape: {
  5882. r: i.shape.r0
  5883. }
  5884. }, e, t, function() {
  5885. i.parent && i.parent.remove(i)
  5886. })
  5887. }
  5888. function sl(t, e, i, n, o, r, s, l) {
  5889. var h = e.getItemVisual(i, "color")
  5890. , u = e.getItemVisual(i, "opacity")
  5891. , c = n.getModel("itemStyle.normal")
  5892. , d = n.getModel("itemStyle.emphasis").getBarItemStyle();
  5893. l || t.setShape("r", c.get("barBorderRadius") || 0),
  5894. t.useStyle(a({
  5895. fill: h,
  5896. opacity: u
  5897. }, c.getBarItemStyle()));
  5898. var f = n.getShallow("cursor");
  5899. f && t.attr("cursor", f);
  5900. var g = s ? o.height > 0 ? "bottom" : "top" : o.width > 0 ? "left" : "right";
  5901. l || nl(t.style, d, n, h, r, i, g),
  5902. lo(t, d)
  5903. }
  5904. function ll(t, e) {
  5905. var i = t.get(JM) || 0;
  5906. return Math.min(i, Math.abs(e.width), Math.abs(e.height))
  5907. }
  5908. function hl(t, e, i, n) {
  5909. var o = e.getData()
  5910. , a = this.dataIndex
  5911. , r = o.getName(a)
  5912. , s = e.get("selectedOffset");
  5913. n.dispatchAction({
  5914. type: "pieToggleSelect",
  5915. from: t,
  5916. name: r,
  5917. seriesId: e.id
  5918. }),
  5919. o.each(function(t) {
  5920. ul(o.getItemGraphicEl(t), o.getItemLayout(t), e.isSelected(o.getName(t)), s, i)
  5921. })
  5922. }
  5923. function ul(t, e, i, n, o) {
  5924. var a = (e.startAngle + e.endAngle) / 2
  5925. , r = Math.cos(a)
  5926. , s = Math.sin(a)
  5927. , l = i ? n : 0
  5928. , h = [r * l, s * l];
  5929. o ? t.animate().when(200, {
  5930. position: h
  5931. }).start("bounceOut") : t.attr("position", h)
  5932. }
  5933. function cl(t, e) {
  5934. function i() {
  5935. a.ignore = a.hoverIgnore,
  5936. r.ignore = r.hoverIgnore
  5937. }
  5938. function n() {
  5939. a.ignore = a.normalIgnore,
  5940. r.ignore = r.normalIgnore
  5941. }
  5942. $y.call(this);
  5943. var o = new hb({
  5944. z2: 2
  5945. })
  5946. , a = new gb
  5947. , r = new ab;
  5948. this.add(o),
  5949. this.add(a),
  5950. this.add(r),
  5951. this.updateData(t, e, !0),
  5952. this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n)
  5953. }
  5954. function dl(t, e, i, n, o, a, r) {
  5955. function s(e, i) {
  5956. for (var n = e; n >= 0 && (t[n].y -= i,
  5957. !(n > 0 && t[n].y > t[n - 1].y + t[n - 1].height)); n--)
  5958. ;
  5959. }
  5960. function l(t, e, i, n, o, a) {
  5961. for (var r = e ? Number.MAX_VALUE : 0, s = 0, l = t.length; s < l; s++)
  5962. if ("center" !== t[s].position) {
  5963. var h = Math.abs(t[s].y - n)
  5964. , u = t[s].len
  5965. , c = t[s].len2
  5966. , d = h < o + u ? Math.sqrt((o + u + c) * (o + u + c) - h * h) : Math.abs(t[s].x - i);
  5967. e && d >= r && (d = r - 10),
  5968. !e && d <= r && (d = r + 10),
  5969. t[s].x = i + d * a,
  5970. r = d
  5971. }
  5972. }
  5973. t.sort(function(t, e) {
  5974. return t.y - e.y
  5975. });
  5976. for (var h, u = 0, c = t.length, d = [], f = [], g = 0; g < c; g++)
  5977. (h = t[g].y - u) < 0 && function(e, i, n, o) {
  5978. for (var a = e; a < i; a++)
  5979. if (t[a].y += n,
  5980. a > e && a + 1 < i && t[a + 1].y > t[a].y + t[a].height)
  5981. return void s(a, n / 2);
  5982. s(i - 1, n / 2)
  5983. }(g, c, -h),
  5984. u = t[g].y + t[g].height;
  5985. r - u < 0 && s(c - 1, u - r);
  5986. for (g = 0; g < c; g++)
  5987. t[g].y >= i ? f.push(t[g]) : d.push(t[g]);
  5988. l(d, !1, e, i, n, o),
  5989. l(f, !0, e, i, n, o)
  5990. }
  5991. function fl(t, e, i, n, o, a) {
  5992. for (var r = [], s = [], l = 0; l < t.length; l++)
  5993. t[l].x < e ? r.push(t[l]) : s.push(t[l]);
  5994. dl(s, e, i, n, 1, o, a),
  5995. dl(r, e, i, n, -1, o, a);
  5996. for (l = 0; l < t.length; l++) {
  5997. var h = t[l].linePoints;
  5998. if (h) {
  5999. var u = h[1][0] - h[2][0];
  6000. t[l].x < e ? h[2][0] = t[l].x + 3 : h[2][0] = t[l].x - 3,
  6001. h[1][1] = h[2][1] = t[l].y,
  6002. h[1][0] = h[2][0] + u
  6003. }
  6004. }
  6005. }
  6006. function gl() {
  6007. this.group = new $y,
  6008. this._symbolEl = new uI({})
  6009. }
  6010. function pl(t, e, i) {
  6011. YS.call(this, t, e, i),
  6012. this.type = "value",
  6013. this.angle = 0,
  6014. this.name = "",
  6015. this.model
  6016. }
  6017. function ml(t, e, i) {
  6018. this._model = t,
  6019. this.dimensions = [],
  6020. this._indicatorAxes = d(t.getIndicatorModels(), function(t, e) {
  6021. var i = "indicator_" + e
  6022. , n = new pl(i,new wS);
  6023. return n.name = t.get("name"),
  6024. n.model = t,
  6025. t.axis = n,
  6026. this.dimensions.push(i),
  6027. n
  6028. }, this),
  6029. this.resize(t, i),
  6030. this.cx,
  6031. this.cy,
  6032. this.r,
  6033. this.startAngle
  6034. }
  6035. function vl(t, e) {
  6036. return a({
  6037. show: e
  6038. }, t)
  6039. }
  6040. function yl(t) {
  6041. return v(t) || (t = [+t, +t]),
  6042. t
  6043. }
  6044. function xl(t, e) {
  6045. return Math.abs(t - e) < pI
  6046. }
  6047. function _l(t, e, i) {
  6048. var n = 0
  6049. , o = t[0];
  6050. if (!o)
  6051. return !1;
  6052. for (var a = 1; a < t.length; a++) {
  6053. var r = t[a];
  6054. n += Mn(o[0], o[1], r[0], r[1], e, i),
  6055. o = r
  6056. }
  6057. var s = t[0];
  6058. return xl(o[0], s[0]) && xl(o[1], s[1]) || (n += Mn(o[0], o[1], s[0], s[1], e, i)),
  6059. 0 !== n
  6060. }
  6061. function bl(t, e, i) {
  6062. if (this.name = t,
  6063. this.geometries = e,
  6064. i)
  6065. i = [i[0], i[1]];
  6066. else {
  6067. var n = this.getBoundingRect();
  6068. i = [n.x + n.width / 2, n.y + n.height / 2]
  6069. }
  6070. this.center = i
  6071. }
  6072. function wl(t) {
  6073. if (!t.UTF8Encoding)
  6074. return t;
  6075. var e = t.UTF8Scale;
  6076. null == e && (e = 1024);
  6077. for (var i = t.features, n = 0; n < i.length; n++)
  6078. for (var o = i[n].geometry, a = o.coordinates, r = o.encodeOffsets, s = 0; s < a.length; s++) {
  6079. var l = a[s];
  6080. if ("Polygon" === o.type)
  6081. a[s] = Sl(l, r[s], e);
  6082. else if ("MultiPolygon" === o.type)
  6083. for (var h = 0; h < l.length; h++) {
  6084. var u = l[h];
  6085. l[h] = Sl(u, r[s][h], e)
  6086. }
  6087. }
  6088. return t.UTF8Encoding = !1,
  6089. t
  6090. }
  6091. function Sl(t, e, i) {
  6092. for (var n = [], o = e[0], a = e[1], r = 0; r < t.length; r += 2) {
  6093. var s = t.charCodeAt(r) - 64
  6094. , l = t.charCodeAt(r + 1) - 64;
  6095. s = s >> 1 ^ -(1 & s),
  6096. l = l >> 1 ^ -(1 & l),
  6097. o = s += o,
  6098. a = l += a,
  6099. n.push([s / i, l / i])
  6100. }
  6101. return n
  6102. }
  6103. function Ml() {
  6104. My.call(this)
  6105. }
  6106. function Il(t) {
  6107. this.name = t,
  6108. this.zoomLimit,
  6109. My.call(this),
  6110. this._roamTransform = new Ml,
  6111. this._viewTransform = new Ml,
  6112. this._center,
  6113. this._zoom
  6114. }
  6115. function Tl(t, e, i, n) {
  6116. var o = i.seriesModel
  6117. , a = o ? o.coordinateSystem : null;
  6118. return a === this ? a[t](n) : null
  6119. }
  6120. function Al(t, e, i, n, o) {
  6121. Il.call(this, t),
  6122. this.map = e,
  6123. this._nameCoordMap = O(),
  6124. this.loadGeoJson(i, n, o)
  6125. }
  6126. function Cl(t, e, i, n) {
  6127. var o = i.geoModel
  6128. , a = i.seriesModel
  6129. , r = o ? o.coordinateSystem : a ? a.coordinateSystem || (a.getReferringComponents("geo")[0] || {}).coordinateSystem : null;
  6130. return r === this ? r[t](n) : null
  6131. }
  6132. function Dl(t, e) {
  6133. var i = t.get("boundingCoords");
  6134. if (null != i) {
  6135. var n = i[0]
  6136. , o = i[1];
  6137. isNaN(n[0]) || isNaN(n[1]) || isNaN(o[0]) || isNaN(o[1]) || this.setBoundingRect(n[0], n[1], o[0] - n[0], o[1] - n[1])
  6138. }
  6139. var a, r = this.getBoundingRect(), s = t.get("layoutCenter"), l = t.get("layoutSize"), h = e.getWidth(), u = e.getHeight(), c = t.get("aspectScale") || .75, d = r.width / r.height * c, f = !1;
  6140. s && l && (s = [bi(s[0], h), bi(s[1], u)],
  6141. l = bi(l, Math.min(h, u)),
  6142. isNaN(s[0]) || isNaN(s[1]) || isNaN(l) || (f = !0));
  6143. if (f) {
  6144. var g = {};
  6145. d > 1 ? (g.width = l,
  6146. g.height = l / d) : (g.height = l,
  6147. g.width = l * d),
  6148. g.y = s[1] - g.height / 2,
  6149. g.x = s[0] - g.width / 2
  6150. } else
  6151. (a = t.getBoxLayoutParams()).aspect = d,
  6152. g = Yo(a, {
  6153. width: h,
  6154. height: u
  6155. });
  6156. this.setViewRect(g.x, g.y, g.width, g.height),
  6157. this.setCenter(t.get("center")),
  6158. this.setZoom(t.get("zoom"))
  6159. }
  6160. function Ll(t, e) {
  6161. c(e.get("geoCoord"), function(e, i) {
  6162. t.addGeoCoord(i, e)
  6163. })
  6164. }
  6165. function kl(t, e, i) {
  6166. zl(t)[e] = i
  6167. }
  6168. function Pl(t, e, i) {
  6169. var n = zl(t);
  6170. n[e] === i && (n[e] = null)
  6171. }
  6172. function Ol(t, e) {
  6173. return !!zl(t)[e]
  6174. }
  6175. function zl(t) {
  6176. return t[DI] || (t[DI] = {})
  6177. }
  6178. function Nl(t) {
  6179. this.pointerChecker,
  6180. this._zr = t,
  6181. this._opt = {};
  6182. var i = p
  6183. , n = i(El, this)
  6184. , o = i(Rl, this)
  6185. , r = i(Vl, this)
  6186. , s = i(Bl, this)
  6187. , l = i(Gl, this);
  6188. my.call(this),
  6189. this.setPointerChecker = function(t) {
  6190. this.pointerChecker = t
  6191. }
  6192. ,
  6193. this.enable = function(i, h) {
  6194. this.disable(),
  6195. this._opt = a(e(h) || {}, {
  6196. zoomOnMouseWheel: !0,
  6197. moveOnMouseMove: !0,
  6198. preventDefaultMouseMove: !0
  6199. }),
  6200. null == i && (i = !0),
  6201. !0 !== i && "move" !== i && "pan" !== i || (t.on("mousedown", n),
  6202. t.on("mousemove", o),
  6203. t.on("mouseup", r)),
  6204. !0 !== i && "scale" !== i && "zoom" !== i || (t.on("mousewheel", s),
  6205. t.on("pinch", l))
  6206. }
  6207. ,
  6208. this.disable = function() {
  6209. t.off("mousedown", n),
  6210. t.off("mousemove", o),
  6211. t.off("mouseup", r),
  6212. t.off("mousewheel", s),
  6213. t.off("pinch", l)
  6214. }
  6215. ,
  6216. this.dispose = this.disable,
  6217. this.isDragging = function() {
  6218. return this._dragging
  6219. }
  6220. ,
  6221. this.isPinching = function() {
  6222. return this._pinching
  6223. }
  6224. }
  6225. function El(t) {
  6226. if (!(si(t) || t.target && t.target.draggable)) {
  6227. var e = t.offsetX
  6228. , i = t.offsetY;
  6229. this.pointerChecker && this.pointerChecker(t, e, i) && (this._x = e,
  6230. this._y = i,
  6231. this._dragging = !0)
  6232. }
  6233. }
  6234. function Rl(t) {
  6235. if (!si(t) && Hl(this, "moveOnMouseMove", t) && this._dragging && "pinch" !== t.gestureEvent && !Ol(this._zr, "globalPan")) {
  6236. var e = t.offsetX
  6237. , i = t.offsetY
  6238. , n = this._x
  6239. , o = this._y
  6240. , a = e - n
  6241. , r = i - o;
  6242. this._x = e,
  6243. this._y = i,
  6244. this._opt.preventDefaultMouseMove && Ix(t.event),
  6245. this.trigger("pan", a, r, n, o, e, i)
  6246. }
  6247. }
  6248. function Vl(t) {
  6249. si(t) || (this._dragging = !1)
  6250. }
  6251. function Bl(t) {
  6252. if (Hl(this, "zoomOnMouseWheel", t) && 0 !== t.wheelDelta) {
  6253. var e = t.wheelDelta > 0 ? 1.1 : 1 / 1.1;
  6254. Wl.call(this, t, e, t.offsetX, t.offsetY)
  6255. }
  6256. }
  6257. function Gl(t) {
  6258. if (!Ol(this._zr, "globalPan")) {
  6259. var e = t.pinchScale > 1 ? 1.1 : 1 / 1.1;
  6260. Wl.call(this, t, e, t.pinchX, t.pinchY)
  6261. }
  6262. }
  6263. function Wl(t, e, i, n) {
  6264. this.pointerChecker && this.pointerChecker(t, i, n) && (Ix(t.event),
  6265. this.trigger("zoom", e, i, n))
  6266. }
  6267. function Hl(t, e, i) {
  6268. var n = t._opt[e];
  6269. return n && (!x(n) || i.event[n + "Key"])
  6270. }
  6271. function Fl(t, e, i) {
  6272. var n = t.target
  6273. , o = n.position;
  6274. o[0] += e,
  6275. o[1] += i,
  6276. n.dirty()
  6277. }
  6278. function Zl(t, e, i, n) {
  6279. var o = t.target
  6280. , a = t.zoomLimit
  6281. , r = o.position
  6282. , s = o.scale
  6283. , l = t.zoom = t.zoom || 1;
  6284. if (l *= e,
  6285. a) {
  6286. var h = a.min || 0
  6287. , u = a.max || 1 / 0;
  6288. l = Math.max(Math.min(u, l), h)
  6289. }
  6290. var c = l / t.zoom;
  6291. t.zoom = l,
  6292. r[0] -= (i - r[0]) * (c - 1),
  6293. r[1] -= (n - r[1]) * (c - 1),
  6294. s[0] *= c,
  6295. s[1] *= c,
  6296. o.dirty()
  6297. }
  6298. function Ul(t, e, i) {
  6299. var n = e.getComponentByElement(t.topTarget)
  6300. , o = n && n.coordinateSystem;
  6301. return n && n !== i && !LI[n.mainType] && o && o.model !== i
  6302. }
  6303. function jl(t, e) {
  6304. var i = t.getItemStyle()
  6305. , n = t.get("areaColor");
  6306. return null != n && (i.fill = n),
  6307. i
  6308. }
  6309. function Xl(t, e, i, n, o) {
  6310. i.off("click"),
  6311. i.off("mousedown"),
  6312. e.get("selectedMode") && (i.on("mousedown", function() {
  6313. t._mouseDownFlag = !0
  6314. }),
  6315. i.on("click", function(a) {
  6316. if (t._mouseDownFlag) {
  6317. t._mouseDownFlag = !1;
  6318. for (var r = a.target; !r.__regions; )
  6319. r = r.parent;
  6320. if (r) {
  6321. var s = {
  6322. type: ("geo" === e.mainType ? "geo" : "map") + "ToggleSelect",
  6323. batch: d(r.__regions, function(t) {
  6324. return {
  6325. name: t.name,
  6326. from: o.uid
  6327. }
  6328. })
  6329. };
  6330. s[e.mainType + "Id"] = e.id,
  6331. n.dispatchAction(s),
  6332. ql(e, i)
  6333. }
  6334. }
  6335. }))
  6336. }
  6337. function ql(t, e) {
  6338. e.eachChild(function(e) {
  6339. c(e.__regions, function(i) {
  6340. e.trigger(t.isSelected(i.name) ? "emphasis" : "normal")
  6341. })
  6342. })
  6343. }
  6344. function Yl(t, e) {
  6345. var i = new $y;
  6346. this._controller = new Nl(t.getZr()),
  6347. this._controllerHost = {
  6348. target: e ? i : null
  6349. },
  6350. this.group = i,
  6351. this._updateGroup = e,
  6352. this._mouseDownFlag
  6353. }
  6354. function $l(t, e, i) {
  6355. var n = t.getZoom()
  6356. , o = t.getCenter()
  6357. , a = e.zoom
  6358. , r = t.dataToPoint(o);
  6359. if (null != e.dx && null != e.dy) {
  6360. r[0] -= e.dx,
  6361. r[1] -= e.dy;
  6362. o = t.pointToData(r);
  6363. t.setCenter(o)
  6364. }
  6365. if (null != a) {
  6366. if (i) {
  6367. var s = i.min || 0
  6368. , l = i.max || 1 / 0;
  6369. a = Math.max(Math.min(n * a, l), s) / n
  6370. }
  6371. t.scale[0] *= a,
  6372. t.scale[1] *= a;
  6373. var h = t.position
  6374. , u = (e.originX - h[0]) * (a - 1)
  6375. , c = (e.originY - h[1]) * (a - 1);
  6376. h[0] -= u,
  6377. h[1] -= c,
  6378. t.updateTransform();
  6379. o = t.pointToData(r);
  6380. t.setCenter(o),
  6381. t.setZoom(a * n)
  6382. }
  6383. return {
  6384. center: t.getCenter(),
  6385. zoom: t.getZoom()
  6386. }
  6387. }
  6388. function Kl(t, e) {
  6389. var i = {}
  6390. , n = ["value"];
  6391. return c(t, function(t) {
  6392. t.each(n, function(e, n) {
  6393. var o = "ec-" + t.getName(n);
  6394. i[o] = i[o] || [],
  6395. isNaN(e) || i[o].push(e)
  6396. })
  6397. }),
  6398. t[0].map(n, function(n, o) {
  6399. for (var a = "ec-" + t[0].getName(o), r = 0, s = 1 / 0, l = -1 / 0, h = i[a].length, u = 0; u < h; u++)
  6400. s = Math.min(s, i[a][u]),
  6401. l = Math.max(l, i[a][u]),
  6402. r += i[a][u];
  6403. var c;
  6404. return c = "min" === e ? s : "max" === e ? l : "average" === e ? r / h : r,
  6405. 0 === h ? NaN : c
  6406. })
  6407. }
  6408. function Jl(t) {
  6409. var e = t.mainData
  6410. , i = t.datas;
  6411. i || (i = {
  6412. main: e
  6413. },
  6414. t.datasAttr = {
  6415. main: "data"
  6416. }),
  6417. t.datas = t.mainData = null,
  6418. oh(e, i, t),
  6419. kI(i, function(i) {
  6420. kI(e.TRANSFERABLE_METHODS, function(e) {
  6421. i.wrapMethod(e, m(Ql, t))
  6422. })
  6423. }),
  6424. e.wrapMethod("cloneShallow", m(eh, t)),
  6425. kI(e.CHANGABLE_METHODS, function(i) {
  6426. e.wrapMethod(i, m(th, t))
  6427. }),
  6428. D(i[e.dataType] === e)
  6429. }
  6430. function Ql(t, e) {
  6431. if (nh(this)) {
  6432. var i = o({}, this[PI]);
  6433. i[this.dataType] = e,
  6434. oh(e, i, t)
  6435. } else
  6436. ah(e, this.dataType, this[OI], t);
  6437. return e
  6438. }
  6439. function th(t, e) {
  6440. return t.struct && t.struct.update(this),
  6441. e
  6442. }
  6443. function eh(t, e) {
  6444. return kI(e[PI], function(i, n) {
  6445. i !== e && ah(i.cloneShallow(), n, e, t)
  6446. }),
  6447. e
  6448. }
  6449. function ih(t) {
  6450. var e = this[OI];
  6451. return null == t || null == e ? e : e[PI][t]
  6452. }
  6453. function nh(t) {
  6454. return t[OI] === t
  6455. }
  6456. function oh(t, e, i) {
  6457. t[PI] = {},
  6458. kI(e, function(e, n) {
  6459. ah(e, n, t, i)
  6460. })
  6461. }
  6462. function ah(t, e, i, n) {
  6463. i[PI][e] = t,
  6464. t[OI] = i,
  6465. t.dataType = e,
  6466. n.struct && (t[n.structAttr] = n.struct,
  6467. n.struct[n.datasAttr[e]] = t),
  6468. t.getLinkedData = ih
  6469. }
  6470. function rh(t, e, i) {
  6471. this.root,
  6472. this.data,
  6473. this._nodes = [],
  6474. this.hostModel = t,
  6475. this.levelModels = d(e || [], function(e) {
  6476. return new Co(e,t,t.ecModel)
  6477. }),
  6478. this.leavesModel = new Co(i || {},t,t.ecModel)
  6479. }
  6480. function sh(t, e) {
  6481. var i = e.children;
  6482. t.parentNode !== e && (i.push(t),
  6483. t.parentNode = e)
  6484. }
  6485. function lh(t) {
  6486. t.hierNode = {
  6487. defaultAncestor: null,
  6488. ancestor: t,
  6489. prelim: 0,
  6490. modifier: 0,
  6491. change: 0,
  6492. shift: 0,
  6493. i: 0,
  6494. thread: null
  6495. };
  6496. for (var e, i, n = [t]; e = n.pop(); )
  6497. if (i = e.children,
  6498. e.isExpand && i.length)
  6499. for (var o = i.length - 1; o >= 0; o--) {
  6500. var a = i[o];
  6501. a.hierNode = {
  6502. defaultAncestor: null,
  6503. ancestor: a,
  6504. prelim: 0,
  6505. modifier: 0,
  6506. change: 0,
  6507. shift: 0,
  6508. i: o,
  6509. thread: null
  6510. },
  6511. n.push(a)
  6512. }
  6513. }
  6514. function hh(t, e) {
  6515. var i = t.isExpand ? t.children : []
  6516. , n = t.parentNode.children
  6517. , o = t.hierNode.i ? n[t.hierNode.i - 1] : null;
  6518. if (i.length) {
  6519. gh(t);
  6520. var a = (i[0].hierNode.prelim + i[i.length - 1].hierNode.prelim) / 2;
  6521. o ? (t.hierNode.prelim = o.hierNode.prelim + e(t, o),
  6522. t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a
  6523. } else
  6524. o && (t.hierNode.prelim = o.hierNode.prelim + e(t, o));
  6525. t.parentNode.hierNode.defaultAncestor = ph(t, o, t.parentNode.hierNode.defaultAncestor || n[0], e)
  6526. }
  6527. function uh(t) {
  6528. var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  6529. t.setLayout({
  6530. x: e
  6531. }, !0),
  6532. t.hierNode.modifier += t.parentNode.hierNode.modifier
  6533. }
  6534. function ch(t) {
  6535. return arguments.length ? t : _h
  6536. }
  6537. function dh(t, e) {
  6538. var i = {};
  6539. return t -= Math.PI / 2,
  6540. i.x = e * Math.cos(t),
  6541. i.y = e * Math.sin(t),
  6542. i
  6543. }
  6544. function fh(t, e) {
  6545. return Yo(t.getBoxLayoutParams(), {
  6546. width: e.getWidth(),
  6547. height: e.getHeight()
  6548. })
  6549. }
  6550. function gh(t) {
  6551. for (var e = t.children, i = e.length, n = 0, o = 0; --i >= 0; ) {
  6552. var a = e[i];
  6553. a.hierNode.prelim += n,
  6554. a.hierNode.modifier += n,
  6555. o += a.hierNode.change,
  6556. n += a.hierNode.shift + o
  6557. }
  6558. }
  6559. function ph(t, e, i, n) {
  6560. if (e) {
  6561. for (var o = t, a = t, r = a.parentNode.children[0], s = e, l = o.hierNode.modifier, h = a.hierNode.modifier, u = r.hierNode.modifier, c = s.hierNode.modifier; s = mh(s),
  6562. a = vh(a),
  6563. s && a; ) {
  6564. o = mh(o),
  6565. r = vh(r),
  6566. o.hierNode.ancestor = t;
  6567. var d = s.hierNode.prelim + c - a.hierNode.prelim - h + n(s, a);
  6568. d > 0 && (xh(yh(s, t, i), t, d),
  6569. h += d,
  6570. l += d),
  6571. c += s.hierNode.modifier,
  6572. h += a.hierNode.modifier,
  6573. l += o.hierNode.modifier,
  6574. u += r.hierNode.modifier
  6575. }
  6576. s && !mh(o) && (o.hierNode.thread = s,
  6577. o.hierNode.modifier += c - l),
  6578. a && !vh(r) && (r.hierNode.thread = a,
  6579. r.hierNode.modifier += h - u,
  6580. i = t)
  6581. }
  6582. return i
  6583. }
  6584. function mh(t) {
  6585. var e = t.children;
  6586. return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread
  6587. }
  6588. function vh(t) {
  6589. var e = t.children;
  6590. return e.length && t.isExpand ? e[0] : t.hierNode.thread
  6591. }
  6592. function yh(t, e, i) {
  6593. return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : i
  6594. }
  6595. function xh(t, e, i) {
  6596. var n = i / (e.hierNode.i - t.hierNode.i);
  6597. e.hierNode.change -= n,
  6598. e.hierNode.shift += i,
  6599. e.hierNode.modifier += i,
  6600. e.hierNode.prelim += i,
  6601. t.hierNode.change += n
  6602. }
  6603. function _h(t, e) {
  6604. return t.parentNode === e.parentNode ? 1 : 2
  6605. }
  6606. function bh(t, e) {
  6607. var i = t.getItemLayout(e);
  6608. return i && !isNaN(i.x) && !isNaN(i.y) && "none" !== t.getItemVisual(e, "symbol")
  6609. }
  6610. function wh(t, e, i) {
  6611. return i.itemModel = e,
  6612. i.itemStyle = e.getModel("itemStyle.normal").getItemStyle(),
  6613. i.hoverItemStyle = e.getModel("itemStyle.emphasis").getItemStyle(),
  6614. i.lineStyle = e.getModel("lineStyle.normal").getLineStyle(),
  6615. i.labelModel = e.getModel("label.normal"),
  6616. i.hoverLabelModel = e.getModel("label.emphasis"),
  6617. !1 === t.isExpand && 0 !== t.children.length ? i.symbolInnerColor = i.itemStyle.fill : i.symbolInnerColor = "#fff",
  6618. i
  6619. }
  6620. function Sh(t, e, i, n, o, r) {
  6621. var s = !i
  6622. , l = t.tree.getNodeByDataIndex(e)
  6623. , r = wh(l, l.getModel(), r)
  6624. , h = t.tree.root
  6625. , u = l.parentNode === h ? l : l.parentNode || l
  6626. , c = t.getItemGraphicEl(u.dataIndex)
  6627. , d = u.getLayout()
  6628. , f = c ? {
  6629. x: c.position[0],
  6630. y: c.position[1],
  6631. rawX: c.__radialOldRawX,
  6632. rawY: c.__radialOldRawY
  6633. } : d
  6634. , g = l.getLayout();
  6635. s ? (i = new Kr(t,e,r)).attr("position", [f.x, f.y]) : i.updateData(t, e, r),
  6636. i.__radialOldRawX = i.__radialRawX,
  6637. i.__radialOldRawY = i.__radialRawY,
  6638. i.__radialRawX = g.rawX,
  6639. i.__radialRawY = g.rawY,
  6640. n.add(i),
  6641. t.setItemGraphicEl(e, i),
  6642. _o(i, {
  6643. position: [g.x, g.y]
  6644. }, o);
  6645. var p = i.getSymbolPath();
  6646. if ("radial" === r.layout) {
  6647. var m, v, y = h.children[0], x = y.getLayout(), _ = y.children.length;
  6648. if (g.x === x.x && !0 === l.isExpand) {
  6649. var b = {};
  6650. b.x = (y.children[0].getLayout().x + y.children[_ - 1].getLayout().x) / 2,
  6651. b.y = (y.children[0].getLayout().y + y.children[_ - 1].getLayout().y) / 2,
  6652. (m = Math.atan2(b.y - x.y, b.x - x.x)) < 0 && (m = 2 * Math.PI + m),
  6653. (v = b.x < x.x) && (m -= Math.PI)
  6654. } else
  6655. (m = Math.atan2(g.y - x.y, g.x - x.x)) < 0 && (m = 2 * Math.PI + m),
  6656. 0 === l.children.length || 0 !== l.children.length && !1 === l.isExpand ? (v = g.x < x.x) && (m -= Math.PI) : (v = g.x > x.x) || (m -= Math.PI);
  6657. var w = v ? "left" : "right";
  6658. p.setStyle({
  6659. textPosition: w,
  6660. textRotation: -m,
  6661. textOrigin: "center",
  6662. verticalAlign: "middle"
  6663. })
  6664. }
  6665. if (l.parentNode && l.parentNode !== h) {
  6666. var S = i.__edge;
  6667. S || (S = i.__edge = new yb({
  6668. shape: Ih(r, f, f),
  6669. style: a({
  6670. opacity: 0
  6671. }, r.lineStyle)
  6672. })),
  6673. _o(S, {
  6674. shape: Ih(r, d, g),
  6675. style: {
  6676. opacity: 1
  6677. }
  6678. }, o),
  6679. n.add(S)
  6680. }
  6681. }
  6682. function Mh(t, e, i, n, o, a) {
  6683. for (var r, s = t.tree.getNodeByDataIndex(e), l = t.tree.root, a = wh(s, s.getModel(), a), h = s.parentNode === l ? s : s.parentNode || s; null == (r = h.getLayout()); )
  6684. h = h.parentNode === l ? h : h.parentNode || h;
  6685. _o(i, {
  6686. position: [r.x + 1, r.y + 1]
  6687. }, o, function() {
  6688. n.remove(i),
  6689. t.setItemGraphicEl(e, null)
  6690. }),
  6691. i.fadeOut(null, {
  6692. keepLabel: !0
  6693. });
  6694. var u = i.__edge;
  6695. u && _o(u, {
  6696. shape: Ih(a, r, r),
  6697. style: {
  6698. opacity: 0
  6699. }
  6700. }, o, function() {
  6701. n.remove(u)
  6702. })
  6703. }
  6704. function Ih(t, e, i) {
  6705. var n, o, a, r, s = t.orient;
  6706. if ("radial" === t.layout) {
  6707. var l = e.rawX
  6708. , h = e.rawY
  6709. , u = i.rawX
  6710. , c = i.rawY
  6711. , d = dh(l, h)
  6712. , f = dh(l, h + (c - h) * t.curvature)
  6713. , g = dh(u, c + (h - c) * t.curvature)
  6714. , p = dh(u, c);
  6715. return {
  6716. x1: d.x,
  6717. y1: d.y,
  6718. x2: p.x,
  6719. y2: p.y,
  6720. cpx1: f.x,
  6721. cpy1: f.y,
  6722. cpx2: g.x,
  6723. cpy2: g.y
  6724. }
  6725. }
  6726. var l = e.x
  6727. , h = e.y
  6728. , u = i.x
  6729. , c = i.y;
  6730. return "horizontal" === s && (n = l + (u - l) * t.curvature,
  6731. o = h,
  6732. a = u + (l - u) * t.curvature,
  6733. r = c),
  6734. "vertical" === s && (n = l,
  6735. o = h + (c - h) * t.curvature,
  6736. a = u,
  6737. r = c + (h - c) * t.curvature),
  6738. {
  6739. x1: l,
  6740. y1: h,
  6741. x2: u,
  6742. y2: c,
  6743. cpx1: n,
  6744. cpy1: o,
  6745. cpx2: a,
  6746. cpy2: r
  6747. }
  6748. }
  6749. function Th(t, e, i) {
  6750. for (var n, o = [t], a = []; n = o.pop(); )
  6751. if (a.push(n),
  6752. n.isExpand) {
  6753. var r = n.children;
  6754. if (r.length)
  6755. for (var s = 0; s < r.length; s++)
  6756. o.push(r[s])
  6757. }
  6758. for (; n = a.pop(); )
  6759. e(n, i)
  6760. }
  6761. function Ah(t, e) {
  6762. for (var i, n = [t]; i = n.pop(); )
  6763. if (e(i),
  6764. i.isExpand) {
  6765. var o = i.children;
  6766. if (o.length)
  6767. for (var a = o.length - 1; a >= 0; a--)
  6768. n.push(o[a])
  6769. }
  6770. }
  6771. function Ch(t, e) {
  6772. if (t && ("treemapZoomToNode" === t.type || "treemapRootToNode" === t.type)) {
  6773. var i = e.getData().tree.root
  6774. , n = t.targetNode;
  6775. if (n && i.contains(n))
  6776. return {
  6777. node: n
  6778. };
  6779. var o = t.targetNodeId;
  6780. if (null != o && (n = i.getNodeById(o)))
  6781. return {
  6782. node: n
  6783. }
  6784. }
  6785. }
  6786. function Dh(t) {
  6787. for (var e = []; t; )
  6788. (t = t.parentNode) && e.push(t);
  6789. return e.reverse()
  6790. }
  6791. function Lh(t, e) {
  6792. return s(Dh(t), e) >= 0
  6793. }
  6794. function kh(t, e) {
  6795. for (var i = []; t; ) {
  6796. var n = t.dataIndex;
  6797. i.push({
  6798. name: t.name,
  6799. dataIndex: n,
  6800. value: e.getRawValue(n)
  6801. }),
  6802. t = t.parentNode
  6803. }
  6804. return i.reverse(),
  6805. i
  6806. }
  6807. function Ph(t) {
  6808. var e = 0;
  6809. c(t.children, function(t) {
  6810. Ph(t);
  6811. var i = t.value;
  6812. v(i) && (i = i[0]),
  6813. e += i
  6814. });
  6815. var i = t.value;
  6816. v(i) && (i = i[0]),
  6817. (null == i || isNaN(i)) && (i = e),
  6818. i < 0 && (i = 0),
  6819. v(t.value) ? t.value[0] = i : t.value = i
  6820. }
  6821. function Oh(t, e) {
  6822. var i = e.get("color");
  6823. if (i) {
  6824. var n;
  6825. return c(t = t || [], function(t) {
  6826. var e = new Co(t)
  6827. , i = e.get("color");
  6828. (e.get("itemStyle.normal.color") || i && "none" !== i) && (n = !0)
  6829. }),
  6830. n || ((t[0] || (t[0] = {})).color = i.slice()),
  6831. t
  6832. }
  6833. }
  6834. function zh(t) {
  6835. this.group = new $y,
  6836. t.add(this.group)
  6837. }
  6838. function Nh(t, e, i, n, o, a) {
  6839. var r = [[o ? t : t - EI, e], [t + i, e], [t + i, e + n], [o ? t : t - EI, e + n]];
  6840. return !a && r.splice(2, 0, [t + i + EI, e + n / 2]),
  6841. !o && r.push([t, e + n / 2]),
  6842. r
  6843. }
  6844. function Eh(t, e, i) {
  6845. t.eventData = {
  6846. componentType: "series",
  6847. componentSubType: "treemap",
  6848. seriesIndex: e.componentIndex,
  6849. seriesName: e.name,
  6850. seriesType: "treemap",
  6851. selfType: "breadcrumb",
  6852. nodeData: {
  6853. dataIndex: i && i.dataIndex,
  6854. name: i && i.name
  6855. },
  6856. treePathInfo: i && kh(i, e)
  6857. }
  6858. }
  6859. function Rh() {
  6860. var t, e = [], i = {};
  6861. return {
  6862. add: function(t, n, o, a, r) {
  6863. return x(a) && (r = a,
  6864. a = 0),
  6865. !i[t.id] && (i[t.id] = 1,
  6866. e.push({
  6867. el: t,
  6868. target: n,
  6869. time: o,
  6870. delay: a,
  6871. easing: r
  6872. }),
  6873. !0)
  6874. },
  6875. done: function(e) {
  6876. return t = e,
  6877. this
  6878. },
  6879. start: function() {
  6880. for (var n = e.length, o = 0, a = e.length; o < a; o++) {
  6881. var r = e[o];
  6882. r.el.animateTo(r.target, r.time, r.delay, r.easing, function() {
  6883. --n || (e.length = 0,
  6884. i = {},
  6885. t && t())
  6886. })
  6887. }
  6888. return this
  6889. }
  6890. }
  6891. }
  6892. function Vh(t, i, n, a, r, s, l, h, u, c) {
  6893. function d(t, e) {
  6894. b ? !t.invisible && s.push(t) : (e(),
  6895. t.__tmWillVisible || (t.invisible = !1))
  6896. }
  6897. function f(i, n, o, a, r, s) {
  6898. var h = l.getModel()
  6899. , u = M(t.getFormattedLabel(l.dataIndex, "normal", null, null, s ? "upperLabel" : "label"), h.get("name"));
  6900. if (!s && v.isLeafRoot) {
  6901. var c = t.get("drillDownIcon", !0);
  6902. u = c ? c + " " + u : u
  6903. }
  6904. var d = h.getModel(s ? FI : WI)
  6905. , f = h.getModel(s ? ZI : HI)
  6906. , g = d.getShallow("show");
  6907. ho(i, n, d, f, {
  6908. defaultText: g ? u : null,
  6909. autoColor: o,
  6910. isRectText: !0
  6911. }),
  6912. s && (i.textRect = e(s)),
  6913. i.truncate = g && d.get("ellipsis") ? {
  6914. outerWidth: a,
  6915. outerHeight: r,
  6916. minChar: 2
  6917. } : null
  6918. }
  6919. function g(t, e, o, a) {
  6920. var s = null != S && n[t][S]
  6921. , l = r[t];
  6922. return s ? (n[t][S] = null,
  6923. p(l, s, t)) : b || ((s = new e({
  6924. z: Bh(o, a)
  6925. })).__tmDepth = o,
  6926. s.__tmStorageName = t,
  6927. m(l, s, t)),
  6928. i[t][w] = s
  6929. }
  6930. function p(t, e, i) {
  6931. (t[w] = {}).old = "nodeGroup" === i ? e.position.slice() : o({}, e.shape)
  6932. }
  6933. function m(t, e, i) {
  6934. var n = t[w] = {}
  6935. , o = l.parentNode;
  6936. if (o && (!a || "drillDown" === a.direction)) {
  6937. var s = 0
  6938. , h = 0
  6939. , u = r.background[o.getRawIndex()];
  6940. !a && u && u.old && (s = u.old.width,
  6941. h = u.old.height),
  6942. n.old = "nodeGroup" === i ? [0, h] : {
  6943. x: s,
  6944. y: h,
  6945. width: 0,
  6946. height: 0
  6947. }
  6948. }
  6949. n.fadein = "nodeGroup" !== i
  6950. }
  6951. if (l) {
  6952. var v = l.getLayout();
  6953. if (v && v.isInView) {
  6954. var y = v.width
  6955. , x = v.height
  6956. , _ = v.borderWidth
  6957. , b = v.invisible
  6958. , w = l.getRawIndex()
  6959. , S = h && h.getRawIndex()
  6960. , I = l.viewChildren
  6961. , T = v.upperHeight
  6962. , A = I && I.length
  6963. , C = l.getModel("itemStyle.normal")
  6964. , D = l.getModel("itemStyle.emphasis")
  6965. , L = g("nodeGroup", VI);
  6966. if (L) {
  6967. if (u.add(L),
  6968. L.attr("position", [v.x || 0, v.y || 0]),
  6969. L.__tmNodeWidth = y,
  6970. L.__tmNodeHeight = x,
  6971. v.isAboveViewRoot)
  6972. return L;
  6973. var k = g("background", BI, c, jI);
  6974. if (k && function(e, i, n) {
  6975. i.dataIndex = l.dataIndex,
  6976. i.seriesIndex = t.seriesIndex,
  6977. i.setShape({
  6978. x: 0,
  6979. y: 0,
  6980. width: y,
  6981. height: x
  6982. });
  6983. var o = l.getVisual("borderColor", !0)
  6984. , a = D.get("borderColor");
  6985. d(i, function() {
  6986. var t = YI(C);
  6987. t.fill = o;
  6988. var e = qI(D);
  6989. if (e.fill = a,
  6990. n) {
  6991. var r = y - 2 * _;
  6992. f(t, e, o, r, T, {
  6993. x: _,
  6994. y: 0,
  6995. width: r,
  6996. height: T
  6997. })
  6998. } else
  6999. t.text = e.text = null;
  7000. i.setStyle(t),
  7001. lo(i, e)
  7002. }),
  7003. e.add(i)
  7004. }(L, k, A && v.upperHeight),
  7005. !A) {
  7006. var P = g("content", BI, c, XI);
  7007. P && function(e, i) {
  7008. i.dataIndex = l.dataIndex,
  7009. i.seriesIndex = t.seriesIndex;
  7010. var n = Math.max(y - 2 * _, 0)
  7011. , o = Math.max(x - 2 * _, 0);
  7012. i.culling = !0,
  7013. i.setShape({
  7014. x: _,
  7015. y: _,
  7016. width: n,
  7017. height: o
  7018. });
  7019. var a = l.getVisual("color", !0);
  7020. d(i, function() {
  7021. var t = YI(C);
  7022. t.fill = a;
  7023. var e = qI(D);
  7024. f(t, e, a, n, o),
  7025. i.setStyle(t),
  7026. lo(i, e)
  7027. }),
  7028. e.add(i)
  7029. }(L, P)
  7030. }
  7031. return L
  7032. }
  7033. }
  7034. }
  7035. }
  7036. function Bh(t, e) {
  7037. var i = t * UI + e;
  7038. return (i - 1) / i
  7039. }
  7040. function Gh(t) {
  7041. var e = t.pieceList;
  7042. t.hasSpecialVisual = !1,
  7043. c(e, function(e, i) {
  7044. e.originIndex = i,
  7045. null != e.visual && (t.hasSpecialVisual = !0)
  7046. })
  7047. }
  7048. function Wh(t) {
  7049. var e = t.categories
  7050. , i = t.visual
  7051. , n = t.categoryMap = {};
  7052. if (JI(e, function(t, e) {
  7053. n[t] = e
  7054. }),
  7055. !v(i)) {
  7056. var o = [];
  7057. _(i) ? JI(i, function(t, e) {
  7058. var i = n[e];
  7059. o[null != i ? i : tT] = t
  7060. }) : o[tT] = i,
  7061. i = $h(t, o)
  7062. }
  7063. for (var a = e.length - 1; a >= 0; a--)
  7064. null == i[a] && (delete n[e[a]],
  7065. e.pop())
  7066. }
  7067. function Hh(t, e) {
  7068. var i = t.visual
  7069. , n = [];
  7070. _(i) ? JI(i, function(t) {
  7071. n.push(t)
  7072. }) : null != i && n.push(i);
  7073. var o = {
  7074. color: 1,
  7075. symbol: 1
  7076. };
  7077. e || 1 !== n.length || o.hasOwnProperty(t.type) || (n[1] = n[0]),
  7078. $h(t, n)
  7079. }
  7080. function Fh(t) {
  7081. return {
  7082. applyVisual: function(e, i, n) {
  7083. e = this.mapValueToVisual(e),
  7084. n("color", t(i("color"), e))
  7085. },
  7086. _doMap: qh([0, 1])
  7087. }
  7088. }
  7089. function Zh(t) {
  7090. var e = this.option.visual;
  7091. return e[Math.round(_i(t, [0, 1], [0, e.length - 1], !0))] || {}
  7092. }
  7093. function Uh(t) {
  7094. return function(e, i, n) {
  7095. n(t, this.mapValueToVisual(e))
  7096. }
  7097. }
  7098. function jh(t) {
  7099. var e = this.option.visual;
  7100. return e[this.option.loop && t !== tT ? t % e.length : t]
  7101. }
  7102. function Xh() {
  7103. return this.option.visual[0]
  7104. }
  7105. function qh(t) {
  7106. return {
  7107. linear: function(e) {
  7108. return _i(e, t, this.option.visual, !0)
  7109. },
  7110. category: jh,
  7111. piecewise: function(e, i) {
  7112. var n = Yh.call(this, i);
  7113. return null == n && (n = _i(e, t, this.option.visual, !0)),
  7114. n
  7115. },
  7116. fixed: Xh
  7117. }
  7118. }
  7119. function Yh(t) {
  7120. var e = this.option
  7121. , i = e.pieceList;
  7122. if (e.hasSpecialVisual) {
  7123. var n = i[eT.findPieceIndex(t, i)];
  7124. if (n && n.visual)
  7125. return n.visual[this.type]
  7126. }
  7127. }
  7128. function $h(t, e) {
  7129. return t.visual = e,
  7130. "color" === t.type && (t.parsedVisual = d(e, function(t) {
  7131. return St(t)
  7132. })),
  7133. e
  7134. }
  7135. function Kh(t, e, i) {
  7136. return t ? e <= i : e < i
  7137. }
  7138. function Jh(t, e, i, n, o, a) {
  7139. var r = t.getModel()
  7140. , s = t.getLayout();
  7141. if (s && !s.invisible && s.isInView) {
  7142. var l, h = t.getModel(aT), u = Qh(h, e, i[t.depth], n), d = h.get("borderColor"), f = h.get("borderColorSaturation");
  7143. null != f && (d = eu(f, l = tu(u))),
  7144. t.setVisual("borderColor", d);
  7145. var g = t.viewChildren;
  7146. if (g && g.length) {
  7147. var p = nu(t, r, s, h, u, g);
  7148. c(g, function(t, e) {
  7149. (t.depth >= o.length || t === o[t.depth]) && Jh(t, au(r, u, t, e, p, a), i, n, o, a)
  7150. })
  7151. } else
  7152. l = tu(u),
  7153. t.setVisual("color", l)
  7154. }
  7155. }
  7156. function Qh(t, e, i, n) {
  7157. var a = o({}, e);
  7158. return c(["color", "colorAlpha", "colorSaturation"], function(o) {
  7159. var r = t.get(o, !0);
  7160. null == r && i && (r = i[o]),
  7161. null == r && (r = e[o]),
  7162. null == r && (r = n.get(o)),
  7163. null != r && (a[o] = r)
  7164. }),
  7165. a
  7166. }
  7167. function tu(t) {
  7168. var e = iu(t, "color");
  7169. if (e) {
  7170. var i = iu(t, "colorAlpha")
  7171. , n = iu(t, "colorSaturation");
  7172. return n && (e = Lt(e, null, null, n)),
  7173. i && (e = kt(e, i)),
  7174. e
  7175. }
  7176. }
  7177. function eu(t, e) {
  7178. return null != e ? Lt(e, null, null, t) : null
  7179. }
  7180. function iu(t, e) {
  7181. var i = t[e];
  7182. if (null != i && "none" !== i)
  7183. return i
  7184. }
  7185. function nu(t, e, i, n, o, a) {
  7186. if (a && a.length) {
  7187. var r = ou(e, "color") || null != o.color && "none" !== o.color && (ou(e, "colorAlpha") || ou(e, "colorSaturation"));
  7188. if (r) {
  7189. var s = e.get("visualMin")
  7190. , l = e.get("visualMax")
  7191. , h = i.dataExtent.slice();
  7192. null != s && s < h[0] && (h[0] = s),
  7193. null != l && l > h[1] && (h[1] = l);
  7194. var u = e.get("colorMappingBy")
  7195. , c = {
  7196. type: r.name,
  7197. dataExtent: h,
  7198. visual: r.range
  7199. };
  7200. "color" !== c.type || "index" !== u && "id" !== u ? c.mappingMethod = "linear" : (c.mappingMethod = "category",
  7201. c.loop = !0);
  7202. var d = new eT(c);
  7203. return d.__drColorMappingBy = u,
  7204. d
  7205. }
  7206. }
  7207. }
  7208. function ou(t, e) {
  7209. var i = t.get(e);
  7210. return oT(i) && i.length ? {
  7211. name: e,
  7212. range: i
  7213. } : null
  7214. }
  7215. function au(t, e, i, n, a, r) {
  7216. var s = o({}, e);
  7217. if (a) {
  7218. var l = a.type
  7219. , h = "color" === l && a.__drColorMappingBy
  7220. , u = "index" === h ? n : "id" === h ? r.mapIdToIndex(i.getId()) : i.getValue(t.get("visualDimension"));
  7221. s[l] = a.mapValueToVisual(u)
  7222. }
  7223. return s
  7224. }
  7225. function ru(t, e, i, n) {
  7226. var o, a;
  7227. if (!t.isRemoved()) {
  7228. var r = t.getLayout();
  7229. o = r.width,
  7230. a = r.height;
  7231. var s = (f = t.getModel()).get(uT)
  7232. , l = f.get(cT) / 2
  7233. , h = mu(f)
  7234. , u = Math.max(s, h)
  7235. , c = s - l
  7236. , d = u - l
  7237. , f = t.getModel();
  7238. t.setLayout({
  7239. borderWidth: s,
  7240. upperHeight: u,
  7241. upperLabelHeight: h
  7242. }, !0);
  7243. var g = (o = rT(o - 2 * c, 0)) * (a = rT(a - c - d, 0))
  7244. , p = su(t, f, g, e, i, n);
  7245. if (p.length) {
  7246. var m = {
  7247. x: c,
  7248. y: d,
  7249. width: o,
  7250. height: a
  7251. }
  7252. , v = sT(o, a)
  7253. , y = 1 / 0
  7254. , x = [];
  7255. x.area = 0;
  7256. for (var _ = 0, b = p.length; _ < b; ) {
  7257. var w = p[_];
  7258. x.push(w),
  7259. x.area += w.getLayout().area;
  7260. var S = cu(x, v, e.squareRatio);
  7261. S <= y ? (_++,
  7262. y = S) : (x.area -= x.pop().getLayout().area,
  7263. du(x, v, m, l, !1),
  7264. v = sT(m.width, m.height),
  7265. x.length = x.area = 0,
  7266. y = 1 / 0)
  7267. }
  7268. if (x.length && du(x, v, m, l, !0),
  7269. !i) {
  7270. var M = f.get("childrenVisibleMin");
  7271. null != M && g < M && (i = !0)
  7272. }
  7273. for (var _ = 0, b = p.length; _ < b; _++)
  7274. ru(p[_], e, i, n + 1)
  7275. }
  7276. }
  7277. }
  7278. function su(t, e, i, n, o, a) {
  7279. var r = t.children || []
  7280. , s = n.sort;
  7281. "asc" !== s && "desc" !== s && (s = null);
  7282. var l = null != n.leafDepth && n.leafDepth <= a;
  7283. if (o && !l)
  7284. return t.viewChildren = [];
  7285. hu(r = g(r, function(t) {
  7286. return !t.isRemoved()
  7287. }), s);
  7288. var h = uu(e, r, s);
  7289. if (0 === h.sum)
  7290. return t.viewChildren = [];
  7291. if (h.sum = lu(e, i, h.sum, s, r),
  7292. 0 === h.sum)
  7293. return t.viewChildren = [];
  7294. for (var u = 0, c = r.length; u < c; u++) {
  7295. var d = r[u].getValue() / h.sum * i;
  7296. r[u].setLayout({
  7297. area: d
  7298. })
  7299. }
  7300. return l && (r.length && t.setLayout({
  7301. isLeafRoot: !0
  7302. }, !0),
  7303. r.length = 0),
  7304. t.viewChildren = r,
  7305. t.setLayout({
  7306. dataExtent: h.dataExtent
  7307. }, !0),
  7308. r
  7309. }
  7310. function lu(t, e, i, n, o) {
  7311. if (!n)
  7312. return i;
  7313. for (var a = t.get("visibleMin"), r = o.length, s = r, l = r - 1; l >= 0; l--) {
  7314. var h = o["asc" === n ? r - l - 1 : l].getValue();
  7315. h / i * e < a && (s = l,
  7316. i -= h)
  7317. }
  7318. return "asc" === n ? o.splice(0, r - s) : o.splice(s, r - s),
  7319. i
  7320. }
  7321. function hu(t, e) {
  7322. return e && t.sort(function(t, i) {
  7323. var n = "asc" === e ? t.getValue() - i.getValue() : i.getValue() - t.getValue();
  7324. return 0 === n ? "asc" === e ? t.dataIndex - i.dataIndex : i.dataIndex - t.dataIndex : n
  7325. }),
  7326. t
  7327. }
  7328. function uu(t, e, i) {
  7329. for (var n = 0, o = 0, a = e.length; o < a; o++)
  7330. n += e[o].getValue();
  7331. var r = t.get("visualDimension");
  7332. if (e && e.length)
  7333. if ("value" === r && i)
  7334. s = [e[e.length - 1].getValue(), e[0].getValue()],
  7335. "asc" === i && s.reverse();
  7336. else {
  7337. var s = [1 / 0, -1 / 0];
  7338. hT(e, function(t) {
  7339. var e = t.getValue(r);
  7340. e < s[0] && (s[0] = e),
  7341. e > s[1] && (s[1] = e)
  7342. })
  7343. }
  7344. else
  7345. s = [NaN, NaN];
  7346. return {
  7347. sum: n,
  7348. dataExtent: s
  7349. }
  7350. }
  7351. function cu(t, e, i) {
  7352. for (var n, o = 0, a = 1 / 0, r = 0, s = t.length; r < s; r++)
  7353. (n = t[r].getLayout().area) && (n < a && (a = n),
  7354. n > o && (o = n));
  7355. var l = t.area * t.area
  7356. , h = e * e * i;
  7357. return l ? rT(h * o / l, l / (h * a)) : 1 / 0
  7358. }
  7359. function du(t, e, i, n, o) {
  7360. var a = e === i.width ? 0 : 1
  7361. , r = 1 - a
  7362. , s = ["x", "y"]
  7363. , l = ["width", "height"]
  7364. , h = i[s[a]]
  7365. , u = e ? t.area / e : 0;
  7366. (o || u > i[l[r]]) && (u = i[l[r]]);
  7367. for (var c = 0, d = t.length; c < d; c++) {
  7368. var f = t[c]
  7369. , g = {}
  7370. , p = u ? f.getLayout().area / u : 0
  7371. , m = g[l[r]] = rT(u - 2 * n, 0)
  7372. , v = i[s[a]] + i[l[a]] - h
  7373. , y = c === d - 1 || v < p ? v : p
  7374. , x = g[l[a]] = rT(y - 2 * n, 0);
  7375. g[s[r]] = i[s[r]] + sT(n, m / 2),
  7376. g[s[a]] = h + sT(n, x / 2),
  7377. h += y,
  7378. f.setLayout(g, !0)
  7379. }
  7380. i[s[r]] += u,
  7381. i[l[r]] -= u
  7382. }
  7383. function fu(t, e, i, n, o) {
  7384. var a = (e || {}).node
  7385. , r = [n, o];
  7386. if (!a || a === i)
  7387. return r;
  7388. for (var s, l = n * o, h = l * t.option.zoomToNodeRatio; s = a.parentNode; ) {
  7389. for (var u = 0, c = s.children, d = 0, f = c.length; d < f; d++)
  7390. u += c[d].getValue();
  7391. var g = a.getValue();
  7392. if (0 === g)
  7393. return r;
  7394. h *= u / g;
  7395. var p = s.getModel()
  7396. , m = p.get(uT);
  7397. (h += 4 * m * m + (3 * m + Math.max(m, mu(p))) * Math.pow(h, .5)) > Hx && (h = Hx),
  7398. a = s
  7399. }
  7400. h < l && (h = l);
  7401. var v = Math.pow(h / l, .5);
  7402. return [n * v, o * v]
  7403. }
  7404. function gu(t, e, i) {
  7405. if (e)
  7406. return {
  7407. x: e.x,
  7408. y: e.y
  7409. };
  7410. var n = {
  7411. x: 0,
  7412. y: 0
  7413. };
  7414. if (!i)
  7415. return n;
  7416. var o = i.node
  7417. , a = o.getLayout();
  7418. if (!a)
  7419. return n;
  7420. for (var r = [a.width / 2, a.height / 2], s = o; s; ) {
  7421. var l = s.getLayout();
  7422. r[0] += l.x,
  7423. r[1] += l.y,
  7424. s = s.parentNode
  7425. }
  7426. return {
  7427. x: t.width / 2 - r[0],
  7428. y: t.height / 2 - r[1]
  7429. }
  7430. }
  7431. function pu(t, e, i, n, o) {
  7432. var a = t.getLayout()
  7433. , r = i[o]
  7434. , s = r && r === t;
  7435. if (!(r && !s || o === i.length && t !== n)) {
  7436. t.setLayout({
  7437. isInView: !0,
  7438. invisible: !s && !e.intersect(a),
  7439. isAboveViewRoot: s
  7440. }, !0);
  7441. var l = new jt(e.x - a.x,e.y - a.y,e.width,e.height);
  7442. hT(t.viewChildren || [], function(t) {
  7443. pu(t, l, i, n, o + 1)
  7444. })
  7445. }
  7446. }
  7447. function mu(t) {
  7448. return t.get(dT) ? t.get(fT) : 0
  7449. }
  7450. function vu(t) {
  7451. return "_EC_" + t
  7452. }
  7453. function yu(t, e) {
  7454. this.id = null == t ? "" : t,
  7455. this.inEdges = [],
  7456. this.outEdges = [],
  7457. this.edges = [],
  7458. this.hostGraph,
  7459. this.dataIndex = null == e ? -1 : e
  7460. }
  7461. function xu(t, e, i) {
  7462. this.node1 = t,
  7463. this.node2 = e,
  7464. this.dataIndex = null == i ? -1 : i
  7465. }
  7466. function _u(t) {
  7467. return isNaN(+t.cpx1) || isNaN(+t.cpy1)
  7468. }
  7469. function bu(t) {
  7470. return "_" + t + "Type"
  7471. }
  7472. function wu(t, e, i) {
  7473. var n = e.getItemVisual(i, "color")
  7474. , o = e.getItemVisual(i, t)
  7475. , a = e.getItemVisual(i, t + "Size");
  7476. if (o && "none" !== o) {
  7477. v(a) || (a = [a, a]);
  7478. var r = Gr(o, -a[0] / 2, -a[1] / 2, a[0], a[1], n);
  7479. return r.name = t,
  7480. r
  7481. }
  7482. }
  7483. function Su(t) {
  7484. var e = new bT({
  7485. name: "line"
  7486. });
  7487. return Mu(e.shape, t),
  7488. e
  7489. }
  7490. function Mu(t, e) {
  7491. var i = e[0]
  7492. , n = e[1]
  7493. , o = e[2];
  7494. t.x1 = i[0],
  7495. t.y1 = i[1],
  7496. t.x2 = n[0],
  7497. t.y2 = n[1],
  7498. t.percent = 1,
  7499. o ? (t.cpx1 = o[0],
  7500. t.cpy1 = o[1]) : (t.cpx1 = NaN,
  7501. t.cpy1 = NaN)
  7502. }
  7503. function Iu(t, e, i) {
  7504. $y.call(this),
  7505. this._createLine(t, e, i)
  7506. }
  7507. function Tu(t) {
  7508. return isNaN(t[0]) || isNaN(t[1])
  7509. }
  7510. function Au(t) {
  7511. return !Tu(t[0]) && !Tu(t[1])
  7512. }
  7513. function Cu(t) {
  7514. this._ctor = t || Iu,
  7515. this.group = new $y
  7516. }
  7517. function Du(t, e, i) {
  7518. for (var n, o = t[0], a = t[1], r = t[2], s = 1 / 0, l = i * i, h = .1, u = .1; u <= .9; u += .1)
  7519. IT[0] = CT(o[0], a[0], r[0], u),
  7520. IT[1] = CT(o[1], a[1], r[1], u),
  7521. (f = LT(DT(IT, e) - l)) < s && (s = f,
  7522. n = u);
  7523. for (var c = 0; c < 32; c++) {
  7524. var d = n + h;
  7525. TT[0] = CT(o[0], a[0], r[0], n),
  7526. TT[1] = CT(o[1], a[1], r[1], n),
  7527. AT[0] = CT(o[0], a[0], r[0], d),
  7528. AT[1] = CT(o[1], a[1], r[1], d);
  7529. var f = DT(TT, e) - l;
  7530. if (LT(f) < .01)
  7531. break;
  7532. var g = DT(AT, e) - l;
  7533. h /= 2,
  7534. f < 0 ? g >= 0 ? n += h : n -= h : g >= 0 ? n -= h : n += h
  7535. }
  7536. return n
  7537. }
  7538. function Lu(t, e) {
  7539. return t.getVisual("opacity") || t.getModel().get(e)
  7540. }
  7541. function ku(t, e, i) {
  7542. var n = t.getGraphicEl()
  7543. , o = Lu(t, e);
  7544. null != i && (null == o && (o = 1),
  7545. o *= i),
  7546. n.downplay && n.downplay(),
  7547. n.traverse(function(t) {
  7548. "group" !== t.type && t.setStyle("opacity", o)
  7549. })
  7550. }
  7551. function Pu(t, e) {
  7552. var i = Lu(t, e)
  7553. , n = t.getGraphicEl();
  7554. n.highlight && n.highlight(),
  7555. n.traverse(function(t) {
  7556. "group" !== t.type && t.setStyle("opacity", i)
  7557. })
  7558. }
  7559. function Ou(t) {
  7560. return t instanceof Array || (t = [t, t]),
  7561. t
  7562. }
  7563. function zu(t) {
  7564. var e = t.coordinateSystem;
  7565. if (!e || "view" === e.type) {
  7566. var i = t.getGraph();
  7567. i.eachNode(function(t) {
  7568. var e = t.getModel();
  7569. t.setLayout([+e.get("x"), +e.get("y")])
  7570. }),
  7571. Nu(i)
  7572. }
  7573. }
  7574. function Nu(t) {
  7575. t.eachEdge(function(t) {
  7576. var e = t.getModel().get("lineStyle.normal.curveness") || 0
  7577. , i = R(t.node1.getLayout())
  7578. , n = R(t.node2.getLayout())
  7579. , o = [i, n];
  7580. +e && o.push([(i[0] + n[0]) / 2 - (i[1] - n[1]) * e, (i[1] + n[1]) / 2 - (n[0] - i[0]) * e]),
  7581. t.setLayout(o)
  7582. })
  7583. }
  7584. function Eu(t) {
  7585. var e = t.coordinateSystem;
  7586. if (!e || "view" === e.type) {
  7587. var i = e.getBoundingRect()
  7588. , n = t.getData()
  7589. , o = n.graph
  7590. , a = 0
  7591. , r = n.getSum("value")
  7592. , s = 2 * Math.PI / (r || n.count())
  7593. , l = i.width / 2 + i.x
  7594. , h = i.height / 2 + i.y
  7595. , u = Math.min(i.width, i.height) / 2;
  7596. o.eachNode(function(t) {
  7597. var e = t.getValue("value");
  7598. a += s * (r ? e : 1) / 2,
  7599. t.setLayout([u * Math.cos(a) + l, u * Math.sin(a) + h]),
  7600. a += s * (r ? e : 1) / 2
  7601. }),
  7602. n.setLayout({
  7603. cx: l,
  7604. cy: h
  7605. }),
  7606. o.eachEdge(function(t) {
  7607. var e, i = t.getModel().get("lineStyle.normal.curveness") || 0, n = R(t.node1.getLayout()), o = R(t.node2.getLayout()), a = (n[0] + o[0]) / 2, r = (n[1] + o[1]) / 2;
  7608. +i && (e = [l * (i *= 3) + a * (1 - i), h * i + r * (1 - i)]),
  7609. t.setLayout([n, o, e])
  7610. })
  7611. }
  7612. }
  7613. function Ru(t, e, i) {
  7614. for (var n = i.rect, o = n.width, a = n.height, r = [n.x + o / 2, n.y + a / 2], s = null == i.gravity ? .1 : i.gravity, l = 0; l < t.length; l++) {
  7615. var h = t[l];
  7616. h.p || (h.p = N(o * (Math.random() - .5) + r[0], a * (Math.random() - .5) + r[1])),
  7617. h.pp = R(h.p),
  7618. h.edges = null
  7619. }
  7620. var u = .6;
  7621. return {
  7622. warmUp: function() {
  7623. u = .5
  7624. },
  7625. setFixed: function(e) {
  7626. t[e].fixed = !0
  7627. },
  7628. setUnfixed: function(e) {
  7629. t[e].fixed = !1
  7630. },
  7631. step: function(i) {
  7632. for (var n = [], o = t.length, a = 0; a < e.length; a++) {
  7633. var l = e[a]
  7634. , h = l.n1;
  7635. W(n, (g = l.n2).p, h.p);
  7636. var c = H(n) - l.d
  7637. , d = g.w / (h.w + g.w);
  7638. isNaN(d) && (d = 0),
  7639. U(n, n),
  7640. !h.fixed && zT(h.p, h.p, n, d * c * u),
  7641. !g.fixed && zT(g.p, g.p, n, -(1 - d) * c * u)
  7642. }
  7643. for (a = 0; a < o; a++)
  7644. (v = t[a]).fixed || (W(n, r, v.p),
  7645. zT(v.p, v.p, n, s * u));
  7646. for (a = 0; a < o; a++)
  7647. for (var h = t[a], f = a + 1; f < o; f++) {
  7648. var g = t[f];
  7649. W(n, g.p, h.p),
  7650. 0 === (c = H(n)) && (V(n, Math.random() - .5, Math.random() - .5),
  7651. c = 1);
  7652. var p = (h.rep + g.rep) / c / c;
  7653. !h.fixed && zT(h.pp, h.pp, n, p),
  7654. !g.fixed && zT(g.pp, g.pp, n, -p)
  7655. }
  7656. for (var m = [], a = 0; a < o; a++) {
  7657. var v = t[a];
  7658. v.fixed || (W(m, v.p, v.pp),
  7659. zT(v.p, v.p, m, u),
  7660. E(v.pp, v.p))
  7661. }
  7662. u *= .992,
  7663. i && i(t, e, u < .01)
  7664. }
  7665. }
  7666. }
  7667. function Vu(t, e, i) {
  7668. var n = t.getBoxLayoutParams();
  7669. return n.aspect = i,
  7670. Yo(n, {
  7671. width: e.getWidth(),
  7672. height: e.getHeight()
  7673. })
  7674. }
  7675. function Bu(t, e) {
  7676. var i = t.get("center")
  7677. , n = e.getWidth()
  7678. , o = e.getHeight()
  7679. , a = Math.min(n, o);
  7680. return {
  7681. cx: bi(i[0], e.getWidth()),
  7682. cy: bi(i[1], e.getHeight()),
  7683. r: bi(t.get("radius"), a / 2)
  7684. }
  7685. }
  7686. function Gu(t, e) {
  7687. return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t : "") : "function" == typeof e && (t = e(t))),
  7688. t
  7689. }
  7690. function Wu(t, e) {
  7691. function i() {
  7692. a.ignore = a.hoverIgnore,
  7693. r.ignore = r.hoverIgnore
  7694. }
  7695. function n() {
  7696. a.ignore = a.normalIgnore,
  7697. r.ignore = r.normalIgnore
  7698. }
  7699. $y.call(this);
  7700. var o = new fb
  7701. , a = new gb
  7702. , r = new ab;
  7703. this.add(o),
  7704. this.add(a),
  7705. this.add(r),
  7706. this.updateData(t, e, !0),
  7707. this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n)
  7708. }
  7709. function Hu(t, e) {
  7710. return Yo(t.getBoxLayoutParams(), {
  7711. width: e.getWidth(),
  7712. height: e.getHeight()
  7713. })
  7714. }
  7715. function Fu(t, e) {
  7716. for (var i = t.mapArray("value", function(t) {
  7717. return t
  7718. }), n = [], o = "ascending" === e, a = 0, r = t.count(); a < r; a++)
  7719. n[a] = a;
  7720. return "function" == typeof e ? n.sort(e) : "none" !== e && n.sort(function(t, e) {
  7721. return o ? i[t] - i[e] : i[e] - i[t]
  7722. }),
  7723. n
  7724. }
  7725. function Zu(t) {
  7726. t.each(function(e) {
  7727. var i, n, o, a, r = t.getItemModel(e), s = r.getModel("label.normal").get("position"), l = r.getModel("labelLine.normal"), h = t.getItemLayout(e), u = h.points, c = "inner" === s || "inside" === s || "center" === s;
  7728. if (c)
  7729. i = "center",
  7730. a = [[n = (u[0][0] + u[1][0] + u[2][0] + u[3][0]) / 4, o = (u[0][1] + u[1][1] + u[2][1] + u[3][1]) / 4], [n, o]];
  7731. else {
  7732. var d, f, g, p = l.get("length");
  7733. "left" === s ? (d = (u[3][0] + u[0][0]) / 2,
  7734. f = (u[3][1] + u[0][1]) / 2,
  7735. n = (g = d - p) - 5,
  7736. i = "right") : (d = (u[1][0] + u[2][0]) / 2,
  7737. f = (u[1][1] + u[2][1]) / 2,
  7738. n = (g = d + p) + 5,
  7739. i = "left");
  7740. var m = f;
  7741. a = [[d, f], [g, m]],
  7742. o = m
  7743. }
  7744. h.label = {
  7745. linePoints: a,
  7746. x: n,
  7747. y: o,
  7748. verticalAlign: "middle",
  7749. textAlign: i,
  7750. inside: c
  7751. }
  7752. })
  7753. }
  7754. function Uu(t) {
  7755. if (!t.parallel) {
  7756. var e = !1;
  7757. c(t.series, function(t) {
  7758. t && "parallel" === t.type && (e = !0)
  7759. }),
  7760. e && (t.parallel = [{}])
  7761. }
  7762. }
  7763. function ju(t) {
  7764. c(ko(t.parallelAxis), function(e) {
  7765. if (_(e)) {
  7766. var n = e.parallelIndex || 0
  7767. , o = ko(t.parallel)[n];
  7768. o && o.parallelAxisDefault && i(e, o.parallelAxisDefault, !1)
  7769. }
  7770. })
  7771. }
  7772. function Xu(t, e) {
  7773. var i = t[e] - t[1 - e];
  7774. return {
  7775. span: Math.abs(i),
  7776. sign: i > 0 ? -1 : i < 0 ? 1 : e ? -1 : 1
  7777. }
  7778. }
  7779. function qu(t, e) {
  7780. return Math.min(e[1], Math.max(e[0], t))
  7781. }
  7782. function Yu(t, e, i) {
  7783. this._axesMap = O(),
  7784. this._axesLayout = {},
  7785. this.dimensions = t.dimensions,
  7786. this._rect,
  7787. this._model = t,
  7788. this._init(t, e, i)
  7789. }
  7790. function $u(t, e) {
  7791. return FT(ZT(t, e[0]), e[1])
  7792. }
  7793. function Ku(t, e) {
  7794. var i = e.layoutLength / (e.axisCount - 1);
  7795. return {
  7796. position: i * t,
  7797. axisNameAvailableWidth: i,
  7798. axisLabelShow: !0
  7799. }
  7800. }
  7801. function Ju(t, e) {
  7802. var i, n, o = e.layoutLength, a = e.axisExpandWidth, r = e.axisCount, s = e.axisCollapseWidth, l = e.winInnerIndices, h = s, u = !1;
  7803. return t < l[0] ? (i = t * s,
  7804. n = s) : t <= l[1] ? (i = e.axisExpandWindow0Pos + t * a - e.axisExpandWindow[0],
  7805. h = a,
  7806. u = !0) : (i = o - (r - 1 - t) * s,
  7807. n = s),
  7808. {
  7809. position: i,
  7810. axisNameAvailableWidth: h,
  7811. axisLabelShow: u,
  7812. nameTruncateMaxWidth: n
  7813. }
  7814. }
  7815. function Qu(t) {
  7816. my.call(this),
  7817. this._zr = t,
  7818. this.group = new $y,
  7819. this._brushType,
  7820. this._brushOption,
  7821. this._panels,
  7822. this._track = [],
  7823. this._dragging,
  7824. this._covers = [],
  7825. this._creatingCover,
  7826. this._creatingPanel,
  7827. this._enableGlobalPan,
  7828. this._uid = "brushController_" + uA++,
  7829. this._handlers = {},
  7830. JT(cA, function(t, e) {
  7831. this._handlers[e] = p(t, this)
  7832. }, this)
  7833. }
  7834. function tc(t, n) {
  7835. var o = t._zr;
  7836. t._enableGlobalPan || kl(o, rA, t._uid),
  7837. JT(t._handlers, function(t, e) {
  7838. o.on(e, t)
  7839. }),
  7840. t._brushType = n.brushType,
  7841. t._brushOption = i(e(hA), n, !0)
  7842. }
  7843. function ec(t) {
  7844. var e = t._zr;
  7845. Pl(e, rA, t._uid),
  7846. JT(t._handlers, function(t, i) {
  7847. e.off(i, t)
  7848. }),
  7849. t._brushType = t._brushOption = null
  7850. }
  7851. function ic(t, e) {
  7852. var i = dA[e.brushType].createCover(t, e);
  7853. return i.__brushOption = e,
  7854. ac(i, e),
  7855. t.group.add(i),
  7856. i
  7857. }
  7858. function nc(t, e) {
  7859. var i = sc(e);
  7860. return i.endCreating && (i.endCreating(t, e),
  7861. ac(e, e.__brushOption)),
  7862. e
  7863. }
  7864. function oc(t, e) {
  7865. var i = e.__brushOption;
  7866. sc(e).updateCoverShape(t, e, i.range, i)
  7867. }
  7868. function ac(t, e) {
  7869. var i = e.z;
  7870. null == i && (i = nA),
  7871. t.traverse(function(t) {
  7872. t.z = i,
  7873. t.z2 = i
  7874. })
  7875. }
  7876. function rc(t, e) {
  7877. sc(e).updateCommon(t, e),
  7878. oc(t, e)
  7879. }
  7880. function sc(t) {
  7881. return dA[t.__brushOption.brushType]
  7882. }
  7883. function lc(t, e, i) {
  7884. var n = t._panels;
  7885. if (!n)
  7886. return !0;
  7887. var o, a = t._transform;
  7888. return JT(n, function(t) {
  7889. t.isTargetByCursor(e, i, a) && (o = t)
  7890. }),
  7891. o
  7892. }
  7893. function hc(t, e) {
  7894. var i = t._panels;
  7895. if (!i)
  7896. return !0;
  7897. var n = e.__brushOption.panelId;
  7898. return null == n || i[n]
  7899. }
  7900. function uc(t) {
  7901. var e = t._covers
  7902. , i = e.length;
  7903. return JT(e, function(e) {
  7904. t.group.remove(e)
  7905. }, t),
  7906. e.length = 0,
  7907. !!i
  7908. }
  7909. function cc(t, i) {
  7910. var n = QT(t._covers, function(t) {
  7911. var i = t.__brushOption
  7912. , n = e(i.range);
  7913. return {
  7914. brushType: i.brushType,
  7915. panelId: i.panelId,
  7916. range: n
  7917. }
  7918. });
  7919. t.trigger("brush", n, {
  7920. isEnd: !!i.isEnd,
  7921. removeOnClick: !!i.removeOnClick
  7922. })
  7923. }
  7924. function dc(t) {
  7925. var e = t._track;
  7926. if (!e.length)
  7927. return !1;
  7928. var i = e[e.length - 1]
  7929. , n = e[0]
  7930. , o = i[0] - n[0]
  7931. , a = i[1] - n[1];
  7932. return iA(o * o + a * a, .5) > oA
  7933. }
  7934. function fc(t) {
  7935. var e = t.length - 1;
  7936. return e < 0 && (e = 0),
  7937. [t[0], t[e]]
  7938. }
  7939. function gc(t, e, i, n) {
  7940. var o = new $y;
  7941. return o.add(new pb({
  7942. name: "main",
  7943. style: yc(i),
  7944. silent: !0,
  7945. draggable: !0,
  7946. cursor: "move",
  7947. drift: KT(t, e, o, "nswe"),
  7948. ondragend: KT(cc, e, {
  7949. isEnd: !0
  7950. })
  7951. })),
  7952. JT(n, function(i) {
  7953. o.add(new pb({
  7954. name: i,
  7955. style: {
  7956. opacity: 0
  7957. },
  7958. draggable: !0,
  7959. silent: !0,
  7960. invisible: !0,
  7961. drift: KT(t, e, o, i),
  7962. ondragend: KT(cc, e, {
  7963. isEnd: !0
  7964. })
  7965. }))
  7966. }),
  7967. o
  7968. }
  7969. function pc(t, e, i, n) {
  7970. var o = n.brushStyle.lineWidth || 0
  7971. , a = eA(o, aA)
  7972. , r = i[0][0]
  7973. , s = i[1][0]
  7974. , l = r - o / 2
  7975. , h = s - o / 2
  7976. , u = i[0][1]
  7977. , c = i[1][1]
  7978. , d = u - a + o / 2
  7979. , f = c - a + o / 2
  7980. , g = u - r
  7981. , p = c - s
  7982. , m = g + o
  7983. , v = p + o;
  7984. vc(t, e, "main", r, s, g, p),
  7985. n.transformable && (vc(t, e, "w", l, h, a, v),
  7986. vc(t, e, "e", d, h, a, v),
  7987. vc(t, e, "n", l, h, m, a),
  7988. vc(t, e, "s", l, f, m, a),
  7989. vc(t, e, "nw", l, h, a, a),
  7990. vc(t, e, "ne", d, h, a, a),
  7991. vc(t, e, "sw", l, f, a, a),
  7992. vc(t, e, "se", d, f, a, a))
  7993. }
  7994. function mc(t, e) {
  7995. var i = e.__brushOption
  7996. , n = i.transformable
  7997. , o = e.childAt(0);
  7998. o.useStyle(yc(i)),
  7999. o.attr({
  8000. silent: !n,
  8001. cursor: n ? "move" : "default"
  8002. }),
  8003. JT(["w", "e", "n", "s", "se", "sw", "ne", "nw"], function(i) {
  8004. var o = e.childOfName(i)
  8005. , a = bc(t, i);
  8006. o && o.attr({
  8007. silent: !n,
  8008. invisible: !n,
  8009. cursor: n ? lA[a] + "-resize" : null
  8010. })
  8011. })
  8012. }
  8013. function vc(t, e, i, n, o, a, r) {
  8014. var s = e.childOfName(i);
  8015. s && s.setShape(Tc(Ic(t, e, [[n, o], [n + a, o + r]])))
  8016. }
  8017. function yc(t) {
  8018. return a({
  8019. strokeNoScale: !0
  8020. }, t.brushStyle)
  8021. }
  8022. function xc(t, e, i, n) {
  8023. var o = [tA(t, i), tA(e, n)]
  8024. , a = [eA(t, i), eA(e, n)];
  8025. return [[o[0], a[0]], [o[1], a[1]]]
  8026. }
  8027. function _c(t) {
  8028. return wo(t.group)
  8029. }
  8030. function bc(t, e) {
  8031. if (e.length > 1)
  8032. return ("e" === (n = [bc(t, (e = e.split(""))[0]), bc(t, e[1])])[0] || "w" === n[0]) && n.reverse(),
  8033. n.join("");
  8034. var i = {
  8035. left: "w",
  8036. right: "e",
  8037. top: "n",
  8038. bottom: "s"
  8039. }
  8040. , n = Mo({
  8041. w: "left",
  8042. e: "right",
  8043. n: "top",
  8044. s: "bottom"
  8045. }[e], _c(t));
  8046. return i[n]
  8047. }
  8048. function wc(t, e, i, n, o, a, r, s) {
  8049. var l = n.__brushOption
  8050. , h = t(l.range)
  8051. , u = Mc(i, a, r);
  8052. JT(o.split(""), function(t) {
  8053. var e = sA[t];
  8054. h[e[0]][e[1]] += u[e[0]]
  8055. }),
  8056. l.range = e(xc(h[0][0], h[1][0], h[0][1], h[1][1])),
  8057. rc(i, n),
  8058. cc(i, {
  8059. isEnd: !1
  8060. })
  8061. }
  8062. function Sc(t, e, i, n, o) {
  8063. var a = e.__brushOption.range
  8064. , r = Mc(t, i, n);
  8065. JT(a, function(t) {
  8066. t[0] += r[0],
  8067. t[1] += r[1]
  8068. }),
  8069. rc(t, e),
  8070. cc(t, {
  8071. isEnd: !1
  8072. })
  8073. }
  8074. function Mc(t, e, i) {
  8075. var n = t.group
  8076. , o = n.transformCoordToLocal(e, i)
  8077. , a = n.transformCoordToLocal(0, 0);
  8078. return [o[0] - a[0], o[1] - a[1]]
  8079. }
  8080. function Ic(t, i, n) {
  8081. var o = hc(t, i);
  8082. return o && !0 !== o ? o.clipPath(n, t._transform) : e(n)
  8083. }
  8084. function Tc(t) {
  8085. var e = tA(t[0][0], t[1][0])
  8086. , i = tA(t[0][1], t[1][1]);
  8087. return {
  8088. x: e,
  8089. y: i,
  8090. width: eA(t[0][0], t[1][0]) - e,
  8091. height: eA(t[0][1], t[1][1]) - i
  8092. }
  8093. }
  8094. function Ac(t, e, i) {
  8095. if (t._brushType) {
  8096. var n = t._zr
  8097. , o = t._covers
  8098. , a = lc(t, e, i);
  8099. if (!t._dragging)
  8100. for (var r = 0; r < o.length; r++) {
  8101. var s = o[r].__brushOption;
  8102. if (a && (!0 === a || s.panelId === a.panelId) && dA[s.brushType].contain(o[r], i[0], i[1]))
  8103. return
  8104. }
  8105. a && n.setCursorStyle("crosshair")
  8106. }
  8107. }
  8108. function Cc(t) {
  8109. var e = t.event;
  8110. e.preventDefault && e.preventDefault()
  8111. }
  8112. function Dc(t, e, i) {
  8113. return t.childOfName("main").contain(e, i)
  8114. }
  8115. function Lc(t, i, n, o) {
  8116. var a, r = t._creatingCover, s = t._creatingPanel, l = t._brushOption;
  8117. if (t._track.push(n.slice()),
  8118. dc(t) || r) {
  8119. if (s && !r) {
  8120. "single" === l.brushMode && uc(t);
  8121. var h = e(l);
  8122. h.brushType = kc(h.brushType, s),
  8123. h.panelId = !0 === s ? null : s.panelId,
  8124. r = t._creatingCover = ic(t, h),
  8125. t._covers.push(r)
  8126. }
  8127. if (r) {
  8128. var u = dA[kc(t._brushType, s)];
  8129. r.__brushOption.range = u.getCreatingRange(Ic(t, r, t._track)),
  8130. o && (nc(t, r),
  8131. u.updateCommon(t, r)),
  8132. oc(t, r),
  8133. a = {
  8134. isEnd: o
  8135. }
  8136. }
  8137. } else
  8138. o && "single" === l.brushMode && l.removeOnClick && lc(t, i, n) && uc(t) && (a = {
  8139. isEnd: o,
  8140. removeOnClick: !0
  8141. });
  8142. return a
  8143. }
  8144. function kc(t, e) {
  8145. return "auto" === t ? e.defaultBrushType : t
  8146. }
  8147. function Pc(t) {
  8148. if (this._dragging) {
  8149. Cc(t);
  8150. var e = Lc(this, t, this.group.transformCoordToLocal(t.offsetX, t.offsetY), !0);
  8151. this._dragging = !1,
  8152. this._track = [],
  8153. this._creatingCover = null,
  8154. e && cc(this, e)
  8155. }
  8156. }
  8157. function Oc(t) {
  8158. return {
  8159. createCover: function(e, i) {
  8160. return gc(KT(wc, function(e) {
  8161. var i = [e, [0, 100]];
  8162. return t && i.reverse(),
  8163. i
  8164. }, function(e) {
  8165. return e[t]
  8166. }), e, i, [["w", "e"], ["n", "s"]][t])
  8167. },
  8168. getCreatingRange: function(e) {
  8169. var i = fc(e);
  8170. return [tA(i[0][t], i[1][t]), eA(i[0][t], i[1][t])]
  8171. },
  8172. updateCoverShape: function(e, i, n, o) {
  8173. var a, r = hc(e, i);
  8174. if (!0 !== r && r.getLinearBrushOtherExtent)
  8175. a = r.getLinearBrushOtherExtent(t, e._transform);
  8176. else {
  8177. var s = e._zr;
  8178. a = [0, [s.getWidth(), s.getHeight()][1 - t]]
  8179. }
  8180. var l = [n, a];
  8181. t && l.reverse(),
  8182. pc(e, i, l, o)
  8183. },
  8184. updateCommon: mc,
  8185. contain: Dc
  8186. }
  8187. }
  8188. function zc(t) {
  8189. return t = Rc(t),
  8190. function(e, i) {
  8191. return To(e, t)
  8192. }
  8193. }
  8194. function Nc(t, e) {
  8195. return t = Rc(t),
  8196. function(i) {
  8197. var n = null != e ? e : i
  8198. , o = n ? t.width : t.height
  8199. , a = n ? t.x : t.y;
  8200. return [a, a + (o || 0)]
  8201. }
  8202. }
  8203. function Ec(t, e, i) {
  8204. return t = Rc(t),
  8205. function(n, o, a) {
  8206. return t.contain(o[0], o[1]) && !Ul(n, e, i)
  8207. }
  8208. }
  8209. function Rc(t) {
  8210. return jt.create(t)
  8211. }
  8212. function Vc(t, e, i) {
  8213. return i && "axisAreaSelect" === i.type && e.findComponents({
  8214. mainType: "parallelAxis",
  8215. query: i
  8216. })[0] === t
  8217. }
  8218. function Bc(t) {
  8219. var e = t.axis;
  8220. return d(t.activeIntervals, function(t) {
  8221. return {
  8222. brushType: "lineX",
  8223. panelId: "pl",
  8224. range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]
  8225. }
  8226. })
  8227. }
  8228. function Gc(t, e) {
  8229. return e.getComponent("parallel", t.get("parallelIndex"))
  8230. }
  8231. function Wc(t, e) {
  8232. var i = t._model;
  8233. return i.get("axisExpandable") && i.get("axisExpandTriggerOn") === e
  8234. }
  8235. function Hc(t, e, i) {
  8236. var n = t.get("data")
  8237. , o = Fc(e);
  8238. n && n.length && c(i, function(t) {
  8239. if (t) {
  8240. var e = s(n, t[o]);
  8241. t[o] = e >= 0 ? e : NaN
  8242. }
  8243. })
  8244. }
  8245. function Fc(t) {
  8246. return +t.replace("dim", "")
  8247. }
  8248. function Zc(t, e) {
  8249. var i = 0;
  8250. c(t, function(t) {
  8251. var e = Fc(t);
  8252. e > i && (i = e)
  8253. });
  8254. var n = e[0];
  8255. n && n.length - 1 > i && (i = n.length - 1);
  8256. for (var o = [], a = 0; a <= i; a++)
  8257. o.push("dim" + a);
  8258. return o
  8259. }
  8260. function Uc(t, e, i) {
  8261. var n = t.model
  8262. , o = t.getRect()
  8263. , a = new pb({
  8264. shape: {
  8265. x: o.x,
  8266. y: o.y,
  8267. width: o.width,
  8268. height: o.height
  8269. }
  8270. })
  8271. , r = "horizontal" === n.get("layout") ? "width" : "height";
  8272. return a.setShape(r, 0),
  8273. bo(a, {
  8274. shape: {
  8275. width: o.width,
  8276. height: o.height
  8277. }
  8278. }, e, i),
  8279. a
  8280. }
  8281. function jc(t, e, i, n) {
  8282. for (var o = [], a = 0; a < i.length; a++) {
  8283. var r = i[a]
  8284. , s = t.get(r, e);
  8285. Yc(s, n.getAxis(r).type) || o.push(n.dataToPoint(s, r))
  8286. }
  8287. return o
  8288. }
  8289. function Xc(t, e, i, n, o) {
  8290. var a = jc(t, i, n, o)
  8291. , r = new gb({
  8292. shape: {
  8293. points: a
  8294. },
  8295. silent: !0,
  8296. z2: 10
  8297. });
  8298. e.add(r),
  8299. t.setItemGraphicEl(i, r)
  8300. }
  8301. function qc(t, e) {
  8302. var i = t.hostModel.getModel("lineStyle.normal")
  8303. , n = i.getLineStyle();
  8304. t.eachItemGraphicEl(function(a, r) {
  8305. if (t.hasItemOption) {
  8306. var s = t.getItemModel(r).getModel("lineStyle.normal", i);
  8307. n = s.getLineStyle(["color", "stroke"])
  8308. }
  8309. a.useStyle(o(n, {
  8310. fill: null,
  8311. stroke: t.getItemVisual(r, "color"),
  8312. opacity: t.getItemVisual(r, "opacity")
  8313. })),
  8314. a.shape.smooth = e
  8315. })
  8316. }
  8317. function Yc(t, e) {
  8318. return "category" === e ? null == t : null == t || isNaN(t)
  8319. }
  8320. function $c(t, e, i) {
  8321. var n = new pb({
  8322. shape: {
  8323. x: t.x - 10,
  8324. y: t.y - 10,
  8325. width: 0,
  8326. height: t.height + 20
  8327. }
  8328. });
  8329. return bo(n, {
  8330. shape: {
  8331. width: t.width + 20,
  8332. height: t.height + 20
  8333. }
  8334. }, e, i),
  8335. n
  8336. }
  8337. function Kc() {
  8338. function t(e, n) {
  8339. if (n >= i.length)
  8340. return e;
  8341. for (var o = -1, a = e.length, r = i[n++], s = {}, l = {}; ++o < a; ) {
  8342. var h = r(e[o])
  8343. , u = l[h];
  8344. u ? u.push(e[o]) : l[h] = [e[o]]
  8345. }
  8346. return c(l, function(e, i) {
  8347. s[i] = t(e, n)
  8348. }),
  8349. s
  8350. }
  8351. function e(t, o) {
  8352. if (o >= i.length)
  8353. return t;
  8354. var a = []
  8355. , r = n[o++];
  8356. return c(t, function(t, i) {
  8357. a.push({
  8358. key: i,
  8359. values: e(t, o)
  8360. })
  8361. }),
  8362. r ? a.sort(function(t, e) {
  8363. return r(t.key, e.key)
  8364. }) : a
  8365. }
  8366. var i = []
  8367. , n = [];
  8368. return {
  8369. key: function(t) {
  8370. return i.push(t),
  8371. this
  8372. },
  8373. sortKeys: function(t) {
  8374. return n[i.length - 1] = t,
  8375. this
  8376. },
  8377. entries: function(i) {
  8378. return e(t(i, 0), 0)
  8379. }
  8380. }
  8381. }
  8382. function Jc(t, e) {
  8383. return Yo(t.getBoxLayoutParams(), {
  8384. width: e.getWidth(),
  8385. height: e.getHeight()
  8386. })
  8387. }
  8388. function Qc(t, e, i, n, o, a, r) {
  8389. ed(t, i, o),
  8390. od(t, e, a, n, r),
  8391. cd(t)
  8392. }
  8393. function td(t) {
  8394. c(t, function(t) {
  8395. var e = gd(t.outEdges, yd)
  8396. , i = gd(t.inEdges, yd)
  8397. , n = Math.max(e, i);
  8398. t.setLayout({
  8399. value: n
  8400. }, !0)
  8401. })
  8402. }
  8403. function ed(t, e, i) {
  8404. for (var n = t, o = null, a = 0; n.length; ) {
  8405. o = [];
  8406. for (var r = 0, s = n.length; r < s; r++) {
  8407. var l = n[r];
  8408. l.setLayout({
  8409. x: a
  8410. }, !0),
  8411. l.setLayout({
  8412. dx: e
  8413. }, !0);
  8414. for (var h = 0, u = l.outEdges.length; h < u; h++)
  8415. o.push(l.outEdges[h].node2)
  8416. }
  8417. n = o,
  8418. ++a
  8419. }
  8420. id(t, a),
  8421. nd(t, (i - e) / (a - 1))
  8422. }
  8423. function id(t, e) {
  8424. c(t, function(t) {
  8425. t.outEdges.length || t.setLayout({
  8426. x: e - 1
  8427. }, !0)
  8428. })
  8429. }
  8430. function nd(t, e) {
  8431. c(t, function(t) {
  8432. var i = t.getLayout().x * e;
  8433. t.setLayout({
  8434. x: i
  8435. }, !0)
  8436. })
  8437. }
  8438. function od(t, e, i, n, o) {
  8439. var a = Kc().key(function(t) {
  8440. return t.getLayout().x
  8441. }).sortKeys(vd).entries(t).map(function(t) {
  8442. return t.values
  8443. });
  8444. ad(t, a, e, i, n),
  8445. rd(a, n, i);
  8446. for (var r = 1; o > 0; o--)
  8447. sd(a, r *= .99),
  8448. rd(a, n, i),
  8449. hd(a, r),
  8450. rd(a, n, i)
  8451. }
  8452. function ad(t, e, i, n, o) {
  8453. var a = [];
  8454. c(e, function(t) {
  8455. var e = t.length
  8456. , i = 0;
  8457. c(t, function(t) {
  8458. i += t.getLayout().value
  8459. });
  8460. var r = (n - (e - 1) * o) / i;
  8461. a.push(r)
  8462. }),
  8463. a.sort(function(t, e) {
  8464. return t - e
  8465. });
  8466. var r = a[0];
  8467. c(e, function(t) {
  8468. c(t, function(t, e) {
  8469. t.setLayout({
  8470. y: e
  8471. }, !0);
  8472. var i = t.getLayout().value * r;
  8473. t.setLayout({
  8474. dy: i
  8475. }, !0)
  8476. })
  8477. }),
  8478. c(i, function(t) {
  8479. var e = +t.getValue() * r;
  8480. t.setLayout({
  8481. dy: e
  8482. }, !0)
  8483. })
  8484. }
  8485. function rd(t, e, i) {
  8486. c(t, function(t) {
  8487. var n, o, a, r = 0, s = t.length;
  8488. for (t.sort(md),
  8489. a = 0; a < s; a++) {
  8490. if (n = t[a],
  8491. (o = r - n.getLayout().y) > 0) {
  8492. l = n.getLayout().y + o;
  8493. n.setLayout({
  8494. y: l
  8495. }, !0)
  8496. }
  8497. r = n.getLayout().y + n.getLayout().dy + e
  8498. }
  8499. if ((o = r - e - i) > 0) {
  8500. var l = n.getLayout().y - o;
  8501. for (n.setLayout({
  8502. y: l
  8503. }, !0),
  8504. r = n.getLayout().y,
  8505. a = s - 2; a >= 0; --a)
  8506. (o = (n = t[a]).getLayout().y + n.getLayout().dy + e - r) > 0 && (l = n.getLayout().y - o,
  8507. n.setLayout({
  8508. y: l
  8509. }, !0)),
  8510. r = n.getLayout().y
  8511. }
  8512. })
  8513. }
  8514. function sd(t, e) {
  8515. c(t.slice().reverse(), function(t) {
  8516. c(t, function(t) {
  8517. if (t.outEdges.length) {
  8518. var i = gd(t.outEdges, ld) / gd(t.outEdges, yd)
  8519. , n = t.getLayout().y + (i - pd(t)) * e;
  8520. t.setLayout({
  8521. y: n
  8522. }, !0)
  8523. }
  8524. })
  8525. })
  8526. }
  8527. function ld(t) {
  8528. return pd(t.node2) * t.getValue()
  8529. }
  8530. function hd(t, e) {
  8531. c(t, function(t) {
  8532. c(t, function(t) {
  8533. if (t.inEdges.length) {
  8534. var i = gd(t.inEdges, ud) / gd(t.inEdges, yd)
  8535. , n = t.getLayout().y + (i - pd(t)) * e;
  8536. t.setLayout({
  8537. y: n
  8538. }, !0)
  8539. }
  8540. })
  8541. })
  8542. }
  8543. function ud(t) {
  8544. return pd(t.node1) * t.getValue()
  8545. }
  8546. function cd(t) {
  8547. c(t, function(t) {
  8548. t.outEdges.sort(dd),
  8549. t.inEdges.sort(fd)
  8550. }),
  8551. c(t, function(t) {
  8552. var e = 0
  8553. , i = 0;
  8554. c(t.outEdges, function(t) {
  8555. t.setLayout({
  8556. sy: e
  8557. }, !0),
  8558. e += t.getLayout().dy
  8559. }),
  8560. c(t.inEdges, function(t) {
  8561. t.setLayout({
  8562. ty: i
  8563. }, !0),
  8564. i += t.getLayout().dy
  8565. })
  8566. })
  8567. }
  8568. function dd(t, e) {
  8569. return t.node2.getLayout().y - e.node2.getLayout().y
  8570. }
  8571. function fd(t, e) {
  8572. return t.node1.getLayout().y - e.node1.getLayout().y
  8573. }
  8574. function gd(t, e) {
  8575. for (var i = 0, n = t.length, o = -1; ++o < n; ) {
  8576. var a = +e.call(t, t[o], o);
  8577. isNaN(a) || (i += a)
  8578. }
  8579. return i
  8580. }
  8581. function pd(t) {
  8582. return t.getLayout().y + t.getLayout().dy / 2
  8583. }
  8584. function md(t, e) {
  8585. return t.getLayout().y - e.getLayout().y
  8586. }
  8587. function vd(t, e) {
  8588. return t < e ? -1 : t > e ? 1 : t === e ? 0 : NaN
  8589. }
  8590. function yd(t) {
  8591. return t.getValue()
  8592. }
  8593. function xd(t, e, i, n) {
  8594. $y.call(this),
  8595. this.bodyIndex,
  8596. this.whiskerIndex,
  8597. this.styleUpdater = i,
  8598. this._createContent(t, e, n),
  8599. this.updateData(t, e, n),
  8600. this._seriesModel
  8601. }
  8602. function _d(t, e, i) {
  8603. return d(t, function(t) {
  8604. return t = t.slice(),
  8605. t[e] = i.initBaseline,
  8606. t
  8607. })
  8608. }
  8609. function bd(t) {
  8610. var e = {};
  8611. return c(t, function(t, i) {
  8612. e["ends" + i] = t
  8613. }),
  8614. e
  8615. }
  8616. function wd(t) {
  8617. this.group = new $y,
  8618. this.styleUpdater = t
  8619. }
  8620. function Sd(t, e, i) {
  8621. var n = e.getItemModel(i)
  8622. , o = n.getModel(MA)
  8623. , a = e.getItemVisual(i, "color")
  8624. , r = o.getItemStyle(["borderColor"])
  8625. , s = t.childAt(t.whiskerIndex);
  8626. s.style.set(r),
  8627. s.style.stroke = a,
  8628. s.dirty();
  8629. var l = t.childAt(t.bodyIndex);
  8630. l.style.set(r),
  8631. l.style.stroke = a,
  8632. l.dirty(),
  8633. lo(t, n.getModel(IA).getItemStyle())
  8634. }
  8635. function Md(t) {
  8636. var e = []
  8637. , i = [];
  8638. return t.eachSeriesByType("boxplot", function(t) {
  8639. var n = t.getBaseAxis()
  8640. , o = s(i, n);
  8641. o < 0 && (o = i.length,
  8642. i[o] = n,
  8643. e[o] = {
  8644. axis: n,
  8645. seriesModels: []
  8646. }),
  8647. e[o].seriesModels.push(t)
  8648. }),
  8649. e
  8650. }
  8651. function Id(t) {
  8652. var e, i, n = t.axis, o = t.seriesModels, a = o.length, r = t.boxWidthList = [], s = t.boxOffsetList = [], l = [];
  8653. if ("category" === n.type)
  8654. i = n.getBandWidth();
  8655. else {
  8656. var h = 0;
  8657. AA(o, function(t) {
  8658. h = Math.max(h, t.getData().count())
  8659. }),
  8660. e = n.getExtent(),
  8661. Math.abs(e[1] - e[0])
  8662. }
  8663. AA(o, function(t) {
  8664. var e = t.get("boxWidth");
  8665. v(e) || (e = [e, e]),
  8666. l.push([bi(e[0], i) || 0, bi(e[1], i) || 0])
  8667. });
  8668. var u = .8 * i - 2
  8669. , c = u / a * .3
  8670. , d = (u - c * (a - 1)) / a
  8671. , f = d / 2 - u / 2;
  8672. AA(o, function(t, e) {
  8673. s.push(f),
  8674. f += c + d,
  8675. r.push(Math.min(Math.max(d, l[e][0]), l[e][1]))
  8676. })
  8677. }
  8678. function Td(t, e, i) {
  8679. var n, o = t.coordinateSystem, a = t.getData(), r = i / 2, s = t.get("layout"), l = "horizontal" === s ? 0 : 1, h = 1 - l, u = ["x", "y"], d = [];
  8680. c(a.dimensions, function(t) {
  8681. var e = a.getDimensionInfo(t).coordDim;
  8682. e === u[h] ? d.push(t) : e === u[l] && (n = t)
  8683. }),
  8684. null == n || d.length < 5 || a.each([n].concat(d), function() {
  8685. function t(t) {
  8686. var i = [];
  8687. i[l] = c,
  8688. i[h] = t;
  8689. var n;
  8690. return isNaN(c) || isNaN(t) ? n = [NaN, NaN] : (n = o.dataToPoint(i))[l] += e,
  8691. n
  8692. }
  8693. function i(t, e) {
  8694. var i = t.slice()
  8695. , n = t.slice();
  8696. i[l] += r,
  8697. n[l] -= r,
  8698. e ? y.push(i, n) : y.push(n, i)
  8699. }
  8700. function n(t) {
  8701. var e = [t.slice(), t.slice()];
  8702. e[0][l] -= r,
  8703. e[1][l] += r,
  8704. v.push(e)
  8705. }
  8706. var u = arguments
  8707. , c = u[0]
  8708. , f = u[d.length + 1]
  8709. , g = t(u[3])
  8710. , p = t(u[1])
  8711. , m = t(u[5])
  8712. , v = [[p, t(u[2])], [m, t(u[4])]];
  8713. n(p),
  8714. n(m),
  8715. n(g);
  8716. var y = [];
  8717. i(v[0][1], 0),
  8718. i(v[1][1], 1),
  8719. a.setItemLayout(f, {
  8720. chartLayout: s,
  8721. initBaseline: g[h],
  8722. median: g,
  8723. bodyEnds: y,
  8724. whiskerEnds: v
  8725. })
  8726. })
  8727. }
  8728. function Ad(t, e, i) {
  8729. var n = e.getItemModel(i)
  8730. , o = n.getModel(CA)
  8731. , a = e.getItemVisual(i, "color")
  8732. , r = e.getItemVisual(i, "borderColor") || a
  8733. , s = o.getItemStyle(["color", "color0", "borderColor", "borderColor0"])
  8734. , l = t.childAt(t.whiskerIndex);
  8735. l.useStyle(s),
  8736. l.style.stroke = r;
  8737. var h = t.childAt(t.bodyIndex);
  8738. h.useStyle(s),
  8739. h.style.fill = a,
  8740. h.style.stroke = r,
  8741. lo(t, n.getModel(DA).getItemStyle())
  8742. }
  8743. function Cd(t, e) {
  8744. var i, n = t.getBaseAxis(), o = "category" === n.type ? n.getBandWidth() : (i = n.getExtent(),
  8745. Math.abs(i[1] - i[0]) / e.count()), a = bi(zA(t.get("barMaxWidth"), o), o), r = bi(zA(t.get("barMinWidth"), 1), o), s = t.get("barWidth");
  8746. return null != s ? bi(s, o) : Math.max(Math.min(o / 2, a), r)
  8747. }
  8748. function Dd(t) {
  8749. return v(t) || (t = [+t, +t]),
  8750. t
  8751. }
  8752. function Ld(t, e) {
  8753. t.eachChild(function(t) {
  8754. t.attr({
  8755. z: e.z,
  8756. zlevel: e.zlevel,
  8757. style: {
  8758. stroke: "stroke" === e.brushType ? e.color : null,
  8759. fill: "fill" === e.brushType ? e.color : null
  8760. }
  8761. })
  8762. })
  8763. }
  8764. function kd(t, e) {
  8765. $y.call(this);
  8766. var i = new Kr(t,e)
  8767. , n = new $y;
  8768. this.add(i),
  8769. this.add(n),
  8770. n.beforeUpdate = function() {
  8771. this.attr(i.getScale())
  8772. }
  8773. ,
  8774. this.updateData(t, e)
  8775. }
  8776. function Pd(t) {
  8777. var e = t.data;
  8778. e && e[0] && e[0][0] && e[0][0].coord && (t.data = d(e, function(t) {
  8779. var e = {
  8780. coords: [t[0].coord, t[1].coord]
  8781. };
  8782. return t[0].name && (e.fromName = t[0].name),
  8783. t[1].name && (e.toName = t[1].name),
  8784. n([e, t[0], t[1]])
  8785. }))
  8786. }
  8787. function Od(t, e, i) {
  8788. $y.call(this),
  8789. this.add(this.createLine(t, e, i)),
  8790. this._updateEffectSymbol(t, e)
  8791. }
  8792. function zd(t, e, i) {
  8793. $y.call(this),
  8794. this._createPolyline(t, e, i)
  8795. }
  8796. function Nd(t, e, i) {
  8797. Od.call(this, t, e, i),
  8798. this._lastFrame = 0,
  8799. this._lastFramePercent = 0
  8800. }
  8801. function Ed() {
  8802. this.group = new $y,
  8803. this._lineEl = new GA
  8804. }
  8805. function Rd(t) {
  8806. return t instanceof Array || (t = [t, t]),
  8807. t
  8808. }
  8809. function Vd() {
  8810. var t = ay();
  8811. this.canvas = t,
  8812. this.blurSize = 30,
  8813. this.pointSize = 20,
  8814. this.maxOpacity = 1,
  8815. this.minOpacity = 0,
  8816. this._gradientPixels = {}
  8817. }
  8818. function Bd(t, e, i) {
  8819. var n = t[1] - t[0]
  8820. , o = (e = d(e, function(e) {
  8821. return {
  8822. interval: [(e.interval[0] - t[0]) / n, (e.interval[1] - t[0]) / n]
  8823. }
  8824. })).length
  8825. , a = 0;
  8826. return function(t) {
  8827. for (n = a; n < o; n++)
  8828. if ((r = e[n].interval)[0] <= t && t <= r[1]) {
  8829. a = n;
  8830. break
  8831. }
  8832. if (n === o)
  8833. for (var n = a - 1; n >= 0; n--) {
  8834. var r = e[n].interval;
  8835. if (r[0] <= t && t <= r[1]) {
  8836. a = n;
  8837. break
  8838. }
  8839. }
  8840. return n >= 0 && n < o && i[n]
  8841. }
  8842. }
  8843. function Gd(t, e) {
  8844. var i = t[1] - t[0];
  8845. return e = [(e[0] - t[0]) / i, (e[1] - t[0]) / i],
  8846. function(t) {
  8847. return t >= e[0] && t <= e[1]
  8848. }
  8849. }
  8850. function Wd(t) {
  8851. var e = t.dimensions;
  8852. return "lng" === e[0] && "lat" === e[1]
  8853. }
  8854. function Hd(t, e, i, n) {
  8855. var o = t.getItemLayout(e)
  8856. , a = i.get("symbolRepeat")
  8857. , r = i.get("symbolClip")
  8858. , s = i.get("symbolPosition") || "start"
  8859. , l = (i.get("symbolRotate") || 0) * Math.PI / 180 || 0
  8860. , h = i.get("symbolPatternSize") || 2
  8861. , u = i.isAnimationEnabled()
  8862. , c = {
  8863. dataIndex: e,
  8864. layout: o,
  8865. itemModel: i,
  8866. symbolType: t.getItemVisual(e, "symbol") || "circle",
  8867. color: t.getItemVisual(e, "color"),
  8868. symbolClip: r,
  8869. symbolRepeat: a,
  8870. symbolRepeatDirection: i.get("symbolRepeatDirection"),
  8871. symbolPatternSize: h,
  8872. rotation: l,
  8873. animationModel: u ? i : null,
  8874. hoverAnimation: u && i.get("hoverAnimation"),
  8875. z2: i.getShallow("z", !0) || 0
  8876. };
  8877. Fd(i, a, o, n, c),
  8878. Ud(t, e, o, a, r, c.boundingLength, c.pxSign, h, n, c),
  8879. jd(i, c.symbolScale, l, n, c);
  8880. var d = c.symbolSize
  8881. , f = i.get("symbolOffset");
  8882. return v(f) && (f = [bi(f[0], d[0]), bi(f[1], d[1])]),
  8883. Xd(i, d, o, a, r, f, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, n, c),
  8884. c
  8885. }
  8886. function Fd(t, e, i, n, o) {
  8887. var a, r = n.valueDim, s = t.get("symbolBoundingData"), l = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()), h = l.toGlobalCoord(l.dataToCoord(0)), u = 1 - +(i[r.wh] <= 0);
  8888. if (v(s)) {
  8889. var c = [Zd(l, s[0]) - h, Zd(l, s[1]) - h];
  8890. c[1] < c[0] && c.reverse(),
  8891. a = c[u]
  8892. } else
  8893. a = null != s ? Zd(l, s) - h : e ? n.coordSysExtent[r.index][u] - h : i[r.wh];
  8894. o.boundingLength = a,
  8895. e && (o.repeatCutLength = i[r.wh]),
  8896. o.pxSign = a > 0 ? 1 : a < 0 ? -1 : 0
  8897. }
  8898. function Zd(t, e) {
  8899. return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))
  8900. }
  8901. function Ud(t, e, i, n, o, a, r, s, l, h) {
  8902. var u = l.valueDim
  8903. , c = l.categoryDim
  8904. , d = Math.abs(i[c.wh])
  8905. , f = t.getItemVisual(e, "symbolSize");
  8906. v(f) ? f = f.slice() : (null == f && (f = "100%"),
  8907. f = [f, f]),
  8908. f[c.index] = bi(f[c.index], d),
  8909. f[u.index] = bi(f[u.index], n ? d : Math.abs(a)),
  8910. h.symbolSize = f,
  8911. (h.symbolScale = [f[0] / s, f[1] / s])[u.index] *= (l.isHorizontal ? -1 : 1) * r
  8912. }
  8913. function jd(t, e, i, n, o) {
  8914. var a = t.get(FA) || 0;
  8915. a && (UA.attr({
  8916. scale: e.slice(),
  8917. rotation: i
  8918. }),
  8919. UA.updateTransform(),
  8920. a /= UA.getLineScale(),
  8921. a *= e[n.valueDim.index]),
  8922. o.valueLineWidth = a
  8923. }
  8924. function Xd(t, e, i, n, a, r, s, l, h, u, c, d) {
  8925. var f = c.categoryDim
  8926. , g = c.valueDim
  8927. , p = d.pxSign
  8928. , m = Math.max(e[g.index] + l, 0)
  8929. , v = m;
  8930. if (n) {
  8931. var y = Math.abs(h)
  8932. , x = M(t.get("symbolMargin"), "15%") + ""
  8933. , _ = !1;
  8934. x.lastIndexOf("!") === x.length - 1 && (_ = !0,
  8935. x = x.slice(0, x.length - 1)),
  8936. x = bi(x, e[g.index]);
  8937. var b = Math.max(m + 2 * x, 0)
  8938. , w = _ ? 0 : 2 * x
  8939. , S = Ni(n)
  8940. , I = S ? n : cf((y + w) / b);
  8941. b = m + 2 * (x = (y - I * m) / 2 / (_ ? I : I - 1)),
  8942. w = _ ? 0 : 2 * x,
  8943. S || "fixed" === n || (I = u ? cf((Math.abs(u) + w) / b) : 0),
  8944. v = I * b - w,
  8945. d.repeatTimes = I,
  8946. d.symbolMargin = x
  8947. }
  8948. var T = p * (v / 2)
  8949. , A = d.pathPosition = [];
  8950. A[f.index] = i[f.wh] / 2,
  8951. A[g.index] = "start" === s ? T : "end" === s ? h - T : h / 2,
  8952. r && (A[0] += r[0],
  8953. A[1] += r[1]);
  8954. var C = d.bundlePosition = [];
  8955. C[f.index] = i[f.xy],
  8956. C[g.index] = i[g.xy];
  8957. var D = d.barRectShape = o({}, i);
  8958. D[g.wh] = p * Math.max(Math.abs(i[g.wh]), Math.abs(A[g.index] + T)),
  8959. D[f.wh] = i[f.wh];
  8960. var L = d.clipShape = {};
  8961. L[f.xy] = -i[f.xy],
  8962. L[f.wh] = c.ecSize[f.wh],
  8963. L[g.xy] = 0,
  8964. L[g.wh] = i[g.wh]
  8965. }
  8966. function qd(t) {
  8967. var e = t.symbolPatternSize
  8968. , i = Gr(t.symbolType, -e / 2, -e / 2, e, e, t.color);
  8969. return i.attr({
  8970. culling: !0
  8971. }),
  8972. "image" !== i.type && i.setStyle({
  8973. strokeNoScale: !0
  8974. }),
  8975. i
  8976. }
  8977. function Yd(t, e, i, n) {
  8978. function o(t) {
  8979. var e = l.slice()
  8980. , n = i.pxSign
  8981. , o = t;
  8982. return ("start" === i.symbolRepeatDirection ? n > 0 : n < 0) && (o = u - 1 - t),
  8983. e[h.index] = d * (o - u / 2 + .5) + l[h.index],
  8984. {
  8985. position: e,
  8986. scale: i.symbolScale.slice(),
  8987. rotation: i.rotation
  8988. }
  8989. }
  8990. var a = t.__pictorialBundle
  8991. , r = i.symbolSize
  8992. , s = i.valueLineWidth
  8993. , l = i.pathPosition
  8994. , h = e.valueDim
  8995. , u = i.repeatTimes || 0
  8996. , c = 0
  8997. , d = r[e.valueDim.index] + s + 2 * i.symbolMargin;
  8998. for (lf(t, function(t) {
  8999. t.__pictorialAnimationIndex = c,
  9000. t.__pictorialRepeatTimes = u,
  9001. c < u ? hf(t, null, o(c), i, n) : hf(t, null, {
  9002. scale: [0, 0]
  9003. }, i, n, function() {
  9004. a.remove(t)
  9005. }),
  9006. nf(t, i),
  9007. c++
  9008. }); c < u; c++) {
  9009. var f = qd(i);
  9010. f.__pictorialAnimationIndex = c,
  9011. f.__pictorialRepeatTimes = u,
  9012. a.add(f);
  9013. var g = o(c);
  9014. hf(f, {
  9015. position: g.position,
  9016. scale: [0, 0]
  9017. }, {
  9018. scale: g.scale,
  9019. rotation: g.rotation
  9020. }, i, n),
  9021. f.on("mouseover", function() {
  9022. lf(t, function(t) {
  9023. t.trigger("emphasis")
  9024. })
  9025. }).on("mouseout", function() {
  9026. lf(t, function(t) {
  9027. t.trigger("normal")
  9028. })
  9029. }),
  9030. nf(f, i)
  9031. }
  9032. }
  9033. function $d(t, e, i, n) {
  9034. var o = t.__pictorialBundle
  9035. , a = t.__pictorialMainPath;
  9036. a ? hf(a, null, {
  9037. position: i.pathPosition.slice(),
  9038. scale: i.symbolScale.slice(),
  9039. rotation: i.rotation
  9040. }, i, n) : (a = t.__pictorialMainPath = qd(i),
  9041. o.add(a),
  9042. hf(a, {
  9043. position: i.pathPosition.slice(),
  9044. scale: [0, 0],
  9045. rotation: i.rotation
  9046. }, {
  9047. scale: i.symbolScale.slice()
  9048. }, i, n),
  9049. a.on("mouseover", function() {
  9050. this.trigger("emphasis")
  9051. }).on("mouseout", function() {
  9052. this.trigger("normal")
  9053. })),
  9054. nf(a, i)
  9055. }
  9056. function Kd(t, e, i) {
  9057. var n = o({}, e.barRectShape)
  9058. , a = t.__pictorialBarRect;
  9059. a ? hf(a, null, {
  9060. shape: n
  9061. }, e, i) : (a = t.__pictorialBarRect = new pb({
  9062. z2: 2,
  9063. shape: n,
  9064. silent: !0,
  9065. style: {
  9066. stroke: "transparent",
  9067. fill: "transparent",
  9068. lineWidth: 0
  9069. }
  9070. }),
  9071. t.add(a))
  9072. }
  9073. function Jd(t, e, i, n) {
  9074. if (i.symbolClip) {
  9075. var a = t.__pictorialClipPath
  9076. , r = o({}, i.clipShape)
  9077. , s = e.valueDim
  9078. , l = i.animationModel
  9079. , h = i.dataIndex;
  9080. if (a)
  9081. _o(a, {
  9082. shape: r
  9083. }, l, h);
  9084. else {
  9085. r[s.wh] = 0,
  9086. a = new pb({
  9087. shape: r
  9088. }),
  9089. t.__pictorialBundle.setClipPath(a),
  9090. t.__pictorialClipPath = a;
  9091. var u = {};
  9092. u[s.wh] = i.clipShape[s.wh],
  9093. Db[n ? "updateProps" : "initProps"](a, {
  9094. shape: u
  9095. }, l, h)
  9096. }
  9097. }
  9098. }
  9099. function Qd(t, e) {
  9100. var i = t.getItemModel(e);
  9101. return i.getAnimationDelayParams = tf,
  9102. i.isAnimationEnabled = ef,
  9103. i
  9104. }
  9105. function tf(t) {
  9106. return {
  9107. index: t.__pictorialAnimationIndex,
  9108. count: t.__pictorialRepeatTimes
  9109. }
  9110. }
  9111. function ef() {
  9112. return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation")
  9113. }
  9114. function nf(t, e) {
  9115. t.off("emphasis").off("normal");
  9116. var i = e.symbolScale.slice();
  9117. e.hoverAnimation && t.on("emphasis", function() {
  9118. this.animateTo({
  9119. scale: [1.1 * i[0], 1.1 * i[1]]
  9120. }, 400, "elasticOut")
  9121. }).on("normal", function() {
  9122. this.animateTo({
  9123. scale: i.slice()
  9124. }, 400, "elasticOut")
  9125. })
  9126. }
  9127. function of(t, e, i, n) {
  9128. var o = new $y
  9129. , a = new $y;
  9130. return o.add(a),
  9131. o.__pictorialBundle = a,
  9132. a.attr("position", i.bundlePosition.slice()),
  9133. i.symbolRepeat ? Yd(o, e, i) : $d(o, e, i),
  9134. Kd(o, i, n),
  9135. Jd(o, e, i, n),
  9136. o.__pictorialShapeStr = sf(t, i),
  9137. o.__pictorialSymbolMeta = i,
  9138. o
  9139. }
  9140. function af(t, e, i) {
  9141. var n = i.animationModel
  9142. , o = i.dataIndex;
  9143. _o(t.__pictorialBundle, {
  9144. position: i.bundlePosition.slice()
  9145. }, n, o),
  9146. i.symbolRepeat ? Yd(t, e, i, !0) : $d(t, e, i, !0),
  9147. Kd(t, i, !0),
  9148. Jd(t, e, i, !0)
  9149. }
  9150. function rf(t, e, i, n) {
  9151. var o = n.__pictorialBarRect;
  9152. o && (o.style.text = null);
  9153. var a = [];
  9154. lf(n, function(t) {
  9155. a.push(t)
  9156. }),
  9157. n.__pictorialMainPath && a.push(n.__pictorialMainPath),
  9158. n.__pictorialClipPath && (i = null),
  9159. c(a, function(t) {
  9160. _o(t, {
  9161. scale: [0, 0]
  9162. }, i, e, function() {
  9163. n.parent && n.parent.remove(n)
  9164. })
  9165. }),
  9166. t.setItemGraphicEl(e, null)
  9167. }
  9168. function sf(t, e) {
  9169. return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":")
  9170. }
  9171. function lf(t, e, i) {
  9172. c(t.__pictorialBundle.children(), function(n) {
  9173. n !== t.__pictorialBarRect && e.call(i, n)
  9174. })
  9175. }
  9176. function hf(t, e, i, n, o, a) {
  9177. e && t.attr(e),
  9178. n.symbolClip && !o ? i && t.attr(i) : i && Db[o ? "updateProps" : "initProps"](t, i, n.animationModel, n.dataIndex, a)
  9179. }
  9180. function uf(t, e, i) {
  9181. var n = i.color
  9182. , o = i.dataIndex
  9183. , r = i.itemModel
  9184. , s = r.getModel("itemStyle.normal").getItemStyle(["color"])
  9185. , l = r.getModel("itemStyle.emphasis").getItemStyle()
  9186. , h = r.getShallow("cursor");
  9187. lf(t, function(t) {
  9188. t.setColor(n),
  9189. t.setStyle(a({
  9190. fill: n,
  9191. opacity: i.opacity
  9192. }, s)),
  9193. lo(t, l),
  9194. h && (t.cursor = h),
  9195. t.z2 = i.z2
  9196. });
  9197. var u = {}
  9198. , c = e.valueDim.posDesc[+(i.boundingLength > 0)]
  9199. , d = t.__pictorialBarRect;
  9200. nl(d.style, u, r, n, e.seriesModel, o, c),
  9201. lo(d, u)
  9202. }
  9203. function cf(t) {
  9204. var e = Math.round(t);
  9205. return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t)
  9206. }
  9207. function df(t, e, i) {
  9208. this.dimension = "single",
  9209. this.dimensions = ["single"],
  9210. this._axis = null,
  9211. this._rect,
  9212. this._init(t, e, i),
  9213. this.model = t
  9214. }
  9215. function ff(t, e) {
  9216. e = e || {};
  9217. var i = t.coordinateSystem
  9218. , n = t.axis
  9219. , o = {}
  9220. , a = n.position
  9221. , r = n.orient
  9222. , s = i.getRect()
  9223. , l = [s.x, s.x + s.width, s.y, s.y + s.height]
  9224. , h = {
  9225. horizontal: {
  9226. top: l[2],
  9227. bottom: l[3]
  9228. },
  9229. vertical: {
  9230. left: l[0],
  9231. right: l[1]
  9232. }
  9233. };
  9234. o.position = ["vertical" === r ? h.vertical[a] : l[0], "horizontal" === r ? h.horizontal[a] : l[3]];
  9235. var u = {
  9236. horizontal: 0,
  9237. vertical: 1
  9238. };
  9239. o.rotation = Math.PI / 2 * u[r];
  9240. var c = {
  9241. top: -1,
  9242. bottom: 1,
  9243. right: 1,
  9244. left: -1
  9245. };
  9246. o.labelDirection = o.tickDirection = o.nameDirection = c[a],
  9247. t.get("axisTick.inside") && (o.tickDirection = -o.tickDirection),
  9248. M(e.labelInside, t.get("axisLabel.inside")) && (o.labelDirection = -o.labelDirection);
  9249. var d = e.rotate;
  9250. return null == d && (d = t.get("axisLabel.rotate")),
  9251. o.labelRotation = "top" === a ? -d : d,
  9252. o.labelInterval = n.getLabelInterval(),
  9253. o.z2 = 1,
  9254. o
  9255. }
  9256. function gf(t, e, i, n, a) {
  9257. var r = t.axis;
  9258. if (!r.scale.isBlank() && r.containData(e))
  9259. if (t.involveSeries) {
  9260. var s = pf(e, t)
  9261. , l = s.payloadBatch
  9262. , h = s.snapToValue;
  9263. l[0] && null == a.seriesIndex && o(a, l[0]),
  9264. !n && t.snap && r.containData(h) && null != h && (e = h),
  9265. i.showPointer(t, e, l, a),
  9266. i.showTooltip(t, s, h)
  9267. } else
  9268. i.showPointer(t, e)
  9269. }
  9270. function pf(t, e) {
  9271. var i = e.axis
  9272. , n = i.dim
  9273. , o = t
  9274. , a = []
  9275. , r = Number.MAX_VALUE
  9276. , s = -1;
  9277. return tC(e.seriesModels, function(e, l) {
  9278. var h, u, c = e.coordDimToDataDim(n);
  9279. if (e.getAxisTooltipData) {
  9280. var d = e.getAxisTooltipData(c, t, i);
  9281. u = d.dataIndices,
  9282. h = d.nestestValue
  9283. } else {
  9284. if (!(u = e.getData().indicesOfNearest(c[0], t, !1, "category" === i.type ? .5 : null)).length)
  9285. return;
  9286. h = e.getData().get(c[0], u[0])
  9287. }
  9288. if (null != h && isFinite(h)) {
  9289. var f = t - h
  9290. , g = Math.abs(f);
  9291. g <= r && ((g < r || f >= 0 && s < 0) && (r = g,
  9292. s = f,
  9293. o = h,
  9294. a.length = 0),
  9295. tC(u, function(t) {
  9296. a.push({
  9297. seriesIndex: e.seriesIndex,
  9298. dataIndexInside: t,
  9299. dataIndex: e.getData().getRawIndex(t)
  9300. })
  9301. }))
  9302. }
  9303. }),
  9304. {
  9305. payloadBatch: a,
  9306. snapToValue: o
  9307. }
  9308. }
  9309. function mf(t, e, i, n) {
  9310. t[e.key] = {
  9311. value: i,
  9312. payloadBatch: n
  9313. }
  9314. }
  9315. function vf(t, e, i, n) {
  9316. var o = i.payloadBatch
  9317. , a = e.axis
  9318. , r = a.model
  9319. , s = e.axisPointerModel;
  9320. if (e.triggerTooltip && o.length) {
  9321. var l = e.coordSys.model
  9322. , h = qs(l)
  9323. , u = t.map[h];
  9324. u || (u = t.map[h] = {
  9325. coordSysId: l.id,
  9326. coordSysIndex: l.componentIndex,
  9327. coordSysType: l.type,
  9328. coordSysMainType: l.mainType,
  9329. dataByAxis: []
  9330. },
  9331. t.list.push(u)),
  9332. u.dataByAxis.push({
  9333. axisDim: a.dim,
  9334. axisIndex: r.componentIndex,
  9335. axisType: r.type,
  9336. axisId: r.id,
  9337. value: n,
  9338. valueLabelOpt: {
  9339. precision: s.get("label.precision"),
  9340. formatter: s.get("label.formatter")
  9341. },
  9342. seriesDataIndices: o.slice()
  9343. })
  9344. }
  9345. }
  9346. function yf(t, e, i) {
  9347. var n = i.axesInfo = [];
  9348. tC(e, function(e, i) {
  9349. var o = e.axisPointerModel.option
  9350. , a = t[i];
  9351. a ? (!e.useHandle && (o.status = "show"),
  9352. o.value = a.value,
  9353. o.seriesDataIndices = (a.payloadBatch || []).slice()) : !e.useHandle && (o.status = "hide"),
  9354. "show" === o.status && n.push({
  9355. axisDim: e.axis.dim,
  9356. axisIndex: e.axis.model.componentIndex,
  9357. value: o.value
  9358. })
  9359. })
  9360. }
  9361. function xf(t, e, i, n) {
  9362. if (!Sf(e) && t.list.length) {
  9363. var o = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  9364. n({
  9365. type: "showTip",
  9366. escapeConnect: !0,
  9367. x: e[0],
  9368. y: e[1],
  9369. tooltipOption: i.tooltipOption,
  9370. position: i.position,
  9371. dataIndexInside: o.dataIndexInside,
  9372. dataIndex: o.dataIndex,
  9373. seriesIndex: o.seriesIndex,
  9374. dataByCoordSys: t.list
  9375. })
  9376. } else
  9377. n({
  9378. type: "hideTip"
  9379. })
  9380. }
  9381. function _f(t, e, i) {
  9382. var n = i.getZr()
  9383. , o = iC(n).axisPointerLastHighlights || {}
  9384. , a = iC(n).axisPointerLastHighlights = {};
  9385. tC(t, function(t, e) {
  9386. var i = t.axisPointerModel.option;
  9387. "show" === i.status && tC(i.seriesDataIndices, function(t) {
  9388. var e = t.seriesIndex + " | " + t.dataIndex;
  9389. a[e] = t
  9390. })
  9391. });
  9392. var r = []
  9393. , s = [];
  9394. c(o, function(t, e) {
  9395. !a[e] && s.push(t)
  9396. }),
  9397. c(a, function(t, e) {
  9398. !o[e] && r.push(t)
  9399. }),
  9400. s.length && i.dispatchAction({
  9401. type: "downplay",
  9402. escapeConnect: !0,
  9403. batch: s
  9404. }),
  9405. r.length && i.dispatchAction({
  9406. type: "highlight",
  9407. escapeConnect: !0,
  9408. batch: r
  9409. })
  9410. }
  9411. function bf(t, e) {
  9412. for (var i = 0; i < (t || []).length; i++) {
  9413. var n = t[i];
  9414. if (e.axis.dim === n.axisDim && e.axis.model.componentIndex === n.axisIndex)
  9415. return n
  9416. }
  9417. }
  9418. function wf(t) {
  9419. var e = t.axis.model
  9420. , i = {}
  9421. , n = i.axisDim = t.axis.dim;
  9422. return i.axisIndex = i[n + "AxisIndex"] = e.componentIndex,
  9423. i.axisName = i[n + "AxisName"] = e.name,
  9424. i.axisId = i[n + "AxisId"] = e.id,
  9425. i
  9426. }
  9427. function Sf(t) {
  9428. return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1])
  9429. }
  9430. function Mf(t, e, i) {
  9431. if (!Yv.node) {
  9432. var n = e.getZr();
  9433. nC(n).records || (nC(n).records = {}),
  9434. If(n, e),
  9435. (nC(n).records[t] || (nC(n).records[t] = {})).handler = i
  9436. }
  9437. }
  9438. function If(t, e) {
  9439. function i(i, n) {
  9440. t.on(i, function(i) {
  9441. var o = Df(e);
  9442. oC(nC(t).records, function(t) {
  9443. t && n(t, i, o.dispatchAction)
  9444. }),
  9445. Tf(o.pendings, e)
  9446. })
  9447. }
  9448. nC(t).initialized || (nC(t).initialized = !0,
  9449. i("click", m(Cf, "click")),
  9450. i("mousemove", m(Cf, "mousemove")),
  9451. i("globalout", Af))
  9452. }
  9453. function Tf(t, e) {
  9454. var i, n = t.showTip.length, o = t.hideTip.length;
  9455. n ? i = t.showTip[n - 1] : o && (i = t.hideTip[o - 1]),
  9456. i && (i.dispatchAction = null,
  9457. e.dispatchAction(i))
  9458. }
  9459. function Af(t, e, i) {
  9460. t.handler("leave", null, i)
  9461. }
  9462. function Cf(t, e, i, n) {
  9463. e.handler(t, i, n)
  9464. }
  9465. function Df(t) {
  9466. var e = {
  9467. showTip: [],
  9468. hideTip: []
  9469. }
  9470. , i = function(n) {
  9471. var o = e[n.type];
  9472. o ? o.push(n) : (n.dispatchAction = i,
  9473. t.dispatchAction(n))
  9474. };
  9475. return {
  9476. dispatchAction: i,
  9477. pendings: e
  9478. }
  9479. }
  9480. function Lf(t, e) {
  9481. if (!Yv.node) {
  9482. var i = e.getZr();
  9483. (nC(i).records || {})[t] && (nC(i).records[t] = null)
  9484. }
  9485. }
  9486. function kf() {}
  9487. function Pf(t, e, i, n) {
  9488. Of(rC(i).lastProp, n) || (rC(i).lastProp = n,
  9489. e ? _o(i, n, t) : (i.stopAnimation(),
  9490. i.attr(n)))
  9491. }
  9492. function Of(t, e) {
  9493. if (_(t) && _(e)) {
  9494. var i = !0;
  9495. return c(e, function(e, n) {
  9496. i = i && Of(t[n], e)
  9497. }),
  9498. !!i
  9499. }
  9500. return t === e
  9501. }
  9502. function zf(t, e) {
  9503. t[e.get("label.show") ? "show" : "hide"]()
  9504. }
  9505. function Nf(t) {
  9506. return {
  9507. position: t.position.slice(),
  9508. rotation: t.rotation || 0
  9509. }
  9510. }
  9511. function Ef(t, e, i) {
  9512. var n = e.get("z")
  9513. , o = e.get("zlevel");
  9514. t && t.traverse(function(t) {
  9515. "group" !== t.type && (null != n && (t.z = n),
  9516. null != o && (t.zlevel = o),
  9517. t.silent = i)
  9518. })
  9519. }
  9520. function Rf(t) {
  9521. var e, i = t.get("type"), n = t.getModel(i + "Style");
  9522. return "line" === i ? (e = n.getLineStyle()).fill = null : "shadow" === i && ((e = n.getAreaStyle()).stroke = null),
  9523. e
  9524. }
  9525. function Vf(t, e, i, n, o) {
  9526. var a = Gf(i.get("value"), e.axis, e.ecModel, i.get("seriesDataIndices"), {
  9527. precision: i.get("label.precision"),
  9528. formatter: i.get("label.formatter")
  9529. })
  9530. , r = i.getModel("label")
  9531. , s = Ux(r.get("padding") || 0)
  9532. , l = r.getFont()
  9533. , h = ce(a, l)
  9534. , u = o.position
  9535. , c = h.width + s[1] + s[3]
  9536. , d = h.height + s[0] + s[2]
  9537. , f = o.align;
  9538. "right" === f && (u[0] -= c),
  9539. "center" === f && (u[0] -= c / 2);
  9540. var g = o.verticalAlign;
  9541. "bottom" === g && (u[1] -= d),
  9542. "middle" === g && (u[1] -= d / 2),
  9543. Bf(u, c, d, n);
  9544. var p = r.get("backgroundColor");
  9545. p && "auto" !== p || (p = e.get("axisLine.lineStyle.color")),
  9546. t.label = {
  9547. shape: {
  9548. x: 0,
  9549. y: 0,
  9550. width: c,
  9551. height: d,
  9552. r: r.get("borderRadius")
  9553. },
  9554. position: u.slice(),
  9555. style: {
  9556. text: a,
  9557. textFont: l,
  9558. textFill: r.getTextColor(),
  9559. textPosition: "inside",
  9560. fill: p,
  9561. stroke: r.get("borderColor") || "transparent",
  9562. lineWidth: r.get("borderWidth") || 0,
  9563. shadowBlur: r.get("shadowBlur"),
  9564. shadowColor: r.get("shadowColor"),
  9565. shadowOffsetX: r.get("shadowOffsetX"),
  9566. shadowOffsetY: r.get("shadowOffsetY")
  9567. },
  9568. z2: 10
  9569. }
  9570. }
  9571. function Bf(t, e, i, n) {
  9572. var o = n.getWidth()
  9573. , a = n.getHeight();
  9574. t[0] = Math.min(t[0] + e, o) - e,
  9575. t[1] = Math.min(t[1] + i, a) - i,
  9576. t[0] = Math.max(t[0], 0),
  9577. t[1] = Math.max(t[1], 0)
  9578. }
  9579. function Gf(t, e, i, n, o) {
  9580. var a = e.scale.getLabel(t, {
  9581. precision: o.precision
  9582. })
  9583. , r = o.formatter;
  9584. if (r) {
  9585. var s = {
  9586. value: Rr(e, t),
  9587. seriesData: []
  9588. };
  9589. c(n, function(t) {
  9590. var e = i.getSeriesByIndex(t.seriesIndex)
  9591. , n = t.dataIndexInside
  9592. , o = e && e.getDataParams(n);
  9593. o && s.seriesData.push(o)
  9594. }),
  9595. x(r) ? a = r.replace("{value}", a) : y(r) && (a = r(s))
  9596. }
  9597. return a
  9598. }
  9599. function Wf(t, e, i) {
  9600. var n = nt();
  9601. return lt(n, n, i.rotation),
  9602. st(n, n, i.position),
  9603. So([t.dataToCoord(e), (i.labelOffset || 0) + (i.labelDirection || 1) * (i.labelMargin || 0)], n)
  9604. }
  9605. function Hf(t, e, i, n, o, a) {
  9606. var r = zM.innerTextLayout(i.rotation, 0, i.labelDirection);
  9607. i.labelMargin = o.get("label.margin"),
  9608. Vf(e, n, o, a, {
  9609. position: Wf(n.axis, t, i),
  9610. align: r.textAlign,
  9611. verticalAlign: r.textVerticalAlign
  9612. })
  9613. }
  9614. function Ff(t, e, i) {
  9615. return i = i || 0,
  9616. {
  9617. x1: t[i],
  9618. y1: t[1 - i],
  9619. x2: e[i],
  9620. y2: e[1 - i]
  9621. }
  9622. }
  9623. function Zf(t, e, i) {
  9624. return i = i || 0,
  9625. {
  9626. x: t[i],
  9627. y: t[1 - i],
  9628. width: e[i],
  9629. height: e[1 - i]
  9630. }
  9631. }
  9632. function Uf(t, e, i, n, o, a) {
  9633. return {
  9634. cx: t,
  9635. cy: e,
  9636. r0: i,
  9637. r: n,
  9638. startAngle: o,
  9639. endAngle: a,
  9640. clockwise: !0
  9641. }
  9642. }
  9643. function jf(t, e) {
  9644. var i = {};
  9645. return i[e.dim + "AxisIndex"] = e.index,
  9646. t.getCartesian(i)
  9647. }
  9648. function Xf(t) {
  9649. return "x" === t.dim ? 0 : 1
  9650. }
  9651. function qf(t) {
  9652. return t.isHorizontal() ? 0 : 1
  9653. }
  9654. function Yf(t, e) {
  9655. var i = t.getRect();
  9656. return [i[cC[e]], i[cC[e]] + i[dC[e]]]
  9657. }
  9658. function $f(t, e, i) {
  9659. var n = new pb({
  9660. shape: {
  9661. x: t.x - 10,
  9662. y: t.y - 10,
  9663. width: 0,
  9664. height: t.height + 20
  9665. }
  9666. });
  9667. return bo(n, {
  9668. shape: {
  9669. width: t.width + 20,
  9670. height: t.height + 20
  9671. }
  9672. }, e, i),
  9673. n
  9674. }
  9675. function Kf(t, e, i) {
  9676. if (t.count())
  9677. for (var n, o = e.coordinateSystem, a = e.getLayerSeries(), r = d(a, function(e) {
  9678. return d(e.indices, function(e) {
  9679. var i = o.dataToPoint(t.get("time", e));
  9680. return i[1] = t.get("value", e),
  9681. i
  9682. })
  9683. }), s = Jf(r), l = s.y0, h = i / s.max, u = a.length, c = a[0].indices.length, f = 0; f < c; ++f) {
  9684. n = l[f] * h,
  9685. t.setItemLayout(a[0].indices[f], {
  9686. layerIndex: 0,
  9687. x: r[0][f][0],
  9688. y0: n,
  9689. y: r[0][f][1] * h
  9690. });
  9691. for (var g = 1; g < u; ++g)
  9692. n += r[g - 1][f][1] * h,
  9693. t.setItemLayout(a[g].indices[f], {
  9694. layerIndex: g,
  9695. x: r[g][f][0],
  9696. y0: n,
  9697. y: r[g][f][1] * h
  9698. })
  9699. }
  9700. }
  9701. function Jf(t) {
  9702. for (var e = t.length, i = t[0].length, n = [], o = [], a = 0, r = {}, s = 0; s < i; ++s) {
  9703. for (var l = 0, h = 0; l < e; ++l)
  9704. h += t[l][s][1];
  9705. h > a && (a = h),
  9706. n.push(h)
  9707. }
  9708. for (var u = 0; u < i; ++u)
  9709. o[u] = (a - n[u]) / 2;
  9710. a = 0;
  9711. for (var c = 0; c < i; ++c) {
  9712. var d = n[c] + o[c];
  9713. d > a && (a = d)
  9714. }
  9715. return r.y0 = o,
  9716. r.max = a,
  9717. r
  9718. }
  9719. function Qf(t, e) {
  9720. return e = e || [0, 0],
  9721. d(["x", "y"], function(i, n) {
  9722. var o = this.getAxis(i)
  9723. , a = e[n]
  9724. , r = t[n] / 2;
  9725. return "category" === o.type ? o.getBandWidth() : Math.abs(o.dataToCoord(a - r) - o.dataToCoord(a + r))
  9726. }, this)
  9727. }
  9728. function tg(t, e) {
  9729. return e = e || [0, 0],
  9730. d([0, 1], function(i) {
  9731. var n = e[i]
  9732. , o = t[i] / 2
  9733. , a = []
  9734. , r = [];
  9735. return a[i] = n - o,
  9736. r[i] = n + o,
  9737. a[1 - i] = r[1 - i] = e[1 - i],
  9738. Math.abs(this.dataToPoint(a)[i] - this.dataToPoint(r)[i])
  9739. }, this)
  9740. }
  9741. function eg(t, e) {
  9742. var i = this.getAxis()
  9743. , n = e instanceof Array ? e[0] : e
  9744. , o = (t instanceof Array ? t[0] : t) / 2;
  9745. return "category" === i.type ? i.getBandWidth() : Math.abs(i.dataToCoord(n - o) - i.dataToCoord(n + o))
  9746. }
  9747. function ig(t, e) {
  9748. return d(["Radius", "Angle"], function(i, n) {
  9749. var o = this["get" + i + "Axis"]()
  9750. , a = e[n]
  9751. , r = t[n] / 2
  9752. , s = "dataTo" + i
  9753. , l = "category" === o.type ? o.getBandWidth() : Math.abs(o[s](a - r) - o[s](a + r));
  9754. return "Angle" === i && (l = l * Math.PI / 180),
  9755. l
  9756. }, this)
  9757. }
  9758. function ng(t) {
  9759. var e, i = t.type;
  9760. if ("path" === i) {
  9761. var n = t.shape;
  9762. (e = Fn(n.pathData, null, {
  9763. x: n.x || 0,
  9764. y: n.y || 0,
  9765. width: n.width || 0,
  9766. height: n.height || 0
  9767. }, "center")).__customPathData = t.pathData
  9768. } else if ("image" === i)
  9769. (e = new je({})).__customImagePath = t.style.image;
  9770. else if ("text" === i)
  9771. (e = new ab({})).__customText = t.style.text;
  9772. else {
  9773. var o = Db[i.charAt(0).toUpperCase() + i.slice(1)];
  9774. e = new o
  9775. }
  9776. return e.__customGraphicType = i,
  9777. e.name = t.name,
  9778. e
  9779. }
  9780. function og(t, i, n, o, a, r) {
  9781. var s = {}
  9782. , l = n.style || {};
  9783. if (n.shape && (s.shape = e(n.shape)),
  9784. n.position && (s.position = n.position.slice()),
  9785. n.scale && (s.scale = n.scale.slice()),
  9786. n.origin && (s.origin = n.origin.slice()),
  9787. n.rotation && (s.rotation = n.rotation),
  9788. "image" === t.type && n.style) {
  9789. h = s.style = {};
  9790. c(["x", "y", "width", "height"], function(e) {
  9791. ag(e, h, l, t.style, r)
  9792. })
  9793. }
  9794. if ("text" === t.type && n.style) {
  9795. var h = s.style = {};
  9796. c(["x", "y"], function(e) {
  9797. ag(e, h, l, t.style, r)
  9798. }),
  9799. !l.hasOwnProperty("textFill") && l.fill && (l.textFill = l.fill),
  9800. !l.hasOwnProperty("textStroke") && l.stroke && (l.textStroke = l.stroke)
  9801. }
  9802. if ("group" !== t.type && (t.useStyle(l),
  9803. r)) {
  9804. t.style.opacity = 0;
  9805. var u = l.opacity;
  9806. null == u && (u = 1),
  9807. bo(t, {
  9808. style: {
  9809. opacity: u
  9810. }
  9811. }, o, i)
  9812. }
  9813. r ? t.attr(s) : _o(t, s, o, i),
  9814. t.attr({
  9815. z2: n.z2 || 0,
  9816. silent: n.silent
  9817. }),
  9818. !1 !== n.styleEmphasis && lo(t, n.styleEmphasis)
  9819. }
  9820. function ag(t, e, i, n, o) {
  9821. null == i[t] || o || (e[t] = i[t],
  9822. i[t] = n[t])
  9823. }
  9824. function rg(t, e, i, n) {
  9825. function r(t) {
  9826. null == t && (t = u),
  9827. y && (c = e.getItemModel(t),
  9828. d = c.getModel(yC),
  9829. f = c.getModel(xC),
  9830. g = qr(e),
  9831. p = e.getItemVisual(t, "color"),
  9832. y = !1)
  9833. }
  9834. var s = t.get("renderItem")
  9835. , l = t.coordinateSystem
  9836. , h = {};
  9837. l && (h = l.prepareCustoms ? l.prepareCustoms() : bC[l.type](l));
  9838. var u, c, d, f, g, p, m = a({
  9839. getWidth: n.getWidth,
  9840. getHeight: n.getHeight,
  9841. getZr: n.getZr,
  9842. getDevicePixelRatio: n.getDevicePixelRatio,
  9843. value: function(t, i) {
  9844. return null == i && (i = u),
  9845. e.get(e.getDimension(t || 0), i)
  9846. },
  9847. style: function(i, n) {
  9848. null == n && (n = u),
  9849. r(n);
  9850. var a = c.getModel(mC).getItemStyle();
  9851. null != p && (a.fill = p);
  9852. var s = e.getItemVisual(n, "opacity");
  9853. return null != s && (a.opacity = s),
  9854. null != g && (uo(a, d, null, {
  9855. autoColor: p,
  9856. isRectText: !0
  9857. }),
  9858. a.text = d.getShallow("show") ? I(t.getFormattedLabel(n, "normal"), e.get(g, n)) : null),
  9859. i && o(a, i),
  9860. a
  9861. },
  9862. styleEmphasis: function(i, n) {
  9863. null == n && (n = u),
  9864. r(n);
  9865. var a = c.getModel(vC).getItemStyle();
  9866. return null != g && (uo(a, f, null, {
  9867. isRectText: !0
  9868. }, !0),
  9869. a.text = f.getShallow("show") ? T(t.getFormattedLabel(n, "emphasis"), t.getFormattedLabel(n, "normal"), e.get(g, n)) : null),
  9870. i && o(a, i),
  9871. a
  9872. },
  9873. visual: function(t, i) {
  9874. return null == i && (i = u),
  9875. e.getItemVisual(i, t)
  9876. },
  9877. barLayout: function(t) {
  9878. if (l.getBaseAxis) {
  9879. var e = l.getBaseAxis();
  9880. return il.getLayoutOnAxis(a({
  9881. axis: e
  9882. }, t), n)
  9883. }
  9884. },
  9885. currentSeriesIndices: function() {
  9886. return i.getCurrentSeriesIndices()
  9887. },
  9888. font: function(t) {
  9889. return yo(t, i)
  9890. }
  9891. }, h.api || {}), v = {
  9892. context: {},
  9893. seriesId: t.id,
  9894. seriesName: t.name,
  9895. seriesIndex: t.seriesIndex,
  9896. coordSys: h.coordSys,
  9897. dataInsideLength: e.count(),
  9898. encode: sg(t.getData())
  9899. }, y = !0;
  9900. return function(t) {
  9901. return u = t,
  9902. y = !0,
  9903. s && s(a({
  9904. dataIndexInside: t,
  9905. dataIndex: e.getRawIndex(t)
  9906. }, v), m) || {}
  9907. }
  9908. }
  9909. function sg(t) {
  9910. var e = {};
  9911. return c(t.dimensions, function(i, n) {
  9912. var o = t.getDimensionInfo(i);
  9913. if (!o.isExtraCoord) {
  9914. var a = o.coordDim;
  9915. (e[a] = e[a] || [])[o.coordDimIndex] = n
  9916. }
  9917. }),
  9918. e
  9919. }
  9920. function lg(t, e, i, n, o, a) {
  9921. (t = hg(t, e, i, n, o, a)) && a.setItemGraphicEl(e, t)
  9922. }
  9923. function hg(t, e, i, n, o, a) {
  9924. var r = i.type;
  9925. if (!t || r === t.__customGraphicType || "path" === r && i.pathData === t.__customPathData || "image" === r && i.style.image === t.__customImagePath || "text" === r && i.style.text === t.__customText || (o.remove(t),
  9926. t = null),
  9927. null != r) {
  9928. var s = !t;
  9929. if (!t && (t = ng(i)),
  9930. og(t, e, i, n, a, s),
  9931. "group" === r) {
  9932. var l = t.children() || []
  9933. , h = i.children || [];
  9934. if (i.diffChildrenByName)
  9935. ug({
  9936. oldChildren: l,
  9937. newChildren: h,
  9938. dataIndex: e,
  9939. animatableModel: n,
  9940. group: t,
  9941. data: a
  9942. });
  9943. else {
  9944. for (var u = 0; u < h.length; u++)
  9945. hg(t.childAt(u), e, h[u], n, t, a);
  9946. for (; u < l.length; u++)
  9947. l[u] && t.remove(l[u])
  9948. }
  9949. }
  9950. return o.add(t),
  9951. t
  9952. }
  9953. }
  9954. function ug(t) {
  9955. new cr(t.oldChildren,t.newChildren,cg,cg,t).add(dg).update(dg).remove(fg).execute()
  9956. }
  9957. function cg(t, e) {
  9958. var i = t && t.name;
  9959. return null != i ? i : _C + e
  9960. }
  9961. function dg(t, e) {
  9962. var i = this.context
  9963. , n = null != t ? i.newChildren[t] : null;
  9964. hg(null != e ? i.oldChildren[e] : null, i.dataIndex, n, i.animatableModel, i.group, i.data)
  9965. }
  9966. function fg(t) {
  9967. var e = this.context
  9968. , i = e.oldChildren[t];
  9969. i && e.group.remove(i)
  9970. }
  9971. function gg(t, e, i, n) {
  9972. var o = i.type
  9973. , a = Db[o.charAt(0).toUpperCase() + o.slice(1)]
  9974. , r = new a(i);
  9975. e.add(r),
  9976. n.set(t, r),
  9977. r.__ecGraphicId = t
  9978. }
  9979. function pg(t, e) {
  9980. var i = t && t.parent;
  9981. i && ("group" === t.type && t.traverse(function(t) {
  9982. pg(t, e)
  9983. }),
  9984. e.removeKey(t.__ecGraphicId),
  9985. i.remove(t))
  9986. }
  9987. function mg(t) {
  9988. return t = o({}, t),
  9989. c(["id", "parentId", "$action", "hv", "bounding"].concat(Fb), function(e) {
  9990. delete t[e]
  9991. }),
  9992. t
  9993. }
  9994. function vg(t, e) {
  9995. var i;
  9996. return c(e, function(e) {
  9997. null != t[e] && "auto" !== t[e] && (i = !0)
  9998. }),
  9999. i
  10000. }
  10001. function yg(t, e) {
  10002. var i = t.exist;
  10003. if (e.id = t.keyInfo.id,
  10004. !e.type && i && (e.type = i.type),
  10005. null == e.parentId) {
  10006. var n = e.parentOption;
  10007. n ? e.parentId = n.id : i && (e.parentId = i.parentId)
  10008. }
  10009. e.parentOption = null
  10010. }
  10011. function xg(t, e, n) {
  10012. var a = o({}, n)
  10013. , r = t[e]
  10014. , s = n.$action || "merge";
  10015. if ("merge" === s)
  10016. if (r) {
  10017. i(r, a, !0),
  10018. Jo(r, a, {
  10019. ignoreSize: !0
  10020. }),
  10021. ta(n, r)
  10022. } else
  10023. t[e] = a;
  10024. else
  10025. "replace" === s ? t[e] = a : "remove" === s && r && (t[e] = null)
  10026. }
  10027. function _g(t, e) {
  10028. t && (t.hv = e.hv = [vg(e, ["left", "right"]), vg(e, ["top", "bottom"])],
  10029. "group" === t.type && (null == t.width && (t.width = e.width = 0),
  10030. null == t.height && (t.height = e.height = 0)))
  10031. }
  10032. function bg(t, e, i) {
  10033. var n, o = {}, a = "toggleSelected" === t;
  10034. return i.eachComponent("legend", function(i) {
  10035. a && null != n ? i[n ? "select" : "unSelect"](e.name) : (i[t](e.name),
  10036. n = i.isSelected(e.name)),
  10037. c(i.getData(), function(t) {
  10038. var e = t.get("name");
  10039. if ("\n" !== e && "" !== e) {
  10040. var n = i.isSelected(e);
  10041. o.hasOwnProperty(e) ? o[e] = o[e] && n : o[e] = n
  10042. }
  10043. })
  10044. }),
  10045. {
  10046. name: e.name,
  10047. selected: o
  10048. }
  10049. }
  10050. function wg(t, e, i) {
  10051. var n = e.getBoxLayoutParams()
  10052. , o = e.get("padding")
  10053. , a = {
  10054. width: i.getWidth(),
  10055. height: i.getHeight()
  10056. }
  10057. , r = Yo(n, a, o);
  10058. Ub(e.get("orient"), t, e.get("itemGap"), r.width, r.height),
  10059. $o(t, n, a, o)
  10060. }
  10061. function Sg(t, e) {
  10062. var i = Ux(e.get("padding"))
  10063. , n = e.getItemStyle(["color", "opacity"]);
  10064. return n.fill = e.get("backgroundColor"),
  10065. t = new pb({
  10066. shape: {
  10067. x: t.x - i[3],
  10068. y: t.y - i[0],
  10069. width: t.width + i[1] + i[3],
  10070. height: t.height + i[0] + i[2],
  10071. r: e.get("borderRadius")
  10072. },
  10073. style: n,
  10074. silent: !0,
  10075. z2: -1
  10076. })
  10077. }
  10078. function Mg(t, e) {
  10079. e.dispatchAction({
  10080. type: "legendToggleSelect",
  10081. name: t
  10082. })
  10083. }
  10084. function Ig(t, e, i) {
  10085. var n = i.getZr().storage.getDisplayList()[0];
  10086. n && n.useHoverLayer || t.get("legendHoverLink") && i.dispatchAction({
  10087. type: "highlight",
  10088. seriesName: t.name,
  10089. name: e
  10090. })
  10091. }
  10092. function Tg(t, e, i) {
  10093. var n = i.getZr().storage.getDisplayList()[0];
  10094. n && n.useHoverLayer || t.get("legendHoverLink") && i.dispatchAction({
  10095. type: "downplay",
  10096. seriesName: t.name,
  10097. name: e
  10098. })
  10099. }
  10100. function Ag(t, e, i) {
  10101. var n = [1, 1];
  10102. n[t.getOrient().index] = 0,
  10103. Jo(e, i, {
  10104. type: "box",
  10105. ignoreSize: n
  10106. })
  10107. }
  10108. function Cg(t) {
  10109. var e = "left " + t + "s cubic-bezier(0.23, 1, 0.32, 1),top " + t + "s cubic-bezier(0.23, 1, 0.32, 1)";
  10110. return d(NC, function(t) {
  10111. return t + "transition:" + e
  10112. }).join(";")
  10113. }
  10114. function Dg(t) {
  10115. var e = []
  10116. , i = t.get("fontSize")
  10117. , n = t.getTextColor();
  10118. return n && e.push("color:" + n),
  10119. e.push("font:" + t.getFont()),
  10120. i && e.push("line-height:" + Math.round(3 * i / 2) + "px"),
  10121. OC(["decoration", "align"], function(i) {
  10122. var n = t.get(i);
  10123. n && e.push("text-" + i + ":" + n)
  10124. }),
  10125. e.join(";")
  10126. }
  10127. function Lg(t) {
  10128. var e = []
  10129. , i = t.get("transitionDuration")
  10130. , n = t.get("backgroundColor")
  10131. , o = t.getModel("textStyle")
  10132. , a = t.get("padding");
  10133. return i && e.push(Cg(i)),
  10134. n && (Yv.canvasSupported ? e.push("background-Color:" + n) : (e.push("background-Color:#" + At(n)),
  10135. e.push("filter:alpha(opacity=70)"))),
  10136. OC(["width", "color", "radius"], function(i) {
  10137. var n = "border-" + i
  10138. , o = zC(n)
  10139. , a = t.get(o);
  10140. null != a && e.push(n + ":" + a + ("color" === i ? "" : "px"))
  10141. }),
  10142. e.push(Dg(o)),
  10143. null != a && e.push("padding:" + Ux(a).join("px ") + "px"),
  10144. e.join(";") + ";"
  10145. }
  10146. function kg(t, e) {
  10147. var i = document.createElement("div")
  10148. , n = this._zr = e.getZr();
  10149. this.el = i,
  10150. this._x = e.getWidth() / 2,
  10151. this._y = e.getHeight() / 2,
  10152. t.appendChild(i),
  10153. this._container = t,
  10154. this._show = !1,
  10155. this._hideTimeout;
  10156. var o = this;
  10157. i.onmouseenter = function() {
  10158. o._enterable && (clearTimeout(o._hideTimeout),
  10159. o._show = !0),
  10160. o._inContent = !0
  10161. }
  10162. ,
  10163. i.onmousemove = function(e) {
  10164. if (e = e || window.event,
  10165. !o._enterable) {
  10166. var i = n.handler;
  10167. oi(t, e, !0),
  10168. i.dispatch("mousemove", e)
  10169. }
  10170. }
  10171. ,
  10172. i.onmouseleave = function() {
  10173. o._enterable && o._show && o.hideLater(o._hideDelay),
  10174. o._inContent = !1
  10175. }
  10176. }
  10177. function Pg(t) {
  10178. for (var e = t.pop(); t.length; ) {
  10179. var i = t.pop();
  10180. i && (i instanceof Co && (i = i.get("tooltip", !0)),
  10181. "string" == typeof i && (i = {
  10182. formatter: i
  10183. }),
  10184. e = new Co(i,e,e.ecModel))
  10185. }
  10186. return e
  10187. }
  10188. function Og(t, e) {
  10189. return t.dispatchAction || p(e.dispatchAction, e)
  10190. }
  10191. function zg(t, e, i, n, o, a, r) {
  10192. var s = Eg(i)
  10193. , l = s.width
  10194. , h = s.height;
  10195. return null != a && (t + l + a > n ? t -= l + a : t += a),
  10196. null != r && (e + h + r > o ? e -= h + r : e += r),
  10197. [t, e]
  10198. }
  10199. function Ng(t, e, i, n, o) {
  10200. var a = Eg(i)
  10201. , r = a.width
  10202. , s = a.height;
  10203. return t = Math.min(t + r, n) - r,
  10204. e = Math.min(e + s, o) - s,
  10205. t = Math.max(t, 0),
  10206. e = Math.max(e, 0),
  10207. [t, e]
  10208. }
  10209. function Eg(t) {
  10210. var e = t.clientWidth
  10211. , i = t.clientHeight;
  10212. if (document.defaultView && document.defaultView.getComputedStyle) {
  10213. var n = document.defaultView.getComputedStyle(t);
  10214. n && (e += parseInt(n.paddingLeft, 10) + parseInt(n.paddingRight, 10) + parseInt(n.borderLeftWidth, 10) + parseInt(n.borderRightWidth, 10),
  10215. i += parseInt(n.paddingTop, 10) + parseInt(n.paddingBottom, 10) + parseInt(n.borderTopWidth, 10) + parseInt(n.borderBottomWidth, 10))
  10216. }
  10217. return {
  10218. width: e,
  10219. height: i
  10220. }
  10221. }
  10222. function Rg(t, e, i) {
  10223. var n = i[0]
  10224. , o = i[1]
  10225. , a = 0
  10226. , r = 0
  10227. , s = e.width
  10228. , l = e.height;
  10229. switch (t) {
  10230. case "inside":
  10231. a = e.x + s / 2 - n / 2,
  10232. r = e.y + l / 2 - o / 2;
  10233. break;
  10234. case "top":
  10235. a = e.x + s / 2 - n / 2,
  10236. r = e.y - o - 5;
  10237. break;
  10238. case "bottom":
  10239. a = e.x + s / 2 - n / 2,
  10240. r = e.y + l + 5;
  10241. break;
  10242. case "left":
  10243. a = e.x - n - 5,
  10244. r = e.y + l / 2 - o / 2;
  10245. break;
  10246. case "right":
  10247. a = e.x + s + 5,
  10248. r = e.y + l / 2 - o / 2
  10249. }
  10250. return [a, r]
  10251. }
  10252. function Vg(t) {
  10253. return "center" === t || "middle" === t
  10254. }
  10255. function Bg(t) {
  10256. return t.get("stack") || "__ec_stack_" + t.seriesIndex
  10257. }
  10258. function Gg(t) {
  10259. return t.dim
  10260. }
  10261. function Wg(t, e) {
  10262. var i = {};
  10263. c(t, function(t, e) {
  10264. var n = t.getData()
  10265. , o = t.coordinateSystem.getBaseAxis()
  10266. , a = o.getExtent()
  10267. , r = "category" === o.type ? o.getBandWidth() : Math.abs(a[1] - a[0]) / n.count()
  10268. , s = i[Gg(o)] || {
  10269. bandWidth: r,
  10270. remainedWidth: r,
  10271. autoWidthCount: 0,
  10272. categoryGap: "20%",
  10273. gap: "30%",
  10274. stacks: {}
  10275. }
  10276. , l = s.stacks;
  10277. i[Gg(o)] = s;
  10278. var h = Bg(t);
  10279. l[h] || s.autoWidthCount++,
  10280. l[h] = l[h] || {
  10281. width: 0,
  10282. maxWidth: 0
  10283. };
  10284. var u = bi(t.get("barWidth"), r)
  10285. , c = bi(t.get("barMaxWidth"), r)
  10286. , d = t.get("barGap")
  10287. , f = t.get("barCategoryGap");
  10288. u && !l[h].width && (u = Math.min(s.remainedWidth, u),
  10289. l[h].width = u,
  10290. s.remainedWidth -= u),
  10291. c && (l[h].maxWidth = c),
  10292. null != d && (s.gap = d),
  10293. null != f && (s.categoryGap = f)
  10294. });
  10295. var n = {};
  10296. return c(i, function(t, e) {
  10297. n[e] = {};
  10298. var i = t.stacks
  10299. , o = t.bandWidth
  10300. , a = bi(t.categoryGap, o)
  10301. , r = bi(t.gap, 1)
  10302. , s = t.remainedWidth
  10303. , l = t.autoWidthCount
  10304. , h = (s - a) / (l + (l - 1) * r);
  10305. h = Math.max(h, 0),
  10306. c(i, function(t, e) {
  10307. var i = t.maxWidth;
  10308. i && i < h && (i = Math.min(i, s),
  10309. t.width && (i = Math.min(i, t.width)),
  10310. s -= i,
  10311. t.width = i,
  10312. l--)
  10313. }),
  10314. h = (s - a) / (l + (l - 1) * r),
  10315. h = Math.max(h, 0);
  10316. var u, d = 0;
  10317. c(i, function(t, e) {
  10318. t.width || (t.width = h),
  10319. u = t,
  10320. d += t.width * (1 + r)
  10321. }),
  10322. u && (d -= u.width * r);
  10323. var f = -d / 2;
  10324. c(i, function(t, i) {
  10325. n[e][i] = n[e][i] || {
  10326. offset: f,
  10327. width: t.width
  10328. },
  10329. f += t.width * (1 + r)
  10330. })
  10331. }),
  10332. n
  10333. }
  10334. function Hg(t, e) {
  10335. YS.call(this, "radius", t, e),
  10336. this.type = "category"
  10337. }
  10338. function Fg(t, e) {
  10339. e = e || [0, 360],
  10340. YS.call(this, "angle", t, e),
  10341. this.type = "category"
  10342. }
  10343. function Zg(t, e) {
  10344. return e.type || (e.data ? "category" : "value")
  10345. }
  10346. function Ug(t, e, i) {
  10347. var n = e.get("center")
  10348. , o = i.getWidth()
  10349. , a = i.getHeight();
  10350. t.cx = bi(n[0], o),
  10351. t.cy = bi(n[1], a);
  10352. var r = t.getRadiusAxis()
  10353. , s = Math.min(o, a) / 2
  10354. , l = bi(e.get("radius"), s);
  10355. r.inverse ? r.setExtent(l, 0) : r.setExtent(0, l)
  10356. }
  10357. function jg(t, e) {
  10358. var i = this
  10359. , n = i.getAngleAxis()
  10360. , o = i.getRadiusAxis();
  10361. if (n.scale.setExtent(1 / 0, -1 / 0),
  10362. o.scale.setExtent(1 / 0, -1 / 0),
  10363. t.eachSeries(function(t) {
  10364. if (t.coordinateSystem === i) {
  10365. var e = t.getData();
  10366. o.scale.unionExtentFromData(e, "radius"),
  10367. n.scale.unionExtentFromData(e, "angle")
  10368. }
  10369. }),
  10370. Or(n.scale, n.model),
  10371. Or(o.scale, o.model),
  10372. "category" === n.type && !n.onBand) {
  10373. var a = n.getExtent()
  10374. , r = 360 / n.scale.count();
  10375. n.inverse ? a[1] += r : a[1] -= r,
  10376. n.setExtent(a[0], a[1])
  10377. }
  10378. }
  10379. function Xg(t, e) {
  10380. if (t.type = e.get("type"),
  10381. t.scale = zr(e),
  10382. t.onBand = e.get("boundaryGap") && "category" === t.type,
  10383. t.inverse = e.get("inverse"),
  10384. "angleAxis" === e.mainType) {
  10385. t.inverse ^= e.get("clockwise");
  10386. var i = e.get("startAngle");
  10387. t.setExtent(i, i + (t.inverse ? -360 : 360))
  10388. }
  10389. e.axis = t,
  10390. t.model = e
  10391. }
  10392. function qg(t, e, i) {
  10393. e[1] > e[0] && (e = e.slice().reverse());
  10394. var n = t.coordToPoint([e[0], i])
  10395. , o = t.coordToPoint([e[1], i]);
  10396. return {
  10397. x1: n[0],
  10398. y1: n[1],
  10399. x2: o[0],
  10400. y2: o[1]
  10401. }
  10402. }
  10403. function Yg(t) {
  10404. return t.getRadiusAxis().inverse ? 0 : 1
  10405. }
  10406. function $g(t, e, i) {
  10407. return {
  10408. position: [t.cx, t.cy],
  10409. rotation: i / 180 * Math.PI,
  10410. labelDirection: -1,
  10411. tickDirection: -1,
  10412. nameDirection: 1,
  10413. labelRotate: e.getModel("axisLabel").get("rotate"),
  10414. z2: 1
  10415. }
  10416. }
  10417. function Kg(t, e, i, n, o) {
  10418. var a = e.axis
  10419. , r = a.dataToCoord(t)
  10420. , s = n.getAngleAxis().getExtent()[0];
  10421. s = s / 180 * Math.PI;
  10422. var l, h, u, c = n.getRadiusAxis().getExtent();
  10423. if ("radius" === a.dim) {
  10424. var d = nt();
  10425. lt(d, d, s),
  10426. st(d, d, [n.cx, n.cy]),
  10427. l = So([r, -o], d);
  10428. var f = e.getModel("axisLabel").get("rotate") || 0
  10429. , g = zM.innerTextLayout(s, f * Math.PI / 180, -1);
  10430. h = g.textAlign,
  10431. u = g.textVerticalAlign
  10432. } else {
  10433. var p = c[1];
  10434. l = n.coordToPoint([p + o, r]);
  10435. var m = n.cx
  10436. , v = n.cy;
  10437. h = Math.abs(l[0] - m) / p < .3 ? "center" : l[0] > m ? "left" : "right",
  10438. u = Math.abs(l[1] - v) / p < .3 ? "middle" : l[1] > v ? "top" : "bottom"
  10439. }
  10440. return {
  10441. position: l,
  10442. align: h,
  10443. verticalAlign: u
  10444. }
  10445. }
  10446. function Jg(t, e) {
  10447. e.update = "updateView",
  10448. er(e, function(e, i) {
  10449. var n = {};
  10450. return i.eachComponent({
  10451. mainType: "geo",
  10452. query: e
  10453. }, function(i) {
  10454. i[t](e.name),
  10455. c(i.coordinateSystem.regions, function(t) {
  10456. n[t.name] = i.isSelected(t.name) || !1
  10457. })
  10458. }),
  10459. {
  10460. selected: n,
  10461. name: e.name
  10462. }
  10463. })
  10464. }
  10465. function Qg(t) {
  10466. var e = {};
  10467. c(t, function(t) {
  10468. e[t] = 1
  10469. }),
  10470. t.length = 0,
  10471. c(e, function(e, i) {
  10472. t.push(i)
  10473. })
  10474. }
  10475. function tp(t) {
  10476. if (t)
  10477. for (var e in t)
  10478. if (t.hasOwnProperty(e))
  10479. return !0
  10480. }
  10481. function ep(t, i, n) {
  10482. function o() {
  10483. var t = function() {};
  10484. return t.prototype.__hidden = t.prototype,
  10485. new t
  10486. }
  10487. var a = {};
  10488. return $C(i, function(i) {
  10489. var r = a[i] = o();
  10490. $C(t[i], function(t, o) {
  10491. if (eT.isValidType(o)) {
  10492. var a = {
  10493. type: o,
  10494. visual: t
  10495. };
  10496. n && n(a, i),
  10497. r[o] = new eT(a),
  10498. "opacity" === o && ((a = e(a)).type = "colorAlpha",
  10499. r.__hidden.__alphaForOpacity = new eT(a))
  10500. }
  10501. })
  10502. }),
  10503. a
  10504. }
  10505. function ip(t, i, n) {
  10506. var o;
  10507. c(n, function(t) {
  10508. i.hasOwnProperty(t) && tp(i[t]) && (o = !0)
  10509. }),
  10510. o && c(n, function(n) {
  10511. i.hasOwnProperty(n) && tp(i[n]) ? t[n] = e(i[n]) : delete t[n]
  10512. })
  10513. }
  10514. function np(t, e, i, n, o, a) {
  10515. function r(t) {
  10516. return i.getItemVisual(u, t)
  10517. }
  10518. function s(t, e) {
  10519. i.setItemVisual(u, t, e)
  10520. }
  10521. function l(t, l) {
  10522. u = null == a ? t : l;
  10523. var c = i.getRawDataItem(u);
  10524. if (!c || !1 !== c.visualMap)
  10525. for (var d = n.call(o, t), f = e[d], g = h[d], p = 0, m = g.length; p < m; p++) {
  10526. var v = g[p];
  10527. f[v] && f[v].applyVisual(t, r, s)
  10528. }
  10529. }
  10530. var h = {};
  10531. c(t, function(t) {
  10532. var i = eT.prepareVisualTypes(e[t]);
  10533. h[t] = i
  10534. });
  10535. var u;
  10536. null == a ? i.each(l, !0) : i.each([a], l, !0)
  10537. }
  10538. function op(t) {
  10539. var e = ["x", "y"]
  10540. , i = ["width", "height"];
  10541. return {
  10542. point: function(e, i, n) {
  10543. if (e) {
  10544. var o = n.range;
  10545. return ap(e[t], o)
  10546. }
  10547. },
  10548. rect: function(n, o, a) {
  10549. if (n) {
  10550. var r = a.range
  10551. , s = [n[e[t]], n[e[t]] + n[i[t]]];
  10552. return s[1] < s[0] && s.reverse(),
  10553. ap(s[0], r) || ap(s[1], r) || ap(r[0], s) || ap(r[1], s)
  10554. }
  10555. }
  10556. }
  10557. }
  10558. function ap(t, e) {
  10559. return e[0] <= t && t <= e[1]
  10560. }
  10561. function rp(t, e, i, n, o) {
  10562. for (var a = 0, r = o[o.length - 1]; a < o.length; a++) {
  10563. var s = o[a];
  10564. if (sp(t, e, i, n, s[0], s[1], r[0], r[1]))
  10565. return !0;
  10566. r = s
  10567. }
  10568. }
  10569. function sp(t, e, i, n, o, a, r, s) {
  10570. var l = hp(i - t, o - r, n - e, a - s);
  10571. if (lp(l))
  10572. return !1;
  10573. var h = hp(o - t, o - r, a - e, a - s) / l;
  10574. if (h < 0 || h > 1)
  10575. return !1;
  10576. var u = hp(i - t, o - t, n - e, a - e) / l;
  10577. return !(u < 0 || u > 1)
  10578. }
  10579. function lp(t) {
  10580. return t <= 1e-6 && t >= -1e-6
  10581. }
  10582. function hp(t, e, i, n) {
  10583. return t * n - e * i
  10584. }
  10585. function up(t, e, i) {
  10586. var n = this._targetInfoList = []
  10587. , o = {}
  10588. , a = dp(e, t);
  10589. JC(oD, function(t, e) {
  10590. (!i || !i.include || QC(i.include, e) >= 0) && t(a, n, o)
  10591. })
  10592. }
  10593. function cp(t) {
  10594. return t[0] > t[1] && t.reverse(),
  10595. t
  10596. }
  10597. function dp(t, e) {
  10598. return Wo(t, e, {
  10599. includeMainTypes: iD
  10600. })
  10601. }
  10602. function fp(t, e, i, n) {
  10603. var o = i.getAxis(["x", "y"][t])
  10604. , a = cp(d([0, 1], function(t) {
  10605. return e ? o.coordToData(o.toLocalCoord(n[t])) : o.toGlobalCoord(o.dataToCoord(n[t]))
  10606. }))
  10607. , r = [];
  10608. return r[t] = a,
  10609. r[1 - t] = [NaN, NaN],
  10610. {
  10611. values: a,
  10612. xyMinMax: r
  10613. }
  10614. }
  10615. function gp(t, e, i, n) {
  10616. return [e[0] - n[t] * i[0], e[1] - n[t] * i[1]]
  10617. }
  10618. function pp(t, e) {
  10619. var i = mp(t)
  10620. , n = mp(e)
  10621. , o = [i[0] / n[0], i[1] / n[1]];
  10622. return isNaN(o[0]) && (o[0] = 1),
  10623. isNaN(o[1]) && (o[1] = 1),
  10624. o
  10625. }
  10626. function mp(t) {
  10627. return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN]
  10628. }
  10629. function vp(t, e, i, n, o) {
  10630. if (o) {
  10631. var a = t.getZr();
  10632. a[cD] || (a[uD] || (a[uD] = yp),
  10633. Da(a, uD, i, e)(t, n))
  10634. }
  10635. }
  10636. function yp(t, e) {
  10637. if (!t.isDisposed()) {
  10638. var i = t.getZr();
  10639. i[cD] = !0,
  10640. t.dispatchAction({
  10641. type: "brushSelect",
  10642. batch: e
  10643. }),
  10644. i[cD] = !1
  10645. }
  10646. }
  10647. function xp(t, e, i, n) {
  10648. for (var o = 0, a = e.length; o < a; o++) {
  10649. var r = e[o];
  10650. if (t[r.brushType](n, i, r.selectors, r))
  10651. return !0
  10652. }
  10653. }
  10654. function _p(t) {
  10655. var e = t.brushSelector;
  10656. if (x(e)) {
  10657. var i = [];
  10658. return c(KC, function(t, n) {
  10659. i[n] = function(i, n, o, a) {
  10660. var r = n.getItemLayout(i);
  10661. return t[e](r, o, a)
  10662. }
  10663. }),
  10664. i
  10665. }
  10666. if (y(e)) {
  10667. var n = {};
  10668. return c(KC, function(t, i) {
  10669. n[i] = e
  10670. }),
  10671. n
  10672. }
  10673. return e
  10674. }
  10675. function bp(t, e) {
  10676. var i = t.option.seriesIndex;
  10677. return null != i && "all" !== i && (v(i) ? s(i, e) < 0 : e !== i)
  10678. }
  10679. function wp(t) {
  10680. var e = t.selectors = {};
  10681. return c(KC[t.brushType], function(i, n) {
  10682. e[n] = function(n) {
  10683. return i(n, e, t)
  10684. }
  10685. }),
  10686. t
  10687. }
  10688. function Sp(t) {
  10689. return new jt(t[0][0],t[1][0],t[0][1] - t[0][0],t[1][1] - t[1][0])
  10690. }
  10691. function Mp(t, e) {
  10692. return i({
  10693. brushType: t.brushType,
  10694. brushMode: t.brushMode,
  10695. transformable: t.transformable,
  10696. brushStyle: new Co(t.brushStyle).getItemStyle(),
  10697. removeOnClick: t.removeOnClick,
  10698. z: t.z
  10699. }, e, !0)
  10700. }
  10701. function Ip(t, e, i, n) {
  10702. (!n || n.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())
  10703. }
  10704. function Tp(t, e) {
  10705. pD[t] = e
  10706. }
  10707. function Ap(t) {
  10708. return pD[t]
  10709. }
  10710. function Cp(t, e, i) {
  10711. this.model = t,
  10712. this.ecModel = e,
  10713. this.api = i,
  10714. this._brushType,
  10715. this._brushMode
  10716. }
  10717. function Dp(t, e, i) {
  10718. this._model = t
  10719. }
  10720. function Lp(t, e, i, n) {
  10721. var o = i.calendarModel
  10722. , a = i.seriesModel
  10723. , r = o ? o.coordinateSystem : a ? a.coordinateSystem : null;
  10724. return r === this ? r[t](n) : null
  10725. }
  10726. function kp(t, e) {
  10727. var i = t.cellSize;
  10728. v(i) ? 1 === i.length && (i[1] = i[0]) : i = t.cellSize = [i, i];
  10729. var n = d([0, 1], function(t) {
  10730. return Ko(e, t) && (i[t] = "auto"),
  10731. null != i[t] && "auto" !== i[t]
  10732. });
  10733. Jo(t, e, {
  10734. type: "box",
  10735. ignoreSize: n
  10736. })
  10737. }
  10738. function Pp(t) {
  10739. return s(wD, t) >= 0
  10740. }
  10741. function Op(t, e, i) {
  10742. function n(t, e) {
  10743. return s(e.nodes, t) >= 0
  10744. }
  10745. function o(t, n) {
  10746. var o = !1;
  10747. return e(function(e) {
  10748. c(i(t, e) || [], function(t) {
  10749. n.records[e.name][t] && (o = !0)
  10750. })
  10751. }),
  10752. o
  10753. }
  10754. function a(t, n) {
  10755. n.nodes.push(t),
  10756. e(function(e) {
  10757. c(i(t, e) || [], function(t) {
  10758. n.records[e.name][t] = !0
  10759. })
  10760. })
  10761. }
  10762. return function(i) {
  10763. var r = {
  10764. nodes: [],
  10765. records: {}
  10766. };
  10767. if (e(function(t) {
  10768. r.records[t.name] = {}
  10769. }),
  10770. !i)
  10771. return r;
  10772. a(i, r);
  10773. var s;
  10774. do {
  10775. s = !1,
  10776. t(function(t) {
  10777. !n(t, r) && o(t, r) && (a(t, r),
  10778. s = !0)
  10779. })
  10780. } while (s);
  10781. return r
  10782. }
  10783. }
  10784. function zp(t, e, i) {
  10785. var n = [1 / 0, -1 / 0];
  10786. return MD(i, function(t) {
  10787. var i = t.getData();
  10788. i && MD(t.coordDimToDataDim(e), function(t) {
  10789. var e = i.getDataExtent(t);
  10790. e[0] < n[0] && (n[0] = e[0]),
  10791. e[1] > n[1] && (n[1] = e[1])
  10792. })
  10793. }),
  10794. n[1] < n[0] && (n = [NaN, NaN]),
  10795. Np(t, n),
  10796. n
  10797. }
  10798. function Np(t, e) {
  10799. var i = t.getAxisModel()
  10800. , n = i.getMin(!0)
  10801. , o = "category" === i.get("type")
  10802. , a = o && (i.get("data") || []).length;
  10803. null != n && "dataMin" !== n && "function" != typeof n ? e[0] = n : o && (e[0] = a > 0 ? 0 : NaN);
  10804. var r = i.getMax(!0);
  10805. return null != r && "dataMax" !== r && "function" != typeof r ? e[1] = r : o && (e[1] = a > 0 ? a - 1 : NaN),
  10806. i.get("scale", !0) || (e[0] > 0 && (e[0] = 0),
  10807. e[1] < 0 && (e[1] = 0)),
  10808. e
  10809. }
  10810. function Ep(t, e) {
  10811. var i = t.getAxisModel()
  10812. , n = t._percentWindow
  10813. , o = t._valueWindow;
  10814. if (n) {
  10815. var a = Ti(o, [0, 500]);
  10816. a = Math.min(a, 20);
  10817. var r = e || 0 === n[0] && 100 === n[1];
  10818. i.setRange(r ? null : +o[0].toFixed(a), r ? null : +o[1].toFixed(a))
  10819. }
  10820. }
  10821. function Rp(t) {
  10822. var e = t._minMaxSpan = {}
  10823. , i = t._dataZoomModel;
  10824. MD(["min", "max"], function(n) {
  10825. e[n + "Span"] = i.get(n + "Span");
  10826. var o = i.get(n + "ValueSpan");
  10827. if (null != o && (e[n + "ValueSpan"] = o,
  10828. null != (o = t.getAxisModel().axis.scale.parse(o)))) {
  10829. var a = t._dataExtent;
  10830. e[n + "Span"] = _i(a[0] + o, a, [0, 100], !0)
  10831. }
  10832. })
  10833. }
  10834. function Vp(t) {
  10835. var e = {};
  10836. return AD(["start", "end", "startValue", "endValue", "throttle"], function(i) {
  10837. t.hasOwnProperty(i) && (e[i] = t[i])
  10838. }),
  10839. e
  10840. }
  10841. function Bp(t, e) {
  10842. var i = t._rangePropMode
  10843. , n = t.get("rangeMode");
  10844. AD([["start", "startValue"], ["end", "endValue"]], function(t, o) {
  10845. var a = null != e[t[0]]
  10846. , r = null != e[t[1]];
  10847. a && !r ? i[o] = "percent" : !a && r ? i[o] = "value" : n ? i[o] = n[o] : a && (i[o] = "percent")
  10848. })
  10849. }
  10850. function Gp(t) {
  10851. return {
  10852. x: "y",
  10853. y: "x",
  10854. radius: "angle",
  10855. angle: "radius"
  10856. }[t]
  10857. }
  10858. function Wp(t) {
  10859. return "vertical" === t ? "ns-resize" : "ew-resize"
  10860. }
  10861. function Hp(t, e) {
  10862. var i = jp(t)
  10863. , n = e.dataZoomId
  10864. , o = e.coordId;
  10865. c(i, function(t, i) {
  10866. var a = t.dataZoomInfos;
  10867. a[n] && s(e.allCoordIds, o) < 0 && (delete a[n],
  10868. t.count--)
  10869. }),
  10870. qp(i);
  10871. var a = i[o];
  10872. a || ((a = i[o] = {
  10873. coordId: o,
  10874. dataZoomInfos: {},
  10875. count: 0
  10876. }).controller = Xp(t, a),
  10877. a.dispatchAction = m(Jp, t)),
  10878. !a.dataZoomInfos[n] && a.count++,
  10879. a.dataZoomInfos[n] = e;
  10880. var r = Qp(a.dataZoomInfos);
  10881. a.controller.enable(r.controlType, r.opt),
  10882. a.controller.setPointerChecker(e.containsPoint),
  10883. Da(a, "dispatchAction", e.throttleRate, "fixRate")
  10884. }
  10885. function Fp(t, e) {
  10886. var i = jp(t);
  10887. c(i, function(t) {
  10888. t.controller.dispose();
  10889. var i = t.dataZoomInfos;
  10890. i[e] && (delete i[e],
  10891. t.count--)
  10892. }),
  10893. qp(i)
  10894. }
  10895. function Zp(t, e) {
  10896. if (t && "dataZoom" === t.type && t.batch)
  10897. for (var i = 0, n = t.batch.length; i < n; i++)
  10898. if (t.batch[i].dataZoomId === e)
  10899. return !1;
  10900. return !0
  10901. }
  10902. function Up(t) {
  10903. return t.type + "\0_" + t.id
  10904. }
  10905. function jp(t) {
  10906. var e = t.getZr();
  10907. return e[WD] || (e[WD] = {})
  10908. }
  10909. function Xp(t, e) {
  10910. var i = new Nl(t.getZr());
  10911. return i.on("pan", GD(Yp, e)),
  10912. i.on("zoom", GD($p, e)),
  10913. i
  10914. }
  10915. function qp(t) {
  10916. c(t, function(e, i) {
  10917. e.count || (e.controller.dispose(),
  10918. delete t[i])
  10919. })
  10920. }
  10921. function Yp(t, e, i, n, o, a, r) {
  10922. Kp(t, function(s) {
  10923. return s.panGetRange(t.controller, e, i, n, o, a, r)
  10924. })
  10925. }
  10926. function $p(t, e, i, n) {
  10927. Kp(t, function(o) {
  10928. return o.zoomGetRange(t.controller, e, i, n)
  10929. })
  10930. }
  10931. function Kp(t, e) {
  10932. var i = [];
  10933. c(t.dataZoomInfos, function(t) {
  10934. var n = e(t);
  10935. !t.disabled && n && i.push({
  10936. dataZoomId: t.dataZoomId,
  10937. start: n[0],
  10938. end: n[1]
  10939. })
  10940. }),
  10941. t.dispatchAction(i)
  10942. }
  10943. function Jp(t, e) {
  10944. t.dispatchAction({
  10945. type: "dataZoom",
  10946. batch: e
  10947. })
  10948. }
  10949. function Qp(t) {
  10950. var e, i = {}, n = {
  10951. true: 2,
  10952. move: 1,
  10953. false: 0,
  10954. undefined: -1
  10955. };
  10956. return c(t, function(t) {
  10957. var a = !t.disabled && (!t.zoomLock || "move");
  10958. n[a] > n[e] && (e = a),
  10959. o(i, t.roamControllerOpt)
  10960. }),
  10961. {
  10962. controlType: e,
  10963. opt: i
  10964. }
  10965. }
  10966. function tm(t, e, i) {
  10967. i.getAxisProxy(t.name, e).reset(i)
  10968. }
  10969. function em(t, e, i) {
  10970. i.getAxisProxy(t.name, e).filterData(i)
  10971. }
  10972. function im(t, e) {
  10973. return t && t.hasOwnProperty && t.hasOwnProperty(e)
  10974. }
  10975. function nm(t, e) {
  10976. t.eachTargetSeries(function(e) {
  10977. var i = e.getData();
  10978. np(t.stateList, t.targetVisuals, i, t.getValueState, t, t.getDataDimension(i))
  10979. })
  10980. }
  10981. function om(t) {
  10982. t.eachSeries(function(e) {
  10983. var i = e.getData()
  10984. , n = [];
  10985. t.eachComponent("visualMap", function(t) {
  10986. if (t.isTargetSeries(e)) {
  10987. var o = t.getVisualMeta(p(am, null, e, t)) || {
  10988. stops: [],
  10989. outerColors: []
  10990. };
  10991. o.dimension = t.getDataDimension(i),
  10992. n.push(o)
  10993. }
  10994. }),
  10995. e.getData().setVisual("visualMeta", n)
  10996. })
  10997. }
  10998. function am(t, e, i, n) {
  10999. for (var o = e.targetVisuals[n], a = eT.prepareVisualTypes(o), r = {
  11000. color: t.getData().getVisual("color")
  11001. }, s = 0, l = a.length; s < l; s++) {
  11002. var h = a[s]
  11003. , u = o["opacity" === h ? "__alphaForOpacity" : h];
  11004. u && u.applyVisual(i, function(t) {
  11005. return r[t]
  11006. }, function(t, e) {
  11007. r[t] = e
  11008. })
  11009. }
  11010. return r.color
  11011. }
  11012. function rm(t, e, i) {
  11013. if (i[0] === i[1])
  11014. return i.slice();
  11015. for (var n = (i[1] - i[0]) / 200, o = i[0], a = [], r = 0; r <= 200 && o < i[1]; r++)
  11016. a.push(o),
  11017. o += n;
  11018. return a.push(i[1]),
  11019. a
  11020. }
  11021. function sm(t, e, i) {
  11022. var n = t.option
  11023. , o = n.align;
  11024. if (null != o && "auto" !== o)
  11025. return o;
  11026. for (var a = {
  11027. width: e.getWidth(),
  11028. height: e.getHeight()
  11029. }, r = "horizontal" === n.orient ? 1 : 0, s = [["left", "right", "width"], ["top", "bottom", "height"]], l = s[r], h = [0, null, 10], u = {}, c = 0; c < 3; c++)
  11030. u[s[1 - r][c]] = h[c],
  11031. u[l[c]] = 2 === c ? i[0] : n[l[c]];
  11032. var d = [["x", "width", 3], ["y", "height", 0]][r]
  11033. , f = Yo(u, a, n.padding);
  11034. return l[(f.margin[d[2]] || 0) + f[d[0]] + .5 * f[d[1]] < .5 * a[d[1]] ? 0 : 1]
  11035. }
  11036. function lm(t) {
  11037. return c(t || [], function(e) {
  11038. null != t.dataIndex && (t.dataIndexInside = t.dataIndex,
  11039. t.dataIndex = null)
  11040. }),
  11041. t
  11042. }
  11043. function hm(t, e, i, n) {
  11044. return new fb({
  11045. shape: {
  11046. points: t
  11047. },
  11048. draggable: !!i,
  11049. cursor: e,
  11050. drift: i,
  11051. onmousemove: function(t) {
  11052. Ix(t.event)
  11053. },
  11054. ondragend: n
  11055. })
  11056. }
  11057. function um(t, e) {
  11058. return 0 === t ? [[0, 0], [e, 0], [e, -e]] : [[0, 0], [e, 0], [e, e]]
  11059. }
  11060. function cm(t, e, i, n) {
  11061. return t ? [[0, -hL(e, uL(i, 0))], [dL, 0], [0, hL(e, uL(n - i, 0))]] : [[0, 0], [5, -5], [5, 5]]
  11062. }
  11063. function dm(t, e, i) {
  11064. var n = cL / 2
  11065. , o = t.get("hoverLinkDataSize");
  11066. return o && (n = sL(o, e, i, !0) / 2),
  11067. n
  11068. }
  11069. function fm(t) {
  11070. var e = t.get("hoverLinkOnHandle");
  11071. return !!(null == e ? t.get("realtime") : e)
  11072. }
  11073. function gm(t) {
  11074. return "vertical" === t ? "ns-resize" : "ew-resize"
  11075. }
  11076. function pm(t, e) {
  11077. var i = t.inverse;
  11078. ("vertical" === t.orient ? !i : i) && e.reverse()
  11079. }
  11080. function mm(t) {
  11081. Po(t.label, ["show"])
  11082. }
  11083. function vm(t) {
  11084. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)))
  11085. }
  11086. function ym(t) {
  11087. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y))
  11088. }
  11089. function xm(t, e, i) {
  11090. var n = -1;
  11091. do {
  11092. n = Math.max(Mi(t.get(e, i)), n),
  11093. t = t.stackedOn
  11094. } while (t);
  11095. return n
  11096. }
  11097. function _m(t, e, i, n, o, a) {
  11098. var r = []
  11099. , s = Im(e, n, t)
  11100. , l = e.indicesOfNearest(n, s, !0)[0];
  11101. r[o] = e.get(i, l, !0),
  11102. r[a] = e.get(n, l, !0);
  11103. var h = xm(e, n, l);
  11104. return (h = Math.min(h, 20)) >= 0 && (r[a] = +r[a].toFixed(h)),
  11105. r
  11106. }
  11107. function bm(t, i) {
  11108. var n = t.getData()
  11109. , o = t.coordinateSystem;
  11110. if (i && !ym(i) && !v(i.coord) && o) {
  11111. var a = o.dimensions
  11112. , r = wm(i, n, o, t);
  11113. if ((i = e(i)).type && bL[i.type] && r.baseAxis && r.valueAxis) {
  11114. var s = xL(a, r.baseAxis.dim)
  11115. , l = xL(a, r.valueAxis.dim);
  11116. i.coord = bL[i.type](n, r.baseDataDim, r.valueDataDim, s, l),
  11117. i.value = i.coord[l]
  11118. } else {
  11119. for (var h = [null != i.xAxis ? i.xAxis : i.radiusAxis, null != i.yAxis ? i.yAxis : i.angleAxis], u = 0; u < 2; u++)
  11120. if (bL[h[u]]) {
  11121. var c = t.coordDimToDataDim(a[u])[0];
  11122. h[u] = Im(n, c, h[u])
  11123. }
  11124. i.coord = h
  11125. }
  11126. }
  11127. return i
  11128. }
  11129. function wm(t, e, i, n) {
  11130. var o = {};
  11131. return null != t.valueIndex || null != t.valueDim ? (o.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim,
  11132. o.valueAxis = i.getAxis(n.dataDimToCoordDim(o.valueDataDim)),
  11133. o.baseAxis = i.getOtherAxis(o.valueAxis),
  11134. o.baseDataDim = n.coordDimToDataDim(o.baseAxis.dim)[0]) : (o.baseAxis = n.getBaseAxis(),
  11135. o.valueAxis = i.getOtherAxis(o.baseAxis),
  11136. o.baseDataDim = n.coordDimToDataDim(o.baseAxis.dim)[0],
  11137. o.valueDataDim = n.coordDimToDataDim(o.valueAxis.dim)[0]),
  11138. o
  11139. }
  11140. function Sm(t, e) {
  11141. return !(t && t.containData && e.coord && !vm(e)) || t.containData(e.coord)
  11142. }
  11143. function Mm(t, e, i, n) {
  11144. return n < 2 ? t.coord && t.coord[n] : t.value
  11145. }
  11146. function Im(t, e, i) {
  11147. if ("average" === i) {
  11148. var n = 0
  11149. , o = 0;
  11150. return t.each(e, function(t, e) {
  11151. isNaN(t) || (n += t,
  11152. o++)
  11153. }, !0),
  11154. n / o
  11155. }
  11156. return t.getDataExtent(e, !0)["max" === i ? 1 : 0]
  11157. }
  11158. function Tm(t, e, i) {
  11159. var n = e.coordinateSystem;
  11160. t.each(function(o) {
  11161. var a, r = t.getItemModel(o), s = bi(r.get("x"), i.getWidth()), l = bi(r.get("y"), i.getHeight());
  11162. if (isNaN(s) || isNaN(l)) {
  11163. if (e.getMarkerPosition)
  11164. a = e.getMarkerPosition(t.getValues(t.dimensions, o));
  11165. else if (n) {
  11166. var h = t.get(n.dimensions[0], o)
  11167. , u = t.get(n.dimensions[1], o);
  11168. a = n.dataToPoint([h, u])
  11169. }
  11170. } else
  11171. a = [s, l];
  11172. isNaN(s) || (a[0] = s),
  11173. isNaN(l) || (a[1] = l),
  11174. t.setItemLayout(o, a)
  11175. })
  11176. }
  11177. function Am(t, e, i) {
  11178. var n;
  11179. n = t ? d(t && t.dimensions, function(t) {
  11180. var i = e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0]) || {};
  11181. return i.name = t,
  11182. i
  11183. }) : [{
  11184. name: "value",
  11185. type: "float"
  11186. }];
  11187. var o = new lS(n,i)
  11188. , a = d(i.get("data"), m(bm, e));
  11189. return t && (a = g(a, m(Sm, t))),
  11190. o.initData(a, null, t ? Mm : function(t) {
  11191. return t.value
  11192. }
  11193. ),
  11194. o
  11195. }
  11196. function Cm(t) {
  11197. return !isNaN(t) && !isFinite(t)
  11198. }
  11199. function Dm(t, e, i, n) {
  11200. var o = 1 - t
  11201. , a = n.dimensions[t];
  11202. return Cm(e[o]) && Cm(i[o]) && e[t] === i[t] && n.getAxis(a).containData(e[t])
  11203. }
  11204. function Lm(t, e) {
  11205. if ("cartesian2d" === t.type) {
  11206. var i = e[0].coord
  11207. , n = e[1].coord;
  11208. if (i && n && (Dm(1, i, n, t) || Dm(0, i, n, t)))
  11209. return !0
  11210. }
  11211. return Sm(t, e[0]) && Sm(t, e[1])
  11212. }
  11213. function km(t, e, i, n, o) {
  11214. var a, r = n.coordinateSystem, s = t.getItemModel(e), l = bi(s.get("x"), o.getWidth()), h = bi(s.get("y"), o.getHeight());
  11215. if (isNaN(l) || isNaN(h)) {
  11216. if (n.getMarkerPosition)
  11217. a = n.getMarkerPosition(t.getValues(t.dimensions, e));
  11218. else {
  11219. var u = r.dimensions
  11220. , c = t.get(u[0], e)
  11221. , d = t.get(u[1], e);
  11222. a = r.dataToPoint([c, d])
  11223. }
  11224. if ("cartesian2d" === r.type) {
  11225. var f = r.getAxis("x")
  11226. , g = r.getAxis("y")
  11227. , u = r.dimensions;
  11228. Cm(t.get(u[0], e)) ? a[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : Cm(t.get(u[1], e)) && (a[1] = g.toGlobalCoord(g.getExtent()[i ? 0 : 1]))
  11229. }
  11230. isNaN(l) || (a[0] = l),
  11231. isNaN(h) || (a[1] = h)
  11232. } else
  11233. a = [l, h];
  11234. t.setItemLayout(e, a)
  11235. }
  11236. function Pm(t, e, i) {
  11237. var n;
  11238. n = t ? d(t && t.dimensions, function(t) {
  11239. var i = e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0]) || {};
  11240. return i.name = t,
  11241. i
  11242. }) : [{
  11243. name: "value",
  11244. type: "float"
  11245. }];
  11246. var o = new lS(n,i)
  11247. , a = new lS(n,i)
  11248. , r = new lS([],i)
  11249. , s = d(i.get("data"), m(SL, e, t, i));
  11250. t && (s = g(s, m(Lm, t)));
  11251. var l = t ? Mm : function(t) {
  11252. return t.value
  11253. }
  11254. ;
  11255. return o.initData(d(s, function(t) {
  11256. return t[0]
  11257. }), null, l),
  11258. a.initData(d(s, function(t) {
  11259. return t[1]
  11260. }), null, l),
  11261. r.initData(d(s, function(t) {
  11262. return t[2]
  11263. })),
  11264. r.hasItemOption = !0,
  11265. {
  11266. from: o,
  11267. to: a,
  11268. line: r
  11269. }
  11270. }
  11271. function Om(t) {
  11272. return !isNaN(t) && !isFinite(t)
  11273. }
  11274. function zm(t, e, i, n) {
  11275. var o = 1 - t;
  11276. return Om(e[o]) && Om(i[o])
  11277. }
  11278. function Nm(t, e) {
  11279. var i = e.coord[0]
  11280. , n = e.coord[1];
  11281. return !("cartesian2d" !== t.type || !i || !n || !zm(1, i, n, t) && !zm(0, i, n, t)) || (Sm(t, {
  11282. coord: i,
  11283. x: e.x0,
  11284. y: e.y0
  11285. }) || Sm(t, {
  11286. coord: n,
  11287. x: e.x1,
  11288. y: e.y1
  11289. }))
  11290. }
  11291. function Em(t, e, i, n, o) {
  11292. var a, r = n.coordinateSystem, s = t.getItemModel(e), l = bi(s.get(i[0]), o.getWidth()), h = bi(s.get(i[1]), o.getHeight());
  11293. if (isNaN(l) || isNaN(h)) {
  11294. if (n.getMarkerPosition)
  11295. a = n.getMarkerPosition(t.getValues(i, e));
  11296. else {
  11297. var u = t.get(i[0], e)
  11298. , c = t.get(i[1], e);
  11299. a = r.dataToPoint([u, c], !0)
  11300. }
  11301. if ("cartesian2d" === r.type) {
  11302. var d = r.getAxis("x")
  11303. , f = r.getAxis("y")
  11304. , u = t.get(i[0], e)
  11305. , c = t.get(i[1], e);
  11306. Om(u) ? a[0] = d.toGlobalCoord(d.getExtent()["x0" === i[0] ? 0 : 1]) : Om(c) && (a[1] = f.toGlobalCoord(f.getExtent()["y0" === i[1] ? 0 : 1]))
  11307. }
  11308. isNaN(l) || (a[0] = l),
  11309. isNaN(h) || (a[1] = h)
  11310. } else
  11311. a = [l, h];
  11312. return a
  11313. }
  11314. function Rm(t, e, i) {
  11315. var n, o, a = ["x0", "y0", "x1", "y1"];
  11316. t ? (n = d(t && t.dimensions, function(t) {
  11317. var i = e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0]) || {};
  11318. return i.name = t,
  11319. i
  11320. }),
  11321. o = new lS(d(a, function(t, e) {
  11322. return {
  11323. name: t,
  11324. type: n[e % 2].type
  11325. }
  11326. }),i)) : o = new lS(n = [{
  11327. name: "value",
  11328. type: "float"
  11329. }],i);
  11330. var r = d(i.get("data"), m(ML, e, t, i));
  11331. t && (r = g(r, m(Nm, t)));
  11332. var s = t ? function(t, e, i, n) {
  11333. return t.coord[Math.floor(n / 2)][n % 2]
  11334. }
  11335. : function(t) {
  11336. return t.value
  11337. }
  11338. ;
  11339. return o.initData(r, null, s),
  11340. o.hasItemOption = !0,
  11341. o
  11342. }
  11343. function Vm(t) {
  11344. var e = t.type
  11345. , i = {
  11346. number: "value",
  11347. time: "time"
  11348. };
  11349. if (i[e] && (t.axisType = i[e],
  11350. delete t.type),
  11351. Bm(t),
  11352. Gm(t, "controlPosition")) {
  11353. var n = t.controlStyle || (t.controlStyle = {});
  11354. Gm(n, "position") || (n.position = t.controlPosition),
  11355. "none" !== n.position || Gm(n, "show") || (n.show = !1,
  11356. delete n.position),
  11357. delete t.controlPosition
  11358. }
  11359. c(t.data || [], function(t) {
  11360. _(t) && !v(t) && (!Gm(t, "value") && Gm(t, "name") && (t.value = t.name),
  11361. Bm(t))
  11362. })
  11363. }
  11364. function Bm(t) {
  11365. var e = t.itemStyle || (t.itemStyle = {})
  11366. , i = e.emphasis || (e.emphasis = {})
  11367. , n = t.label || t.label || {}
  11368. , o = n.normal || (n.normal = {})
  11369. , a = {
  11370. normal: 1,
  11371. emphasis: 1
  11372. };
  11373. c(n, function(t, e) {
  11374. a[e] || Gm(o, e) || (o[e] = t)
  11375. }),
  11376. i.label && !Gm(n, "emphasis") && (n.emphasis = i.label,
  11377. delete i.label)
  11378. }
  11379. function Gm(t, e) {
  11380. return t.hasOwnProperty(e)
  11381. }
  11382. function Wm(t, e) {
  11383. return Yo(t.getBoxLayoutParams(), {
  11384. width: e.getWidth(),
  11385. height: e.getHeight()
  11386. }, t.get("padding"))
  11387. }
  11388. function Hm(t, i, n, o) {
  11389. return Fn(t.get(i).replace(/^path:\/\//, ""), e(o || {}), new jt(n[0],n[1],n[2],n[3]), "center")
  11390. }
  11391. function Fm(t, e, n, o, a, r) {
  11392. var s = e.get("color");
  11393. a ? (a.setColor(s),
  11394. n.add(a),
  11395. r && r.onUpdate(a)) : ((a = Gr(t.get("symbol"), -1, -1, 2, 2, s)).setStyle("strokeNoScale", !0),
  11396. n.add(a),
  11397. r && r.onCreate(a));
  11398. var l = e.getItemStyle(["color", "symbol", "symbolSize"]);
  11399. a.setStyle(l),
  11400. o = i({
  11401. rectHover: !0,
  11402. z2: 100
  11403. }, o, !0);
  11404. var h = t.get("symbolSize");
  11405. (h = h instanceof Array ? h.slice() : [+h, +h])[0] /= 2,
  11406. h[1] /= 2,
  11407. o.scale = h;
  11408. var u = t.get("symbolOffset");
  11409. if (u) {
  11410. var c = o.position = o.position || [0, 0];
  11411. c[0] += bi(u[0], h[0]),
  11412. c[1] += bi(u[1], h[1])
  11413. }
  11414. var d = t.get("symbolRotate");
  11415. return o.rotation = (d || 0) * Math.PI / 180 || 0,
  11416. a.attr(o),
  11417. a.updateTransform(),
  11418. a
  11419. }
  11420. function Zm(t, e, i, n, o) {
  11421. if (!t.dragging) {
  11422. var a = n.getModel("checkpointStyle")
  11423. , r = i.dataToCoord(n.getData().get(["value"], e));
  11424. o || !a.get("animation", !0) ? t.attr({
  11425. position: [r, 0]
  11426. }) : (t.stopAnimation(!0),
  11427. t.animateTo({
  11428. position: [r, 0]
  11429. }, a.get("animationDuration", !0), a.get("animationEasing", !0)))
  11430. }
  11431. }
  11432. function Um(t) {
  11433. return 0 === t.indexOf("my")
  11434. }
  11435. function jm(t) {
  11436. this.model = t
  11437. }
  11438. function Xm(t) {
  11439. this.model = t
  11440. }
  11441. function qm(t) {
  11442. var e = {}
  11443. , i = []
  11444. , n = [];
  11445. return t.eachRawSeries(function(t) {
  11446. var o = t.coordinateSystem;
  11447. if (!o || "cartesian2d" !== o.type && "polar" !== o.type)
  11448. i.push(t);
  11449. else {
  11450. var a = o.getBaseAxis();
  11451. if ("category" === a.type) {
  11452. var r = a.dim + "_" + a.index;
  11453. e[r] || (e[r] = {
  11454. categoryAxis: a,
  11455. valueAxis: o.getOtherAxis(a),
  11456. series: []
  11457. },
  11458. n.push({
  11459. axisDim: a.dim,
  11460. axisIndex: a.index
  11461. })),
  11462. e[r].series.push(t)
  11463. } else
  11464. i.push(t)
  11465. }
  11466. }),
  11467. {
  11468. seriesGroupByCategoryAxis: e,
  11469. other: i,
  11470. meta: n
  11471. }
  11472. }
  11473. function Ym(t) {
  11474. var e = [];
  11475. return c(t, function(t, i) {
  11476. var n = t.categoryAxis
  11477. , o = t.valueAxis.dim
  11478. , a = [" "].concat(d(t.series, function(t) {
  11479. return t.name
  11480. }))
  11481. , r = [n.model.getCategories()];
  11482. c(t.series, function(t) {
  11483. r.push(t.getRawData().mapArray(o, function(t) {
  11484. return t
  11485. }))
  11486. });
  11487. for (var s = [a.join(GL)], l = 0; l < r[0].length; l++) {
  11488. for (var h = [], u = 0; u < r.length; u++)
  11489. h.push(r[u][l]);
  11490. s.push(h.join(GL))
  11491. }
  11492. e.push(s.join("\n"))
  11493. }),
  11494. e.join("\n\n" + BL + "\n\n")
  11495. }
  11496. function $m(t) {
  11497. return d(t, function(t) {
  11498. var e = t.getRawData()
  11499. , i = [t.name]
  11500. , n = [];
  11501. return e.each(e.dimensions, function() {
  11502. for (var t = arguments.length, o = arguments[t - 1], a = e.getName(o), r = 0; r < t - 1; r++)
  11503. n[r] = arguments[r];
  11504. i.push((a ? a + GL : "") + n.join(GL))
  11505. }),
  11506. i.join("\n")
  11507. }).join("\n\n" + BL + "\n\n")
  11508. }
  11509. function Km(t) {
  11510. var e = qm(t);
  11511. return {
  11512. value: g([Ym(e.seriesGroupByCategoryAxis), $m(e.other)], function(t) {
  11513. return t.replace(/[\n\t\s]/g, "")
  11514. }).join("\n\n" + BL + "\n\n"),
  11515. meta: e.meta
  11516. }
  11517. }
  11518. function Jm(t) {
  11519. return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
  11520. }
  11521. function Qm(t) {
  11522. if (t.slice(0, t.indexOf("\n")).indexOf(GL) >= 0)
  11523. return !0
  11524. }
  11525. function tv(t) {
  11526. for (var e = t.split(/\n+/g), i = [], n = d(Jm(e.shift()).split(WL), function(t) {
  11527. return {
  11528. name: t,
  11529. data: []
  11530. }
  11531. }), o = 0; o < e.length; o++) {
  11532. var a = Jm(e[o]).split(WL);
  11533. i.push(a.shift());
  11534. for (var r = 0; r < a.length; r++)
  11535. n[r] && (n[r].data[o] = a[r])
  11536. }
  11537. return {
  11538. series: n,
  11539. categories: i
  11540. }
  11541. }
  11542. function ev(t) {
  11543. for (var e = t.split(/\n+/g), i = Jm(e.shift()), n = [], o = 0; o < e.length; o++) {
  11544. var a, r = Jm(e[o]).split(WL), s = "", l = !1;
  11545. isNaN(r[0]) ? (l = !0,
  11546. s = r[0],
  11547. r = r.slice(1),
  11548. n[o] = {
  11549. name: s,
  11550. value: []
  11551. },
  11552. a = n[o].value) : a = n[o] = [];
  11553. for (var h = 0; h < r.length; h++)
  11554. a.push(+r[h]);
  11555. 1 === a.length && (l ? n[o].value = a[0] : n[o] = a[0])
  11556. }
  11557. return {
  11558. name: i,
  11559. data: n
  11560. }
  11561. }
  11562. function iv(t, e) {
  11563. var i = {
  11564. series: []
  11565. };
  11566. return c(t.split(new RegExp("\n*" + BL + "\n*","g")), function(t, n) {
  11567. if (Qm(t)) {
  11568. var o = tv(t)
  11569. , a = e[n]
  11570. , r = a.axisDim + "Axis";
  11571. a && (i[r] = i[r] || [],
  11572. i[r][a.axisIndex] = {
  11573. data: o.categories
  11574. },
  11575. i.series = i.series.concat(o.series))
  11576. } else {
  11577. o = ev(t);
  11578. i.series.push(o)
  11579. }
  11580. }),
  11581. i
  11582. }
  11583. function nv(t) {
  11584. this._dom = null,
  11585. this.model = t
  11586. }
  11587. function ov(t, e) {
  11588. return d(t, function(t, i) {
  11589. var n = e && e[i];
  11590. return _(n) && !v(n) ? (_(t) && !v(t) && (t = t.value),
  11591. a({
  11592. value: t
  11593. }, n)) : t
  11594. })
  11595. }
  11596. function av(t, e) {
  11597. var i = hv(t);
  11598. HL(e, function(e, n) {
  11599. for (var o = i.length - 1; o >= 0 && !i[o][n]; o--)
  11600. ;
  11601. if (o < 0) {
  11602. var a = t.queryComponents({
  11603. mainType: "dataZoom",
  11604. subType: "select",
  11605. id: n
  11606. })[0];
  11607. if (a) {
  11608. var r = a.getPercentRange();
  11609. i[0][n] = {
  11610. dataZoomId: n,
  11611. start: r[0],
  11612. end: r[1]
  11613. }
  11614. }
  11615. }
  11616. }),
  11617. i.push(e)
  11618. }
  11619. function rv(t) {
  11620. var e = hv(t)
  11621. , i = e[e.length - 1];
  11622. e.length > 1 && e.pop();
  11623. var n = {};
  11624. return HL(i, function(t, i) {
  11625. for (var o = e.length - 1; o >= 0; o--)
  11626. if (t = e[o][i]) {
  11627. n[i] = t;
  11628. break
  11629. }
  11630. }),
  11631. n
  11632. }
  11633. function sv(t) {
  11634. t[FL] = null
  11635. }
  11636. function lv(t) {
  11637. return hv(t).length
  11638. }
  11639. function hv(t) {
  11640. var e = t[FL];
  11641. return e || (e = t[FL] = [{}]),
  11642. e
  11643. }
  11644. function uv(t, e, i) {
  11645. (this._brushController = new Qu(i.getZr())).on("brush", p(this._onBrush, this)).mount(),
  11646. this._isZoomActive
  11647. }
  11648. function cv(t) {
  11649. var e = {};
  11650. return c(["xAxisIndex", "yAxisIndex"], function(i) {
  11651. e[i] = t[i],
  11652. null == e[i] && (e[i] = "all"),
  11653. (!1 === e[i] || "none" === e[i]) && (e[i] = [])
  11654. }),
  11655. e
  11656. }
  11657. function dv(t, e) {
  11658. t.setIconStatus("back", lv(e) > 1 ? "emphasis" : "normal")
  11659. }
  11660. function fv(t, e, i, n, o) {
  11661. var a = i._isZoomActive;
  11662. n && "takeGlobalCursor" === n.type && (a = "dataZoomSelect" === n.key && n.dataZoomSelectActive),
  11663. i._isZoomActive = a,
  11664. t.setIconStatus("zoom", a ? "emphasis" : "normal");
  11665. var r = new up(cv(t.option),e,{
  11666. include: ["grid"]
  11667. });
  11668. i._brushController.setPanels(r.makePanelOpts(o, function(t) {
  11669. return t.xAxisDeclared && !t.yAxisDeclared ? "lineX" : !t.xAxisDeclared && t.yAxisDeclared ? "lineY" : "rect"
  11670. })).enableBrush(!!a && {
  11671. brushType: "auto",
  11672. brushStyle: {
  11673. lineWidth: 0,
  11674. fill: "rgba(0,0,0,0.2)"
  11675. }
  11676. })
  11677. }
  11678. function gv(t) {
  11679. this.model = t
  11680. }
  11681. function pv() {
  11682. if (!QL && tk) {
  11683. QL = !0;
  11684. var t = tk.styleSheets;
  11685. t.length < 31 ? tk.createStyleSheet().addRule(".zrvml", "behavior:url(#default#VML)") : t[0].addRule(".zrvml", "behavior:url(#default#VML)")
  11686. }
  11687. }
  11688. function mv(t) {
  11689. return parseInt(t, 10)
  11690. }
  11691. function vv(t, e) {
  11692. pv(),
  11693. this.root = t,
  11694. this.storage = e;
  11695. var i = document.createElement("div")
  11696. , n = document.createElement("div");
  11697. i.style.cssText = "display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",
  11698. n.style.cssText = "position:absolute;left:0;top:0;",
  11699. t.appendChild(i),
  11700. this._vmlRoot = n,
  11701. this._vmlViewport = i,
  11702. this.resize();
  11703. var o = e.delFromStorage
  11704. , a = e.addToStorage;
  11705. e.delFromStorage = function(t) {
  11706. o.call(e, t),
  11707. t && t.onRemove && t.onRemove(n)
  11708. }
  11709. ,
  11710. e.addToStorage = function(t) {
  11711. t.onAdd && t.onAdd(n),
  11712. a.call(e, t)
  11713. }
  11714. ,
  11715. this._firstPaint = !0
  11716. }
  11717. function yv(t) {
  11718. return function() {
  11719. Zy('In IE8.0 VML mode painter not support method "' + t + '"')
  11720. }
  11721. }
  11722. function xv(t) {
  11723. return document.createElementNS(Ok, t)
  11724. }
  11725. function _v(t) {
  11726. return Ek(1e4 * t) / 1e4
  11727. }
  11728. function bv(t) {
  11729. return t < Hk && t > -Hk
  11730. }
  11731. function wv(t, e) {
  11732. var i = e ? t.textFill : t.fill;
  11733. return null != i && i !== Nk
  11734. }
  11735. function Sv(t, e) {
  11736. var i = e ? t.textStroke : t.stroke;
  11737. return null != i && i !== Nk
  11738. }
  11739. function Mv(t, e) {
  11740. e && Iv(t, "transform", "matrix(" + zk.call(e, ",") + ")")
  11741. }
  11742. function Iv(t, e, i) {
  11743. (!i || "linear" !== i.type && "radial" !== i.type) && t.setAttribute(e, i)
  11744. }
  11745. function Tv(t, e, i) {
  11746. t.setAttributeNS("http://www.w3.org/1999/xlink", e, i)
  11747. }
  11748. function Av(t, e, i) {
  11749. if (wv(e, i)) {
  11750. var n = i ? e.textFill : e.fill;
  11751. n = "transparent" === n ? Nk : n,
  11752. "none" !== t.getAttribute("clip-path") && n === Nk && (n = "rgba(0, 0, 0, 0.002)"),
  11753. Iv(t, "fill", n),
  11754. Iv(t, "fill-opacity", e.opacity)
  11755. } else
  11756. Iv(t, "fill", Nk);
  11757. if (Sv(e, i)) {
  11758. var o = i ? e.textStroke : e.stroke;
  11759. Iv(t, "stroke", o = "transparent" === o ? Nk : o),
  11760. Iv(t, "stroke-width", (i ? e.textStrokeWidth : e.lineWidth) / (e.strokeNoScale ? e.host.getLineScale() : 1)),
  11761. Iv(t, "paint-order", "stroke"),
  11762. Iv(t, "stroke-opacity", e.opacity),
  11763. e.lineDash ? (Iv(t, "stroke-dasharray", e.lineDash.join(",")),
  11764. Iv(t, "stroke-dashoffset", Ek(e.lineDashOffset || 0))) : Iv(t, "stroke-dasharray", ""),
  11765. e.lineCap && Iv(t, "stroke-linecap", e.lineCap),
  11766. e.lineJoin && Iv(t, "stroke-linejoin", e.lineJoin),
  11767. e.miterLimit && Iv(t, "stroke-miterlimit", e.miterLimit)
  11768. } else
  11769. Iv(t, "stroke", Nk)
  11770. }
  11771. function Cv(t) {
  11772. for (var e = [], i = t.data, n = t.len(), o = 0; o < n; ) {
  11773. var a = ""
  11774. , r = 0;
  11775. switch (i[o++]) {
  11776. case I_.M:
  11777. a = "M",
  11778. r = 2;
  11779. break;
  11780. case I_.L:
  11781. a = "L",
  11782. r = 2;
  11783. break;
  11784. case I_.Q:
  11785. a = "Q",
  11786. r = 4;
  11787. break;
  11788. case I_.C:
  11789. a = "C",
  11790. r = 6;
  11791. break;
  11792. case I_.A:
  11793. var s = i[o++]
  11794. , l = i[o++]
  11795. , h = i[o++]
  11796. , u = i[o++]
  11797. , c = i[o++]
  11798. , d = i[o++]
  11799. , f = i[o++]
  11800. , g = i[o++]
  11801. , p = Math.abs(d)
  11802. , m = bv(p % Gk) && !bv(p)
  11803. , v = !1;
  11804. v = p >= Gk || !bv(p) && (d > -Bk && d < 0 || d > Bk) == !!g;
  11805. var y = _v(s + h * Vk(c))
  11806. , x = _v(l + u * Rk(c));
  11807. m && (d = g ? Gk - 1e-4 : 1e-4 - Gk,
  11808. v = !0,
  11809. 9 === o && e.push("M", y, x));
  11810. var _ = _v(s + h * Vk(c + d))
  11811. , b = _v(l + u * Rk(c + d));
  11812. e.push("A", _v(h), _v(u), Ek(f * Wk), +v, +g, _, b);
  11813. break;
  11814. case I_.Z:
  11815. a = "Z";
  11816. break;
  11817. case I_.R:
  11818. var _ = _v(i[o++])
  11819. , b = _v(i[o++])
  11820. , w = _v(i[o++])
  11821. , S = _v(i[o++]);
  11822. e.push("M", _, b, "L", _ + w, b, "L", _ + w, b + S, "L", _, b + S, "L", _, b)
  11823. }
  11824. a && e.push(a);
  11825. for (var M = 0; M < r; M++)
  11826. e.push(_v(i[o++]))
  11827. }
  11828. return e.join(" ")
  11829. }
  11830. function Dv(t) {
  11831. return "middle" === t ? "middle" : "bottom" === t ? "baseline" : "hanging"
  11832. }
  11833. function Lv() {}
  11834. function kv(t, e, i, n) {
  11835. for (var o = 0, a = e.length, r = 0, s = 0; o < a; o++) {
  11836. var l = e[o];
  11837. if (l.removed) {
  11838. for (var h = [], u = s; u < s + l.count; u++)
  11839. h.push(u);
  11840. l.indices = h,
  11841. s += l.count
  11842. } else {
  11843. for (var h = [], u = r; u < r + l.count; u++)
  11844. h.push(u);
  11845. l.indices = h,
  11846. r += l.count,
  11847. l.added || (s += l.count)
  11848. }
  11849. }
  11850. return e
  11851. }
  11852. function Pv(t) {
  11853. return {
  11854. newPos: t.newPos,
  11855. components: t.components.slice(0)
  11856. }
  11857. }
  11858. function Ov(t, e, i) {
  11859. this._svgRoot = t,
  11860. this._tagNames = "string" == typeof e ? [e] : e,
  11861. this._markLabel = i,
  11862. this.nextId = 0
  11863. }
  11864. function zv(t) {
  11865. Ov.call(this, t, ["linearGradient", "radialGradient"], "__gradient_in_use__")
  11866. }
  11867. function Nv(t) {
  11868. Ov.call(this, t, "clipPath", "__clippath_in_use__")
  11869. }
  11870. function Ev(t) {
  11871. return parseInt(t, 10)
  11872. }
  11873. function Rv(t) {
  11874. return t instanceof On ? Fk : t instanceof je ? Zk : t instanceof ab ? Uk : Fk
  11875. }
  11876. function Vv(t, e) {
  11877. return e && t && e.parentNode !== t
  11878. }
  11879. function Bv(t, e, i) {
  11880. if (Vv(t, e) && i) {
  11881. var n = i.nextSibling;
  11882. n ? t.insertBefore(e, n) : t.appendChild(e)
  11883. }
  11884. }
  11885. function Gv(t, e) {
  11886. if (Vv(t, e)) {
  11887. var i = t.firstChild;
  11888. i ? t.insertBefore(e, i) : t.appendChild(e)
  11889. }
  11890. }
  11891. function Wv(t, e) {
  11892. e && t && e.parentNode === t && t.removeChild(e)
  11893. }
  11894. function Hv(t) {
  11895. return t.__textSvgEl
  11896. }
  11897. function Fv(t) {
  11898. return t.__svgEl
  11899. }
  11900. function Zv(t) {
  11901. return function() {
  11902. Zy('In SVG mode painter not support method "' + t + '"')
  11903. }
  11904. }
  11905. var Uv, jv = 2311, Xv = function() {
  11906. return jv++
  11907. }, qv = {}, Yv = qv = "undefined" == typeof navigator ? {
  11908. browser: {},
  11909. os: {},
  11910. node: !0,
  11911. canvasSupported: !0,
  11912. svgSupported: !0
  11913. } : function(t) {
  11914. var e = {}
  11915. , i = {}
  11916. , n = t.match(/Firefox\/([\d.]+)/)
  11917. , o = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/)
  11918. , a = t.match(/Edge\/([\d.]+)/)
  11919. , r = /micromessenger/i.test(t);
  11920. return n && (i.firefox = !0,
  11921. i.version = n[1]),
  11922. o && (i.ie = !0,
  11923. i.version = o[1]),
  11924. a && (i.edge = !0,
  11925. i.version = a[1]),
  11926. r && (i.weChat = !0),
  11927. {
  11928. browser: i,
  11929. os: e,
  11930. node: !1,
  11931. canvasSupported: !!document.createElement("canvas").getContext,
  11932. svgSupported: "undefined" != typeof SVGRect,
  11933. touchEventsSupported: "ontouchstart"in window && !i.ie && !i.edge,
  11934. pointerEventsSupported: "onpointerdown"in window && (i.edge || i.ie && i.version >= 11)
  11935. }
  11936. }(navigator.userAgent), $v = {
  11937. "[object Function]": 1,
  11938. "[object RegExp]": 1,
  11939. "[object Date]": 1,
  11940. "[object Error]": 1,
  11941. "[object CanvasGradient]": 1,
  11942. "[object CanvasPattern]": 1,
  11943. "[object Image]": 1,
  11944. "[object Canvas]": 1
  11945. }, Kv = {
  11946. "[object Int8Array]": 1,
  11947. "[object Uint8Array]": 1,
  11948. "[object Uint8ClampedArray]": 1,
  11949. "[object Int16Array]": 1,
  11950. "[object Uint16Array]": 1,
  11951. "[object Int32Array]": 1,
  11952. "[object Uint32Array]": 1,
  11953. "[object Float32Array]": 1,
  11954. "[object Float64Array]": 1
  11955. }, Jv = Object.prototype.toString, Qv = Array.prototype, ty = Qv.forEach, ey = Qv.filter, iy = Qv.slice, ny = Qv.map, oy = Qv.reduce, ay = function() {
  11956. return document.createElement("canvas")
  11957. }, ry = "__ec_primitive__";
  11958. P.prototype = {
  11959. constructor: P,
  11960. get: function(t) {
  11961. return this["_ec_" + t]
  11962. },
  11963. set: function(t, e) {
  11964. return this["_ec_" + t] = e,
  11965. e
  11966. },
  11967. each: function(t, e) {
  11968. void 0 !== e && (t = p(t, e));
  11969. for (var i in this)
  11970. this.hasOwnProperty(i) && t(this[i], i.slice(4))
  11971. },
  11972. removeKey: function(t) {
  11973. delete this["_ec_" + t]
  11974. }
  11975. };
  11976. var sy = {
  11977. createCanvas: function(t) {
  11978. ay = t
  11979. }
  11980. }
  11981. , ly = (Object.freeze || Object)({
  11982. clone: e,
  11983. merge: i,
  11984. mergeAll: n,
  11985. extend: o,
  11986. defaults: a,
  11987. createCanvas: ay,
  11988. getContext: r,
  11989. indexOf: s,
  11990. inherits: l,
  11991. mixin: h,
  11992. isArrayLike: u,
  11993. each: c,
  11994. map: d,
  11995. reduce: f,
  11996. filter: g,
  11997. find: function(t, e, i) {
  11998. if (t && e)
  11999. for (var n = 0, o = t.length; n < o; n++)
  12000. if (e.call(i, t[n], n, t))
  12001. return t[n]
  12002. },
  12003. bind: p,
  12004. curry: m,
  12005. isArray: v,
  12006. isFunction: y,
  12007. isString: x,
  12008. isObject: _,
  12009. isBuiltInObject: b,
  12010. isDom: w,
  12011. eqNaN: S,
  12012. retrieve: M,
  12013. retrieve2: I,
  12014. retrieve3: T,
  12015. slice: A,
  12016. normalizeCssArray: C,
  12017. assert: D,
  12018. setAsPrimitive: L,
  12019. isPrimitive: k,
  12020. createHashMap: O,
  12021. noop: z,
  12022. $inject: sy
  12023. })
  12024. , hy = "undefined" == typeof Float32Array ? Array : Float32Array
  12025. , uy = H
  12026. , cy = F
  12027. , dy = j
  12028. , fy = X
  12029. , gy = (Object.freeze || Object)({
  12030. create: N,
  12031. copy: E,
  12032. clone: R,
  12033. set: V,
  12034. add: B,
  12035. scaleAndAdd: G,
  12036. sub: W,
  12037. len: H,
  12038. length: uy,
  12039. lenSquare: F,
  12040. lengthSquare: cy,
  12041. mul: function(t, e, i) {
  12042. return t[0] = e[0] * i[0],
  12043. t[1] = e[1] * i[1],
  12044. t
  12045. },
  12046. div: function(t, e, i) {
  12047. return t[0] = e[0] / i[0],
  12048. t[1] = e[1] / i[1],
  12049. t
  12050. },
  12051. dot: function(t, e) {
  12052. return t[0] * e[0] + t[1] * e[1]
  12053. },
  12054. scale: Z,
  12055. normalize: U,
  12056. distance: j,
  12057. dist: dy,
  12058. distanceSquare: X,
  12059. distSquare: fy,
  12060. negate: function(t, e) {
  12061. return t[0] = -e[0],
  12062. t[1] = -e[1],
  12063. t
  12064. },
  12065. lerp: q,
  12066. applyTransform: Y,
  12067. min: $,
  12068. max: K
  12069. });
  12070. J.prototype = {
  12071. constructor: J,
  12072. _dragStart: function(t) {
  12073. var e = t.target;
  12074. e && e.draggable && (this._draggingTarget = e,
  12075. e.dragging = !0,
  12076. this._x = t.offsetX,
  12077. this._y = t.offsetY,
  12078. this.dispatchToElement(Q(e, t), "dragstart", t.event))
  12079. },
  12080. _drag: function(t) {
  12081. var e = this._draggingTarget;
  12082. if (e) {
  12083. var i = t.offsetX
  12084. , n = t.offsetY
  12085. , o = i - this._x
  12086. , a = n - this._y;
  12087. this._x = i,
  12088. this._y = n,
  12089. e.drift(o, a, t),
  12090. this.dispatchToElement(Q(e, t), "drag", t.event);
  12091. var r = this.findHover(i, n, e).target
  12092. , s = this._dropTarget;
  12093. this._dropTarget = r,
  12094. e !== r && (s && r !== s && this.dispatchToElement(Q(s, t), "dragleave", t.event),
  12095. r && r !== s && this.dispatchToElement(Q(r, t), "dragenter", t.event))
  12096. }
  12097. },
  12098. _dragEnd: function(t) {
  12099. var e = this._draggingTarget;
  12100. e && (e.dragging = !1),
  12101. this.dispatchToElement(Q(e, t), "dragend", t.event),
  12102. this._dropTarget && this.dispatchToElement(Q(this._dropTarget, t), "drop", t.event),
  12103. this._draggingTarget = null,
  12104. this._dropTarget = null
  12105. }
  12106. };
  12107. var py = Array.prototype.slice
  12108. , my = function() {
  12109. this._$handlers = {}
  12110. };
  12111. my.prototype = {
  12112. constructor: my,
  12113. one: function(t, e, i) {
  12114. var n = this._$handlers;
  12115. if (!e || !t)
  12116. return this;
  12117. n[t] || (n[t] = []);
  12118. for (var o = 0; o < n[t].length; o++)
  12119. if (n[t][o].h === e)
  12120. return this;
  12121. return n[t].push({
  12122. h: e,
  12123. one: !0,
  12124. ctx: i || this
  12125. }),
  12126. this
  12127. },
  12128. on: function(t, e, i) {
  12129. var n = this._$handlers;
  12130. if (!e || !t)
  12131. return this;
  12132. n[t] || (n[t] = []);
  12133. for (var o = 0; o < n[t].length; o++)
  12134. if (n[t][o].h === e)
  12135. return this;
  12136. return n[t].push({
  12137. h: e,
  12138. one: !1,
  12139. ctx: i || this
  12140. }),
  12141. this
  12142. },
  12143. isSilent: function(t) {
  12144. var e = this._$handlers;
  12145. return e[t] && e[t].length
  12146. },
  12147. off: function(t, e) {
  12148. var i = this._$handlers;
  12149. if (!t)
  12150. return this._$handlers = {},
  12151. this;
  12152. if (e) {
  12153. if (i[t]) {
  12154. for (var n = [], o = 0, a = i[t].length; o < a; o++)
  12155. i[t][o].h != e && n.push(i[t][o]);
  12156. i[t] = n
  12157. }
  12158. i[t] && 0 === i[t].length && delete i[t]
  12159. } else
  12160. delete i[t];
  12161. return this
  12162. },
  12163. trigger: function(t) {
  12164. if (this._$handlers[t]) {
  12165. var e = arguments
  12166. , i = e.length;
  12167. i > 3 && (e = py.call(e, 1));
  12168. for (var n = this._$handlers[t], o = n.length, a = 0; a < o; ) {
  12169. switch (i) {
  12170. case 1:
  12171. n[a].h.call(n[a].ctx);
  12172. break;
  12173. case 2:
  12174. n[a].h.call(n[a].ctx, e[1]);
  12175. break;
  12176. case 3:
  12177. n[a].h.call(n[a].ctx, e[1], e[2]);
  12178. break;
  12179. default:
  12180. n[a].h.apply(n[a].ctx, e)
  12181. }
  12182. n[a].one ? (n.splice(a, 1),
  12183. o--) : a++
  12184. }
  12185. }
  12186. return this
  12187. },
  12188. triggerWithContext: function(t) {
  12189. if (this._$handlers[t]) {
  12190. var e = arguments
  12191. , i = e.length;
  12192. i > 4 && (e = py.call(e, 1, e.length - 1));
  12193. for (var n = e[e.length - 1], o = this._$handlers[t], a = o.length, r = 0; r < a; ) {
  12194. switch (i) {
  12195. case 1:
  12196. o[r].h.call(n);
  12197. break;
  12198. case 2:
  12199. o[r].h.call(n, e[1]);
  12200. break;
  12201. case 3:
  12202. o[r].h.call(n, e[1], e[2]);
  12203. break;
  12204. default:
  12205. o[r].h.apply(n, e)
  12206. }
  12207. o[r].one ? (o.splice(r, 1),
  12208. a--) : r++
  12209. }
  12210. }
  12211. return this
  12212. }
  12213. };
  12214. var vy = "silent";
  12215. et.prototype.dispose = function() {}
  12216. ;
  12217. var yy = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"]
  12218. , xy = function(t, e, i, n) {
  12219. my.call(this),
  12220. this.storage = t,
  12221. this.painter = e,
  12222. this.painterRoot = n,
  12223. i = i || new et,
  12224. this.proxy = i,
  12225. i.handler = this,
  12226. this._hovered = {},
  12227. this._lastTouchMoment,
  12228. this._lastX,
  12229. this._lastY,
  12230. J.call(this),
  12231. c(yy, function(t) {
  12232. i.on && i.on(t, this[t], this)
  12233. }, this)
  12234. };
  12235. xy.prototype = {
  12236. constructor: xy,
  12237. mousemove: function(t) {
  12238. var e = t.zrX
  12239. , i = t.zrY
  12240. , n = this._hovered
  12241. , o = n.target;
  12242. o && !o.__zr && (o = (n = this.findHover(n.x, n.y)).target);
  12243. var a = this._hovered = this.findHover(e, i)
  12244. , r = a.target
  12245. , s = this.proxy;
  12246. s.setCursor && s.setCursor(r ? r.cursor : "default"),
  12247. o && r !== o && this.dispatchToElement(n, "mouseout", t),
  12248. this.dispatchToElement(a, "mousemove", t),
  12249. r && r !== o && this.dispatchToElement(a, "mouseover", t)
  12250. },
  12251. mouseout: function(t) {
  12252. this.dispatchToElement(this._hovered, "mouseout", t);
  12253. var e, i = t.toElement || t.relatedTarget;
  12254. do {
  12255. i = i && i.parentNode
  12256. } while (i && 9 != i.nodeType && !(e = i === this.painterRoot));
  12257. !e && this.trigger("globalout", {
  12258. event: t
  12259. })
  12260. },
  12261. resize: function(t) {
  12262. this._hovered = {}
  12263. },
  12264. dispatch: function(t, e) {
  12265. var i = this[t];
  12266. i && i.call(this, e)
  12267. },
  12268. dispose: function() {
  12269. this.proxy.dispose(),
  12270. this.storage = this.proxy = this.painter = null
  12271. },
  12272. setCursorStyle: function(t) {
  12273. var e = this.proxy;
  12274. e.setCursor && e.setCursor(t)
  12275. },
  12276. dispatchToElement: function(t, e, i) {
  12277. var n = (t = t || {}).target;
  12278. if (!n || !n.silent) {
  12279. for (var o = "on" + e, a = tt(e, t, i); n && (n[o] && (a.cancelBubble = n[o].call(n, a)),
  12280. n.trigger(e, a),
  12281. n = n.parent,
  12282. !a.cancelBubble); )
  12283. ;
  12284. a.cancelBubble || (this.trigger(e, a),
  12285. this.painter && this.painter.eachOtherLayer(function(t) {
  12286. "function" == typeof t[o] && t[o].call(t, a),
  12287. t.trigger && t.trigger(e, a)
  12288. }))
  12289. }
  12290. },
  12291. findHover: function(t, e, i) {
  12292. for (var n = this.storage.getDisplayList(), o = {
  12293. x: t,
  12294. y: e
  12295. }, a = n.length - 1; a >= 0; a--) {
  12296. var r;
  12297. if (n[a] !== i && !n[a].ignore && (r = it(n[a], t, e)) && (!o.topTarget && (o.topTarget = n[a]),
  12298. r !== vy)) {
  12299. o.target = n[a];
  12300. break
  12301. }
  12302. }
  12303. return o
  12304. }
  12305. },
  12306. c(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  12307. xy.prototype[t] = function(e) {
  12308. var i = this.findHover(e.zrX, e.zrY)
  12309. , n = i.target;
  12310. if ("mousedown" === t)
  12311. this._downEl = n,
  12312. this._downPoint = [e.zrX, e.zrY],
  12313. this._upEl = n;
  12314. else if ("mosueup" === t)
  12315. this._upEl = n;
  12316. else if ("click" === t) {
  12317. if (this._downEl !== this._upEl || !this._downPoint || dy(this._downPoint, [e.zrX, e.zrY]) > 4)
  12318. return;
  12319. this._downPoint = null
  12320. }
  12321. this.dispatchToElement(i, t, e)
  12322. }
  12323. }),
  12324. h(xy, my),
  12325. h(xy, J);
  12326. var _y = "undefined" == typeof Float32Array ? Array : Float32Array
  12327. , by = (Object.freeze || Object)({
  12328. create: nt,
  12329. identity: ot,
  12330. copy: at,
  12331. mul: rt,
  12332. translate: st,
  12333. rotate: lt,
  12334. scale: ht,
  12335. invert: ut
  12336. })
  12337. , wy = ot
  12338. , Sy = 5e-5
  12339. , My = function(t) {
  12340. (t = t || {}).position || (this.position = [0, 0]),
  12341. null == t.rotation && (this.rotation = 0),
  12342. t.scale || (this.scale = [1, 1]),
  12343. this.origin = this.origin || null
  12344. }
  12345. , Iy = My.prototype;
  12346. Iy.transform = null,
  12347. Iy.needLocalTransform = function() {
  12348. return ct(this.rotation) || ct(this.position[0]) || ct(this.position[1]) || ct(this.scale[0] - 1) || ct(this.scale[1] - 1)
  12349. }
  12350. ,
  12351. Iy.updateTransform = function() {
  12352. var t = this.parent
  12353. , e = t && t.transform
  12354. , i = this.needLocalTransform()
  12355. , n = this.transform;
  12356. i || e ? (n = n || nt(),
  12357. i ? this.getLocalTransform(n) : wy(n),
  12358. e && (i ? rt(n, t.transform, n) : at(n, t.transform)),
  12359. this.transform = n,
  12360. this.invTransform = this.invTransform || nt(),
  12361. ut(this.invTransform, n)) : n && wy(n)
  12362. }
  12363. ,
  12364. Iy.getLocalTransform = function(t) {
  12365. return My.getLocalTransform(this, t)
  12366. }
  12367. ,
  12368. Iy.setTransform = function(t) {
  12369. var e = this.transform
  12370. , i = t.dpr || 1;
  12371. e ? t.setTransform(i * e[0], i * e[1], i * e[2], i * e[3], i * e[4], i * e[5]) : t.setTransform(i, 0, 0, i, 0, 0)
  12372. }
  12373. ,
  12374. Iy.restoreTransform = function(t) {
  12375. var e = t.dpr || 1;
  12376. t.setTransform(e, 0, 0, e, 0, 0)
  12377. }
  12378. ;
  12379. var Ty = [];
  12380. Iy.decomposeTransform = function() {
  12381. if (this.transform) {
  12382. var t = this.parent
  12383. , e = this.transform;
  12384. t && t.transform && (rt(Ty, t.invTransform, e),
  12385. e = Ty);
  12386. var i = e[0] * e[0] + e[1] * e[1]
  12387. , n = e[2] * e[2] + e[3] * e[3]
  12388. , o = this.position
  12389. , a = this.scale;
  12390. ct(i - 1) && (i = Math.sqrt(i)),
  12391. ct(n - 1) && (n = Math.sqrt(n)),
  12392. e[0] < 0 && (i = -i),
  12393. e[3] < 0 && (n = -n),
  12394. o[0] = e[4],
  12395. o[1] = e[5],
  12396. a[0] = i,
  12397. a[1] = n,
  12398. this.rotation = Math.atan2(-e[1] / n, e[0] / i)
  12399. }
  12400. }
  12401. ,
  12402. Iy.getGlobalScale = function() {
  12403. var t = this.transform;
  12404. if (!t)
  12405. return [1, 1];
  12406. var e = Math.sqrt(t[0] * t[0] + t[1] * t[1])
  12407. , i = Math.sqrt(t[2] * t[2] + t[3] * t[3]);
  12408. return t[0] < 0 && (e = -e),
  12409. t[3] < 0 && (i = -i),
  12410. [e, i]
  12411. }
  12412. ,
  12413. Iy.transformCoordToLocal = function(t, e) {
  12414. var i = [t, e]
  12415. , n = this.invTransform;
  12416. return n && Y(i, i, n),
  12417. i
  12418. }
  12419. ,
  12420. Iy.transformCoordToGlobal = function(t, e) {
  12421. var i = [t, e]
  12422. , n = this.transform;
  12423. return n && Y(i, i, n),
  12424. i
  12425. }
  12426. ,
  12427. My.getLocalTransform = function(t, e) {
  12428. wy(e = e || []);
  12429. var i = t.origin
  12430. , n = t.scale || [1, 1]
  12431. , o = t.rotation || 0
  12432. , a = t.position || [0, 0];
  12433. return i && (e[4] -= i[0],
  12434. e[5] -= i[1]),
  12435. ht(e, e, n),
  12436. o && lt(e, e, o),
  12437. i && (e[4] += i[0],
  12438. e[5] += i[1]),
  12439. e[4] += a[0],
  12440. e[5] += a[1],
  12441. e
  12442. }
  12443. ;
  12444. var Ay = {
  12445. linear: function(t) {
  12446. return t
  12447. },
  12448. quadraticIn: function(t) {
  12449. return t * t
  12450. },
  12451. quadraticOut: function(t) {
  12452. return t * (2 - t)
  12453. },
  12454. quadraticInOut: function(t) {
  12455. return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1)
  12456. },
  12457. cubicIn: function(t) {
  12458. return t * t * t
  12459. },
  12460. cubicOut: function(t) {
  12461. return --t * t * t + 1
  12462. },
  12463. cubicInOut: function(t) {
  12464. return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2)
  12465. },
  12466. quarticIn: function(t) {
  12467. return t * t * t * t
  12468. },
  12469. quarticOut: function(t) {
  12470. return 1 - --t * t * t * t
  12471. },
  12472. quarticInOut: function(t) {
  12473. return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2)
  12474. },
  12475. quinticIn: function(t) {
  12476. return t * t * t * t * t
  12477. },
  12478. quinticOut: function(t) {
  12479. return --t * t * t * t * t + 1
  12480. },
  12481. quinticInOut: function(t) {
  12482. return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2)
  12483. },
  12484. sinusoidalIn: function(t) {
  12485. return 1 - Math.cos(t * Math.PI / 2)
  12486. },
  12487. sinusoidalOut: function(t) {
  12488. return Math.sin(t * Math.PI / 2)
  12489. },
  12490. sinusoidalInOut: function(t) {
  12491. return .5 * (1 - Math.cos(Math.PI * t))
  12492. },
  12493. exponentialIn: function(t) {
  12494. return 0 === t ? 0 : Math.pow(1024, t - 1)
  12495. },
  12496. exponentialOut: function(t) {
  12497. return 1 === t ? 1 : 1 - Math.pow(2, -10 * t)
  12498. },
  12499. exponentialInOut: function(t) {
  12500. return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (2 - Math.pow(2, -10 * (t - 1)))
  12501. },
  12502. circularIn: function(t) {
  12503. return 1 - Math.sqrt(1 - t * t)
  12504. },
  12505. circularOut: function(t) {
  12506. return Math.sqrt(1 - --t * t)
  12507. },
  12508. circularInOut: function(t) {
  12509. return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1)
  12510. },
  12511. elasticIn: function(t) {
  12512. var e, i = .1;
  12513. return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1,
  12514. e = .1) : e = .4 * Math.asin(1 / i) / (2 * Math.PI),
  12515. -i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4))
  12516. },
  12517. elasticOut: function(t) {
  12518. var e, i = .1;
  12519. return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1,
  12520. e = .1) : e = .4 * Math.asin(1 / i) / (2 * Math.PI),
  12521. i * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / .4) + 1)
  12522. },
  12523. elasticInOut: function(t) {
  12524. var e, i = .1;
  12525. return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1,
  12526. e = .1) : e = .4 * Math.asin(1 / i) / (2 * Math.PI),
  12527. (t *= 2) < 1 ? i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4) * -.5 : i * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4) * .5 + 1)
  12528. },
  12529. backIn: function(t) {
  12530. var e = 1.70158;
  12531. return t * t * ((e + 1) * t - e)
  12532. },
  12533. backOut: function(t) {
  12534. var e = 1.70158;
  12535. return --t * t * ((e + 1) * t + e) + 1
  12536. },
  12537. backInOut: function(t) {
  12538. var e = 2.5949095;
  12539. return (t *= 2) < 1 ? t * t * ((e + 1) * t - e) * .5 : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2)
  12540. },
  12541. bounceIn: function(t) {
  12542. return 1 - Ay.bounceOut(1 - t)
  12543. },
  12544. bounceOut: function(t) {
  12545. return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
  12546. },
  12547. bounceInOut: function(t) {
  12548. return t < .5 ? .5 * Ay.bounceIn(2 * t) : .5 * Ay.bounceOut(2 * t - 1) + .5
  12549. }
  12550. };
  12551. dt.prototype = {
  12552. constructor: dt,
  12553. step: function(t, e) {
  12554. if (this._initialized || (this._startTime = t + this._delay,
  12555. this._initialized = !0),
  12556. this._paused)
  12557. this._pausedTime += e;
  12558. else {
  12559. var i = (t - this._startTime - this._pausedTime) / this._life;
  12560. if (!(i < 0)) {
  12561. i = Math.min(i, 1);
  12562. var n = this.easing
  12563. , o = "string" == typeof n ? Ay[n] : n
  12564. , a = "function" == typeof o ? o(i) : i;
  12565. return this.fire("frame", a),
  12566. 1 == i ? this.loop ? (this.restart(t),
  12567. "restart") : (this._needsRemove = !0,
  12568. "destroy") : null
  12569. }
  12570. }
  12571. },
  12572. restart: function(t) {
  12573. var e = (t - this._startTime - this._pausedTime) % this._life;
  12574. this._startTime = t - e + this.gap,
  12575. this._pausedTime = 0,
  12576. this._needsRemove = !1
  12577. },
  12578. fire: function(t, e) {
  12579. this[t = "on" + t] && this[t](this._target, e)
  12580. },
  12581. pause: function() {
  12582. this._paused = !0
  12583. },
  12584. resume: function() {
  12585. this._paused = !1
  12586. }
  12587. };
  12588. var Cy = function() {
  12589. this.head = null,
  12590. this.tail = null,
  12591. this._len = 0
  12592. }
  12593. , Dy = Cy.prototype;
  12594. Dy.insert = function(t) {
  12595. var e = new Ly(t);
  12596. return this.insertEntry(e),
  12597. e
  12598. }
  12599. ,
  12600. Dy.insertEntry = function(t) {
  12601. this.head ? (this.tail.next = t,
  12602. t.prev = this.tail,
  12603. t.next = null,
  12604. this.tail = t) : this.head = this.tail = t,
  12605. this._len++
  12606. }
  12607. ,
  12608. Dy.remove = function(t) {
  12609. var e = t.prev
  12610. , i = t.next;
  12611. e ? e.next = i : this.head = i,
  12612. i ? i.prev = e : this.tail = e,
  12613. t.next = t.prev = null,
  12614. this._len--
  12615. }
  12616. ,
  12617. Dy.len = function() {
  12618. return this._len
  12619. }
  12620. ,
  12621. Dy.clear = function() {
  12622. this.head = this.tail = null,
  12623. this._len = 0
  12624. }
  12625. ;
  12626. var Ly = function(t) {
  12627. this.value = t,
  12628. this.next,
  12629. this.prev
  12630. }
  12631. , ky = function(t) {
  12632. this._list = new Cy,
  12633. this._map = {},
  12634. this._maxSize = t || 10,
  12635. this._lastRemovedEntry = null
  12636. }
  12637. , Py = ky.prototype;
  12638. Py.put = function(t, e) {
  12639. var i = this._list
  12640. , n = this._map
  12641. , o = null;
  12642. if (null == n[t]) {
  12643. var a = i.len()
  12644. , r = this._lastRemovedEntry;
  12645. if (a >= this._maxSize && a > 0) {
  12646. var s = i.head;
  12647. i.remove(s),
  12648. delete n[s.key],
  12649. o = s.value,
  12650. this._lastRemovedEntry = s
  12651. }
  12652. r ? r.value = e : r = new Ly(e),
  12653. r.key = t,
  12654. i.insertEntry(r),
  12655. n[t] = r
  12656. }
  12657. return o
  12658. }
  12659. ,
  12660. Py.get = function(t) {
  12661. var e = this._map[t]
  12662. , i = this._list;
  12663. if (null != e)
  12664. return e !== i.tail && (i.remove(e),
  12665. i.insertEntry(e)),
  12666. e.value
  12667. }
  12668. ,
  12669. Py.clear = function() {
  12670. this._list.clear(),
  12671. this._map = {}
  12672. }
  12673. ;
  12674. var Oy = {
  12675. transparent: [0, 0, 0, 0],
  12676. aliceblue: [240, 248, 255, 1],
  12677. antiquewhite: [250, 235, 215, 1],
  12678. aqua: [0, 255, 255, 1],
  12679. aquamarine: [127, 255, 212, 1],
  12680. azure: [240, 255, 255, 1],
  12681. beige: [245, 245, 220, 1],
  12682. bisque: [255, 228, 196, 1],
  12683. black: [0, 0, 0, 1],
  12684. blanchedalmond: [255, 235, 205, 1],
  12685. blue: [0, 0, 255, 1],
  12686. blueviolet: [138, 43, 226, 1],
  12687. brown: [165, 42, 42, 1],
  12688. burlywood: [222, 184, 135, 1],
  12689. cadetblue: [95, 158, 160, 1],
  12690. chartreuse: [127, 255, 0, 1],
  12691. chocolate: [210, 105, 30, 1],
  12692. coral: [255, 127, 80, 1],
  12693. cornflowerblue: [100, 149, 237, 1],
  12694. cornsilk: [255, 248, 220, 1],
  12695. crimson: [220, 20, 60, 1],
  12696. cyan: [0, 255, 255, 1],
  12697. darkblue: [0, 0, 139, 1],
  12698. darkcyan: [0, 139, 139, 1],
  12699. darkgoldenrod: [184, 134, 11, 1],
  12700. darkgray: [169, 169, 169, 1],
  12701. darkgreen: [0, 100, 0, 1],
  12702. darkgrey: [169, 169, 169, 1],
  12703. darkkhaki: [189, 183, 107, 1],
  12704. darkmagenta: [139, 0, 139, 1],
  12705. darkolivegreen: [85, 107, 47, 1],
  12706. darkorange: [255, 140, 0, 1],
  12707. darkorchid: [153, 50, 204, 1],
  12708. darkred: [139, 0, 0, 1],
  12709. darksalmon: [233, 150, 122, 1],
  12710. darkseagreen: [143, 188, 143, 1],
  12711. darkslateblue: [72, 61, 139, 1],
  12712. darkslategray: [47, 79, 79, 1],
  12713. darkslategrey: [47, 79, 79, 1],
  12714. darkturquoise: [0, 206, 209, 1],
  12715. darkviolet: [148, 0, 211, 1],
  12716. deeppink: [255, 20, 147, 1],
  12717. deepskyblue: [0, 191, 255, 1],
  12718. dimgray: [105, 105, 105, 1],
  12719. dimgrey: [105, 105, 105, 1],
  12720. dodgerblue: [30, 144, 255, 1],
  12721. firebrick: [178, 34, 34, 1],
  12722. floralwhite: [255, 250, 240, 1],
  12723. forestgreen: [34, 139, 34, 1],
  12724. fuchsia: [255, 0, 255, 1],
  12725. gainsboro: [220, 220, 220, 1],
  12726. ghostwhite: [248, 248, 255, 1],
  12727. gold: [255, 215, 0, 1],
  12728. goldenrod: [218, 165, 32, 1],
  12729. gray: [128, 128, 128, 1],
  12730. green: [0, 128, 0, 1],
  12731. greenyellow: [173, 255, 47, 1],
  12732. grey: [128, 128, 128, 1],
  12733. honeydew: [240, 255, 240, 1],
  12734. hotpink: [255, 105, 180, 1],
  12735. indianred: [205, 92, 92, 1],
  12736. indigo: [75, 0, 130, 1],
  12737. ivory: [255, 255, 240, 1],
  12738. khaki: [240, 230, 140, 1],
  12739. lavender: [230, 230, 250, 1],
  12740. lavenderblush: [255, 240, 245, 1],
  12741. lawngreen: [124, 252, 0, 1],
  12742. lemonchiffon: [255, 250, 205, 1],
  12743. lightblue: [173, 216, 230, 1],
  12744. lightcoral: [240, 128, 128, 1],
  12745. lightcyan: [224, 255, 255, 1],
  12746. lightgoldenrodyellow: [250, 250, 210, 1],
  12747. lightgray: [211, 211, 211, 1],
  12748. lightgreen: [144, 238, 144, 1],
  12749. lightgrey: [211, 211, 211, 1],
  12750. lightpink: [255, 182, 193, 1],
  12751. lightsalmon: [255, 160, 122, 1],
  12752. lightseagreen: [32, 178, 170, 1],
  12753. lightskyblue: [135, 206, 250, 1],
  12754. lightslategray: [119, 136, 153, 1],
  12755. lightslategrey: [119, 136, 153, 1],
  12756. lightsteelblue: [176, 196, 222, 1],
  12757. lightyellow: [255, 255, 224, 1],
  12758. lime: [0, 255, 0, 1],
  12759. limegreen: [50, 205, 50, 1],
  12760. linen: [250, 240, 230, 1],
  12761. magenta: [255, 0, 255, 1],
  12762. maroon: [128, 0, 0, 1],
  12763. mediumaquamarine: [102, 205, 170, 1],
  12764. mediumblue: [0, 0, 205, 1],
  12765. mediumorchid: [186, 85, 211, 1],
  12766. mediumpurple: [147, 112, 219, 1],
  12767. mediumseagreen: [60, 179, 113, 1],
  12768. mediumslateblue: [123, 104, 238, 1],
  12769. mediumspringgreen: [0, 250, 154, 1],
  12770. mediumturquoise: [72, 209, 204, 1],
  12771. mediumvioletred: [199, 21, 133, 1],
  12772. midnightblue: [25, 25, 112, 1],
  12773. mintcream: [245, 255, 250, 1],
  12774. mistyrose: [255, 228, 225, 1],
  12775. moccasin: [255, 228, 181, 1],
  12776. navajowhite: [255, 222, 173, 1],
  12777. navy: [0, 0, 128, 1],
  12778. oldlace: [253, 245, 230, 1],
  12779. olive: [128, 128, 0, 1],
  12780. olivedrab: [107, 142, 35, 1],
  12781. orange: [255, 165, 0, 1],
  12782. orangered: [255, 69, 0, 1],
  12783. orchid: [218, 112, 214, 1],
  12784. palegoldenrod: [238, 232, 170, 1],
  12785. palegreen: [152, 251, 152, 1],
  12786. paleturquoise: [175, 238, 238, 1],
  12787. palevioletred: [219, 112, 147, 1],
  12788. papayawhip: [255, 239, 213, 1],
  12789. peachpuff: [255, 218, 185, 1],
  12790. peru: [205, 133, 63, 1],
  12791. pink: [255, 192, 203, 1],
  12792. plum: [221, 160, 221, 1],
  12793. powderblue: [176, 224, 230, 1],
  12794. purple: [128, 0, 128, 1],
  12795. red: [255, 0, 0, 1],
  12796. rosybrown: [188, 143, 143, 1],
  12797. royalblue: [65, 105, 225, 1],
  12798. saddlebrown: [139, 69, 19, 1],
  12799. salmon: [250, 128, 114, 1],
  12800. sandybrown: [244, 164, 96, 1],
  12801. seagreen: [46, 139, 87, 1],
  12802. seashell: [255, 245, 238, 1],
  12803. sienna: [160, 82, 45, 1],
  12804. silver: [192, 192, 192, 1],
  12805. skyblue: [135, 206, 235, 1],
  12806. slateblue: [106, 90, 205, 1],
  12807. slategray: [112, 128, 144, 1],
  12808. slategrey: [112, 128, 144, 1],
  12809. snow: [255, 250, 250, 1],
  12810. springgreen: [0, 255, 127, 1],
  12811. steelblue: [70, 130, 180, 1],
  12812. tan: [210, 180, 140, 1],
  12813. teal: [0, 128, 128, 1],
  12814. thistle: [216, 191, 216, 1],
  12815. tomato: [255, 99, 71, 1],
  12816. turquoise: [64, 224, 208, 1],
  12817. violet: [238, 130, 238, 1],
  12818. wheat: [245, 222, 179, 1],
  12819. white: [255, 255, 255, 1],
  12820. whitesmoke: [245, 245, 245, 1],
  12821. yellow: [255, 255, 0, 1],
  12822. yellowgreen: [154, 205, 50, 1]
  12823. }
  12824. , zy = new ky(20)
  12825. , Ny = null
  12826. , Ey = Ct
  12827. , Ry = Dt
  12828. , Vy = (Object.freeze || Object)({
  12829. parse: St,
  12830. lift: Tt,
  12831. toHex: At,
  12832. fastLerp: Ct,
  12833. fastMapToColor: Ey,
  12834. lerp: Dt,
  12835. mapToColor: Ry,
  12836. modifyHSL: Lt,
  12837. modifyAlpha: kt,
  12838. stringify: Pt
  12839. })
  12840. , By = Array.prototype.slice
  12841. , Gy = function(t, e, i, n) {
  12842. this._tracks = {},
  12843. this._target = t,
  12844. this._loop = e || !1,
  12845. this._getter = i || Ot,
  12846. this._setter = n || zt,
  12847. this._clipCount = 0,
  12848. this._delay = 0,
  12849. this._doneList = [],
  12850. this._onframeList = [],
  12851. this._clipList = []
  12852. };
  12853. Gy.prototype = {
  12854. when: function(t, e) {
  12855. var i = this._tracks;
  12856. for (var n in e)
  12857. if (e.hasOwnProperty(n)) {
  12858. if (!i[n]) {
  12859. i[n] = [];
  12860. var o = this._getter(this._target, n);
  12861. if (null == o)
  12862. continue;
  12863. 0 !== t && i[n].push({
  12864. time: 0,
  12865. value: Ht(o)
  12866. })
  12867. }
  12868. i[n].push({
  12869. time: t,
  12870. value: e[n]
  12871. })
  12872. }
  12873. return this
  12874. },
  12875. during: function(t) {
  12876. return this._onframeList.push(t),
  12877. this
  12878. },
  12879. pause: function() {
  12880. for (var t = 0; t < this._clipList.length; t++)
  12881. this._clipList[t].pause();
  12882. this._paused = !0
  12883. },
  12884. resume: function() {
  12885. for (var t = 0; t < this._clipList.length; t++)
  12886. this._clipList[t].resume();
  12887. this._paused = !1
  12888. },
  12889. isPaused: function() {
  12890. return !!this._paused
  12891. },
  12892. _doneCallback: function() {
  12893. this._tracks = {},
  12894. this._clipList.length = 0;
  12895. for (var t = this._doneList, e = t.length, i = 0; i < e; i++)
  12896. t[i].call(this)
  12897. },
  12898. start: function(t, e) {
  12899. var i, n = this, o = 0;
  12900. for (var a in this._tracks)
  12901. if (this._tracks.hasOwnProperty(a)) {
  12902. var r = Ut(this, t, function() {
  12903. --o || n._doneCallback()
  12904. }, this._tracks[a], a, e);
  12905. r && (this._clipList.push(r),
  12906. o++,
  12907. this.animation && this.animation.addClip(r),
  12908. i = r)
  12909. }
  12910. if (i) {
  12911. var s = i.onframe;
  12912. i.onframe = function(t, e) {
  12913. s(t, e);
  12914. for (var i = 0; i < n._onframeList.length; i++)
  12915. n._onframeList[i](t, e)
  12916. }
  12917. }
  12918. return o || this._doneCallback(),
  12919. this
  12920. },
  12921. stop: function(t) {
  12922. for (var e = this._clipList, i = this.animation, n = 0; n < e.length; n++) {
  12923. var o = e[n];
  12924. t && o.onframe(this._target, 1),
  12925. i && i.removeClip(o)
  12926. }
  12927. e.length = 0
  12928. },
  12929. delay: function(t) {
  12930. return this._delay = t,
  12931. this
  12932. },
  12933. done: function(t) {
  12934. return t && this._doneList.push(t),
  12935. this
  12936. },
  12937. getClips: function() {
  12938. return this._clipList
  12939. }
  12940. };
  12941. var Wy = 1;
  12942. "undefined" != typeof window && (Wy = Math.max(window.devicePixelRatio || 1, 1));
  12943. var Hy = Wy
  12944. , Fy = function() {}
  12945. , Zy = Fy
  12946. , Uy = function() {
  12947. this.animators = []
  12948. };
  12949. Uy.prototype = {
  12950. constructor: Uy,
  12951. animate: function(t, e) {
  12952. var i, n = !1, o = this, a = this.__zr;
  12953. if (t) {
  12954. var r = t.split(".")
  12955. , l = o;
  12956. n = "shape" === r[0];
  12957. for (var h = 0, u = r.length; h < u; h++)
  12958. l && (l = l[r[h]]);
  12959. l && (i = l)
  12960. } else
  12961. i = o;
  12962. if (i) {
  12963. var c = o.animators
  12964. , d = new Gy(i,e);
  12965. return d.during(function(t) {
  12966. o.dirty(n)
  12967. }).done(function() {
  12968. c.splice(s(c, d), 1)
  12969. }),
  12970. c.push(d),
  12971. a && a.animation.addAnimator(d),
  12972. d
  12973. }
  12974. Zy('Property "' + t + '" is not existed in element ' + o.id)
  12975. },
  12976. stopAnimation: function(t) {
  12977. for (var e = this.animators, i = e.length, n = 0; n < i; n++)
  12978. e[n].stop(t);
  12979. return e.length = 0,
  12980. this
  12981. },
  12982. animateTo: function(t, e, i, n, o, a) {
  12983. x(i) ? (o = n,
  12984. n = i,
  12985. i = 0) : y(n) ? (o = n,
  12986. n = "linear",
  12987. i = 0) : y(i) ? (o = i,
  12988. i = 0) : y(e) ? (o = e,
  12989. e = 500) : e || (e = 500),
  12990. this.stopAnimation(),
  12991. this._animateToShallow("", this, t, e, i);
  12992. var r = this.animators.slice()
  12993. , s = r.length;
  12994. s || o && o();
  12995. for (var l = 0; l < r.length; l++)
  12996. r[l].done(function() {
  12997. --s || o && o()
  12998. }).start(n, a)
  12999. },
  13000. _animateToShallow: function(t, e, i, n, o) {
  13001. var a = {}
  13002. , r = 0;
  13003. for (var s in i)
  13004. if (i.hasOwnProperty(s))
  13005. if (null != e[s])
  13006. _(i[s]) && !u(i[s]) ? this._animateToShallow(t ? t + "." + s : s, e[s], i[s], n, o) : (a[s] = i[s],
  13007. r++);
  13008. else if (null != i[s])
  13009. if (t) {
  13010. var l = {};
  13011. l[t] = {},
  13012. l[t][s] = i[s],
  13013. this.attr(l)
  13014. } else
  13015. this.attr(s, i[s]);
  13016. return r > 0 && this.animate(t, !1).when(null == n ? 500 : n, a).delay(o || 0),
  13017. this
  13018. }
  13019. };
  13020. var jy = function(t) {
  13021. My.call(this, t),
  13022. my.call(this, t),
  13023. Uy.call(this, t),
  13024. this.id = t.id || Xv()
  13025. };
  13026. jy.prototype = {
  13027. type: "element",
  13028. name: "",
  13029. __zr: null,
  13030. ignore: !1,
  13031. clipPath: null,
  13032. drift: function(t, e) {
  13033. switch (this.draggable) {
  13034. case "horizontal":
  13035. e = 0;
  13036. break;
  13037. case "vertical":
  13038. t = 0
  13039. }
  13040. var i = this.transform;
  13041. i || (i = this.transform = [1, 0, 0, 1, 0, 0]),
  13042. i[4] += t,
  13043. i[5] += e,
  13044. this.decomposeTransform(),
  13045. this.dirty(!1)
  13046. },
  13047. beforeUpdate: function() {},
  13048. afterUpdate: function() {},
  13049. update: function() {
  13050. this.updateTransform()
  13051. },
  13052. traverse: function(t, e) {},
  13053. attrKV: function(t, e) {
  13054. if ("position" === t || "scale" === t || "origin" === t) {
  13055. if (e) {
  13056. var i = this[t];
  13057. i || (i = this[t] = []),
  13058. i[0] = e[0],
  13059. i[1] = e[1]
  13060. }
  13061. } else
  13062. this[t] = e
  13063. },
  13064. hide: function() {
  13065. this.ignore = !0,
  13066. this.__zr && this.__zr.refresh()
  13067. },
  13068. show: function() {
  13069. this.ignore = !1,
  13070. this.__zr && this.__zr.refresh()
  13071. },
  13072. attr: function(t, e) {
  13073. if ("string" == typeof t)
  13074. this.attrKV(t, e);
  13075. else if (_(t))
  13076. for (var i in t)
  13077. t.hasOwnProperty(i) && this.attrKV(i, t[i]);
  13078. return this.dirty(!1),
  13079. this
  13080. },
  13081. setClipPath: function(t) {
  13082. var e = this.__zr;
  13083. e && t.addSelfToZr(e),
  13084. this.clipPath && this.clipPath !== t && this.removeClipPath(),
  13085. this.clipPath = t,
  13086. t.__zr = e,
  13087. t.__clipTarget = this,
  13088. this.dirty(!1)
  13089. },
  13090. removeClipPath: function() {
  13091. var t = this.clipPath;
  13092. t && (t.__zr && t.removeSelfFromZr(t.__zr),
  13093. t.__zr = null,
  13094. t.__clipTarget = null,
  13095. this.clipPath = null,
  13096. this.dirty(!1))
  13097. },
  13098. addSelfToZr: function(t) {
  13099. this.__zr = t;
  13100. var e = this.animators;
  13101. if (e)
  13102. for (var i = 0; i < e.length; i++)
  13103. t.animation.addAnimator(e[i]);
  13104. this.clipPath && this.clipPath.addSelfToZr(t)
  13105. },
  13106. removeSelfFromZr: function(t) {
  13107. this.__zr = null;
  13108. var e = this.animators;
  13109. if (e)
  13110. for (var i = 0; i < e.length; i++)
  13111. t.animation.removeAnimator(e[i]);
  13112. this.clipPath && this.clipPath.removeSelfFromZr(t)
  13113. }
  13114. },
  13115. h(jy, Uy),
  13116. h(jy, My),
  13117. h(jy, my);
  13118. var Xy = Y
  13119. , qy = Math.min
  13120. , Yy = Math.max;
  13121. jt.prototype = {
  13122. constructor: jt,
  13123. union: function(t) {
  13124. var e = qy(t.x, this.x)
  13125. , i = qy(t.y, this.y);
  13126. this.width = Yy(t.x + t.width, this.x + this.width) - e,
  13127. this.height = Yy(t.y + t.height, this.y + this.height) - i,
  13128. this.x = e,
  13129. this.y = i
  13130. },
  13131. applyTransform: function() {
  13132. var t = []
  13133. , e = []
  13134. , i = []
  13135. , n = [];
  13136. return function(o) {
  13137. if (o) {
  13138. t[0] = i[0] = this.x,
  13139. t[1] = n[1] = this.y,
  13140. e[0] = n[0] = this.x + this.width,
  13141. e[1] = i[1] = this.y + this.height,
  13142. Xy(t, t, o),
  13143. Xy(e, e, o),
  13144. Xy(i, i, o),
  13145. Xy(n, n, o),
  13146. this.x = qy(t[0], e[0], i[0], n[0]),
  13147. this.y = qy(t[1], e[1], i[1], n[1]);
  13148. var a = Yy(t[0], e[0], i[0], n[0])
  13149. , r = Yy(t[1], e[1], i[1], n[1]);
  13150. this.width = a - this.x,
  13151. this.height = r - this.y
  13152. }
  13153. }
  13154. }(),
  13155. calculateTransform: function(t) {
  13156. var e = this
  13157. , i = t.width / e.width
  13158. , n = t.height / e.height
  13159. , o = nt();
  13160. return st(o, o, [-e.x, -e.y]),
  13161. ht(o, o, [i, n]),
  13162. st(o, o, [t.x, t.y]),
  13163. o
  13164. },
  13165. intersect: function(t) {
  13166. if (!t)
  13167. return !1;
  13168. t instanceof jt || (t = jt.create(t));
  13169. var e = this
  13170. , i = e.x
  13171. , n = e.x + e.width
  13172. , o = e.y
  13173. , a = e.y + e.height
  13174. , r = t.x
  13175. , s = t.x + t.width
  13176. , l = t.y
  13177. , h = t.y + t.height;
  13178. return !(n < r || s < i || a < l || h < o)
  13179. },
  13180. contain: function(t, e) {
  13181. var i = this;
  13182. return t >= i.x && t <= i.x + i.width && e >= i.y && e <= i.y + i.height
  13183. },
  13184. clone: function() {
  13185. return new jt(this.x,this.y,this.width,this.height)
  13186. },
  13187. copy: function(t) {
  13188. this.x = t.x,
  13189. this.y = t.y,
  13190. this.width = t.width,
  13191. this.height = t.height
  13192. },
  13193. plain: function() {
  13194. return {
  13195. x: this.x,
  13196. y: this.y,
  13197. width: this.width,
  13198. height: this.height
  13199. }
  13200. }
  13201. },
  13202. jt.create = function(t) {
  13203. return new jt(t.x,t.y,t.width,t.height)
  13204. }
  13205. ;
  13206. var $y = function(t) {
  13207. t = t || {},
  13208. jy.call(this, t);
  13209. for (var e in t)
  13210. t.hasOwnProperty(e) && (this[e] = t[e]);
  13211. this._children = [],
  13212. this.__storage = null,
  13213. this.__dirty = !0
  13214. };
  13215. $y.prototype = {
  13216. constructor: $y,
  13217. isGroup: !0,
  13218. type: "group",
  13219. silent: !1,
  13220. children: function() {
  13221. return this._children.slice()
  13222. },
  13223. childAt: function(t) {
  13224. return this._children[t]
  13225. },
  13226. childOfName: function(t) {
  13227. for (var e = this._children, i = 0; i < e.length; i++)
  13228. if (e[i].name === t)
  13229. return e[i]
  13230. },
  13231. childCount: function() {
  13232. return this._children.length
  13233. },
  13234. add: function(t) {
  13235. return t && t !== this && t.parent !== this && (this._children.push(t),
  13236. this._doAdd(t)),
  13237. this
  13238. },
  13239. addBefore: function(t, e) {
  13240. if (t && t !== this && t.parent !== this && e && e.parent === this) {
  13241. var i = this._children
  13242. , n = i.indexOf(e);
  13243. n >= 0 && (i.splice(n, 0, t),
  13244. this._doAdd(t))
  13245. }
  13246. return this
  13247. },
  13248. _doAdd: function(t) {
  13249. t.parent && t.parent.remove(t),
  13250. t.parent = this;
  13251. var e = this.__storage
  13252. , i = this.__zr;
  13253. e && e !== t.__storage && (e.addToStorage(t),
  13254. t instanceof $y && t.addChildrenToStorage(e)),
  13255. i && i.refresh()
  13256. },
  13257. remove: function(t) {
  13258. var e = this.__zr
  13259. , i = this.__storage
  13260. , n = this._children
  13261. , o = s(n, t);
  13262. return o < 0 ? this : (n.splice(o, 1),
  13263. t.parent = null,
  13264. i && (i.delFromStorage(t),
  13265. t instanceof $y && t.delChildrenFromStorage(i)),
  13266. e && e.refresh(),
  13267. this)
  13268. },
  13269. removeAll: function() {
  13270. var t, e, i = this._children, n = this.__storage;
  13271. for (e = 0; e < i.length; e++)
  13272. t = i[e],
  13273. n && (n.delFromStorage(t),
  13274. t instanceof $y && t.delChildrenFromStorage(n)),
  13275. t.parent = null;
  13276. return i.length = 0,
  13277. this
  13278. },
  13279. eachChild: function(t, e) {
  13280. for (var i = this._children, n = 0; n < i.length; n++) {
  13281. var o = i[n];
  13282. t.call(e, o, n)
  13283. }
  13284. return this
  13285. },
  13286. traverse: function(t, e) {
  13287. for (var i = 0; i < this._children.length; i++) {
  13288. var n = this._children[i];
  13289. t.call(e, n),
  13290. "group" === n.type && n.traverse(t, e)
  13291. }
  13292. return this
  13293. },
  13294. addChildrenToStorage: function(t) {
  13295. for (var e = 0; e < this._children.length; e++) {
  13296. var i = this._children[e];
  13297. t.addToStorage(i),
  13298. i instanceof $y && i.addChildrenToStorage(t)
  13299. }
  13300. },
  13301. delChildrenFromStorage: function(t) {
  13302. for (var e = 0; e < this._children.length; e++) {
  13303. var i = this._children[e];
  13304. t.delFromStorage(i),
  13305. i instanceof $y && i.delChildrenFromStorage(t)
  13306. }
  13307. },
  13308. dirty: function() {
  13309. return this.__dirty = !0,
  13310. this.__zr && this.__zr.refresh(),
  13311. this
  13312. },
  13313. getBoundingRect: function(t) {
  13314. for (var e = null, i = new jt(0,0,0,0), n = t || this._children, o = [], a = 0; a < n.length; a++) {
  13315. var r = n[a];
  13316. if (!r.ignore && !r.invisible) {
  13317. var s = r.getBoundingRect()
  13318. , l = r.getLocalTransform(o);
  13319. l ? (i.copy(s),
  13320. i.applyTransform(l),
  13321. (e = e || i.clone()).union(i)) : (e = e || s.clone()).union(s)
  13322. }
  13323. }
  13324. return e || i
  13325. }
  13326. },
  13327. l($y, jy);
  13328. var Ky = 32
  13329. , Jy = 7
  13330. , Qy = function() {
  13331. this._roots = [],
  13332. this._displayList = [],
  13333. this._displayListLen = 0
  13334. };
  13335. Qy.prototype = {
  13336. constructor: Qy,
  13337. traverse: function(t, e) {
  13338. for (var i = 0; i < this._roots.length; i++)
  13339. this._roots[i].traverse(t, e)
  13340. },
  13341. getDisplayList: function(t, e) {
  13342. return e = e || !1,
  13343. t && this.updateDisplayList(e),
  13344. this._displayList
  13345. },
  13346. updateDisplayList: function(t) {
  13347. this._displayListLen = 0;
  13348. for (var e = this._roots, i = this._displayList, n = 0, o = e.length; n < o; n++)
  13349. this._updateAndAddDisplayable(e[n], null, t);
  13350. i.length = this._displayListLen,
  13351. Yv.canvasSupported && te(i, ee)
  13352. },
  13353. _updateAndAddDisplayable: function(t, e, i) {
  13354. if (!t.ignore || i) {
  13355. t.beforeUpdate(),
  13356. t.__dirty && t.update(),
  13357. t.afterUpdate();
  13358. var n = t.clipPath;
  13359. if (n) {
  13360. e = e ? e.slice() : [];
  13361. for (var o = n, a = t; o; )
  13362. o.parent = a,
  13363. o.updateTransform(),
  13364. e.push(o),
  13365. a = o,
  13366. o = o.clipPath
  13367. }
  13368. if (t.isGroup) {
  13369. for (var r = t._children, s = 0; s < r.length; s++) {
  13370. var l = r[s];
  13371. t.__dirty && (l.__dirty = !0),
  13372. this._updateAndAddDisplayable(l, e, i)
  13373. }
  13374. t.__dirty = !1
  13375. } else
  13376. t.__clipPaths = e,
  13377. this._displayList[this._displayListLen++] = t
  13378. }
  13379. },
  13380. addRoot: function(t) {
  13381. t.__storage !== this && (t instanceof $y && t.addChildrenToStorage(this),
  13382. this.addToStorage(t),
  13383. this._roots.push(t))
  13384. },
  13385. delRoot: function(t) {
  13386. if (null == t) {
  13387. for (i = 0; i < this._roots.length; i++) {
  13388. var e = this._roots[i];
  13389. e instanceof $y && e.delChildrenFromStorage(this)
  13390. }
  13391. return this._roots = [],
  13392. this._displayList = [],
  13393. void (this._displayListLen = 0)
  13394. }
  13395. if (t instanceof Array)
  13396. for (var i = 0, n = t.length; i < n; i++)
  13397. this.delRoot(t[i]);
  13398. else {
  13399. var o = s(this._roots, t);
  13400. o >= 0 && (this.delFromStorage(t),
  13401. this._roots.splice(o, 1),
  13402. t instanceof $y && t.delChildrenFromStorage(this))
  13403. }
  13404. },
  13405. addToStorage: function(t) {
  13406. return t.__storage = this,
  13407. t.dirty(!1),
  13408. this
  13409. },
  13410. delFromStorage: function(t) {
  13411. return t && (t.__storage = null),
  13412. this
  13413. },
  13414. dispose: function() {
  13415. this._renderList = this._roots = null
  13416. },
  13417. displayableSortFunc: ee
  13418. };
  13419. var tx = [["shadowBlur", 0], ["shadowOffsetX", 0], ["shadowOffsetY", 0], ["shadowColor", "#000"], ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]]
  13420. , ex = function(t, e) {
  13421. this.extendFrom(t, !1),
  13422. this.host = e
  13423. };
  13424. ex.prototype = {
  13425. constructor: ex,
  13426. host: null,
  13427. fill: "#000",
  13428. stroke: null,
  13429. opacity: 1,
  13430. lineDash: null,
  13431. lineDashOffset: 0,
  13432. shadowBlur: 0,
  13433. shadowOffsetX: 0,
  13434. shadowOffsetY: 0,
  13435. lineWidth: 1,
  13436. strokeNoScale: !1,
  13437. text: null,
  13438. font: null,
  13439. textFont: null,
  13440. fontStyle: null,
  13441. fontWeight: null,
  13442. fontSize: null,
  13443. fontFamily: null,
  13444. textTag: null,
  13445. textFill: "#000",
  13446. textStroke: null,
  13447. textWidth: null,
  13448. textHeight: null,
  13449. textStrokeWidth: 0,
  13450. textLineHeight: null,
  13451. textPosition: "inside",
  13452. textRect: null,
  13453. textOffset: null,
  13454. textAlign: null,
  13455. textVerticalAlign: null,
  13456. textDistance: 5,
  13457. textShadowColor: "transparent",
  13458. textShadowBlur: 0,
  13459. textShadowOffsetX: 0,
  13460. textShadowOffsetY: 0,
  13461. textBoxShadowColor: "transparent",
  13462. textBoxShadowBlur: 0,
  13463. textBoxShadowOffsetX: 0,
  13464. textBoxShadowOffsetY: 0,
  13465. transformText: !1,
  13466. textRotation: 0,
  13467. textOrigin: null,
  13468. textBackgroundColor: null,
  13469. textBorderColor: null,
  13470. textBorderWidth: 0,
  13471. textBorderRadius: 0,
  13472. textPadding: null,
  13473. rich: null,
  13474. truncate: null,
  13475. blend: null,
  13476. bind: function(t, e, i) {
  13477. for (var n = this, o = i && i.style, a = !o, r = 0; r < tx.length; r++) {
  13478. var s = tx[r]
  13479. , l = s[0];
  13480. (a || n[l] !== o[l]) && (t[l] = n[l] || s[1])
  13481. }
  13482. if ((a || n.fill !== o.fill) && (t.fillStyle = n.fill),
  13483. (a || n.stroke !== o.stroke) && (t.strokeStyle = n.stroke),
  13484. (a || n.opacity !== o.opacity) && (t.globalAlpha = null == n.opacity ? 1 : n.opacity),
  13485. (a || n.blend !== o.blend) && (t.globalCompositeOperation = n.blend || "source-over"),
  13486. this.hasStroke()) {
  13487. var h = n.lineWidth;
  13488. t.lineWidth = h / (this.strokeNoScale && e && e.getLineScale ? e.getLineScale() : 1)
  13489. }
  13490. },
  13491. hasFill: function() {
  13492. var t = this.fill;
  13493. return null != t && "none" !== t
  13494. },
  13495. hasStroke: function() {
  13496. var t = this.stroke;
  13497. return null != t && "none" !== t && this.lineWidth > 0
  13498. },
  13499. extendFrom: function(t, e) {
  13500. if (t)
  13501. for (var i in t)
  13502. !t.hasOwnProperty(i) || !0 !== e && (!1 === e ? this.hasOwnProperty(i) : null == t[i]) || (this[i] = t[i])
  13503. },
  13504. set: function(t, e) {
  13505. "string" == typeof t ? this[t] = e : this.extendFrom(t, !0)
  13506. },
  13507. clone: function() {
  13508. var t = new this.constructor;
  13509. return t.extendFrom(this, !0),
  13510. t
  13511. },
  13512. getGradient: function(t, e, i) {
  13513. for (var n = ("radial" === e.type ? ne : ie)(t, e, i), o = e.colorStops, a = 0; a < o.length; a++)
  13514. n.addColorStop(o[a].offset, o[a].color);
  13515. return n
  13516. }
  13517. };
  13518. for (var ix = ex.prototype, nx = 0; nx < tx.length; nx++) {
  13519. var ox = tx[nx];
  13520. ox[0]in ix || (ix[ox[0]] = ox[1])
  13521. }
  13522. ex.getGradient = ix.getGradient;
  13523. var ax = function(t, e) {
  13524. this.image = t,
  13525. this.repeat = e,
  13526. this.type = "pattern"
  13527. };
  13528. ax.prototype.getCanvasPattern = function(t) {
  13529. return t.createPattern(this.image, this.repeat || "repeat")
  13530. }
  13531. ;
  13532. var rx = function(t, e, i) {
  13533. var n;
  13534. i = i || Hy,
  13535. "string" == typeof t ? n = ae(t, e, i) : _(t) && (t = (n = t).id),
  13536. this.id = t,
  13537. this.dom = n;
  13538. var o = n.style;
  13539. o && (n.onselectstart = oe,
  13540. o["-webkit-user-select"] = "none",
  13541. o["user-select"] = "none",
  13542. o["-webkit-touch-callout"] = "none",
  13543. o["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)",
  13544. o.padding = 0,
  13545. o.margin = 0,
  13546. o["border-width"] = 0),
  13547. this.domBack = null,
  13548. this.ctxBack = null,
  13549. this.painter = e,
  13550. this.config = null,
  13551. this.clearColor = 0,
  13552. this.motionBlur = !1,
  13553. this.lastFrameAlpha = .7,
  13554. this.dpr = i
  13555. };
  13556. rx.prototype = {
  13557. constructor: rx,
  13558. elCount: 0,
  13559. __dirty: !0,
  13560. initContext: function() {
  13561. this.ctx = this.dom.getContext("2d"),
  13562. this.ctx.__currentValues = {},
  13563. this.ctx.dpr = this.dpr
  13564. },
  13565. createBackBuffer: function() {
  13566. var t = this.dpr;
  13567. this.domBack = ae("back-" + this.id, this.painter, t),
  13568. this.ctxBack = this.domBack.getContext("2d"),
  13569. this.ctxBack.__currentValues = {},
  13570. 1 != t && this.ctxBack.scale(t, t)
  13571. },
  13572. resize: function(t, e) {
  13573. var i = this.dpr
  13574. , n = this.dom
  13575. , o = n.style
  13576. , a = this.domBack;
  13577. o.width = t + "px",
  13578. o.height = e + "px",
  13579. n.width = t * i,
  13580. n.height = e * i,
  13581. a && (a.width = t * i,
  13582. a.height = e * i,
  13583. 1 != i && this.ctxBack.scale(i, i))
  13584. },
  13585. clear: function(t) {
  13586. var e = this.dom
  13587. , i = this.ctx
  13588. , n = e.width
  13589. , o = e.height
  13590. , a = this.clearColor
  13591. , r = this.motionBlur && !t
  13592. , s = this.lastFrameAlpha
  13593. , l = this.dpr;
  13594. if (r && (this.domBack || this.createBackBuffer(),
  13595. this.ctxBack.globalCompositeOperation = "copy",
  13596. this.ctxBack.drawImage(e, 0, 0, n / l, o / l)),
  13597. i.clearRect(0, 0, n, o),
  13598. a) {
  13599. var h;
  13600. a.colorStops ? (h = a.__canvasGradient || ex.getGradient(i, a, {
  13601. x: 0,
  13602. y: 0,
  13603. width: n,
  13604. height: o
  13605. }),
  13606. a.__canvasGradient = h) : a.image && (h = ax.prototype.getCanvasPattern.call(a, i)),
  13607. i.save(),
  13608. i.fillStyle = h || a,
  13609. i.fillRect(0, 0, n, o),
  13610. i.restore()
  13611. }
  13612. if (r) {
  13613. var u = this.domBack;
  13614. i.save(),
  13615. i.globalAlpha = s,
  13616. i.drawImage(u, 0, 0, n, o),
  13617. i.restore()
  13618. }
  13619. }
  13620. };
  13621. var sx = "undefined" != typeof window && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(t) {
  13622. setTimeout(t, 16)
  13623. }
  13624. , lx = new ky(50)
  13625. , hx = {}
  13626. , ux = 0
  13627. , cx = 5e3
  13628. , dx = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g
  13629. , fx = "12px sans-serif"
  13630. , gx = function(t, e) {
  13631. var i = r();
  13632. return i.font = e || fx,
  13633. i.measureText(t)
  13634. }
  13635. , px = {
  13636. measureText: function(t) {
  13637. gx = t
  13638. }
  13639. }
  13640. , mx = {
  13641. left: 1,
  13642. right: 1,
  13643. center: 1
  13644. }
  13645. , vx = {
  13646. top: 1,
  13647. bottom: 1,
  13648. middle: 1
  13649. }
  13650. , yx = new jt
  13651. , xx = function() {};
  13652. xx.prototype = {
  13653. constructor: xx,
  13654. drawRectText: function(t, e) {
  13655. var i = this.style;
  13656. e = i.textRect || e,
  13657. this.__dirty && Ae(i);
  13658. var n = i.text;
  13659. if (null != n && (n += ""),
  13660. Ze(n, i)) {
  13661. t.save();
  13662. var o = this.transform;
  13663. i.transformText ? this.setTransform(t) : o && (yx.copy(e),
  13664. yx.applyTransform(o),
  13665. e = yx),
  13666. De(this, t, n, i, e),
  13667. t.restore()
  13668. }
  13669. }
  13670. },
  13671. Ue.prototype = {
  13672. constructor: Ue,
  13673. type: "displayable",
  13674. __dirty: !0,
  13675. invisible: !1,
  13676. z: 0,
  13677. z2: 0,
  13678. zlevel: 0,
  13679. draggable: !1,
  13680. dragging: !1,
  13681. silent: !1,
  13682. culling: !1,
  13683. cursor: "pointer",
  13684. rectHover: !1,
  13685. progressive: -1,
  13686. beforeBrush: function(t) {},
  13687. afterBrush: function(t) {},
  13688. brush: function(t, e) {},
  13689. getBoundingRect: function() {},
  13690. contain: function(t, e) {
  13691. return this.rectContain(t, e)
  13692. },
  13693. traverse: function(t, e) {
  13694. t.call(e, this)
  13695. },
  13696. rectContain: function(t, e) {
  13697. var i = this.transformCoordToLocal(t, e);
  13698. return this.getBoundingRect().contain(i[0], i[1])
  13699. },
  13700. dirty: function() {
  13701. this.__dirty = !0,
  13702. this._rect = null,
  13703. this.__zr && this.__zr.refresh()
  13704. },
  13705. animateStyle: function(t) {
  13706. return this.animate("style", t)
  13707. },
  13708. attrKV: function(t, e) {
  13709. "style" !== t ? jy.prototype.attrKV.call(this, t, e) : this.style.set(e)
  13710. },
  13711. setStyle: function(t, e) {
  13712. return this.style.set(t, e),
  13713. this.dirty(!1),
  13714. this
  13715. },
  13716. useStyle: function(t) {
  13717. return this.style = new ex(t,this),
  13718. this.dirty(!1),
  13719. this
  13720. }
  13721. },
  13722. l(Ue, jy),
  13723. h(Ue, xx),
  13724. je.prototype = {
  13725. constructor: je,
  13726. type: "image",
  13727. brush: function(t, e) {
  13728. var i = this.style
  13729. , n = i.image;
  13730. i.bind(t, this, e);
  13731. var o = this._image = se(n, this._image, this, this.onload);
  13732. if (o && he(o)) {
  13733. var a = i.x || 0
  13734. , r = i.y || 0
  13735. , s = i.width
  13736. , l = i.height
  13737. , h = o.width / o.height;
  13738. if (null == s && null != l ? s = l * h : null == l && null != s ? l = s / h : null == s && null == l && (s = o.width,
  13739. l = o.height),
  13740. this.setTransform(t),
  13741. i.sWidth && i.sHeight) {
  13742. var u = i.sx || 0
  13743. , c = i.sy || 0;
  13744. t.drawImage(o, u, c, i.sWidth, i.sHeight, a, r, s, l)
  13745. } else if (i.sx && i.sy) {
  13746. var d = s - (u = i.sx)
  13747. , f = l - (c = i.sy);
  13748. t.drawImage(o, u, c, d, f, a, r, s, l)
  13749. } else
  13750. t.drawImage(o, a, r, s, l);
  13751. this.restoreTransform(t),
  13752. null != i.text && this.drawRectText(t, this.getBoundingRect())
  13753. }
  13754. },
  13755. getBoundingRect: function() {
  13756. var t = this.style;
  13757. return this._rect || (this._rect = new jt(t.x || 0,t.y || 0,t.width || 0,t.height || 0)),
  13758. this._rect
  13759. }
  13760. },
  13761. l(je, Ue);
  13762. var _x = new jt(0,0,0,0)
  13763. , bx = new jt(0,0,0,0)
  13764. , wx = function(t, e, i) {
  13765. this.type = "canvas";
  13766. var n = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase();
  13767. this._opts = i = o({}, i || {}),
  13768. this.dpr = i.devicePixelRatio || Hy,
  13769. this._singleCanvas = n,
  13770. this.root = t;
  13771. var a = t.style;
  13772. a && (a["-webkit-tap-highlight-color"] = "transparent",
  13773. a["-webkit-user-select"] = a["user-select"] = a["-webkit-touch-callout"] = "none",
  13774. t.innerHTML = ""),
  13775. this.storage = e;
  13776. var r = this._zlevelList = []
  13777. , s = this._layers = {};
  13778. if (this._layerConfig = {},
  13779. n) {
  13780. null != i.width && (t.width = i.width),
  13781. null != i.height && (t.height = i.height);
  13782. var l = t.width
  13783. , h = t.height;
  13784. this._width = l,
  13785. this._height = h;
  13786. var u = new rx(t,this,1);
  13787. u.initContext(),
  13788. s[0] = u,
  13789. r.push(0),
  13790. this._domRoot = t
  13791. } else {
  13792. this._width = this._getSize(0),
  13793. this._height = this._getSize(1);
  13794. var c = this._domRoot = ti(this._width, this._height);
  13795. t.appendChild(c)
  13796. }
  13797. this._progressiveLayers = [],
  13798. this._hoverlayer,
  13799. this._hoverElements = []
  13800. };
  13801. wx.prototype = {
  13802. constructor: wx,
  13803. getType: function() {
  13804. return "canvas"
  13805. },
  13806. isSingleCanvas: function() {
  13807. return this._singleCanvas
  13808. },
  13809. getViewportRoot: function() {
  13810. return this._domRoot
  13811. },
  13812. getViewportRootOffset: function() {
  13813. var t = this.getViewportRoot();
  13814. if (t)
  13815. return {
  13816. offsetLeft: t.offsetLeft || 0,
  13817. offsetTop: t.offsetTop || 0
  13818. }
  13819. },
  13820. refresh: function(t) {
  13821. var e = this.storage.getDisplayList(!0)
  13822. , i = this._zlevelList;
  13823. this._paintList(e, t);
  13824. for (var n = 0; n < i.length; n++) {
  13825. var o = i[n]
  13826. , a = this._layers[o];
  13827. !a.__builtin__ && a.refresh && a.refresh()
  13828. }
  13829. return this.refreshHover(),
  13830. this._progressiveLayers.length && this._startProgessive(),
  13831. this
  13832. },
  13833. addHover: function(t, e) {
  13834. if (!t.__hoverMir) {
  13835. var i = new t.constructor({
  13836. style: t.style,
  13837. shape: t.shape
  13838. });
  13839. i.__from = t,
  13840. t.__hoverMir = i,
  13841. i.setStyle(e),
  13842. this._hoverElements.push(i)
  13843. }
  13844. },
  13845. removeHover: function(t) {
  13846. var e = t.__hoverMir
  13847. , i = this._hoverElements
  13848. , n = s(i, e);
  13849. n >= 0 && i.splice(n, 1),
  13850. t.__hoverMir = null
  13851. },
  13852. clearHover: function(t) {
  13853. for (var e = this._hoverElements, i = 0; i < e.length; i++) {
  13854. var n = e[i].__from;
  13855. n && (n.__hoverMir = null)
  13856. }
  13857. e.length = 0
  13858. },
  13859. refreshHover: function() {
  13860. var t = this._hoverElements
  13861. , e = t.length
  13862. , i = this._hoverlayer;
  13863. if (i && i.clear(),
  13864. e) {
  13865. te(t, this.storage.displayableSortFunc),
  13866. i || (i = this._hoverlayer = this.getLayer(1e5));
  13867. var n = {};
  13868. i.ctx.save();
  13869. for (var o = 0; o < e; ) {
  13870. var a = t[o]
  13871. , r = a.__from;
  13872. r && r.__zr ? (o++,
  13873. r.invisible || (a.transform = r.transform,
  13874. a.invTransform = r.invTransform,
  13875. a.__clipPaths = r.__clipPaths,
  13876. this._doPaintEl(a, i, !0, n))) : (t.splice(o, 1),
  13877. r.__hoverMir = null,
  13878. e--)
  13879. }
  13880. i.ctx.restore()
  13881. }
  13882. },
  13883. _startProgessive: function() {
  13884. function t() {
  13885. i === e._progressiveToken && e.storage && (e._doPaintList(e.storage.getDisplayList()),
  13886. e._furtherProgressive ? (e._progress++,
  13887. sx(t)) : e._progressiveToken = -1)
  13888. }
  13889. var e = this;
  13890. if (e._furtherProgressive) {
  13891. var i = e._progressiveToken = +new Date;
  13892. e._progress++,
  13893. sx(t)
  13894. }
  13895. },
  13896. _clearProgressive: function() {
  13897. this._progressiveToken = -1,
  13898. this._progress = 0,
  13899. c(this._progressiveLayers, function(t) {
  13900. t.__dirty && t.clear()
  13901. })
  13902. },
  13903. _paintList: function(t, e) {
  13904. null == e && (e = !1),
  13905. this._updateLayerStatus(t),
  13906. this._clearProgressive(),
  13907. this.eachBuiltinLayer(Ye),
  13908. this._doPaintList(t, e),
  13909. this.eachBuiltinLayer($e)
  13910. },
  13911. _doPaintList: function(t, e) {
  13912. function i(t) {
  13913. var e = a.dpr || 1;
  13914. a.save(),
  13915. a.globalAlpha = 1,
  13916. a.shadowBlur = 0,
  13917. n.__dirty = !0,
  13918. a.setTransform(1, 0, 0, 1, 0, 0),
  13919. a.drawImage(t.dom, 0, 0, u * e, d * e),
  13920. a.restore()
  13921. }
  13922. for (var n, o, a, r, s, l, h = 0, u = this._width, d = this._height, f = this._progress, g = 0, p = t.length; g < p; g++) {
  13923. var m = t[g]
  13924. , v = this._singleCanvas ? 0 : m.zlevel
  13925. , y = m.__frame;
  13926. if (y < 0 && s && (i(s),
  13927. s = null),
  13928. o !== v && (a && a.restore(),
  13929. r = {},
  13930. o = v,
  13931. (n = this.getLayer(o)).__builtin__ || Zy("ZLevel " + o + " has been used by unkown layer " + n.id),
  13932. (a = n.ctx).save(),
  13933. n.__unusedCount = 0,
  13934. (n.__dirty || e) && n.clear()),
  13935. n.__dirty || e) {
  13936. if (y >= 0) {
  13937. if (!s) {
  13938. if ((s = this._progressiveLayers[Math.min(h++, 4)]).ctx.save(),
  13939. s.renderScope = {},
  13940. s && s.__progress > s.__maxProgress) {
  13941. g = s.__nextIdxNotProg - 1;
  13942. continue
  13943. }
  13944. l = s.__progress,
  13945. s.__dirty || (f = l),
  13946. s.__progress = f + 1
  13947. }
  13948. y === f && this._doPaintEl(m, s, !0, s.renderScope)
  13949. } else
  13950. this._doPaintEl(m, n, e, r);
  13951. m.__dirty = !1
  13952. }
  13953. }
  13954. s && i(s),
  13955. a && a.restore(),
  13956. this._furtherProgressive = !1,
  13957. c(this._progressiveLayers, function(t) {
  13958. t.__maxProgress >= t.__progress && (this._furtherProgressive = !0)
  13959. }, this)
  13960. },
  13961. _doPaintEl: function(t, e, i, n) {
  13962. var o = e.ctx
  13963. , a = t.transform;
  13964. if ((e.__dirty || i) && !t.invisible && 0 !== t.style.opacity && (!a || a[0] || a[3]) && (!t.culling || !Ke(t, this._width, this._height))) {
  13965. var r = t.__clipPaths;
  13966. (n.prevClipLayer !== e || Je(r, n.prevElClipPaths)) && (n.prevElClipPaths && (n.prevClipLayer.ctx.restore(),
  13967. n.prevClipLayer = n.prevElClipPaths = null,
  13968. n.prevEl = null),
  13969. r && (o.save(),
  13970. Qe(r, o),
  13971. n.prevClipLayer = e,
  13972. n.prevElClipPaths = r)),
  13973. t.beforeBrush && t.beforeBrush(o),
  13974. t.brush(o, n.prevEl || null),
  13975. n.prevEl = t,
  13976. t.afterBrush && t.afterBrush(o)
  13977. }
  13978. },
  13979. getLayer: function(t) {
  13980. if (this._singleCanvas)
  13981. return this._layers[0];
  13982. var e = this._layers[t];
  13983. return e || ((e = new rx("zr_" + t,this,this.dpr)).__builtin__ = !0,
  13984. this._layerConfig[t] && i(e, this._layerConfig[t], !0),
  13985. this.insertLayer(t, e),
  13986. e.initContext()),
  13987. e
  13988. },
  13989. insertLayer: function(t, e) {
  13990. var i = this._layers
  13991. , n = this._zlevelList
  13992. , o = n.length
  13993. , a = null
  13994. , r = -1
  13995. , s = this._domRoot;
  13996. if (i[t])
  13997. Zy("ZLevel " + t + " has been used already");
  13998. else if (qe(e)) {
  13999. if (o > 0 && t > n[0]) {
  14000. for (r = 0; r < o - 1 && !(n[r] < t && n[r + 1] > t); r++)
  14001. ;
  14002. a = i[n[r]]
  14003. }
  14004. if (n.splice(r + 1, 0, t),
  14005. i[t] = e,
  14006. !e.virtual)
  14007. if (a) {
  14008. var l = a.dom;
  14009. l.nextSibling ? s.insertBefore(e.dom, l.nextSibling) : s.appendChild(e.dom)
  14010. } else
  14011. s.firstChild ? s.insertBefore(e.dom, s.firstChild) : s.appendChild(e.dom)
  14012. } else
  14013. Zy("Layer of zlevel " + t + " is not valid")
  14014. },
  14015. eachLayer: function(t, e) {
  14016. var i, n, o = this._zlevelList;
  14017. for (n = 0; n < o.length; n++)
  14018. i = o[n],
  14019. t.call(e, this._layers[i], i)
  14020. },
  14021. eachBuiltinLayer: function(t, e) {
  14022. var i, n, o, a = this._zlevelList;
  14023. for (o = 0; o < a.length; o++)
  14024. n = a[o],
  14025. (i = this._layers[n]).__builtin__ && t.call(e, i, n)
  14026. },
  14027. eachOtherLayer: function(t, e) {
  14028. var i, n, o, a = this._zlevelList;
  14029. for (o = 0; o < a.length; o++)
  14030. n = a[o],
  14031. (i = this._layers[n]).__builtin__ || t.call(e, i, n)
  14032. },
  14033. getLayers: function() {
  14034. return this._layers
  14035. },
  14036. _updateLayerStatus: function(t) {
  14037. var e = this._layers
  14038. , i = this._progressiveLayers
  14039. , n = {}
  14040. , o = {};
  14041. this.eachBuiltinLayer(function(t, e) {
  14042. n[e] = t.elCount,
  14043. t.elCount = 0,
  14044. t.__dirty = !1
  14045. }),
  14046. c(i, function(t, e) {
  14047. o[e] = t.elCount,
  14048. t.elCount = 0,
  14049. t.__dirty = !1
  14050. });
  14051. for (var a, r, s = 0, l = 0, h = 0, u = t.length; h < u; h++) {
  14052. var d = t[h]
  14053. , f = e[this._singleCanvas ? 0 : d.zlevel]
  14054. , g = d.progressive;
  14055. if (f && (f.elCount++,
  14056. f.__dirty = f.__dirty || d.__dirty),
  14057. g >= 0) {
  14058. r !== g && (r = g,
  14059. l++);
  14060. var p = d.__frame = l - 1;
  14061. if (!a) {
  14062. var m = Math.min(s, 4);
  14063. (a = i[m]) || (a = i[m] = new rx("progressive",this,this.dpr)).initContext(),
  14064. a.__maxProgress = 0
  14065. }
  14066. a.__dirty = a.__dirty || d.__dirty,
  14067. a.elCount++,
  14068. a.__maxProgress = Math.max(a.__maxProgress, p),
  14069. a.__maxProgress >= a.__progress && (f.__dirty = !0)
  14070. } else
  14071. d.__frame = -1,
  14072. a && (a.__nextIdxNotProg = h,
  14073. s++,
  14074. a = null)
  14075. }
  14076. a && (s++,
  14077. a.__nextIdxNotProg = h),
  14078. this.eachBuiltinLayer(function(t, e) {
  14079. n[e] !== t.elCount && (t.__dirty = !0)
  14080. }),
  14081. i.length = Math.min(s, 5),
  14082. c(i, function(t, e) {
  14083. o[e] !== t.elCount && (d.__dirty = !0),
  14084. t.__dirty && (t.__progress = 0)
  14085. })
  14086. },
  14087. clear: function() {
  14088. return this.eachBuiltinLayer(this._clearLayer),
  14089. this
  14090. },
  14091. _clearLayer: function(t) {
  14092. t.clear()
  14093. },
  14094. configLayer: function(t, e) {
  14095. if (e) {
  14096. var n = this._layerConfig;
  14097. n[t] ? i(n[t], e, !0) : n[t] = e;
  14098. var o = this._layers[t];
  14099. o && i(o, n[t], !0)
  14100. }
  14101. },
  14102. delLayer: function(t) {
  14103. var e = this._layers
  14104. , i = this._zlevelList
  14105. , n = e[t];
  14106. n && (n.dom.parentNode.removeChild(n.dom),
  14107. delete e[t],
  14108. i.splice(s(i, t), 1))
  14109. },
  14110. resize: function(t, e) {
  14111. var i = this._domRoot;
  14112. i.style.display = "none";
  14113. var n = this._opts;
  14114. if (null != t && (n.width = t),
  14115. null != e && (n.height = e),
  14116. t = this._getSize(0),
  14117. e = this._getSize(1),
  14118. i.style.display = "",
  14119. this._width != t || e != this._height) {
  14120. i.style.width = t + "px",
  14121. i.style.height = e + "px";
  14122. for (var o in this._layers)
  14123. this._layers.hasOwnProperty(o) && this._layers[o].resize(t, e);
  14124. c(this._progressiveLayers, function(i) {
  14125. i.resize(t, e)
  14126. }),
  14127. this.refresh(!0)
  14128. }
  14129. return this._width = t,
  14130. this._height = e,
  14131. this
  14132. },
  14133. clearLayer: function(t) {
  14134. var e = this._layers[t];
  14135. e && e.clear()
  14136. },
  14137. dispose: function() {
  14138. this.root.innerHTML = "",
  14139. this.root = this.storage = this._domRoot = this._layers = null
  14140. },
  14141. getRenderedCanvas: function(t) {
  14142. function e(t, e) {
  14143. var n = r._zlevelList;
  14144. null == t && (t = -1 / 0);
  14145. for (var o, a = 0; a < n.length; a++) {
  14146. var s = n[a]
  14147. , l = r._layers[s];
  14148. if (!l.__builtin__ && s > t && s < e) {
  14149. o = l;
  14150. break
  14151. }
  14152. }
  14153. o && o.renderToCanvas && (i.ctx.save(),
  14154. o.renderToCanvas(i.ctx),
  14155. i.ctx.restore())
  14156. }
  14157. if (t = t || {},
  14158. this._singleCanvas)
  14159. return this._layers[0].dom;
  14160. var i = new rx("image",this,t.pixelRatio || this.dpr);
  14161. i.initContext(),
  14162. i.clearColor = t.backgroundColor,
  14163. i.clear();
  14164. for (var n, o = this.storage.getDisplayList(!0), a = {}, r = this, s = 0; s < o.length; s++) {
  14165. var l = o[s];
  14166. l.zlevel !== n && (e(n, l.zlevel),
  14167. n = l.zlevel),
  14168. this._doPaintEl(l, i, !0, a)
  14169. }
  14170. return e(n, 1 / 0),
  14171. i.dom
  14172. },
  14173. getWidth: function() {
  14174. return this._width
  14175. },
  14176. getHeight: function() {
  14177. return this._height
  14178. },
  14179. _getSize: function(t) {
  14180. var e = this._opts
  14181. , i = ["width", "height"][t]
  14182. , n = ["clientWidth", "clientHeight"][t]
  14183. , o = ["paddingLeft", "paddingTop"][t]
  14184. , a = ["paddingRight", "paddingBottom"][t];
  14185. if (null != e[i] && "auto" !== e[i])
  14186. return parseFloat(e[i]);
  14187. var r = this.root
  14188. , s = document.defaultView.getComputedStyle(r);
  14189. return (r[n] || Xe(s[i]) || Xe(r.style[i])) - (Xe(s[o]) || 0) - (Xe(s[a]) || 0) | 0
  14190. },
  14191. pathToImage: function(t, e) {
  14192. e = e || this.dpr;
  14193. var i = document.createElement("canvas")
  14194. , n = i.getContext("2d")
  14195. , o = t.getBoundingRect()
  14196. , a = t.style
  14197. , r = a.shadowBlur
  14198. , s = a.shadowOffsetX
  14199. , l = a.shadowOffsetY
  14200. , h = a.hasStroke() ? a.lineWidth : 0
  14201. , u = Math.max(h / 2, -s + r)
  14202. , c = Math.max(h / 2, s + r)
  14203. , d = Math.max(h / 2, -l + r)
  14204. , f = Math.max(h / 2, l + r)
  14205. , g = o.width + u + c
  14206. , p = o.height + d + f;
  14207. i.width = g * e,
  14208. i.height = p * e,
  14209. n.scale(e, e),
  14210. n.clearRect(0, 0, g, p),
  14211. n.dpr = e;
  14212. var m = {
  14213. position: t.position,
  14214. rotation: t.rotation,
  14215. scale: t.scale
  14216. };
  14217. t.position = [u - o.x, d - o.y],
  14218. t.rotation = 0,
  14219. t.scale = [1, 1],
  14220. t.updateTransform(),
  14221. t && t.brush(n);
  14222. var v = new je({
  14223. style: {
  14224. x: 0,
  14225. y: 0,
  14226. image: i
  14227. }
  14228. });
  14229. return null != m.position && (v.position = t.position = m.position),
  14230. null != m.rotation && (v.rotation = t.rotation = m.rotation),
  14231. null != m.scale && (v.scale = t.scale = m.scale),
  14232. v
  14233. }
  14234. };
  14235. var Sx = "undefined" != typeof window && !!window.addEventListener
  14236. , Mx = /^(?:mouse|pointer|contextmenu|drag|drop)|click/
  14237. , Ix = Sx ? function(t) {
  14238. t.preventDefault(),
  14239. t.stopPropagation(),
  14240. t.cancelBubble = !0
  14241. }
  14242. : function(t) {
  14243. t.returnValue = !1,
  14244. t.cancelBubble = !0
  14245. }
  14246. , Tx = function(t) {
  14247. t = t || {},
  14248. this.stage = t.stage || {},
  14249. this.onframe = t.onframe || function() {}
  14250. ,
  14251. this._clips = [],
  14252. this._running = !1,
  14253. this._time,
  14254. this._pausedTime,
  14255. this._pauseStart,
  14256. this._paused = !1,
  14257. my.call(this)
  14258. };
  14259. Tx.prototype = {
  14260. constructor: Tx,
  14261. addClip: function(t) {
  14262. this._clips.push(t)
  14263. },
  14264. addAnimator: function(t) {
  14265. t.animation = this;
  14266. for (var e = t.getClips(), i = 0; i < e.length; i++)
  14267. this.addClip(e[i])
  14268. },
  14269. removeClip: function(t) {
  14270. var e = s(this._clips, t);
  14271. e >= 0 && this._clips.splice(e, 1)
  14272. },
  14273. removeAnimator: function(t) {
  14274. for (var e = t.getClips(), i = 0; i < e.length; i++)
  14275. this.removeClip(e[i]);
  14276. t.animation = null
  14277. },
  14278. _update: function() {
  14279. for (var t = (new Date).getTime() - this._pausedTime, e = t - this._time, i = this._clips, n = i.length, o = [], a = [], r = 0; r < n; r++) {
  14280. var s = i[r]
  14281. , l = s.step(t, e);
  14282. l && (o.push(l),
  14283. a.push(s))
  14284. }
  14285. for (r = 0; r < n; )
  14286. i[r]._needsRemove ? (i[r] = i[n - 1],
  14287. i.pop(),
  14288. n--) : r++;
  14289. n = o.length;
  14290. for (r = 0; r < n; r++)
  14291. a[r].fire(o[r]);
  14292. this._time = t,
  14293. this.onframe(e),
  14294. this.trigger("frame", e),
  14295. this.stage.update && this.stage.update()
  14296. },
  14297. _startLoop: function() {
  14298. function t() {
  14299. e._running && (sx(t),
  14300. !e._paused && e._update())
  14301. }
  14302. var e = this;
  14303. this._running = !0,
  14304. sx(t)
  14305. },
  14306. start: function() {
  14307. this._time = (new Date).getTime(),
  14308. this._pausedTime = 0,
  14309. this._startLoop()
  14310. },
  14311. stop: function() {
  14312. this._running = !1
  14313. },
  14314. pause: function() {
  14315. this._paused || (this._pauseStart = (new Date).getTime(),
  14316. this._paused = !0)
  14317. },
  14318. resume: function() {
  14319. this._paused && (this._pausedTime += (new Date).getTime() - this._pauseStart,
  14320. this._paused = !1)
  14321. },
  14322. clear: function() {
  14323. this._clips = []
  14324. },
  14325. animate: function(t, e) {
  14326. var i = new Gy(t,(e = e || {}).loop,e.getter,e.setter);
  14327. return this.addAnimator(i),
  14328. i
  14329. }
  14330. },
  14331. h(Tx, my);
  14332. var Ax = function() {
  14333. this._track = []
  14334. };
  14335. Ax.prototype = {
  14336. constructor: Ax,
  14337. recognize: function(t, e, i) {
  14338. return this._doTrack(t, e, i),
  14339. this._recognize(t)
  14340. },
  14341. clear: function() {
  14342. return this._track.length = 0,
  14343. this
  14344. },
  14345. _doTrack: function(t, e, i) {
  14346. var n = t.touches;
  14347. if (n) {
  14348. for (var o = {
  14349. points: [],
  14350. touches: [],
  14351. target: e,
  14352. event: t
  14353. }, a = 0, r = n.length; a < r; a++) {
  14354. var s = n[a]
  14355. , l = ii(i, s, {});
  14356. o.points.push([l.zrX, l.zrY]),
  14357. o.touches.push(s)
  14358. }
  14359. this._track.push(o)
  14360. }
  14361. },
  14362. _recognize: function(t) {
  14363. for (var e in Cx)
  14364. if (Cx.hasOwnProperty(e)) {
  14365. var i = Cx[e](this._track, t);
  14366. if (i)
  14367. return i
  14368. }
  14369. }
  14370. };
  14371. var Cx = {
  14372. pinch: function(t, e) {
  14373. var i = t.length;
  14374. if (i) {
  14375. var n = (t[i - 1] || {}).points
  14376. , o = (t[i - 2] || {}).points || n;
  14377. if (o && o.length > 1 && n && n.length > 1) {
  14378. var a = li(n) / li(o);
  14379. !isFinite(a) && (a = 1),
  14380. e.pinchScale = a;
  14381. var r = hi(n);
  14382. return e.pinchX = r[0],
  14383. e.pinchY = r[1],
  14384. {
  14385. type: "pinch",
  14386. target: t[0].target,
  14387. event: e
  14388. }
  14389. }
  14390. }
  14391. }
  14392. }
  14393. , Dx = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"]
  14394. , Lx = ["touchstart", "touchend", "touchmove"]
  14395. , kx = {
  14396. pointerdown: 1,
  14397. pointerup: 1,
  14398. pointermove: 1,
  14399. pointerout: 1
  14400. }
  14401. , Px = d(Dx, function(t) {
  14402. var e = t.replace("mouse", "pointer");
  14403. return kx[e] ? e : t
  14404. })
  14405. , Ox = {
  14406. mousemove: function(t) {
  14407. t = oi(this.dom, t),
  14408. this.trigger("mousemove", t)
  14409. },
  14410. mouseout: function(t) {
  14411. var e = (t = oi(this.dom, t)).toElement || t.relatedTarget;
  14412. if (e != this.dom)
  14413. for (; e && 9 != e.nodeType; ) {
  14414. if (e === this.dom)
  14415. return;
  14416. e = e.parentNode
  14417. }
  14418. this.trigger("mouseout", t)
  14419. },
  14420. touchstart: function(t) {
  14421. (t = oi(this.dom, t)).zrByTouch = !0,
  14422. this._lastTouchMoment = new Date,
  14423. ci(this, t, "start"),
  14424. Ox.mousemove.call(this, t),
  14425. Ox.mousedown.call(this, t),
  14426. di(this)
  14427. },
  14428. touchmove: function(t) {
  14429. (t = oi(this.dom, t)).zrByTouch = !0,
  14430. ci(this, t, "change"),
  14431. Ox.mousemove.call(this, t),
  14432. di(this)
  14433. },
  14434. touchend: function(t) {
  14435. (t = oi(this.dom, t)).zrByTouch = !0,
  14436. ci(this, t, "end"),
  14437. Ox.mouseup.call(this, t),
  14438. +new Date - this._lastTouchMoment < 300 && Ox.click.call(this, t),
  14439. di(this)
  14440. },
  14441. pointerdown: function(t) {
  14442. Ox.mousedown.call(this, t)
  14443. },
  14444. pointermove: function(t) {
  14445. fi(t) || Ox.mousemove.call(this, t)
  14446. },
  14447. pointerup: function(t) {
  14448. Ox.mouseup.call(this, t)
  14449. },
  14450. pointerout: function(t) {
  14451. fi(t) || Ox.mouseout.call(this, t)
  14452. }
  14453. };
  14454. c(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  14455. Ox[t] = function(e) {
  14456. e = oi(this.dom, e),
  14457. this.trigger(t, e)
  14458. }
  14459. });
  14460. var zx = pi.prototype;
  14461. zx.dispose = function() {
  14462. for (var t = Dx.concat(Lx), e = 0; e < t.length; e++) {
  14463. var i = t[e];
  14464. ri(this.dom, ui(i), this._handlers[i])
  14465. }
  14466. }
  14467. ,
  14468. zx.setCursor = function(t) {
  14469. this.dom.style.cursor = t || "default"
  14470. }
  14471. ,
  14472. h(pi, my);
  14473. var Nx = !Yv.canvasSupported
  14474. , Ex = {
  14475. canvas: wx
  14476. }
  14477. , Rx = {}
  14478. , Vx = "3.7.0"
  14479. , Bx = function(t, e, i) {
  14480. i = i || {},
  14481. this.dom = e,
  14482. this.id = t;
  14483. var n = this
  14484. , o = new Qy
  14485. , a = i.renderer;
  14486. if (Nx) {
  14487. if (!Ex.vml)
  14488. throw new Error("You need to require 'zrender/vml/vml' to support IE8");
  14489. a = "vml"
  14490. } else
  14491. a && Ex[a] || (a = "canvas");
  14492. var r = new Ex[a](e,o,i);
  14493. this.storage = o,
  14494. this.painter = r;
  14495. var s = Yv.node ? null : new pi(r.getViewportRoot());
  14496. this.handler = new xy(o,r,s,r.root),
  14497. this.animation = new Tx({
  14498. stage: {
  14499. update: p(this.flush, this)
  14500. }
  14501. }),
  14502. this.animation.start(),
  14503. this._needsRefresh;
  14504. var l = o.delFromStorage
  14505. , h = o.addToStorage;
  14506. o.delFromStorage = function(t) {
  14507. l.call(o, t),
  14508. t && t.removeSelfFromZr(n)
  14509. }
  14510. ,
  14511. o.addToStorage = function(t) {
  14512. h.call(o, t),
  14513. t.addSelfToZr(n)
  14514. }
  14515. };
  14516. Bx.prototype = {
  14517. constructor: Bx,
  14518. getId: function() {
  14519. return this.id
  14520. },
  14521. add: function(t) {
  14522. this.storage.addRoot(t),
  14523. this._needsRefresh = !0
  14524. },
  14525. remove: function(t) {
  14526. this.storage.delRoot(t),
  14527. this._needsRefresh = !0
  14528. },
  14529. configLayer: function(t, e) {
  14530. this.painter.configLayer(t, e),
  14531. this._needsRefresh = !0
  14532. },
  14533. refreshImmediately: function() {
  14534. this._needsRefresh = !1,
  14535. this.painter.refresh(),
  14536. this._needsRefresh = !1
  14537. },
  14538. refresh: function() {
  14539. this._needsRefresh = !0
  14540. },
  14541. flush: function() {
  14542. this._needsRefresh && this.refreshImmediately(),
  14543. this._needsRefreshHover && this.refreshHoverImmediately()
  14544. },
  14545. addHover: function(t, e) {
  14546. this.painter.addHover && (this.painter.addHover(t, e),
  14547. this.refreshHover())
  14548. },
  14549. removeHover: function(t) {
  14550. this.painter.removeHover && (this.painter.removeHover(t),
  14551. this.refreshHover())
  14552. },
  14553. clearHover: function() {
  14554. this.painter.clearHover && (this.painter.clearHover(),
  14555. this.refreshHover())
  14556. },
  14557. refreshHover: function() {
  14558. this._needsRefreshHover = !0
  14559. },
  14560. refreshHoverImmediately: function() {
  14561. this._needsRefreshHover = !1,
  14562. this.painter.refreshHover && this.painter.refreshHover()
  14563. },
  14564. resize: function(t) {
  14565. t = t || {},
  14566. this.painter.resize(t.width, t.height),
  14567. this.handler.resize()
  14568. },
  14569. clearAnimation: function() {
  14570. this.animation.clear()
  14571. },
  14572. getWidth: function() {
  14573. return this.painter.getWidth()
  14574. },
  14575. getHeight: function() {
  14576. return this.painter.getHeight()
  14577. },
  14578. pathToImage: function(t, e) {
  14579. return this.painter.pathToImage(t, e)
  14580. },
  14581. setCursorStyle: function(t) {
  14582. this.handler.setCursorStyle(t)
  14583. },
  14584. findHover: function(t, e) {
  14585. return this.handler.findHover(t, e)
  14586. },
  14587. on: function(t, e, i) {
  14588. this.handler.on(t, e, i)
  14589. },
  14590. off: function(t, e) {
  14591. this.handler.off(t, e)
  14592. },
  14593. trigger: function(t, e) {
  14594. this.handler.trigger(t, e)
  14595. },
  14596. clear: function() {
  14597. this.storage.delRoot(),
  14598. this.painter.clear()
  14599. },
  14600. dispose: function() {
  14601. this.animation.stop(),
  14602. this.clear(),
  14603. this.storage.dispose(),
  14604. this.painter.dispose(),
  14605. this.handler.dispose(),
  14606. this.animation = this.storage = this.painter = this.handler = null,
  14607. yi(this.id)
  14608. }
  14609. };
  14610. var Gx = (Object.freeze || Object)({
  14611. version: Vx,
  14612. init: mi,
  14613. dispose: function(t) {
  14614. if (t)
  14615. t.dispose();
  14616. else {
  14617. for (var e in Rx)
  14618. Rx.hasOwnProperty(e) && Rx[e].dispose();
  14619. Rx = {}
  14620. }
  14621. return this
  14622. },
  14623. getInstance: function(t) {
  14624. return Rx[t]
  14625. },
  14626. registerPainter: vi
  14627. })
  14628. , Wx = 1e-4
  14629. , Hx = 9007199254740991
  14630. , Fx = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/
  14631. , Zx = (Object.freeze || Object)({
  14632. linearMap: _i,
  14633. parsePercent: bi,
  14634. round: wi,
  14635. asc: Si,
  14636. getPrecision: Mi,
  14637. getPrecisionSafe: Ii,
  14638. getPixelPrecision: Ti,
  14639. getPercentWithPrecision: Ai,
  14640. MAX_SAFE_INTEGER: Hx,
  14641. remRadian: Ci,
  14642. isRadianAroundZero: Di,
  14643. parseDate: Li,
  14644. quantity: ki,
  14645. nice: Oi,
  14646. reformIntervals: zi,
  14647. isNumeric: Ni
  14648. })
  14649. , Ux = C
  14650. , jx = ["a", "b", "c", "d", "e", "f", "g"]
  14651. , Xx = function(t, e) {
  14652. return "{" + t + (null == e ? "" : e) + "}"
  14653. }
  14654. , qx = function(t) {
  14655. return t < 10 ? "0" + t : t
  14656. }
  14657. , Yx = ve
  14658. , $x = ce
  14659. , Kx = (Object.freeze || Object)({
  14660. addCommas: Ei,
  14661. toCamelCase: Ri,
  14662. normalizeCssArray: Ux,
  14663. encodeHTML: Vi,
  14664. formatTpl: Bi,
  14665. formatTplSimple: Gi,
  14666. getTooltipMarker: Wi,
  14667. formatTime: Hi,
  14668. capitalFirst: Fi,
  14669. truncateText: Yx,
  14670. getTextRect: $x
  14671. })
  14672. , Jx = "."
  14673. , Qx = "___EC__COMPONENT__CONTAINER___"
  14674. , t_ = "\0ec_\0"
  14675. , e_ = function(t) {
  14676. for (var e = 0; e < t.length; e++)
  14677. t[e][1] || (t[e][1] = t[e][0]);
  14678. return function(e, i, n) {
  14679. for (var o = {}, a = 0; a < t.length; a++) {
  14680. var r = t[a][1];
  14681. if (!(i && s(i, r) >= 0 || n && s(n, r) < 0)) {
  14682. var l = e.getShallow(r);
  14683. null != l && (o[t[a][0]] = l)
  14684. }
  14685. }
  14686. return o
  14687. }
  14688. }
  14689. , i_ = e_([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]])
  14690. , n_ = {
  14691. getLineStyle: function(t) {
  14692. var e = i_(this, t)
  14693. , i = this.getLineDash(e.lineWidth);
  14694. return i && (e.lineDash = i),
  14695. e
  14696. },
  14697. getLineDash: function(t) {
  14698. null == t && (t = 1);
  14699. var e = this.get("type")
  14700. , i = Math.max(t, 2)
  14701. , n = 4 * t;
  14702. return "solid" === e || null == e ? null : "dashed" === e ? [n, n] : [i, i]
  14703. }
  14704. }
  14705. , o_ = e_([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]])
  14706. , a_ = {
  14707. getAreaStyle: function(t, e) {
  14708. return o_(this, t, e)
  14709. }
  14710. }
  14711. , r_ = Math.pow
  14712. , s_ = Math.sqrt
  14713. , l_ = 1e-8
  14714. , h_ = 1e-4
  14715. , u_ = s_(3)
  14716. , c_ = 1 / 3
  14717. , d_ = N()
  14718. , f_ = N()
  14719. , g_ = N()
  14720. , p_ = Math.min
  14721. , m_ = Math.max
  14722. , v_ = Math.sin
  14723. , y_ = Math.cos
  14724. , x_ = 2 * Math.PI
  14725. , __ = N()
  14726. , b_ = N()
  14727. , w_ = N()
  14728. , S_ = []
  14729. , M_ = []
  14730. , I_ = {
  14731. M: 1,
  14732. L: 2,
  14733. C: 3,
  14734. Q: 4,
  14735. A: 5,
  14736. Z: 6,
  14737. R: 7
  14738. }
  14739. , T_ = []
  14740. , A_ = []
  14741. , C_ = []
  14742. , D_ = []
  14743. , L_ = Math.min
  14744. , k_ = Math.max
  14745. , P_ = Math.cos
  14746. , O_ = Math.sin
  14747. , z_ = Math.sqrt
  14748. , N_ = Math.abs
  14749. , E_ = "undefined" != typeof Float32Array
  14750. , R_ = function(t) {
  14751. this._saveData = !t,
  14752. this._saveData && (this.data = []),
  14753. this._ctx = null
  14754. };
  14755. R_.prototype = {
  14756. constructor: R_,
  14757. _xi: 0,
  14758. _yi: 0,
  14759. _x0: 0,
  14760. _y0: 0,
  14761. _ux: 0,
  14762. _uy: 0,
  14763. _len: 0,
  14764. _lineDash: null,
  14765. _dashOffset: 0,
  14766. _dashIdx: 0,
  14767. _dashSum: 0,
  14768. setScale: function(t, e) {
  14769. this._ux = N_(1 / Hy / t) || 0,
  14770. this._uy = N_(1 / Hy / e) || 0
  14771. },
  14772. getContext: function() {
  14773. return this._ctx
  14774. },
  14775. beginPath: function(t) {
  14776. return this._ctx = t,
  14777. t && t.beginPath(),
  14778. t && (this.dpr = t.dpr),
  14779. this._saveData && (this._len = 0),
  14780. this._lineDash && (this._lineDash = null,
  14781. this._dashOffset = 0),
  14782. this
  14783. },
  14784. moveTo: function(t, e) {
  14785. return this.addData(I_.M, t, e),
  14786. this._ctx && this._ctx.moveTo(t, e),
  14787. this._x0 = t,
  14788. this._y0 = e,
  14789. this._xi = t,
  14790. this._yi = e,
  14791. this
  14792. },
  14793. lineTo: function(t, e) {
  14794. var i = N_(t - this._xi) > this._ux || N_(e - this._yi) > this._uy || this._len < 5;
  14795. return this.addData(I_.L, t, e),
  14796. this._ctx && i && (this._needsDash() ? this._dashedLineTo(t, e) : this._ctx.lineTo(t, e)),
  14797. i && (this._xi = t,
  14798. this._yi = e),
  14799. this
  14800. },
  14801. bezierCurveTo: function(t, e, i, n, o, a) {
  14802. return this.addData(I_.C, t, e, i, n, o, a),
  14803. this._ctx && (this._needsDash() ? this._dashedBezierTo(t, e, i, n, o, a) : this._ctx.bezierCurveTo(t, e, i, n, o, a)),
  14804. this._xi = o,
  14805. this._yi = a,
  14806. this
  14807. },
  14808. quadraticCurveTo: function(t, e, i, n) {
  14809. return this.addData(I_.Q, t, e, i, n),
  14810. this._ctx && (this._needsDash() ? this._dashedQuadraticTo(t, e, i, n) : this._ctx.quadraticCurveTo(t, e, i, n)),
  14811. this._xi = i,
  14812. this._yi = n,
  14813. this
  14814. },
  14815. arc: function(t, e, i, n, o, a) {
  14816. return this.addData(I_.A, t, e, i, i, n, o - n, 0, a ? 0 : 1),
  14817. this._ctx && this._ctx.arc(t, e, i, n, o, a),
  14818. this._xi = P_(o) * i + t,
  14819. this._yi = O_(o) * i + t,
  14820. this
  14821. },
  14822. arcTo: function(t, e, i, n, o) {
  14823. return this._ctx && this._ctx.arcTo(t, e, i, n, o),
  14824. this
  14825. },
  14826. rect: function(t, e, i, n) {
  14827. return this._ctx && this._ctx.rect(t, e, i, n),
  14828. this.addData(I_.R, t, e, i, n),
  14829. this
  14830. },
  14831. closePath: function() {
  14832. this.addData(I_.Z);
  14833. var t = this._ctx
  14834. , e = this._x0
  14835. , i = this._y0;
  14836. return t && (this._needsDash() && this._dashedLineTo(e, i),
  14837. t.closePath()),
  14838. this._xi = e,
  14839. this._yi = i,
  14840. this
  14841. },
  14842. fill: function(t) {
  14843. t && t.fill(),
  14844. this.toStatic()
  14845. },
  14846. stroke: function(t) {
  14847. t && t.stroke(),
  14848. this.toStatic()
  14849. },
  14850. setLineDash: function(t) {
  14851. if (t instanceof Array) {
  14852. this._lineDash = t,
  14853. this._dashIdx = 0;
  14854. for (var e = 0, i = 0; i < t.length; i++)
  14855. e += t[i];
  14856. this._dashSum = e
  14857. }
  14858. return this
  14859. },
  14860. setLineDashOffset: function(t) {
  14861. return this._dashOffset = t,
  14862. this
  14863. },
  14864. len: function() {
  14865. return this._len
  14866. },
  14867. setData: function(t) {
  14868. var e = t.length;
  14869. this.data && this.data.length == e || !E_ || (this.data = new Float32Array(e));
  14870. for (var i = 0; i < e; i++)
  14871. this.data[i] = t[i];
  14872. this._len = e
  14873. },
  14874. appendPath: function(t) {
  14875. t instanceof Array || (t = [t]);
  14876. for (var e = t.length, i = 0, n = this._len, o = 0; o < e; o++)
  14877. i += t[o].len();
  14878. E_ && this.data instanceof Float32Array && (this.data = new Float32Array(n + i));
  14879. for (o = 0; o < e; o++)
  14880. for (var a = t[o].data, r = 0; r < a.length; r++)
  14881. this.data[n++] = a[r];
  14882. this._len = n
  14883. },
  14884. addData: function(t) {
  14885. if (this._saveData) {
  14886. var e = this.data;
  14887. this._len + arguments.length > e.length && (this._expandData(),
  14888. e = this.data);
  14889. for (var i = 0; i < arguments.length; i++)
  14890. e[this._len++] = arguments[i];
  14891. this._prevCmd = t
  14892. }
  14893. },
  14894. _expandData: function() {
  14895. if (!(this.data instanceof Array)) {
  14896. for (var t = [], e = 0; e < this._len; e++)
  14897. t[e] = this.data[e];
  14898. this.data = t
  14899. }
  14900. },
  14901. _needsDash: function() {
  14902. return this._lineDash
  14903. },
  14904. _dashedLineTo: function(t, e) {
  14905. var i, n, o = this._dashSum, a = this._dashOffset, r = this._lineDash, s = this._ctx, l = this._xi, h = this._yi, u = t - l, c = e - h, d = z_(u * u + c * c), f = l, g = h, p = r.length;
  14906. for (u /= d,
  14907. c /= d,
  14908. a < 0 && (a = o + a),
  14909. f -= (a %= o) * u,
  14910. g -= a * c; u > 0 && f <= t || u < 0 && f >= t || 0 == u && (c > 0 && g <= e || c < 0 && g >= e); )
  14911. f += u * (i = r[n = this._dashIdx]),
  14912. g += c * i,
  14913. this._dashIdx = (n + 1) % p,
  14914. u > 0 && f < l || u < 0 && f > l || c > 0 && g < h || c < 0 && g > h || s[n % 2 ? "moveTo" : "lineTo"](u >= 0 ? L_(f, t) : k_(f, t), c >= 0 ? L_(g, e) : k_(g, e));
  14915. u = f - t,
  14916. c = g - e,
  14917. this._dashOffset = -z_(u * u + c * c)
  14918. },
  14919. _dashedBezierTo: function(t, e, i, n, o, a) {
  14920. var r, s, l, h, u, c = this._dashSum, d = this._dashOffset, f = this._lineDash, g = this._ctx, p = this._xi, m = this._yi, v = en, y = 0, x = this._dashIdx, _ = f.length, b = 0;
  14921. for (d < 0 && (d = c + d),
  14922. d %= c,
  14923. r = 0; r < 1; r += .1)
  14924. s = v(p, t, i, o, r + .1) - v(p, t, i, o, r),
  14925. l = v(m, e, n, a, r + .1) - v(m, e, n, a, r),
  14926. y += z_(s * s + l * l);
  14927. for (; x < _ && !((b += f[x]) > d); x++)
  14928. ;
  14929. for (r = (b - d) / y; r <= 1; )
  14930. h = v(p, t, i, o, r),
  14931. u = v(m, e, n, a, r),
  14932. x % 2 ? g.moveTo(h, u) : g.lineTo(h, u),
  14933. r += f[x] / y,
  14934. x = (x + 1) % _;
  14935. x % 2 != 0 && g.lineTo(o, a),
  14936. s = o - h,
  14937. l = a - u,
  14938. this._dashOffset = -z_(s * s + l * l)
  14939. },
  14940. _dashedQuadraticTo: function(t, e, i, n) {
  14941. var o = i
  14942. , a = n;
  14943. i = (i + 2 * t) / 3,
  14944. n = (n + 2 * e) / 3,
  14945. t = (this._xi + 2 * t) / 3,
  14946. e = (this._yi + 2 * e) / 3,
  14947. this._dashedBezierTo(t, e, i, n, o, a)
  14948. },
  14949. toStatic: function() {
  14950. var t = this.data;
  14951. t instanceof Array && (t.length = this._len,
  14952. E_ && (this.data = new Float32Array(t)))
  14953. },
  14954. getBoundingRect: function() {
  14955. T_[0] = T_[1] = C_[0] = C_[1] = Number.MAX_VALUE,
  14956. A_[0] = A_[1] = D_[0] = D_[1] = -Number.MAX_VALUE;
  14957. for (var t = this.data, e = 0, i = 0, n = 0, o = 0, a = 0; a < t.length; ) {
  14958. var r = t[a++];
  14959. switch (1 == a && (n = e = t[a],
  14960. o = i = t[a + 1]),
  14961. r) {
  14962. case I_.M:
  14963. e = n = t[a++],
  14964. i = o = t[a++],
  14965. C_[0] = n,
  14966. C_[1] = o,
  14967. D_[0] = n,
  14968. D_[1] = o;
  14969. break;
  14970. case I_.L:
  14971. pn(e, i, t[a], t[a + 1], C_, D_),
  14972. e = t[a++],
  14973. i = t[a++];
  14974. break;
  14975. case I_.C:
  14976. mn(e, i, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], C_, D_),
  14977. e = t[a++],
  14978. i = t[a++];
  14979. break;
  14980. case I_.Q:
  14981. vn(e, i, t[a++], t[a++], t[a], t[a + 1], C_, D_),
  14982. e = t[a++],
  14983. i = t[a++];
  14984. break;
  14985. case I_.A:
  14986. var s = t[a++]
  14987. , l = t[a++]
  14988. , h = t[a++]
  14989. , u = t[a++]
  14990. , c = t[a++]
  14991. , d = t[a++] + c
  14992. , f = (t[a++],
  14993. 1 - t[a++]);
  14994. 1 == a && (n = P_(c) * h + s,
  14995. o = O_(c) * u + l),
  14996. yn(s, l, h, u, c, d, f, C_, D_),
  14997. e = P_(d) * h + s,
  14998. i = O_(d) * u + l;
  14999. break;
  15000. case I_.R:
  15001. pn(n = e = t[a++], o = i = t[a++], n + t[a++], o + t[a++], C_, D_);
  15002. break;
  15003. case I_.Z:
  15004. e = n,
  15005. i = o
  15006. }
  15007. $(T_, T_, C_),
  15008. K(A_, A_, D_)
  15009. }
  15010. return 0 === a && (T_[0] = T_[1] = A_[0] = A_[1] = 0),
  15011. new jt(T_[0],T_[1],A_[0] - T_[0],A_[1] - T_[1])
  15012. },
  15013. rebuildPath: function(t) {
  15014. for (var e, i, n, o, a, r, s = this.data, l = this._ux, h = this._uy, u = this._len, c = 0; c < u; ) {
  15015. var d = s[c++];
  15016. switch (1 == c && (e = n = s[c],
  15017. i = o = s[c + 1]),
  15018. d) {
  15019. case I_.M:
  15020. e = n = s[c++],
  15021. i = o = s[c++],
  15022. t.moveTo(n, o);
  15023. break;
  15024. case I_.L:
  15025. a = s[c++],
  15026. r = s[c++],
  15027. (N_(a - n) > l || N_(r - o) > h || c === u - 1) && (t.lineTo(a, r),
  15028. n = a,
  15029. o = r);
  15030. break;
  15031. case I_.C:
  15032. t.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]),
  15033. n = s[c - 2],
  15034. o = s[c - 1];
  15035. break;
  15036. case I_.Q:
  15037. t.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]),
  15038. n = s[c - 2],
  15039. o = s[c - 1];
  15040. break;
  15041. case I_.A:
  15042. var f = s[c++]
  15043. , g = s[c++]
  15044. , p = s[c++]
  15045. , m = s[c++]
  15046. , v = s[c++]
  15047. , y = s[c++]
  15048. , x = s[c++]
  15049. , _ = s[c++]
  15050. , b = p > m ? p : m
  15051. , w = p > m ? 1 : p / m
  15052. , S = p > m ? m / p : 1
  15053. , M = v + y;
  15054. Math.abs(p - m) > .001 ? (t.translate(f, g),
  15055. t.rotate(x),
  15056. t.scale(w, S),
  15057. t.arc(0, 0, b, v, M, 1 - _),
  15058. t.scale(1 / w, 1 / S),
  15059. t.rotate(-x),
  15060. t.translate(-f, -g)) : t.arc(f, g, b, v, M, 1 - _),
  15061. 1 == c && (e = P_(v) * p + f,
  15062. i = O_(v) * m + g),
  15063. n = P_(M) * p + f,
  15064. o = O_(M) * m + g;
  15065. break;
  15066. case I_.R:
  15067. e = n = s[c],
  15068. i = o = s[c + 1],
  15069. t.rect(s[c++], s[c++], s[c++], s[c++]);
  15070. break;
  15071. case I_.Z:
  15072. t.closePath(),
  15073. n = e,
  15074. o = i
  15075. }
  15076. }
  15077. }
  15078. },
  15079. R_.CMD = I_;
  15080. var V_ = 2 * Math.PI
  15081. , B_ = 2 * Math.PI
  15082. , G_ = 2 * Math.PI
  15083. , W_ = 1e-4
  15084. , H_ = [-1, -1, -1]
  15085. , F_ = [-1, -1]
  15086. , Z_ = ax.prototype.getCanvasPattern
  15087. , U_ = Math.abs
  15088. , j_ = new R_(!0);
  15089. On.prototype = {
  15090. constructor: On,
  15091. type: "path",
  15092. __dirtyPath: !0,
  15093. strokeContainThreshold: 5,
  15094. brush: function(t, e) {
  15095. var i = this.style
  15096. , n = this.path || j_
  15097. , o = i.hasStroke()
  15098. , a = i.hasFill()
  15099. , r = i.fill
  15100. , s = i.stroke
  15101. , l = a && !!r.colorStops
  15102. , h = o && !!s.colorStops
  15103. , u = a && !!r.image
  15104. , c = o && !!s.image;
  15105. if (i.bind(t, this, e),
  15106. this.setTransform(t),
  15107. this.__dirty) {
  15108. var d;
  15109. l && (d = d || this.getBoundingRect(),
  15110. this._fillGradient = i.getGradient(t, r, d)),
  15111. h && (d = d || this.getBoundingRect(),
  15112. this._strokeGradient = i.getGradient(t, s, d))
  15113. }
  15114. l ? t.fillStyle = this._fillGradient : u && (t.fillStyle = Z_.call(r, t)),
  15115. h ? t.strokeStyle = this._strokeGradient : c && (t.strokeStyle = Z_.call(s, t));
  15116. var f = i.lineDash
  15117. , g = i.lineDashOffset
  15118. , p = !!t.setLineDash
  15119. , m = this.getGlobalScale();
  15120. n.setScale(m[0], m[1]),
  15121. this.__dirtyPath || f && !p && o ? (n.beginPath(t),
  15122. f && !p && (n.setLineDash(f),
  15123. n.setLineDashOffset(g)),
  15124. this.buildPath(n, this.shape, !1),
  15125. this.path && (this.__dirtyPath = !1)) : (t.beginPath(),
  15126. this.path.rebuildPath(t)),
  15127. a && n.fill(t),
  15128. f && p && (t.setLineDash(f),
  15129. t.lineDashOffset = g),
  15130. o && n.stroke(t),
  15131. f && p && t.setLineDash([]),
  15132. this.restoreTransform(t),
  15133. null != i.text && this.drawRectText(t, this.getBoundingRect())
  15134. },
  15135. buildPath: function(t, e, i) {},
  15136. createPathProxy: function() {
  15137. this.path = new R_
  15138. },
  15139. getBoundingRect: function() {
  15140. var t = this._rect
  15141. , e = this.style
  15142. , i = !t;
  15143. if (i) {
  15144. var n = this.path;
  15145. n || (n = this.path = new R_),
  15146. this.__dirtyPath && (n.beginPath(),
  15147. this.buildPath(n, this.shape, !1)),
  15148. t = n.getBoundingRect()
  15149. }
  15150. if (this._rect = t,
  15151. e.hasStroke()) {
  15152. var o = this._rectWithStroke || (this._rectWithStroke = t.clone());
  15153. if (this.__dirty || i) {
  15154. o.copy(t);
  15155. var a = e.lineWidth
  15156. , r = e.strokeNoScale ? this.getLineScale() : 1;
  15157. e.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4)),
  15158. r > 1e-10 && (o.width += a / r,
  15159. o.height += a / r,
  15160. o.x -= a / r / 2,
  15161. o.y -= a / r / 2)
  15162. }
  15163. return o
  15164. }
  15165. return t
  15166. },
  15167. contain: function(t, e) {
  15168. var i = this.transformCoordToLocal(t, e)
  15169. , n = this.getBoundingRect()
  15170. , o = this.style;
  15171. if (t = i[0],
  15172. e = i[1],
  15173. n.contain(t, e)) {
  15174. var a = this.path.data;
  15175. if (o.hasStroke()) {
  15176. var r = o.lineWidth
  15177. , s = o.strokeNoScale ? this.getLineScale() : 1;
  15178. if (s > 1e-10 && (o.hasFill() || (r = Math.max(r, this.strokeContainThreshold)),
  15179. Pn(a, r / s, t, e)))
  15180. return !0
  15181. }
  15182. if (o.hasFill())
  15183. return kn(a, t, e)
  15184. }
  15185. return !1
  15186. },
  15187. dirty: function(t) {
  15188. null == t && (t = !0),
  15189. t && (this.__dirtyPath = t,
  15190. this._rect = null),
  15191. this.__dirty = !0,
  15192. this.__zr && this.__zr.refresh(),
  15193. this.__clipTarget && this.__clipTarget.dirty()
  15194. },
  15195. animateShape: function(t) {
  15196. return this.animate("shape", t)
  15197. },
  15198. attrKV: function(t, e) {
  15199. "shape" === t ? (this.setShape(e),
  15200. this.__dirtyPath = !0,
  15201. this._rect = null) : Ue.prototype.attrKV.call(this, t, e)
  15202. },
  15203. setShape: function(t, e) {
  15204. var i = this.shape;
  15205. if (i) {
  15206. if (_(t))
  15207. for (var n in t)
  15208. t.hasOwnProperty(n) && (i[n] = t[n]);
  15209. else
  15210. i[t] = e;
  15211. this.dirty(!0)
  15212. }
  15213. return this
  15214. },
  15215. getLineScale: function() {
  15216. var t = this.transform;
  15217. return t && U_(t[0] - 1) > 1e-10 && U_(t[3] - 1) > 1e-10 ? Math.sqrt(U_(t[0] * t[3] - t[2] * t[1])) : 1
  15218. }
  15219. },
  15220. On.extend = function(t) {
  15221. var e = function(e) {
  15222. On.call(this, e),
  15223. t.style && this.style.extendFrom(t.style, !1);
  15224. var i = t.shape;
  15225. if (i) {
  15226. this.shape = this.shape || {};
  15227. var n = this.shape;
  15228. for (var o in i)
  15229. !n.hasOwnProperty(o) && i.hasOwnProperty(o) && (n[o] = i[o])
  15230. }
  15231. t.init && t.init.call(this, e)
  15232. };
  15233. l(e, On);
  15234. for (var i in t)
  15235. "style" !== i && "shape" !== i && (e.prototype[i] = t[i]);
  15236. return e
  15237. }
  15238. ,
  15239. l(On, Ue);
  15240. var X_ = [[], [], []]
  15241. , q_ = Math.sqrt
  15242. , Y_ = Math.atan2
  15243. , $_ = function(t, e) {
  15244. var i, n, o, a, r, s, l = t.data, h = I_.M, u = I_.C, c = I_.L, d = I_.R, f = I_.A, g = I_.Q;
  15245. for (o = 0,
  15246. a = 0; o < l.length; ) {
  15247. switch (i = l[o++],
  15248. a = o,
  15249. n = 0,
  15250. i) {
  15251. case h:
  15252. case c:
  15253. n = 1;
  15254. break;
  15255. case u:
  15256. n = 3;
  15257. break;
  15258. case g:
  15259. n = 2;
  15260. break;
  15261. case f:
  15262. var p = e[4]
  15263. , m = e[5]
  15264. , v = q_(e[0] * e[0] + e[1] * e[1])
  15265. , y = q_(e[2] * e[2] + e[3] * e[3])
  15266. , x = Y_(-e[1] / y, e[0] / v);
  15267. l[o] *= v,
  15268. l[o++] += p,
  15269. l[o] *= y,
  15270. l[o++] += m,
  15271. l[o++] *= v,
  15272. l[o++] *= y,
  15273. l[o++] += x,
  15274. l[o++] += x,
  15275. a = o += 2;
  15276. break;
  15277. case d:
  15278. s[0] = l[o++],
  15279. s[1] = l[o++],
  15280. Y(s, s, e),
  15281. l[a++] = s[0],
  15282. l[a++] = s[1],
  15283. s[0] += l[o++],
  15284. s[1] += l[o++],
  15285. Y(s, s, e),
  15286. l[a++] = s[0],
  15287. l[a++] = s[1]
  15288. }
  15289. for (r = 0; r < n; r++)
  15290. (s = X_[r])[0] = l[o++],
  15291. s[1] = l[o++],
  15292. Y(s, s, e),
  15293. l[a++] = s[0],
  15294. l[a++] = s[1]
  15295. }
  15296. }
  15297. , K_ = ["m", "M", "l", "L", "v", "V", "h", "H", "z", "Z", "c", "C", "q", "Q", "t", "T", "s", "S", "a", "A"]
  15298. , J_ = Math.sqrt
  15299. , Q_ = Math.sin
  15300. , tb = Math.cos
  15301. , eb = Math.PI
  15302. , ib = function(t) {
  15303. return Math.sqrt(t[0] * t[0] + t[1] * t[1])
  15304. }
  15305. , nb = function(t, e) {
  15306. return (t[0] * e[0] + t[1] * e[1]) / (ib(t) * ib(e))
  15307. }
  15308. , ob = function(t, e) {
  15309. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(nb(t, e))
  15310. }
  15311. , ab = function(t) {
  15312. Ue.call(this, t)
  15313. };
  15314. ab.prototype = {
  15315. constructor: ab,
  15316. type: "text",
  15317. brush: function(t, e) {
  15318. var i = this.style;
  15319. this.__dirty && Ae(i),
  15320. i.fill = i.stroke = i.shadowBlur = i.shadowColor = i.shadowOffsetX = i.shadowOffsetY = null;
  15321. var n = i.text;
  15322. null != n && (n += ""),
  15323. i.bind(t, this, e),
  15324. Ze(n, i) && (this.setTransform(t),
  15325. De(this, t, n, i),
  15326. this.restoreTransform(t))
  15327. },
  15328. getBoundingRect: function() {
  15329. var t = this.style;
  15330. if (this.__dirty && Ae(t),
  15331. !this._rect) {
  15332. var e = t.text;
  15333. null != e ? e += "" : e = "";
  15334. var i = ce(t.text + "", t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.rich);
  15335. if (i.x += t.x || 0,
  15336. i.y += t.y || 0,
  15337. Ge(t.textStroke, t.textStrokeWidth)) {
  15338. var n = t.textStrokeWidth;
  15339. i.x -= n / 2,
  15340. i.y -= n / 2,
  15341. i.width += n,
  15342. i.height += n
  15343. }
  15344. this._rect = i
  15345. }
  15346. return this._rect
  15347. }
  15348. },
  15349. l(ab, Ue);
  15350. var rb = On.extend({
  15351. type: "circle",
  15352. shape: {
  15353. cx: 0,
  15354. cy: 0,
  15355. r: 0
  15356. },
  15357. buildPath: function(t, e, i) {
  15358. i && t.moveTo(e.cx + e.r, e.cy),
  15359. t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI, !0)
  15360. }
  15361. })
  15362. , sb = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]]
  15363. , lb = function(t) {
  15364. return Yv.browser.ie && Yv.browser.version >= 11 ? function() {
  15365. var e, i = this.__clipPaths, n = this.style;
  15366. if (i)
  15367. for (var o = 0; o < i.length; o++) {
  15368. var a = i[o]
  15369. , r = a && a.shape
  15370. , s = a && a.type;
  15371. if (r && ("sector" === s && r.startAngle === r.endAngle || "rect" === s && (!r.width || !r.height))) {
  15372. for (l = 0; l < sb.length; l++)
  15373. sb[l][2] = n[sb[l][0]],
  15374. n[sb[l][0]] = sb[l][1];
  15375. e = !0;
  15376. break
  15377. }
  15378. }
  15379. if (t.apply(this, arguments),
  15380. e)
  15381. for (var l = 0; l < sb.length; l++)
  15382. n[sb[l][0]] = sb[l][2]
  15383. }
  15384. : t
  15385. }
  15386. , hb = On.extend({
  15387. type: "sector",
  15388. shape: {
  15389. cx: 0,
  15390. cy: 0,
  15391. r0: 0,
  15392. r: 0,
  15393. startAngle: 0,
  15394. endAngle: 2 * Math.PI,
  15395. clockwise: !0
  15396. },
  15397. brush: lb(On.prototype.brush),
  15398. buildPath: function(t, e) {
  15399. var i = e.cx
  15400. , n = e.cy
  15401. , o = Math.max(e.r0 || 0, 0)
  15402. , a = Math.max(e.r, 0)
  15403. , r = e.startAngle
  15404. , s = e.endAngle
  15405. , l = e.clockwise
  15406. , h = Math.cos(r)
  15407. , u = Math.sin(r);
  15408. t.moveTo(h * o + i, u * o + n),
  15409. t.lineTo(h * a + i, u * a + n),
  15410. t.arc(i, n, a, r, s, !l),
  15411. t.lineTo(Math.cos(s) * o + i, Math.sin(s) * o + n),
  15412. 0 !== o && t.arc(i, n, o, s, r, l),
  15413. t.closePath()
  15414. }
  15415. })
  15416. , ub = On.extend({
  15417. type: "ring",
  15418. shape: {
  15419. cx: 0,
  15420. cy: 0,
  15421. r: 0,
  15422. r0: 0
  15423. },
  15424. buildPath: function(t, e) {
  15425. var i = e.cx
  15426. , n = e.cy
  15427. , o = 2 * Math.PI;
  15428. t.moveTo(i + e.r, n),
  15429. t.arc(i, n, e.r, 0, o, !1),
  15430. t.moveTo(i + e.r0, n),
  15431. t.arc(i, n, e.r0, 0, o, !0)
  15432. }
  15433. })
  15434. , cb = function(t, e) {
  15435. for (var i = t.length, n = [], o = 0, a = 1; a < i; a++)
  15436. o += j(t[a - 1], t[a]);
  15437. var r = o / 2;
  15438. r = r < i ? i : r;
  15439. for (a = 0; a < r; a++) {
  15440. var s, l, h, u = a / (r - 1) * (e ? i : i - 1), c = Math.floor(u), d = u - c, f = t[c % i];
  15441. e ? (s = t[(c - 1 + i) % i],
  15442. l = t[(c + 1) % i],
  15443. h = t[(c + 2) % i]) : (s = t[0 === c ? c : c - 1],
  15444. l = t[c > i - 2 ? i - 1 : c + 1],
  15445. h = t[c > i - 3 ? i - 1 : c + 2]);
  15446. var g = d * d
  15447. , p = d * g;
  15448. n.push([Bn(s[0], f[0], l[0], h[0], d, g, p), Bn(s[1], f[1], l[1], h[1], d, g, p)])
  15449. }
  15450. return n
  15451. }
  15452. , db = function(t, e, i, n) {
  15453. var o, a, r, s, l = [], h = [], u = [], c = [];
  15454. if (n) {
  15455. r = [1 / 0, 1 / 0],
  15456. s = [-1 / 0, -1 / 0];
  15457. for (var d = 0, f = t.length; d < f; d++)
  15458. $(r, r, t[d]),
  15459. K(s, s, t[d]);
  15460. $(r, r, n[0]),
  15461. K(s, s, n[1])
  15462. }
  15463. for (var d = 0, f = t.length; d < f; d++) {
  15464. var g = t[d];
  15465. if (i)
  15466. o = t[d ? d - 1 : f - 1],
  15467. a = t[(d + 1) % f];
  15468. else {
  15469. if (0 === d || d === f - 1) {
  15470. l.push(R(t[d]));
  15471. continue
  15472. }
  15473. o = t[d - 1],
  15474. a = t[d + 1]
  15475. }
  15476. W(h, a, o),
  15477. Z(h, h, e);
  15478. var p = j(g, o)
  15479. , m = j(g, a)
  15480. , v = p + m;
  15481. 0 !== v && (p /= v,
  15482. m /= v),
  15483. Z(u, h, -p),
  15484. Z(c, h, m);
  15485. var y = B([], g, u)
  15486. , x = B([], g, c);
  15487. n && (K(y, y, r),
  15488. $(y, y, s),
  15489. K(x, x, r),
  15490. $(x, x, s)),
  15491. l.push(y),
  15492. l.push(x)
  15493. }
  15494. return i && l.push(l.shift()),
  15495. l
  15496. }
  15497. , fb = On.extend({
  15498. type: "polygon",
  15499. shape: {
  15500. points: null,
  15501. smooth: !1,
  15502. smoothConstraint: null
  15503. },
  15504. buildPath: function(t, e) {
  15505. Gn(t, e, !0)
  15506. }
  15507. })
  15508. , gb = On.extend({
  15509. type: "polyline",
  15510. shape: {
  15511. points: null,
  15512. smooth: !1,
  15513. smoothConstraint: null
  15514. },
  15515. style: {
  15516. stroke: "#000",
  15517. fill: null
  15518. },
  15519. buildPath: function(t, e) {
  15520. Gn(t, e, !1)
  15521. }
  15522. })
  15523. , pb = On.extend({
  15524. type: "rect",
  15525. shape: {
  15526. r: 0,
  15527. x: 0,
  15528. y: 0,
  15529. width: 0,
  15530. height: 0
  15531. },
  15532. buildPath: function(t, e) {
  15533. var i = e.x
  15534. , n = e.y
  15535. , o = e.width
  15536. , a = e.height;
  15537. e.r ? Te(t, e) : t.rect(i, n, o, a),
  15538. t.closePath()
  15539. }
  15540. })
  15541. , mb = On.extend({
  15542. type: "line",
  15543. shape: {
  15544. x1: 0,
  15545. y1: 0,
  15546. x2: 0,
  15547. y2: 0,
  15548. percent: 1
  15549. },
  15550. style: {
  15551. stroke: "#000",
  15552. fill: null
  15553. },
  15554. buildPath: function(t, e) {
  15555. var i = e.x1
  15556. , n = e.y1
  15557. , o = e.x2
  15558. , a = e.y2
  15559. , r = e.percent;
  15560. 0 !== r && (t.moveTo(i, n),
  15561. r < 1 && (o = i * (1 - r) + o * r,
  15562. a = n * (1 - r) + a * r),
  15563. t.lineTo(o, a))
  15564. },
  15565. pointAt: function(t) {
  15566. var e = this.shape;
  15567. return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t]
  15568. }
  15569. })
  15570. , vb = []
  15571. , yb = On.extend({
  15572. type: "bezier-curve",
  15573. shape: {
  15574. x1: 0,
  15575. y1: 0,
  15576. x2: 0,
  15577. y2: 0,
  15578. cpx1: 0,
  15579. cpy1: 0,
  15580. percent: 1
  15581. },
  15582. style: {
  15583. stroke: "#000",
  15584. fill: null
  15585. },
  15586. buildPath: function(t, e) {
  15587. var i = e.x1
  15588. , n = e.y1
  15589. , o = e.x2
  15590. , a = e.y2
  15591. , r = e.cpx1
  15592. , s = e.cpy1
  15593. , l = e.cpx2
  15594. , h = e.cpy2
  15595. , u = e.percent;
  15596. 0 !== u && (t.moveTo(i, n),
  15597. null == l || null == h ? (u < 1 && (dn(i, r, o, u, vb),
  15598. r = vb[1],
  15599. o = vb[2],
  15600. dn(n, s, a, u, vb),
  15601. s = vb[1],
  15602. a = vb[2]),
  15603. t.quadraticCurveTo(r, s, o, a)) : (u < 1 && (rn(i, r, l, o, u, vb),
  15604. r = vb[1],
  15605. l = vb[2],
  15606. o = vb[3],
  15607. rn(n, s, h, a, u, vb),
  15608. s = vb[1],
  15609. h = vb[2],
  15610. a = vb[3]),
  15611. t.bezierCurveTo(r, s, l, h, o, a)))
  15612. },
  15613. pointAt: function(t) {
  15614. return Wn(this.shape, t, !1)
  15615. },
  15616. tangentAt: function(t) {
  15617. var e = Wn(this.shape, t, !0);
  15618. return U(e, e)
  15619. }
  15620. })
  15621. , xb = On.extend({
  15622. type: "arc",
  15623. shape: {
  15624. cx: 0,
  15625. cy: 0,
  15626. r: 0,
  15627. startAngle: 0,
  15628. endAngle: 2 * Math.PI,
  15629. clockwise: !0
  15630. },
  15631. style: {
  15632. stroke: "#000",
  15633. fill: null
  15634. },
  15635. buildPath: function(t, e) {
  15636. var i = e.cx
  15637. , n = e.cy
  15638. , o = Math.max(e.r, 0)
  15639. , a = e.startAngle
  15640. , r = e.endAngle
  15641. , s = e.clockwise
  15642. , l = Math.cos(a)
  15643. , h = Math.sin(a);
  15644. t.moveTo(l * o + i, h * o + n),
  15645. t.arc(i, n, o, a, r, !s)
  15646. }
  15647. })
  15648. , _b = On.extend({
  15649. type: "compound",
  15650. shape: {
  15651. paths: null
  15652. },
  15653. _updatePathDirty: function() {
  15654. for (var t = this.__dirtyPath, e = this.shape.paths, i = 0; i < e.length; i++)
  15655. t = t || e[i].__dirtyPath;
  15656. this.__dirtyPath = t,
  15657. this.__dirty = this.__dirty || t
  15658. },
  15659. beforeBrush: function() {
  15660. this._updatePathDirty();
  15661. for (var t = this.shape.paths || [], e = this.getGlobalScale(), i = 0; i < t.length; i++)
  15662. t[i].path || t[i].createPathProxy(),
  15663. t[i].path.setScale(e[0], e[1])
  15664. },
  15665. buildPath: function(t, e) {
  15666. for (var i = e.paths || [], n = 0; n < i.length; n++)
  15667. i[n].buildPath(t, i[n].shape, !0)
  15668. },
  15669. afterBrush: function() {
  15670. for (var t = this.shape.paths || [], e = 0; e < t.length; e++)
  15671. t[e].__dirtyPath = !1
  15672. },
  15673. getBoundingRect: function() {
  15674. return this._updatePathDirty(),
  15675. On.prototype.getBoundingRect.call(this)
  15676. }
  15677. })
  15678. , bb = function(t) {
  15679. this.colorStops = t || []
  15680. };
  15681. bb.prototype = {
  15682. constructor: bb,
  15683. addColorStop: function(t, e) {
  15684. this.colorStops.push({
  15685. offset: t,
  15686. color: e
  15687. })
  15688. }
  15689. };
  15690. var wb = function(t, e, i, n, o, a) {
  15691. this.x = null == t ? 0 : t,
  15692. this.y = null == e ? 0 : e,
  15693. this.x2 = null == i ? 1 : i,
  15694. this.y2 = null == n ? 0 : n,
  15695. this.type = "linear",
  15696. this.global = a || !1,
  15697. bb.call(this, o)
  15698. };
  15699. wb.prototype = {
  15700. constructor: wb
  15701. },
  15702. l(wb, bb);
  15703. var Sb = function(t, e, i, n, o) {
  15704. this.x = null == t ? .5 : t,
  15705. this.y = null == e ? .5 : e,
  15706. this.r = null == i ? .5 : i,
  15707. this.type = "radial",
  15708. this.global = o || !1,
  15709. bb.call(this, n)
  15710. };
  15711. Sb.prototype = {
  15712. constructor: Sb
  15713. },
  15714. l(Sb, bb);
  15715. var Mb = Math.round
  15716. , Ib = Math.max
  15717. , Tb = Math.min
  15718. , Ab = {}
  15719. , Cb = function(t, e) {
  15720. for (var i = [], n = t.length, o = 0; o < n; o++) {
  15721. var a = t[o];
  15722. a.path || a.createPathProxy(),
  15723. a.__dirtyPath && a.buildPath(a.path, a.shape, !0),
  15724. i.push(a.path)
  15725. }
  15726. var r = new On(e);
  15727. return r.createPathProxy(),
  15728. r.buildPath = function(t) {
  15729. t.appendPath(i);
  15730. var e = t.getContext();
  15731. e && t.rebuildPath(e)
  15732. }
  15733. ,
  15734. r
  15735. }
  15736. , Db = (Object.freeze || Object)({
  15737. extendShape: Hn,
  15738. extendPath: function(t, e) {
  15739. return Vn(t, e)
  15740. },
  15741. makePath: Fn,
  15742. makeImage: Zn,
  15743. mergePath: Cb,
  15744. resizePath: jn,
  15745. subPixelOptimizeLine: Xn,
  15746. subPixelOptimizeRect: qn,
  15747. subPixelOptimize: Yn,
  15748. setHoverStyle: lo,
  15749. setLabelStyle: ho,
  15750. setTextStyle: uo,
  15751. setText: function(t, e, i) {
  15752. var n, o = {
  15753. isRectText: !0
  15754. };
  15755. !1 === i ? n = !0 : o.autoColor = i,
  15756. co(t, e, o, n),
  15757. t.host && t.host.dirty && t.host.dirty(!1)
  15758. },
  15759. getFont: yo,
  15760. updateProps: _o,
  15761. initProps: bo,
  15762. getTransform: wo,
  15763. applyTransform: So,
  15764. transformDirection: Mo,
  15765. groupTransition: Io,
  15766. clipPointsByRect: To,
  15767. clipRectByRect: function(t, e) {
  15768. var i = Ib(t.x, e.x)
  15769. , n = Tb(t.x + t.width, e.x + e.width)
  15770. , o = Ib(t.y, e.y)
  15771. , a = Tb(t.y + t.height, e.y + e.height);
  15772. if (n >= i && a >= o)
  15773. return {
  15774. x: i,
  15775. y: o,
  15776. width: n - i,
  15777. height: a - o
  15778. }
  15779. },
  15780. createIcon: Ao,
  15781. Group: $y,
  15782. Image: je,
  15783. Text: ab,
  15784. Circle: rb,
  15785. Sector: hb,
  15786. Ring: ub,
  15787. Polygon: fb,
  15788. Polyline: gb,
  15789. Rect: pb,
  15790. Line: mb,
  15791. BezierCurve: yb,
  15792. Arc: xb,
  15793. CompoundPath: _b,
  15794. LinearGradient: wb,
  15795. RadialGradient: Sb,
  15796. BoundingRect: jt
  15797. })
  15798. , Lb = ["textStyle", "color"]
  15799. , kb = {
  15800. getTextColor: function(t) {
  15801. var e = this.ecModel;
  15802. return this.getShallow("color") || (!t && e ? e.get(Lb) : null)
  15803. },
  15804. getFont: function() {
  15805. return yo({
  15806. fontStyle: this.getShallow("fontStyle"),
  15807. fontWeight: this.getShallow("fontWeight"),
  15808. fontSize: this.getShallow("fontSize"),
  15809. fontFamily: this.getShallow("fontFamily")
  15810. }, this.ecModel)
  15811. },
  15812. getTextRect: function(t) {
  15813. return ce(t, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("rich"), this.getShallow("truncateText"))
  15814. }
  15815. }
  15816. , Pb = e_([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]])
  15817. , Ob = {
  15818. getItemStyle: function(t, e) {
  15819. var i = Pb(this, t, e)
  15820. , n = this.getBorderLineDash();
  15821. return n && (i.lineDash = n),
  15822. i
  15823. },
  15824. getBorderLineDash: function() {
  15825. var t = this.get("borderType");
  15826. return "solid" === t || null == t ? null : "dashed" === t ? [5, 5] : [1, 1]
  15827. }
  15828. }
  15829. , zb = h;
  15830. Co.prototype = {
  15831. constructor: Co,
  15832. init: null,
  15833. mergeOption: function(t) {
  15834. i(this.option, t, !0)
  15835. },
  15836. get: function(t, e) {
  15837. return null == t ? this.option : Do(this.option, this.parsePath(t), !e && Lo(this, t))
  15838. },
  15839. getShallow: function(t, e) {
  15840. var i = this.option
  15841. , n = null == i ? i : i[t]
  15842. , o = !e && Lo(this, t);
  15843. return null == n && o && (n = o.getShallow(t)),
  15844. n
  15845. },
  15846. getModel: function(t, e) {
  15847. var i, n = null == t ? this.option : Do(this.option, t = this.parsePath(t));
  15848. return e = e || (i = Lo(this, t)) && i.getModel(t),
  15849. new Co(n,e,this.ecModel)
  15850. },
  15851. isEmpty: function() {
  15852. return null == this.option
  15853. },
  15854. restoreData: function() {},
  15855. clone: function() {
  15856. return new (0,
  15857. this.constructor)(e(this.option))
  15858. },
  15859. setReadOnly: function(t) {},
  15860. parsePath: function(t) {
  15861. return "string" == typeof t && (t = t.split(".")),
  15862. t
  15863. },
  15864. customizeGetParent: function(t) {
  15865. Zi(this, "getParent", t)
  15866. },
  15867. isAnimationEnabled: function() {
  15868. if (!Yv.node) {
  15869. if (null != this.option.animation)
  15870. return !!this.option.animation;
  15871. if (this.parentModel)
  15872. return this.parentModel.isAnimationEnabled()
  15873. }
  15874. }
  15875. },
  15876. Yi(Co),
  15877. zb(Co, n_),
  15878. zb(Co, a_),
  15879. zb(Co, kb),
  15880. zb(Co, Ob);
  15881. var Nb = c
  15882. , Eb = _
  15883. , Rb = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"]
  15884. , Vb = {
  15885. getDataParams: function(t, e) {
  15886. var i = this.getData(e)
  15887. , n = this.getRawValue(t, e)
  15888. , o = i.getRawIndex(t)
  15889. , a = i.getName(t, !0)
  15890. , r = i.getRawDataItem(t)
  15891. , s = i.getItemVisual(t, "color");
  15892. return {
  15893. componentType: this.mainType,
  15894. componentSubType: this.subType,
  15895. seriesType: "series" === this.mainType ? this.subType : null,
  15896. seriesIndex: this.seriesIndex,
  15897. seriesId: this.id,
  15898. seriesName: this.name,
  15899. name: a,
  15900. dataIndex: o,
  15901. data: r,
  15902. dataType: e,
  15903. value: n,
  15904. color: s,
  15905. marker: Wi(s),
  15906. $vars: ["seriesName", "name", "value"]
  15907. }
  15908. },
  15909. getFormattedLabel: function(t, e, i, n, o) {
  15910. e = e || "normal";
  15911. var a = this.getData(i).getItemModel(t)
  15912. , r = this.getDataParams(t, i);
  15913. null != n && r.value instanceof Array && (r.value = r.value[n]);
  15914. var s = a.get([o || "label", e, "formatter"]);
  15915. return "function" == typeof s ? (r.status = e,
  15916. s(r)) : "string" == typeof s ? Bi(s, r) : void 0
  15917. },
  15918. getRawValue: function(t, e) {
  15919. var i = this.getData(e).getRawDataItem(t);
  15920. if (null != i)
  15921. return !Eb(i) || i instanceof Array ? i : i.value
  15922. },
  15923. formatTooltip: z
  15924. }
  15925. , Bb = function() {
  15926. var t = 0;
  15927. return function() {
  15928. var e = "\0__ec_prop_getter_" + t++;
  15929. return function(t) {
  15930. return t[e] || (t[e] = {})
  15931. }
  15932. }
  15933. }()
  15934. , Gb = 0
  15935. , Wb = "_"
  15936. , Hb = c
  15937. , Fb = ["left", "right", "top", "bottom", "width", "height"]
  15938. , Zb = [["width", "left", "right"], ["height", "top", "bottom"]]
  15939. , Ub = Xo
  15940. , jb = (m(Xo, "vertical"),
  15941. m(Xo, "horizontal"),
  15942. {
  15943. getBoxLayoutParams: function() {
  15944. return {
  15945. left: this.get("left"),
  15946. top: this.get("top"),
  15947. right: this.get("right"),
  15948. bottom: this.get("bottom"),
  15949. width: this.get("width"),
  15950. height: this.get("height")
  15951. }
  15952. }
  15953. })
  15954. , Xb = Array.prototype.push
  15955. , qb = Co.extend({
  15956. type: "component",
  15957. id: "",
  15958. name: "",
  15959. mainType: "",
  15960. subType: "",
  15961. componentIndex: 0,
  15962. defaultOption: null,
  15963. ecModel: null,
  15964. dependentModels: [],
  15965. uid: null,
  15966. layoutMode: null,
  15967. $constructor: function(t, e, i, n) {
  15968. Co.call(this, t, e, i, n),
  15969. this.uid = jo("componentModel")
  15970. },
  15971. init: function(t, e, i, n) {
  15972. this.mergeDefaultAndTheme(t, i)
  15973. },
  15974. mergeDefaultAndTheme: function(t, e) {
  15975. var n = this.layoutMode
  15976. , o = n ? Qo(t) : {};
  15977. i(t, e.getTheme().get(this.mainType)),
  15978. i(t, this.getDefaultOption()),
  15979. n && Jo(t, o, n)
  15980. },
  15981. mergeOption: function(t, e) {
  15982. i(this.option, t, !0);
  15983. var n = this.layoutMode;
  15984. n && Jo(this.option, t, n)
  15985. },
  15986. optionUpdated: function(t, e) {},
  15987. getDefaultOption: function() {
  15988. if (!ji(this, "__defaultOption")) {
  15989. for (var t = [], e = this.constructor; e; ) {
  15990. var n = e.prototype.defaultOption;
  15991. n && t.push(n),
  15992. e = e.superClass
  15993. }
  15994. for (var o = {}, a = t.length - 1; a >= 0; a--)
  15995. o = i(o, t[a], !0);
  15996. Zi(this, "__defaultOption", o)
  15997. }
  15998. return Ui(this, "__defaultOption")
  15999. },
  16000. getReferringComponents: function(t) {
  16001. return this.ecModel.queryComponents({
  16002. mainType: t,
  16003. index: this.get(t + "Index", !0),
  16004. id: this.get(t + "Id", !0)
  16005. })
  16006. }
  16007. });
  16008. Ji(qb, {
  16009. registerWhenExtend: !0
  16010. }),
  16011. function(t) {
  16012. var e = {};
  16013. t.registerSubTypeDefaulter = function(t, i) {
  16014. t = Xi(t),
  16015. e[t.main] = i
  16016. }
  16017. ,
  16018. t.determineSubType = function(i, n) {
  16019. var o = n.type;
  16020. if (!o) {
  16021. var a = Xi(i).main;
  16022. t.hasSubTypes(i) && e[a] && (o = e[a](n))
  16023. }
  16024. return o
  16025. }
  16026. }(qb),
  16027. function(t, e) {
  16028. function i(t) {
  16029. var i = {}
  16030. , a = [];
  16031. return c(t, function(r) {
  16032. var l = n(i, r)
  16033. , h = o(l.originalDeps = e(r), t);
  16034. l.entryCount = h.length,
  16035. 0 === l.entryCount && a.push(r),
  16036. c(h, function(t) {
  16037. s(l.predecessor, t) < 0 && l.predecessor.push(t);
  16038. var e = n(i, t);
  16039. s(e.successor, t) < 0 && e.successor.push(r)
  16040. })
  16041. }),
  16042. {
  16043. graph: i,
  16044. noEntryList: a
  16045. }
  16046. }
  16047. function n(t, e) {
  16048. return t[e] || (t[e] = {
  16049. predecessor: [],
  16050. successor: []
  16051. }),
  16052. t[e]
  16053. }
  16054. function o(t, e) {
  16055. var i = [];
  16056. return c(t, function(t) {
  16057. s(e, t) >= 0 && i.push(t)
  16058. }),
  16059. i
  16060. }
  16061. t.topologicalTravel = function(t, e, n, o) {
  16062. function a(t) {
  16063. s[t].entryCount--,
  16064. 0 === s[t].entryCount && l.push(t)
  16065. }
  16066. if (t.length) {
  16067. var r = i(e)
  16068. , s = r.graph
  16069. , l = r.noEntryList
  16070. , h = {};
  16071. for (c(t, function(t) {
  16072. h[t] = !0
  16073. }); l.length; ) {
  16074. var u = l.pop()
  16075. , d = s[u]
  16076. , f = !!h[u];
  16077. f && (n.call(o, u, d.originalDeps.slice()),
  16078. delete h[u]),
  16079. c(d.successor, f ? function(t) {
  16080. h[t] = !0,
  16081. a(t)
  16082. }
  16083. : a)
  16084. }
  16085. c(h, function() {
  16086. throw new Error("Circle dependency may exists")
  16087. })
  16088. }
  16089. }
  16090. }(qb, function(t) {
  16091. var e = [];
  16092. return c(qb.getClassesByMainType(t), function(t) {
  16093. Xb.apply(e, t.prototype.dependencies || [])
  16094. }),
  16095. d(e, function(t) {
  16096. return Xi(t).main
  16097. })
  16098. }),
  16099. h(qb, jb);
  16100. var Yb = "";
  16101. "undefined" != typeof navigator && (Yb = navigator.platform || "");
  16102. var $b = {
  16103. color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"],
  16104. textStyle: {
  16105. fontFamily: Yb.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  16106. fontSize: 12,
  16107. fontStyle: "normal",
  16108. fontWeight: "normal"
  16109. },
  16110. blendMode: null,
  16111. animation: "auto",
  16112. animationDuration: 1e3,
  16113. animationDurationUpdate: 300,
  16114. animationEasing: "exponentialOut",
  16115. animationEasingUpdate: "cubicOut",
  16116. animationThreshold: 2e3,
  16117. progressiveThreshold: 3e3,
  16118. progressive: 400,
  16119. hoverLayerThreshold: 3e3,
  16120. useUTC: !1
  16121. }
  16122. , Kb = {
  16123. clearColorPalette: function() {
  16124. Zi(this, "colorIdx", 0),
  16125. Zi(this, "colorNameMap", {})
  16126. },
  16127. getColorFromPalette: function(t, e) {
  16128. var i = Ui(e = e || this, "colorIdx") || 0
  16129. , n = Ui(e, "colorNameMap") || Zi(e, "colorNameMap", {});
  16130. if (n.hasOwnProperty(t))
  16131. return n[t];
  16132. var o = this.get("color", !0) || [];
  16133. if (o.length) {
  16134. var a = o[i];
  16135. return t && (n[t] = a),
  16136. Zi(e, "colorIdx", (i + 1) % o.length),
  16137. a
  16138. }
  16139. }
  16140. }
  16141. , Jb = c
  16142. , Qb = g
  16143. , tw = d
  16144. , ew = v
  16145. , iw = s
  16146. , nw = _
  16147. , ow = "\0_ec_inner"
  16148. , aw = Co.extend({
  16149. constructor: aw,
  16150. init: function(t, e, i, n) {
  16151. i = i || {},
  16152. this.option = null,
  16153. this._theme = new Co(i),
  16154. this._optionManager = n
  16155. },
  16156. setOption: function(t, e) {
  16157. D(!(ow in t), "please use chart.getOption()"),
  16158. this._optionManager.setOption(t, e),
  16159. this.resetOption(null)
  16160. },
  16161. resetOption: function(t) {
  16162. var e = !1
  16163. , i = this._optionManager;
  16164. if (!t || "recreate" === t) {
  16165. var n = i.mountOption("recreate" === t);
  16166. this.option && "recreate" !== t ? (this.restoreData(),
  16167. this.mergeOption(n)) : ia.call(this, n),
  16168. e = !0
  16169. }
  16170. if ("timeline" !== t && "media" !== t || this.restoreData(),
  16171. !t || "recreate" === t || "timeline" === t) {
  16172. var o = i.getTimelineOption(this);
  16173. o && (this.mergeOption(o),
  16174. e = !0)
  16175. }
  16176. if (!t || "recreate" === t || "media" === t) {
  16177. var a = i.getMediaOption(this, this._api);
  16178. a.length && Jb(a, function(t) {
  16179. this.mergeOption(t, e = !0)
  16180. }, this)
  16181. }
  16182. return e
  16183. },
  16184. mergeOption: function(t) {
  16185. var n = this.option
  16186. , a = this._componentsMap
  16187. , r = [];
  16188. Jb(t, function(t, o) {
  16189. null != t && (qb.hasClass(o) ? r.push(o) : n[o] = null == n[o] ? e(t) : i(n[o], t, !0))
  16190. }),
  16191. qb.topologicalTravel(r, qb.getAllClassMainTypes(), function(e, i) {
  16192. var r = ko(t[e])
  16193. , s = Eo(a.get(e), r);
  16194. Ro(s),
  16195. Jb(s, function(t, i) {
  16196. var n = t.option;
  16197. nw(n) && (t.keyInfo.mainType = e,
  16198. t.keyInfo.subType = oa(e, n, t.exist))
  16199. });
  16200. var l = na(a, i);
  16201. n[e] = [],
  16202. a.set(e, []),
  16203. Jb(s, function(t, i) {
  16204. var r = t.exist
  16205. , s = t.option;
  16206. if (D(nw(s) || r, "Empty component definition"),
  16207. s) {
  16208. var h = qb.getClass(e, t.keyInfo.subType, !0);
  16209. if (r && r instanceof h)
  16210. r.name = t.keyInfo.name,
  16211. r.mergeOption(s, this),
  16212. r.optionUpdated(s, !1);
  16213. else {
  16214. var u = o({
  16215. dependentModels: l,
  16216. componentIndex: i
  16217. }, t.keyInfo);
  16218. o(r = new h(s,this,this,u), u),
  16219. r.init(s, this, this, u),
  16220. r.optionUpdated(null, !0)
  16221. }
  16222. } else
  16223. r.mergeOption({}, this),
  16224. r.optionUpdated({}, !1);
  16225. a.get(e)[i] = r,
  16226. n[e][i] = r.option
  16227. }, this),
  16228. "series" === e && (this._seriesIndices = aa(a.get("series")))
  16229. }, this),
  16230. this._seriesIndices = this._seriesIndices || []
  16231. },
  16232. getOption: function() {
  16233. var t = e(this.option);
  16234. return Jb(t, function(e, i) {
  16235. if (qb.hasClass(i)) {
  16236. for (var n = (e = ko(e)).length - 1; n >= 0; n--)
  16237. Vo(e[n]) && e.splice(n, 1);
  16238. t[i] = e
  16239. }
  16240. }),
  16241. delete t[ow],
  16242. t
  16243. },
  16244. getTheme: function() {
  16245. return this._theme
  16246. },
  16247. getComponent: function(t, e) {
  16248. var i = this._componentsMap.get(t);
  16249. if (i)
  16250. return i[e || 0]
  16251. },
  16252. queryComponents: function(t) {
  16253. var e = t.mainType;
  16254. if (!e)
  16255. return [];
  16256. var i = t.index
  16257. , n = t.id
  16258. , o = t.name
  16259. , a = this._componentsMap.get(e);
  16260. if (!a || !a.length)
  16261. return [];
  16262. var r;
  16263. if (null != i)
  16264. ew(i) || (i = [i]),
  16265. r = Qb(tw(i, function(t) {
  16266. return a[t]
  16267. }), function(t) {
  16268. return !!t
  16269. });
  16270. else if (null != n) {
  16271. var s = ew(n);
  16272. r = Qb(a, function(t) {
  16273. return s && iw(n, t.id) >= 0 || !s && t.id === n
  16274. })
  16275. } else if (null != o) {
  16276. var l = ew(o);
  16277. r = Qb(a, function(t) {
  16278. return l && iw(o, t.name) >= 0 || !l && t.name === o
  16279. })
  16280. } else
  16281. r = a.slice();
  16282. return ra(r, t)
  16283. },
  16284. findComponents: function(t) {
  16285. var e = t.query
  16286. , i = t.mainType
  16287. , n = function(t) {
  16288. var e = i + "Index"
  16289. , n = i + "Id"
  16290. , o = i + "Name";
  16291. return !t || null == t[e] && null == t[n] && null == t[o] ? null : {
  16292. mainType: i,
  16293. index: t[e],
  16294. id: t[n],
  16295. name: t[o]
  16296. }
  16297. }(e);
  16298. return function(e) {
  16299. return t.filter ? Qb(e, t.filter) : e
  16300. }(ra(n ? this.queryComponents(n) : this._componentsMap.get(i), t))
  16301. },
  16302. eachComponent: function(t, e, i) {
  16303. var n = this._componentsMap;
  16304. if ("function" == typeof t)
  16305. i = e,
  16306. e = t,
  16307. n.each(function(t, n) {
  16308. Jb(t, function(t, o) {
  16309. e.call(i, n, t, o)
  16310. })
  16311. });
  16312. else if (x(t))
  16313. Jb(n.get(t), e, i);
  16314. else if (nw(t)) {
  16315. var o = this.findComponents(t);
  16316. Jb(o, e, i)
  16317. }
  16318. },
  16319. getSeriesByName: function(t) {
  16320. var e = this._componentsMap.get("series");
  16321. return Qb(e, function(e) {
  16322. return e.name === t
  16323. })
  16324. },
  16325. getSeriesByIndex: function(t) {
  16326. return this._componentsMap.get("series")[t]
  16327. },
  16328. getSeriesByType: function(t) {
  16329. var e = this._componentsMap.get("series");
  16330. return Qb(e, function(e) {
  16331. return e.subType === t
  16332. })
  16333. },
  16334. getSeries: function() {
  16335. return this._componentsMap.get("series").slice()
  16336. },
  16337. eachSeries: function(t, e) {
  16338. sa(),
  16339. Jb(this._seriesIndices, function(i) {
  16340. var n = this._componentsMap.get("series")[i];
  16341. t.call(e, n, i)
  16342. }, this)
  16343. },
  16344. eachRawSeries: function(t, e) {
  16345. Jb(this._componentsMap.get("series"), t, e)
  16346. },
  16347. eachSeriesByType: function(t, e, i) {
  16348. sa(),
  16349. Jb(this._seriesIndices, function(n) {
  16350. var o = this._componentsMap.get("series")[n];
  16351. o.subType === t && e.call(i, o, n)
  16352. }, this)
  16353. },
  16354. eachRawSeriesByType: function(t, e, i) {
  16355. return Jb(this.getSeriesByType(t), e, i)
  16356. },
  16357. isSeriesFiltered: function(t) {
  16358. return sa(),
  16359. s(this._seriesIndices, t.componentIndex) < 0
  16360. },
  16361. getCurrentSeriesIndices: function() {
  16362. return (this._seriesIndices || []).slice()
  16363. },
  16364. filterSeries: function(t, e) {
  16365. sa();
  16366. var i = Qb(this._componentsMap.get("series"), t, e);
  16367. this._seriesIndices = aa(i)
  16368. },
  16369. restoreData: function() {
  16370. var t = this._componentsMap;
  16371. this._seriesIndices = aa(t.get("series"));
  16372. var e = [];
  16373. t.each(function(t, i) {
  16374. e.push(i)
  16375. }),
  16376. qb.topologicalTravel(e, qb.getAllClassMainTypes(), function(e, i) {
  16377. Jb(t.get(e), function(t) {
  16378. t.restoreData()
  16379. })
  16380. })
  16381. }
  16382. });
  16383. h(aw, Kb);
  16384. var rw = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel", "getViewOfSeriesModel"]
  16385. , sw = {};
  16386. ha.prototype = {
  16387. constructor: ha,
  16388. create: function(t, e) {
  16389. var i = [];
  16390. c(sw, function(n, o) {
  16391. var a = n.create(t, e);
  16392. i = i.concat(a || [])
  16393. }),
  16394. this._coordinateSystems = i
  16395. },
  16396. update: function(t, e) {
  16397. c(this._coordinateSystems, function(i) {
  16398. i.update && i.update(t, e)
  16399. })
  16400. },
  16401. getCoordinateSystems: function() {
  16402. return this._coordinateSystems.slice()
  16403. }
  16404. },
  16405. ha.register = function(t, e) {
  16406. sw[t] = e
  16407. }
  16408. ,
  16409. ha.get = function(t) {
  16410. return sw[t]
  16411. }
  16412. ;
  16413. var lw = c
  16414. , hw = e
  16415. , uw = d
  16416. , cw = i
  16417. , dw = /^(min|max)?(.+)$/;
  16418. ua.prototype = {
  16419. constructor: ua,
  16420. setOption: function(t, e) {
  16421. t = hw(t, !0);
  16422. var i = this._optionBackup
  16423. , n = ca.call(this, t, e, !i);
  16424. this._newBaseOption = n.baseOption,
  16425. i ? (pa(i.baseOption, n.baseOption),
  16426. n.timelineOptions.length && (i.timelineOptions = n.timelineOptions),
  16427. n.mediaList.length && (i.mediaList = n.mediaList),
  16428. n.mediaDefault && (i.mediaDefault = n.mediaDefault)) : this._optionBackup = n
  16429. },
  16430. mountOption: function(t) {
  16431. var e = this._optionBackup;
  16432. return this._timelineOptions = uw(e.timelineOptions, hw),
  16433. this._mediaList = uw(e.mediaList, hw),
  16434. this._mediaDefault = hw(e.mediaDefault),
  16435. this._currentMediaIndices = [],
  16436. hw(t ? e.baseOption : this._newBaseOption)
  16437. },
  16438. getTimelineOption: function(t) {
  16439. var e, i = this._timelineOptions;
  16440. if (i.length) {
  16441. var n = t.getComponent("timeline");
  16442. n && (e = hw(i[n.getCurrentIndex()], !0))
  16443. }
  16444. return e
  16445. },
  16446. getMediaOption: function(t) {
  16447. var e = this._api.getWidth()
  16448. , i = this._api.getHeight()
  16449. , n = this._mediaList
  16450. , o = this._mediaDefault
  16451. , a = []
  16452. , r = [];
  16453. if (!n.length && !o)
  16454. return r;
  16455. for (var s = 0, l = n.length; s < l; s++)
  16456. da(n[s].query, e, i) && a.push(s);
  16457. return !a.length && o && (a = [-1]),
  16458. a.length && !ga(a, this._currentMediaIndices) && (r = uw(a, function(t) {
  16459. return hw(-1 === t ? o.option : n[t].option)
  16460. })),
  16461. this._currentMediaIndices = a,
  16462. r
  16463. }
  16464. };
  16465. var fw = c
  16466. , gw = _
  16467. , pw = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"]
  16468. , mw = function(t, e) {
  16469. fw(_a(t.series), function(t) {
  16470. gw(t) && xa(t)
  16471. });
  16472. var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  16473. e && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"),
  16474. fw(i, function(e) {
  16475. fw(_a(t[e]), function(t) {
  16476. t && (va(t, "axisLabel"),
  16477. va(t.axisPointer, "label"))
  16478. })
  16479. }),
  16480. fw(_a(t.parallel), function(t) {
  16481. var e = t && t.parallelAxisDefault;
  16482. va(e, "axisLabel"),
  16483. va(e && e.axisPointer, "label")
  16484. }),
  16485. fw(_a(t.calendar), function(t) {
  16486. va(t, "dayLabel"),
  16487. va(t, "monthLabel"),
  16488. va(t, "yearLabel")
  16489. }),
  16490. fw(_a(t.radar), function(t) {
  16491. va(t, "name")
  16492. }),
  16493. fw(_a(t.geo), function(t) {
  16494. gw(t) && (ya(t.label),
  16495. fw(_a(t.regions), function(t) {
  16496. ya(t.label)
  16497. }))
  16498. }),
  16499. ya(ba(t.timeline).label),
  16500. va(ba(t.axisPointer), "label"),
  16501. va(ba(t.tooltip).axisPointer, "label")
  16502. }
  16503. , vw = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]]
  16504. , yw = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"]
  16505. , xw = ["bar", "boxplot", "candlestick", "chord", "effectScatter", "funnel", "gauge", "lines", "graph", "heatmap", "line", "map", "parallel", "pie", "radar", "sankey", "scatter", "treemap"]
  16506. , _w = function(t, e) {
  16507. mw(t, e),
  16508. t.series = ko(t.series),
  16509. c(t.series, function(t) {
  16510. if (_(t)) {
  16511. var e = t.type;
  16512. if ("pie" !== e && "gauge" !== e || null != t.clockWise && (t.clockwise = t.clockWise),
  16513. "gauge" === e) {
  16514. var i = wa(t, "pointer.color");
  16515. null != i && Sa(t, "itemStyle.normal.color", i)
  16516. }
  16517. for (var n = 0; n < xw.length; n++)
  16518. if (xw[n] === t.type) {
  16519. Ma(t);
  16520. break
  16521. }
  16522. }
  16523. }),
  16524. t.dataRange && (t.visualMap = t.dataRange),
  16525. c(yw, function(e) {
  16526. var i = t[e];
  16527. i && (v(i) || (i = [i]),
  16528. c(i, function(t) {
  16529. Ma(t)
  16530. }))
  16531. })
  16532. }
  16533. , bw = qb.extend({
  16534. type: "series.__base__",
  16535. seriesIndex: 0,
  16536. coordinateSystem: null,
  16537. defaultOption: null,
  16538. legendDataProvider: null,
  16539. visualColorAccessPath: "itemStyle.normal.color",
  16540. layoutMode: null,
  16541. init: function(t, e, i, n) {
  16542. this.seriesIndex = this.componentIndex,
  16543. this.mergeDefaultAndTheme(t, i);
  16544. var o = this.getInitialData(t, i);
  16545. Zi(this, "dataBeforeProcessed", o),
  16546. this.restoreData()
  16547. },
  16548. mergeDefaultAndTheme: function(t, e) {
  16549. var n = this.layoutMode
  16550. , o = n ? Qo(t) : {}
  16551. , a = this.subType;
  16552. qb.hasClass(a) && (a += "Series"),
  16553. i(t, e.getTheme().get(this.subType)),
  16554. i(t, this.getDefaultOption()),
  16555. Po(t.label, ["show"]),
  16556. this.fillDataTextStyle(t.data),
  16557. n && Jo(t, o, n)
  16558. },
  16559. mergeOption: function(t, e) {
  16560. t = i(this.option, t, !0),
  16561. this.fillDataTextStyle(t.data);
  16562. var n = this.layoutMode;
  16563. n && Jo(this.option, t, n);
  16564. var o = this.getInitialData(t, e);
  16565. o && (Zi(this, "data", o),
  16566. Zi(this, "dataBeforeProcessed", o.cloneShallow()))
  16567. },
  16568. fillDataTextStyle: function(t) {
  16569. if (t)
  16570. for (var e = ["show"], i = 0; i < t.length; i++)
  16571. t[i] && t[i].label && Po(t[i].label, e)
  16572. },
  16573. getInitialData: function() {},
  16574. getData: function(t) {
  16575. var e = Ui(this, "data");
  16576. return null == t ? e : e.getLinkedData(t)
  16577. },
  16578. setData: function(t) {
  16579. Zi(this, "data", t)
  16580. },
  16581. getRawData: function() {
  16582. return Ui(this, "dataBeforeProcessed")
  16583. },
  16584. coordDimToDataDim: function(t) {
  16585. return Fo(this.getData(), t)
  16586. },
  16587. dataDimToCoordDim: function(t) {
  16588. return Ho(this.getData(), t)
  16589. },
  16590. getBaseAxis: function() {
  16591. var t = this.coordinateSystem;
  16592. return t && t.getBaseAxis && t.getBaseAxis()
  16593. },
  16594. formatTooltip: function(t, e, i) {
  16595. var n = Ui(this, "data")
  16596. , o = this.getRawValue(t)
  16597. , a = v(o) ? function(i) {
  16598. function o(t, i) {
  16599. var o = n.getDimensionInfo(i);
  16600. if (o && !1 !== o.otherDims.tooltip) {
  16601. var s = o.type
  16602. , l = (a ? "- " + (o.tooltipName || o.name) + ": " : "") + ("ordinal" === s ? t + "" : "time" === s ? e ? "" : Hi("yyyy/MM/dd hh:mm:ss", t) : Ei(t));
  16603. l && r.push(Vi(l))
  16604. }
  16605. }
  16606. var a = f(i, function(t, e, i) {
  16607. var o = n.getDimensionInfo(i);
  16608. return t |= o && !1 !== o.tooltip && null != o.tooltipName
  16609. }, 0)
  16610. , r = []
  16611. , s = Zo(n, "tooltip");
  16612. return s.length ? c(s, function(e) {
  16613. o(n.get(e, t), e)
  16614. }) : c(i, o),
  16615. (a ? "<br/>" : "") + r.join(a ? "<br/>" : ", ")
  16616. }(o) : Vi(Ei(o))
  16617. , r = n.getName(t)
  16618. , s = n.getItemVisual(t, "color");
  16619. _(s) && s.colorStops && (s = (s.colorStops[0] || {}).color);
  16620. var l = Wi(s = s || "transparent")
  16621. , h = this.name;
  16622. return "\0-" === h && (h = ""),
  16623. h = h ? Vi(h) + (e ? ": " : "<br/>") : "",
  16624. e ? l + h + a : h + l + (r ? Vi(r) + ": " + a : a)
  16625. },
  16626. isAnimationEnabled: function() {
  16627. if (Yv.node)
  16628. return !1;
  16629. var t = this.getShallow("animation");
  16630. return t && this.getData().count() > this.getShallow("animationThreshold") && (t = !1),
  16631. t
  16632. },
  16633. restoreData: function() {
  16634. Zi(this, "data", Ui(this, "dataBeforeProcessed").cloneShallow())
  16635. },
  16636. getColorFromPalette: function(t, e) {
  16637. var i = this.ecModel
  16638. , n = Kb.getColorFromPalette.call(this, t, e);
  16639. return n || (n = i.getColorFromPalette(t, e)),
  16640. n
  16641. },
  16642. getAxisTooltipData: null,
  16643. getTooltipPosition: null
  16644. });
  16645. h(bw, Vb),
  16646. h(bw, Kb);
  16647. var ww = function() {
  16648. this.group = new $y,
  16649. this.uid = jo("viewComponent")
  16650. };
  16651. ww.prototype = {
  16652. constructor: ww,
  16653. init: function(t, e) {},
  16654. render: function(t, e, i, n) {},
  16655. dispose: function() {}
  16656. };
  16657. var Sw = ww.prototype;
  16658. Sw.updateView = Sw.updateLayout = Sw.updateVisual = function(t, e, i, n) {}
  16659. ,
  16660. Yi(ww),
  16661. Ji(ww, {
  16662. registerWhenExtend: !0
  16663. }),
  16664. Ia.prototype = {
  16665. type: "chart",
  16666. init: function(t, e) {},
  16667. render: function(t, e, i, n) {},
  16668. highlight: function(t, e, i, n) {
  16669. Aa(t.getData(), n, "emphasis")
  16670. },
  16671. downplay: function(t, e, i, n) {
  16672. Aa(t.getData(), n, "normal")
  16673. },
  16674. remove: function(t, e) {
  16675. this.group.removeAll()
  16676. },
  16677. dispose: function() {}
  16678. };
  16679. var Mw = Ia.prototype;
  16680. Mw.updateView = Mw.updateLayout = Mw.updateVisual = function(t, e, i, n) {
  16681. this.render(t, e, i, n)
  16682. }
  16683. ,
  16684. Yi(Ia),
  16685. Ji(Ia, {
  16686. registerWhenExtend: !0
  16687. });
  16688. var Iw = "\0__throttleOriginMethod"
  16689. , Tw = "\0__throttleRate"
  16690. , Aw = "\0__throttleType"
  16691. , Cw = Math.PI
  16692. , Dw = c
  16693. , Lw = qb.parseClassType
  16694. , kw = "3.8.0"
  16695. , Pw = {
  16696. zrender: "3.7.0"
  16697. }
  16698. , Ow = 1e3
  16699. , zw = 1e3
  16700. , Nw = 3e3
  16701. , Ew = {
  16702. PROCESSOR: {
  16703. FILTER: Ow,
  16704. STATISTIC: 5e3
  16705. },
  16706. VISUAL: {
  16707. LAYOUT: zw,
  16708. GLOBAL: 2e3,
  16709. CHART: Nw,
  16710. COMPONENT: 4e3,
  16711. BRUSH: 5e3
  16712. }
  16713. }
  16714. , Rw = "__flagInMainProcess"
  16715. , Vw = "__optionUpdated"
  16716. , Bw = /^[a-zA-Z0-9_]+$/;
  16717. Pa.prototype.on = ka("on"),
  16718. Pa.prototype.off = ka("off"),
  16719. Pa.prototype.one = ka("one"),
  16720. h(Pa, my);
  16721. var Gw = Oa.prototype;
  16722. Gw._onframe = function() {
  16723. if (this[Vw]) {
  16724. var t = this[Vw].silent;
  16725. this[Rw] = !0,
  16726. Ww.prepareAndUpdate.call(this),
  16727. this[Rw] = !1,
  16728. this[Vw] = !1,
  16729. Ra.call(this, t),
  16730. Va.call(this, t)
  16731. }
  16732. }
  16733. ,
  16734. Gw.getDom = function() {
  16735. return this._dom
  16736. }
  16737. ,
  16738. Gw.getZr = function() {
  16739. return this._zr
  16740. }
  16741. ,
  16742. Gw.setOption = function(t, e, i) {
  16743. var n;
  16744. if (_(e) && (i = e.lazyUpdate,
  16745. n = e.silent,
  16746. e = e.notMerge),
  16747. this[Rw] = !0,
  16748. !this._model || e) {
  16749. var o = new ua(this._api)
  16750. , a = this._theme;
  16751. (this._model = new aw(null,null,a,o)).init(null, null, a, o)
  16752. }
  16753. this._model.setOption(t, jw),
  16754. i ? (this[Vw] = {
  16755. silent: n
  16756. },
  16757. this[Rw] = !1) : (Ww.prepareAndUpdate.call(this),
  16758. this._zr.flush(),
  16759. this[Vw] = !1,
  16760. this[Rw] = !1,
  16761. Ra.call(this, n),
  16762. Va.call(this, n))
  16763. }
  16764. ,
  16765. Gw.setTheme = function() {
  16766. console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")
  16767. }
  16768. ,
  16769. Gw.getModel = function() {
  16770. return this._model
  16771. }
  16772. ,
  16773. Gw.getOption = function() {
  16774. return this._model && this._model.getOption()
  16775. }
  16776. ,
  16777. Gw.getWidth = function() {
  16778. return this._zr.getWidth()
  16779. }
  16780. ,
  16781. Gw.getHeight = function() {
  16782. return this._zr.getHeight()
  16783. }
  16784. ,
  16785. Gw.getDevicePixelRatio = function() {
  16786. return this._zr.painter.dpr || window.devicePixelRatio || 1
  16787. }
  16788. ,
  16789. Gw.getRenderedCanvas = function(t) {
  16790. if (Yv.canvasSupported) {
  16791. (t = t || {}).pixelRatio = t.pixelRatio || 1,
  16792. t.backgroundColor = t.backgroundColor || this._model.get("backgroundColor");
  16793. var e = this._zr;
  16794. return c(e.storage.getDisplayList(), function(t) {
  16795. t.stopAnimation(!0)
  16796. }),
  16797. e.painter.getRenderedCanvas(t)
  16798. }
  16799. }
  16800. ,
  16801. Gw.getSvgDataUrl = function() {
  16802. if (Yv.svgSupported) {
  16803. var t = this._zr;
  16804. return c(t.storage.getDisplayList(), function(t) {
  16805. t.stopAnimation(!0)
  16806. }),
  16807. t.painter.pathToSvg()
  16808. }
  16809. }
  16810. ,
  16811. Gw.getDataURL = function(t) {
  16812. var e = (t = t || {}).excludeComponents
  16813. , i = this._model
  16814. , n = []
  16815. , o = this;
  16816. Dw(e, function(t) {
  16817. i.eachComponent({
  16818. mainType: t
  16819. }, function(t) {
  16820. var e = o._componentsMap[t.__viewId];
  16821. e.group.ignore || (n.push(e),
  16822. e.group.ignore = !0)
  16823. })
  16824. });
  16825. var a = "svg" === this._zr.painter.getType() ? this.getSvgDataUrl() : this.getRenderedCanvas(t).toDataURL("image/" + (t && t.type || "png"));
  16826. return Dw(n, function(t) {
  16827. t.group.ignore = !1
  16828. }),
  16829. a
  16830. }
  16831. ,
  16832. Gw.getConnectedDataURL = function(t) {
  16833. if (Yv.canvasSupported) {
  16834. var i = this.group
  16835. , n = Math.min
  16836. , o = Math.max;
  16837. if (Jw[i]) {
  16838. var a = 1 / 0
  16839. , r = 1 / 0
  16840. , s = -1 / 0
  16841. , l = -1 / 0
  16842. , h = []
  16843. , u = t && t.pixelRatio || 1;
  16844. c(Kw, function(u, c) {
  16845. if (u.group === i) {
  16846. var d = u.getRenderedCanvas(e(t))
  16847. , f = u.getDom().getBoundingClientRect();
  16848. a = n(f.left, a),
  16849. r = n(f.top, r),
  16850. s = o(f.right, s),
  16851. l = o(f.bottom, l),
  16852. h.push({
  16853. dom: d,
  16854. left: f.left,
  16855. top: f.top
  16856. })
  16857. }
  16858. });
  16859. var d = (s *= u) - (a *= u)
  16860. , f = (l *= u) - (r *= u)
  16861. , g = ay();
  16862. g.width = d,
  16863. g.height = f;
  16864. var p = mi(g);
  16865. return Dw(h, function(t) {
  16866. var e = new je({
  16867. style: {
  16868. x: t.left * u - a,
  16869. y: t.top * u - r,
  16870. image: t.dom
  16871. }
  16872. });
  16873. p.add(e)
  16874. }),
  16875. p.refreshImmediately(),
  16876. g.toDataURL("image/" + (t && t.type || "png"))
  16877. }
  16878. return this.getDataURL(t)
  16879. }
  16880. }
  16881. ,
  16882. Gw.convertToPixel = m(za, "convertToPixel"),
  16883. Gw.convertFromPixel = m(za, "convertFromPixel"),
  16884. Gw.containPixel = function(t, e) {
  16885. var i;
  16886. return t = Wo(this._model, t),
  16887. c(t, function(t, n) {
  16888. n.indexOf("Models") >= 0 && c(t, function(t) {
  16889. var o = t.coordinateSystem;
  16890. if (o && o.containPoint)
  16891. i |= !!o.containPoint(e);
  16892. else if ("seriesModels" === n) {
  16893. var a = this._chartsMap[t.__viewId];
  16894. a && a.containPoint && (i |= a.containPoint(e, t))
  16895. }
  16896. }, this)
  16897. }, this),
  16898. !!i
  16899. }
  16900. ,
  16901. Gw.getVisual = function(t, e) {
  16902. var i = (t = Wo(this._model, t, {
  16903. defaultMainType: "series"
  16904. })).seriesModel
  16905. , n = i.getData()
  16906. , o = t.hasOwnProperty("dataIndexInside") ? t.dataIndexInside : t.hasOwnProperty("dataIndex") ? n.indexOfRawIndex(t.dataIndex) : null;
  16907. return null != o ? n.getItemVisual(o, e) : n.getVisual(e)
  16908. }
  16909. ,
  16910. Gw.getViewOfComponentModel = function(t) {
  16911. return this._componentsMap[t.__viewId]
  16912. }
  16913. ,
  16914. Gw.getViewOfSeriesModel = function(t) {
  16915. return this._chartsMap[t.__viewId]
  16916. }
  16917. ;
  16918. var Ww = {
  16919. update: function(t) {
  16920. var e = this._model
  16921. , i = this._api
  16922. , n = this._coordSysMgr
  16923. , o = this._zr;
  16924. if (e) {
  16925. e.restoreData(),
  16926. n.create(this._model, this._api),
  16927. Wa.call(this, e, i),
  16928. Ha.call(this, e),
  16929. n.update(e, i),
  16930. Za.call(this, e, t),
  16931. Ua.call(this, e, t);
  16932. var a = e.get("backgroundColor") || "transparent"
  16933. , r = o.painter;
  16934. if (r.isSingleCanvas && r.isSingleCanvas())
  16935. o.configLayer(0, {
  16936. clearColor: a
  16937. });
  16938. else {
  16939. if (!Yv.canvasSupported) {
  16940. var s = St(a);
  16941. a = Pt(s, "rgb"),
  16942. 0 === s[3] && (a = "transparent")
  16943. }
  16944. a.colorStops || a.image ? (o.configLayer(0, {
  16945. clearColor: a
  16946. }),
  16947. this.__hasGradientOrPatternBg = !0,
  16948. this._dom.style.background = "transparent") : (this.__hasGradientOrPatternBg && o.configLayer(0, {
  16949. clearColor: null
  16950. }),
  16951. this.__hasGradientOrPatternBg = !1,
  16952. this._dom.style.background = a)
  16953. }
  16954. Dw(Xw, function(t) {
  16955. t(e, i)
  16956. })
  16957. }
  16958. },
  16959. updateView: function(t) {
  16960. var e = this._model;
  16961. e && (e.eachSeries(function(t) {
  16962. t.getData().clearAllVisual()
  16963. }),
  16964. Za.call(this, e, t),
  16965. Ba.call(this, "updateView", e, t))
  16966. },
  16967. updateVisual: function(t) {
  16968. var e = this._model;
  16969. e && (e.eachSeries(function(t) {
  16970. t.getData().clearAllVisual()
  16971. }),
  16972. Za.call(this, e, t, !0),
  16973. Ba.call(this, "updateVisual", e, t))
  16974. },
  16975. updateLayout: function(t) {
  16976. var e = this._model;
  16977. e && (Fa.call(this, e, t),
  16978. Ba.call(this, "updateLayout", e, t))
  16979. },
  16980. prepareAndUpdate: function(t) {
  16981. var e = this._model;
  16982. Ga.call(this, "component", e),
  16983. Ga.call(this, "chart", e),
  16984. Ww.update.call(this, t)
  16985. }
  16986. };
  16987. Gw.resize = function(t) {
  16988. this[Rw] = !0,
  16989. this._zr.resize(t);
  16990. var e = this._model && this._model.resetOption("media");
  16991. Ww[e ? "prepareAndUpdate" : "update"].call(this),
  16992. this._loadingFX && this._loadingFX.resize(),
  16993. this[Rw] = !1;
  16994. var i = t && t.silent;
  16995. Ra.call(this, i),
  16996. Va.call(this, i)
  16997. }
  16998. ,
  16999. Gw.showLoading = function(t, e) {
  17000. if (_(t) && (e = t,
  17001. t = ""),
  17002. t = t || "default",
  17003. this.hideLoading(),
  17004. $w[t]) {
  17005. var i = $w[t](this._api, e)
  17006. , n = this._zr;
  17007. this._loadingFX = i,
  17008. n.add(i)
  17009. }
  17010. }
  17011. ,
  17012. Gw.hideLoading = function() {
  17013. this._loadingFX && this._zr.remove(this._loadingFX),
  17014. this._loadingFX = null
  17015. }
  17016. ,
  17017. Gw.makeActionFromEvent = function(t) {
  17018. var e = o({}, t);
  17019. return e.type = Zw[t.type],
  17020. e
  17021. }
  17022. ,
  17023. Gw.dispatchAction = function(t, e) {
  17024. _(e) || (e = {
  17025. silent: !!e
  17026. }),
  17027. Fw[t.type] && this._model && (this[Rw] ? this._pendingActions.push(t) : (Ea.call(this, t, e.silent),
  17028. e.flush ? this._zr.flush(!0) : !1 !== e.flush && Yv.browser.weChat && this._throttledZrFlush(),
  17029. Ra.call(this, e.silent),
  17030. Va.call(this, e.silent)))
  17031. }
  17032. ,
  17033. Gw.on = ka("on"),
  17034. Gw.off = ka("off"),
  17035. Gw.one = ka("one");
  17036. var Hw = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
  17037. Gw._initEvents = function() {
  17038. Dw(Hw, function(t) {
  17039. this._zr.on(t, function(e) {
  17040. var i, n = this.getModel(), a = e.target;
  17041. if ("globalout" === t)
  17042. i = {};
  17043. else if (a && null != a.dataIndex) {
  17044. var r = a.dataModel || n.getSeriesByIndex(a.seriesIndex);
  17045. i = r && r.getDataParams(a.dataIndex, a.dataType) || {}
  17046. } else
  17047. a && a.eventData && (i = o({}, a.eventData));
  17048. i && (i.event = e,
  17049. i.type = t,
  17050. this.trigger(t, i))
  17051. }, this)
  17052. }, this),
  17053. Dw(Zw, function(t, e) {
  17054. this._messageCenter.on(e, function(t) {
  17055. this.trigger(e, t)
  17056. }, this)
  17057. }, this)
  17058. }
  17059. ,
  17060. Gw.isDisposed = function() {
  17061. return this._disposed
  17062. }
  17063. ,
  17064. Gw.clear = function() {
  17065. this.setOption({
  17066. series: []
  17067. }, !0)
  17068. }
  17069. ,
  17070. Gw.dispose = function() {
  17071. if (!this._disposed) {
  17072. this._disposed = !0;
  17073. var t = this._api
  17074. , e = this._model;
  17075. Dw(this._componentsViews, function(i) {
  17076. i.dispose(e, t)
  17077. }),
  17078. Dw(this._chartsViews, function(i) {
  17079. i.dispose(e, t)
  17080. }),
  17081. this._zr.dispose(),
  17082. delete Kw[this.id]
  17083. }
  17084. }
  17085. ,
  17086. h(Oa, my);
  17087. var Fw = {}
  17088. , Zw = {}
  17089. , Uw = []
  17090. , jw = []
  17091. , Xw = []
  17092. , qw = []
  17093. , Yw = {}
  17094. , $w = {}
  17095. , Kw = {}
  17096. , Jw = {}
  17097. , Qw = new Date - 0
  17098. , tS = new Date - 0
  17099. , eS = "_echarts_instance_"
  17100. , iS = Ka;
  17101. or(2e3, function(t) {
  17102. t.eachRawSeries(function(e) {
  17103. var i = (e.visualColorAccessPath || "itemStyle.normal.color").split(".")
  17104. , n = e.getData()
  17105. , o = e.get(i) || e.getColorFromPalette(e.get("name"));
  17106. n.setVisual("color", o),
  17107. t.isSeriesFiltered(e) || ("function" != typeof o || o instanceof bb || n.each(function(t) {
  17108. n.setItemVisual(t, "color", o(e.getDataParams(t)))
  17109. }),
  17110. n.each(function(t) {
  17111. var e = n.getItemModel(t).get(i, !0);
  17112. null != e && n.setItemVisual(t, "color", e)
  17113. }))
  17114. })
  17115. }),
  17116. Qa(_w),
  17117. ar("default", function(t, e) {
  17118. a(e = e || {}, {
  17119. text: "loading",
  17120. color: "#c23531",
  17121. textColor: "#000",
  17122. maskColor: "rgba(255, 255, 255, 0.8)",
  17123. zlevel: 0
  17124. });
  17125. var i = new pb({
  17126. style: {
  17127. fill: e.maskColor
  17128. },
  17129. zlevel: e.zlevel,
  17130. z: 1e4
  17131. })
  17132. , n = new xb({
  17133. shape: {
  17134. startAngle: -Cw / 2,
  17135. endAngle: -Cw / 2 + .1,
  17136. r: 10
  17137. },
  17138. style: {
  17139. stroke: e.color,
  17140. lineCap: "round",
  17141. lineWidth: 5
  17142. },
  17143. zlevel: e.zlevel,
  17144. z: 10001
  17145. })
  17146. , o = new pb({
  17147. style: {
  17148. fill: "none",
  17149. text: e.text,
  17150. textPosition: "right",
  17151. textDistance: 10,
  17152. textFill: e.textColor
  17153. },
  17154. zlevel: e.zlevel,
  17155. z: 10001
  17156. });
  17157. n.animateShape(!0).when(1e3, {
  17158. endAngle: 3 * Cw / 2
  17159. }).start("circularInOut"),
  17160. n.animateShape(!0).when(1e3, {
  17161. startAngle: 3 * Cw / 2
  17162. }).delay(300).start("circularInOut");
  17163. var r = new $y;
  17164. return r.add(n),
  17165. r.add(o),
  17166. r.add(i),
  17167. r.resize = function() {
  17168. var e = t.getWidth() / 2
  17169. , a = t.getHeight() / 2;
  17170. n.setShape({
  17171. cx: e,
  17172. cy: a
  17173. });
  17174. var r = n.shape.r;
  17175. o.setShape({
  17176. x: e - r,
  17177. y: a - r,
  17178. width: 2 * r,
  17179. height: 2 * r
  17180. }),
  17181. i.setShape({
  17182. x: 0,
  17183. y: 0,
  17184. width: t.getWidth(),
  17185. height: t.getHeight()
  17186. })
  17187. }
  17188. ,
  17189. r.resize(),
  17190. r
  17191. }),
  17192. er({
  17193. type: "highlight",
  17194. event: "highlight",
  17195. update: "highlight"
  17196. }, z),
  17197. er({
  17198. type: "downplay",
  17199. event: "downplay",
  17200. update: "downplay"
  17201. }, z);
  17202. var nS = {
  17203. registerMap: function(e) {
  17204. t.registerMap = e
  17205. },
  17206. getMap: function(e) {
  17207. t.getMap = e
  17208. },
  17209. parseGeoJSON: function(e) {
  17210. t.parseGeoJSON = e
  17211. }
  17212. };
  17213. cr.prototype = {
  17214. constructor: cr,
  17215. add: function(t) {
  17216. return this._add = t,
  17217. this
  17218. },
  17219. update: function(t) {
  17220. return this._update = t,
  17221. this
  17222. },
  17223. remove: function(t) {
  17224. return this._remove = t,
  17225. this
  17226. },
  17227. execute: function() {
  17228. var t = this._old
  17229. , e = this._new
  17230. , i = {}
  17231. , n = []
  17232. , o = [];
  17233. for (dr(t, {}, n, "_oldKeyGetter", this),
  17234. dr(e, i, o, "_newKeyGetter", this),
  17235. a = 0; a < t.length; a++)
  17236. null != (s = i[r = n[a]]) ? ((h = s.length) ? (1 === h && (i[r] = null),
  17237. s = s.unshift()) : i[r] = null,
  17238. this._update && this._update(s, a)) : this._remove && this._remove(a);
  17239. for (var a = 0; a < o.length; a++) {
  17240. var r = o[a];
  17241. if (i.hasOwnProperty(r)) {
  17242. var s = i[r];
  17243. if (null == s)
  17244. continue;
  17245. if (s.length)
  17246. for (var l = 0, h = s.length; l < h; l++)
  17247. this._add && this._add(s[l]);
  17248. else
  17249. this._add && this._add(s)
  17250. }
  17251. }
  17252. }
  17253. };
  17254. var oS = _
  17255. , aS = "undefined" == typeof window ? global : window
  17256. , rS = {
  17257. float: void 0 === aS.Float64Array ? Array : aS.Float64Array,
  17258. int: void 0 === aS.Int32Array ? Array : aS.Int32Array,
  17259. ordinal: Array,
  17260. number: Array,
  17261. time: Array
  17262. }
  17263. , sS = ["stackedOn", "hasItemOption", "_nameList", "_idList", "_rawData"];
  17264. gr.prototype.pure = !1,
  17265. gr.prototype.count = function() {
  17266. return this._array.length
  17267. }
  17268. ,
  17269. gr.prototype.getItem = function(t) {
  17270. return this._array[t]
  17271. }
  17272. ;
  17273. var lS = function(t, e) {
  17274. t = t || ["x", "y"];
  17275. for (var i = {}, n = [], o = 0; o < t.length; o++) {
  17276. var a, r = {};
  17277. "string" == typeof t[o] ? r = {
  17278. name: a = t[o],
  17279. coordDim: a,
  17280. coordDimIndex: 0,
  17281. stackable: !1,
  17282. type: "number"
  17283. } : (a = (r = t[o]).name,
  17284. r.type = r.type || "number",
  17285. r.coordDim || (r.coordDim = a,
  17286. r.coordDimIndex = 0)),
  17287. r.otherDims = r.otherDims || {},
  17288. n.push(a),
  17289. i[a] = r
  17290. }
  17291. this.dimensions = n,
  17292. this._dimensionInfos = i,
  17293. this.hostModel = e,
  17294. this.dataType,
  17295. this.indices = [],
  17296. this._storage = {},
  17297. this._nameList = [],
  17298. this._idList = [],
  17299. this._optionModels = [],
  17300. this.stackedOn = null,
  17301. this._visual = {},
  17302. this._layout = {},
  17303. this._itemVisuals = [],
  17304. this._itemLayouts = [],
  17305. this._graphicEls = [],
  17306. this._rawData,
  17307. this._extent
  17308. }
  17309. , hS = lS.prototype;
  17310. hS.type = "list",
  17311. hS.hasItemOption = !0,
  17312. hS.getDimension = function(t) {
  17313. return isNaN(t) || (t = this.dimensions[t] || t),
  17314. t
  17315. }
  17316. ,
  17317. hS.getDimensionInfo = function(t) {
  17318. return e(this._dimensionInfos[this.getDimension(t)])
  17319. }
  17320. ,
  17321. hS.initData = function(t, e, i) {
  17322. var n = v(t = t || []);
  17323. n && (t = new gr(t)),
  17324. this._rawData = t;
  17325. var o, a = this._storage = {}, r = this.indices = [], s = this.dimensions, l = this._dimensionInfos, h = t.count(), u = [], c = {};
  17326. e = e || [];
  17327. for (x = 0; x < s.length; x++) {
  17328. var d = l[s[x]];
  17329. 0 === d.otherDims.itemName && (o = x);
  17330. var f = rS[d.type];
  17331. a[s[x]] = new f(h)
  17332. }
  17333. var g = this;
  17334. i || (g.hasItemOption = !1),
  17335. i = i || function(t, e, i, n) {
  17336. var o = Oo(t);
  17337. return zo(t) && (g.hasItemOption = !0),
  17338. No(o instanceof Array ? o[n] : o, l[e])
  17339. }
  17340. ;
  17341. for (x = 0; x < h; x++) {
  17342. for (var p = t.getItem(x), m = 0; m < s.length; m++) {
  17343. var y = s[m];
  17344. a[y][x] = i(p, y, x, m)
  17345. }
  17346. r.push(x)
  17347. }
  17348. for (var x = 0; x < h; x++) {
  17349. p = t.getItem(x);
  17350. !e[x] && p && (null != p.name ? e[x] = p.name : null != o && (e[x] = a[s[o]][x]));
  17351. var _ = e[x] || ""
  17352. , b = p && p.id;
  17353. !b && _ && (c[_] = c[_] || 0,
  17354. b = _,
  17355. c[_] > 0 && (b += "__ec__" + c[_]),
  17356. c[_]++),
  17357. b && (u[x] = b)
  17358. }
  17359. this._nameList = e,
  17360. this._idList = u
  17361. }
  17362. ,
  17363. hS.count = function() {
  17364. return this.indices.length
  17365. }
  17366. ,
  17367. hS.get = function(t, e, i) {
  17368. var n = this._storage
  17369. , o = this.indices[e];
  17370. if (null == o || !n[t])
  17371. return NaN;
  17372. var a = n[t][o];
  17373. if (i) {
  17374. var r = this._dimensionInfos[t];
  17375. if (r && r.stackable)
  17376. for (var s = this.stackedOn; s; ) {
  17377. var l = s.get(t, e);
  17378. (a >= 0 && l > 0 || a <= 0 && l < 0) && (a += l),
  17379. s = s.stackedOn
  17380. }
  17381. }
  17382. return a
  17383. }
  17384. ,
  17385. hS.getValues = function(t, e, i) {
  17386. var n = [];
  17387. v(t) || (i = e,
  17388. e = t,
  17389. t = this.dimensions);
  17390. for (var o = 0, a = t.length; o < a; o++)
  17391. n.push(this.get(t[o], e, i));
  17392. return n
  17393. }
  17394. ,
  17395. hS.hasValue = function(t) {
  17396. for (var e = this.dimensions, i = this._dimensionInfos, n = 0, o = e.length; n < o; n++)
  17397. if ("ordinal" !== i[e[n]].type && isNaN(this.get(e[n], t)))
  17398. return !1;
  17399. return !0
  17400. }
  17401. ,
  17402. hS.getDataExtent = function(t, e, i) {
  17403. t = this.getDimension(t);
  17404. var n = this._storage[t]
  17405. , o = this.getDimensionInfo(t);
  17406. e = o && o.stackable && e;
  17407. var a, r = (this._extent || (this._extent = {}))[t + !!e];
  17408. if (r)
  17409. return r;
  17410. if (n) {
  17411. for (var s = 1 / 0, l = -1 / 0, h = 0, u = this.count(); h < u; h++)
  17412. a = this.get(t, h, e),
  17413. i && !i(a, t, h) || (a < s && (s = a),
  17414. a > l && (l = a));
  17415. return this._extent[t + !!e] = [s, l]
  17416. }
  17417. return [1 / 0, -1 / 0]
  17418. }
  17419. ,
  17420. hS.getSum = function(t, e) {
  17421. var i = 0;
  17422. if (this._storage[t])
  17423. for (var n = 0, o = this.count(); n < o; n++) {
  17424. var a = this.get(t, n, e);
  17425. isNaN(a) || (i += a)
  17426. }
  17427. return i
  17428. }
  17429. ,
  17430. hS.indexOf = function(t, e) {
  17431. var i = this._storage[t]
  17432. , n = this.indices;
  17433. if (i)
  17434. for (var o = 0, a = n.length; o < a; o++)
  17435. if (i[n[o]] === e)
  17436. return o;
  17437. return -1
  17438. }
  17439. ,
  17440. hS.indexOfName = function(t) {
  17441. for (var e = this.indices, i = this._nameList, n = 0, o = e.length; n < o; n++)
  17442. if (i[e[n]] === t)
  17443. return n;
  17444. return -1
  17445. }
  17446. ,
  17447. hS.indexOfRawIndex = function(t) {
  17448. var e = this.indices
  17449. , i = e[t];
  17450. if (null != i && i === t)
  17451. return t;
  17452. for (var n = 0, o = e.length - 1; n <= o; ) {
  17453. var a = (n + o) / 2 | 0;
  17454. if (e[a] < t)
  17455. n = a + 1;
  17456. else {
  17457. if (!(e[a] > t))
  17458. return a;
  17459. o = a - 1
  17460. }
  17461. }
  17462. return -1
  17463. }
  17464. ,
  17465. hS.indicesOfNearest = function(t, e, i, n) {
  17466. var o = [];
  17467. if (!this._storage[t])
  17468. return o;
  17469. null == n && (n = 1 / 0);
  17470. for (var a = Number.MAX_VALUE, r = -1, s = 0, l = this.count(); s < l; s++) {
  17471. var h = e - this.get(t, s, i)
  17472. , u = Math.abs(h);
  17473. h <= n && u <= a && ((u < a || h >= 0 && r < 0) && (a = u,
  17474. r = h,
  17475. o.length = 0),
  17476. o.push(s))
  17477. }
  17478. return o
  17479. }
  17480. ,
  17481. hS.getRawIndex = function(t) {
  17482. var e = this.indices[t];
  17483. return null == e ? -1 : e
  17484. }
  17485. ,
  17486. hS.getRawDataItem = function(t) {
  17487. return this._rawData.getItem(this.getRawIndex(t))
  17488. }
  17489. ,
  17490. hS.getName = function(t) {
  17491. return this._nameList[this.indices[t]] || ""
  17492. }
  17493. ,
  17494. hS.getId = function(t) {
  17495. return this._idList[this.indices[t]] || this.getRawIndex(t) + ""
  17496. }
  17497. ,
  17498. hS.each = function(t, e, i, n) {
  17499. "function" == typeof t && (n = i,
  17500. i = e,
  17501. e = t,
  17502. t = []);
  17503. var o = []
  17504. , a = (t = d(pr(t), this.getDimension, this)).length
  17505. , r = this.indices;
  17506. n = n || this;
  17507. for (var s = 0; s < r.length; s++)
  17508. switch (a) {
  17509. case 0:
  17510. e.call(n, s);
  17511. break;
  17512. case 1:
  17513. e.call(n, this.get(t[0], s, i), s);
  17514. break;
  17515. case 2:
  17516. e.call(n, this.get(t[0], s, i), this.get(t[1], s, i), s);
  17517. break;
  17518. default:
  17519. for (var l = 0; l < a; l++)
  17520. o[l] = this.get(t[l], s, i);
  17521. o[l] = s,
  17522. e.apply(n, o)
  17523. }
  17524. }
  17525. ,
  17526. hS.filterSelf = function(t, e, i, n) {
  17527. "function" == typeof t && (n = i,
  17528. i = e,
  17529. e = t,
  17530. t = []);
  17531. var o = []
  17532. , a = []
  17533. , r = (t = d(pr(t), this.getDimension, this)).length
  17534. , s = this.indices;
  17535. n = n || this;
  17536. for (var l = 0; l < s.length; l++) {
  17537. var h;
  17538. if (r)
  17539. if (1 === r)
  17540. h = e.call(n, this.get(t[0], l, i), l);
  17541. else {
  17542. for (var u = 0; u < r; u++)
  17543. a[u] = this.get(t[u], l, i);
  17544. a[u] = l,
  17545. h = e.apply(n, a)
  17546. }
  17547. else
  17548. h = e.call(n, l);
  17549. h && o.push(s[l])
  17550. }
  17551. return this.indices = o,
  17552. this._extent = {},
  17553. this
  17554. }
  17555. ,
  17556. hS.mapArray = function(t, e, i, n) {
  17557. "function" == typeof t && (n = i,
  17558. i = e,
  17559. e = t,
  17560. t = []);
  17561. var o = [];
  17562. return this.each(t, function() {
  17563. o.push(e && e.apply(this, arguments))
  17564. }, i, n),
  17565. o
  17566. }
  17567. ,
  17568. hS.map = function(t, e, i, n) {
  17569. var o = mr(this, t = d(pr(t), this.getDimension, this))
  17570. , a = o.indices = this.indices
  17571. , r = o._storage
  17572. , s = [];
  17573. return this.each(t, function() {
  17574. var i = arguments[arguments.length - 1]
  17575. , n = e && e.apply(this, arguments);
  17576. if (null != n) {
  17577. "number" == typeof n && (s[0] = n,
  17578. n = s);
  17579. for (var o = 0; o < n.length; o++) {
  17580. var l = t[o]
  17581. , h = r[l]
  17582. , u = a[i];
  17583. h && (h[u] = n[o])
  17584. }
  17585. }
  17586. }, i, n),
  17587. o
  17588. }
  17589. ,
  17590. hS.downSample = function(t, e, i, n) {
  17591. for (var o = mr(this, [t]), a = this._storage, r = o._storage, s = this.indices, l = o.indices = [], h = [], u = [], c = Math.floor(1 / e), d = r[t], f = this.count(), g = 0; g < a[t].length; g++)
  17592. r[t][g] = a[t][g];
  17593. for (g = 0; g < f; g += c) {
  17594. c > f - g && (c = f - g,
  17595. h.length = c);
  17596. for (var p = 0; p < c; p++) {
  17597. var m = s[g + p];
  17598. h[p] = d[m],
  17599. u[p] = m
  17600. }
  17601. var v = i(h);
  17602. d[m = u[n(h, v) || 0]] = v,
  17603. l.push(m)
  17604. }
  17605. return o
  17606. }
  17607. ,
  17608. hS.getItemModel = function(t) {
  17609. var e = this.hostModel;
  17610. return t = this.indices[t],
  17611. new Co(this._rawData.getItem(t),e,e && e.ecModel)
  17612. }
  17613. ,
  17614. hS.diff = function(t) {
  17615. var e, i = this._idList, n = t && t._idList;
  17616. return new cr(t ? t.indices : [],this.indices,function(t) {
  17617. return null != (e = n[t]) ? e : "e\0\0" + t
  17618. }
  17619. ,function(t) {
  17620. return null != (e = i[t]) ? e : "e\0\0" + t
  17621. }
  17622. )
  17623. }
  17624. ,
  17625. hS.getVisual = function(t) {
  17626. var e = this._visual;
  17627. return e && e[t]
  17628. }
  17629. ,
  17630. hS.setVisual = function(t, e) {
  17631. if (oS(t))
  17632. for (var i in t)
  17633. t.hasOwnProperty(i) && this.setVisual(i, t[i]);
  17634. else
  17635. this._visual = this._visual || {},
  17636. this._visual[t] = e
  17637. }
  17638. ,
  17639. hS.setLayout = function(t, e) {
  17640. if (oS(t))
  17641. for (var i in t)
  17642. t.hasOwnProperty(i) && this.setLayout(i, t[i]);
  17643. else
  17644. this._layout[t] = e
  17645. }
  17646. ,
  17647. hS.getLayout = function(t) {
  17648. return this._layout[t]
  17649. }
  17650. ,
  17651. hS.getItemLayout = function(t) {
  17652. return this._itemLayouts[t]
  17653. }
  17654. ,
  17655. hS.setItemLayout = function(t, e, i) {
  17656. this._itemLayouts[t] = i ? o(this._itemLayouts[t] || {}, e) : e
  17657. }
  17658. ,
  17659. hS.clearItemLayouts = function() {
  17660. this._itemLayouts.length = 0
  17661. }
  17662. ,
  17663. hS.getItemVisual = function(t, e, i) {
  17664. var n = this._itemVisuals[t]
  17665. , o = n && n[e];
  17666. return null != o || i ? o : this.getVisual(e)
  17667. }
  17668. ,
  17669. hS.setItemVisual = function(t, e, i) {
  17670. var n = this._itemVisuals[t] || {};
  17671. if (this._itemVisuals[t] = n,
  17672. oS(e))
  17673. for (var o in e)
  17674. e.hasOwnProperty(o) && (n[o] = e[o]);
  17675. else
  17676. n[e] = i
  17677. }
  17678. ,
  17679. hS.clearAllVisual = function() {
  17680. this._visual = {},
  17681. this._itemVisuals = []
  17682. }
  17683. ;
  17684. var uS = function(t) {
  17685. t.seriesIndex = this.seriesIndex,
  17686. t.dataIndex = this.dataIndex,
  17687. t.dataType = this.dataType
  17688. };
  17689. hS.setItemGraphicEl = function(t, e) {
  17690. var i = this.hostModel;
  17691. e && (e.dataIndex = t,
  17692. e.dataType = this.dataType,
  17693. e.seriesIndex = i && i.seriesIndex,
  17694. "group" === e.type && e.traverse(uS, e)),
  17695. this._graphicEls[t] = e
  17696. }
  17697. ,
  17698. hS.getItemGraphicEl = function(t) {
  17699. return this._graphicEls[t]
  17700. }
  17701. ,
  17702. hS.eachItemGraphicEl = function(t, e) {
  17703. c(this._graphicEls, function(i, n) {
  17704. i && t && t.call(e, i, n)
  17705. })
  17706. }
  17707. ,
  17708. hS.cloneShallow = function() {
  17709. var t = d(this.dimensions, this.getDimensionInfo, this)
  17710. , e = new lS(t,this.hostModel);
  17711. return e._storage = this._storage,
  17712. fr(e, this),
  17713. e.indices = this.indices.slice(),
  17714. this._extent && (e._extent = o({}, this._extent)),
  17715. e
  17716. }
  17717. ,
  17718. hS.wrapMethod = function(t, e) {
  17719. var i = this[t];
  17720. "function" == typeof i && (this.__wrappedMethods = this.__wrappedMethods || [],
  17721. this.__wrappedMethods.push(t),
  17722. this[t] = function() {
  17723. var t = i.apply(this, arguments);
  17724. return e.apply(this, [t].concat(A(arguments)))
  17725. }
  17726. )
  17727. }
  17728. ,
  17729. hS.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "map"],
  17730. hS.CHANGABLE_METHODS = ["filterSelf"];
  17731. var cS = c
  17732. , dS = x
  17733. , fS = a
  17734. , gS = {
  17735. tooltip: 1,
  17736. label: 1,
  17737. itemName: 1
  17738. }
  17739. , pS = vr.guessOrdinal = function(t, e) {
  17740. for (var i = 0, n = t.length; i < n; i++) {
  17741. var o = yr(t[i]);
  17742. if (!v(o))
  17743. return !1;
  17744. if (null != (o = o[e]) && isFinite(o) && "" !== o)
  17745. return !1;
  17746. if (dS(o) && "-" !== o)
  17747. return !0
  17748. }
  17749. return !1
  17750. }
  17751. , mS = {
  17752. cartesian2d: function(t, e, i, n) {
  17753. var o = d(["xAxis", "yAxis"], function(t) {
  17754. return i.queryComponents({
  17755. mainType: t,
  17756. index: e.get(t + "Index"),
  17757. id: e.get(t + "Id")
  17758. })[0]
  17759. })
  17760. , a = o[0]
  17761. , r = o[1]
  17762. , s = a.get("type")
  17763. , l = r.get("type")
  17764. , h = [{
  17765. name: "x",
  17766. type: Sr(s),
  17767. stackable: wr(s)
  17768. }, {
  17769. name: "y",
  17770. type: Sr(l),
  17771. stackable: wr(l)
  17772. }]
  17773. , u = "category" === s
  17774. , c = "category" === l;
  17775. h = vr(h, t, n);
  17776. var f = {};
  17777. return u && (f.x = a),
  17778. c && (f.y = r),
  17779. {
  17780. dimensions: h,
  17781. categoryIndex: u ? 0 : c ? 1 : -1,
  17782. categoryAxesModels: f
  17783. }
  17784. },
  17785. singleAxis: function(t, e, i, n) {
  17786. var o = i.queryComponents({
  17787. mainType: "singleAxis",
  17788. index: e.get("singleAxisIndex"),
  17789. id: e.get("singleAxisId")
  17790. })[0]
  17791. , a = o.get("type")
  17792. , r = "category" === a
  17793. , s = [{
  17794. name: "single",
  17795. type: Sr(a),
  17796. stackable: wr(a)
  17797. }];
  17798. s = vr(s, t, n);
  17799. var l = {};
  17800. return r && (l.single = o),
  17801. {
  17802. dimensions: s,
  17803. categoryIndex: r ? 0 : -1,
  17804. categoryAxesModels: l
  17805. }
  17806. },
  17807. polar: function(t, e, i, n) {
  17808. var o = i.queryComponents({
  17809. mainType: "polar",
  17810. index: e.get("polarIndex"),
  17811. id: e.get("polarId")
  17812. })[0]
  17813. , a = o.findAxisModel("angleAxis")
  17814. , r = o.findAxisModel("radiusAxis")
  17815. , s = r.get("type")
  17816. , l = a.get("type")
  17817. , h = [{
  17818. name: "radius",
  17819. type: Sr(s),
  17820. stackable: wr(s)
  17821. }, {
  17822. name: "angle",
  17823. type: Sr(l),
  17824. stackable: wr(l)
  17825. }]
  17826. , u = "category" === l
  17827. , c = "category" === s;
  17828. h = vr(h, t, n);
  17829. var d = {};
  17830. return c && (d.radius = r),
  17831. u && (d.angle = a),
  17832. {
  17833. dimensions: h,
  17834. categoryIndex: u ? 1 : c ? 0 : -1,
  17835. categoryAxesModels: d
  17836. }
  17837. },
  17838. geo: function(t, e, i, n) {
  17839. return {
  17840. dimensions: vr([{
  17841. name: "lng"
  17842. }, {
  17843. name: "lat"
  17844. }], t, n)
  17845. }
  17846. }
  17847. }
  17848. , vS = Ir.prototype;
  17849. vS.parse = function(t) {
  17850. return t
  17851. }
  17852. ,
  17853. vS.getSetting = function(t) {
  17854. return this._setting[t]
  17855. }
  17856. ,
  17857. vS.contain = function(t) {
  17858. var e = this._extent;
  17859. return t >= e[0] && t <= e[1]
  17860. }
  17861. ,
  17862. vS.normalize = function(t) {
  17863. var e = this._extent;
  17864. return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0])
  17865. }
  17866. ,
  17867. vS.scale = function(t) {
  17868. var e = this._extent;
  17869. return t * (e[1] - e[0]) + e[0]
  17870. }
  17871. ,
  17872. vS.unionExtent = function(t) {
  17873. var e = this._extent;
  17874. t[0] < e[0] && (e[0] = t[0]),
  17875. t[1] > e[1] && (e[1] = t[1])
  17876. }
  17877. ,
  17878. vS.unionExtentFromData = function(t, e) {
  17879. this.unionExtent(t.getDataExtent(e, !0))
  17880. }
  17881. ,
  17882. vS.getExtent = function() {
  17883. return this._extent.slice()
  17884. }
  17885. ,
  17886. vS.setExtent = function(t, e) {
  17887. var i = this._extent;
  17888. isNaN(t) || (i[0] = t),
  17889. isNaN(e) || (i[1] = e)
  17890. }
  17891. ,
  17892. vS.getTicksLabels = function() {
  17893. for (var t = [], e = this.getTicks(), i = 0; i < e.length; i++)
  17894. t.push(this.getLabel(e[i]));
  17895. return t
  17896. }
  17897. ,
  17898. vS.isBlank = function() {
  17899. return this._isBlank
  17900. }
  17901. ,
  17902. vS.setBlank = function(t) {
  17903. this._isBlank = t
  17904. }
  17905. ,
  17906. Yi(Ir),
  17907. Ji(Ir, {
  17908. registerWhenExtend: !0
  17909. });
  17910. var yS = Ir.prototype
  17911. , xS = Ir.extend({
  17912. type: "ordinal",
  17913. init: function(t, e) {
  17914. this._data = t,
  17915. this._extent = e || [0, t.length - 1]
  17916. },
  17917. parse: function(t) {
  17918. return "string" == typeof t ? s(this._data, t) : Math.round(t)
  17919. },
  17920. contain: function(t) {
  17921. return t = this.parse(t),
  17922. yS.contain.call(this, t) && null != this._data[t]
  17923. },
  17924. normalize: function(t) {
  17925. return yS.normalize.call(this, this.parse(t))
  17926. },
  17927. scale: function(t) {
  17928. return Math.round(yS.scale.call(this, t))
  17929. },
  17930. getTicks: function() {
  17931. for (var t = [], e = this._extent, i = e[0]; i <= e[1]; )
  17932. t.push(i),
  17933. i++;
  17934. return t
  17935. },
  17936. getLabel: function(t) {
  17937. return this._data[t]
  17938. },
  17939. count: function() {
  17940. return this._extent[1] - this._extent[0] + 1
  17941. },
  17942. unionExtentFromData: function(t, e) {
  17943. this.unionExtent(t.getDataExtent(e, !1))
  17944. },
  17945. niceTicks: z,
  17946. niceExtent: z
  17947. });
  17948. xS.create = function() {
  17949. return new xS
  17950. }
  17951. ;
  17952. var _S = wi
  17953. , bS = wi
  17954. , wS = Ir.extend({
  17955. type: "interval",
  17956. _interval: 0,
  17957. _intervalPrecision: 2,
  17958. setExtent: function(t, e) {
  17959. var i = this._extent;
  17960. isNaN(t) || (i[0] = parseFloat(t)),
  17961. isNaN(e) || (i[1] = parseFloat(e))
  17962. },
  17963. unionExtent: function(t) {
  17964. var e = this._extent;
  17965. t[0] < e[0] && (e[0] = t[0]),
  17966. t[1] > e[1] && (e[1] = t[1]),
  17967. wS.prototype.setExtent.call(this, e[0], e[1])
  17968. },
  17969. getInterval: function() {
  17970. return this._interval
  17971. },
  17972. setInterval: function(t) {
  17973. this._interval = t,
  17974. this._niceExtent = this._extent.slice(),
  17975. this._intervalPrecision = Ar(t)
  17976. },
  17977. getTicks: function() {
  17978. return Lr(this._interval, this._extent, this._niceExtent, this._intervalPrecision)
  17979. },
  17980. getTicksLabels: function() {
  17981. for (var t = [], e = this.getTicks(), i = 0; i < e.length; i++)
  17982. t.push(this.getLabel(e[i]));
  17983. return t
  17984. },
  17985. getLabel: function(t, e) {
  17986. if (null == t)
  17987. return "";
  17988. var i = e && e.precision;
  17989. return null == i ? i = Ii(t) || 0 : "auto" === i && (i = this._intervalPrecision),
  17990. t = bS(t, i, !0),
  17991. Ei(t)
  17992. },
  17993. niceTicks: function(t, e, i) {
  17994. t = t || 5;
  17995. var n = this._extent
  17996. , o = n[1] - n[0];
  17997. if (isFinite(o)) {
  17998. o < 0 && (o = -o,
  17999. n.reverse());
  18000. var a = Tr(n, t, e, i);
  18001. this._intervalPrecision = a.intervalPrecision,
  18002. this._interval = a.interval,
  18003. this._niceExtent = a.niceTickExtent
  18004. }
  18005. },
  18006. niceExtent: function(t) {
  18007. var e = this._extent;
  18008. if (e[0] === e[1])
  18009. if (0 !== e[0]) {
  18010. var i = e[0];
  18011. t.fixMax ? e[0] -= i / 2 : (e[1] += i / 2,
  18012. e[0] -= i / 2)
  18013. } else
  18014. e[1] = 1;
  18015. var n = e[1] - e[0];
  18016. isFinite(n) || (e[0] = 0,
  18017. e[1] = 1),
  18018. this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  18019. var o = this._interval;
  18020. t.fixMin || (e[0] = bS(Math.floor(e[0] / o) * o)),
  18021. t.fixMax || (e[1] = bS(Math.ceil(e[1] / o) * o))
  18022. }
  18023. });
  18024. wS.create = function() {
  18025. return new wS
  18026. }
  18027. ;
  18028. var SS = wS.prototype
  18029. , MS = Math.ceil
  18030. , IS = Math.floor
  18031. , TS = function(t, e, i, n) {
  18032. for (; i < n; ) {
  18033. var o = i + n >>> 1;
  18034. t[o][1] < e ? i = o + 1 : n = o
  18035. }
  18036. return i
  18037. }
  18038. , AS = wS.extend({
  18039. type: "time",
  18040. getLabel: function(t) {
  18041. var e = this._stepLvl
  18042. , i = new Date(t);
  18043. return Hi(e[0], i, this.getSetting("useUTC"))
  18044. },
  18045. niceExtent: function(t) {
  18046. var e = this._extent;
  18047. if (e[0] === e[1] && (e[0] -= 864e5,
  18048. e[1] += 864e5),
  18049. e[1] === -1 / 0 && e[0] === 1 / 0) {
  18050. var i = new Date;
  18051. e[1] = +new Date(i.getFullYear(),i.getMonth(),i.getDate()),
  18052. e[0] = e[1] - 864e5
  18053. }
  18054. this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  18055. var n = this._interval;
  18056. t.fixMin || (e[0] = wi(IS(e[0] / n) * n)),
  18057. t.fixMax || (e[1] = wi(MS(e[1] / n) * n))
  18058. },
  18059. niceTicks: function(t, e, i) {
  18060. t = t || 10;
  18061. var n = this._extent
  18062. , o = n[1] - n[0]
  18063. , a = o / t;
  18064. null != e && a < e && (a = e),
  18065. null != i && a > i && (a = i);
  18066. var r = CS.length
  18067. , s = TS(CS, a, 0, r)
  18068. , l = CS[Math.min(s, r - 1)]
  18069. , h = l[1];
  18070. "year" === l[0] && (h *= Oi(o / h / t, !0));
  18071. var u = this.getSetting("useUTC") ? 0 : 60 * new Date(+n[0] || +n[1]).getTimezoneOffset() * 1e3
  18072. , c = [Math.round(MS((n[0] - u) / h) * h + u), Math.round(IS((n[1] - u) / h) * h + u)];
  18073. Dr(c, n),
  18074. this._stepLvl = l,
  18075. this._interval = h,
  18076. this._niceExtent = c
  18077. },
  18078. parse: function(t) {
  18079. return +Li(t)
  18080. }
  18081. });
  18082. c(["contain", "normalize"], function(t) {
  18083. AS.prototype[t] = function(e) {
  18084. return SS[t].call(this, this.parse(e))
  18085. }
  18086. });
  18087. var CS = [["hh:mm:ss", 1e3], ["hh:mm:ss", 5e3], ["hh:mm:ss", 1e4], ["hh:mm:ss", 15e3], ["hh:mm:ss", 3e4], ["hh:mm\nMM-dd", 6e4], ["hh:mm\nMM-dd", 3e5], ["hh:mm\nMM-dd", 6e5], ["hh:mm\nMM-dd", 9e5], ["hh:mm\nMM-dd", 18e5], ["hh:mm\nMM-dd", 36e5], ["hh:mm\nMM-dd", 72e5], ["hh:mm\nMM-dd", 216e5], ["hh:mm\nMM-dd", 432e5], ["MM-dd\nyyyy", 864e5], ["MM-dd\nyyyy", 1728e5], ["MM-dd\nyyyy", 2592e5], ["MM-dd\nyyyy", 3456e5], ["MM-dd\nyyyy", 432e6], ["MM-dd\nyyyy", 5184e5], ["week", 6048e5], ["MM-dd\nyyyy", 864e6], ["week", 12096e5], ["week", 18144e5], ["month", 26784e5], ["week", 36288e5], ["month", 53568e5], ["week", 36288e5], ["quarter", 8208e6], ["month", 107136e5], ["month", 13392e6], ["half-year", 16416e6], ["month", 214272e5], ["month", 26784e6], ["year", 32832e6]];
  18088. AS.create = function(t) {
  18089. return new AS({
  18090. useUTC: t.ecModel.get("useUTC")
  18091. })
  18092. }
  18093. ;
  18094. var DS = Ir.prototype
  18095. , LS = wS.prototype
  18096. , kS = Ii
  18097. , PS = wi
  18098. , OS = Math.floor
  18099. , zS = Math.ceil
  18100. , NS = Math.pow
  18101. , ES = Math.log
  18102. , RS = Ir.extend({
  18103. type: "log",
  18104. base: 10,
  18105. $constructor: function() {
  18106. Ir.apply(this, arguments),
  18107. this._originalScale = new wS
  18108. },
  18109. getTicks: function() {
  18110. var t = this._originalScale
  18111. , e = this._extent
  18112. , i = t.getExtent();
  18113. return d(LS.getTicks.call(this), function(n) {
  18114. var o = wi(NS(this.base, n));
  18115. return o = n === e[0] && t.__fixMin ? kr(o, i[0]) : o,
  18116. o = n === e[1] && t.__fixMax ? kr(o, i[1]) : o
  18117. }, this)
  18118. },
  18119. getLabel: LS.getLabel,
  18120. scale: function(t) {
  18121. return t = DS.scale.call(this, t),
  18122. NS(this.base, t)
  18123. },
  18124. setExtent: function(t, e) {
  18125. var i = this.base;
  18126. t = ES(t) / ES(i),
  18127. e = ES(e) / ES(i),
  18128. LS.setExtent.call(this, t, e)
  18129. },
  18130. getExtent: function() {
  18131. var t = this.base
  18132. , e = DS.getExtent.call(this);
  18133. e[0] = NS(t, e[0]),
  18134. e[1] = NS(t, e[1]);
  18135. var i = this._originalScale
  18136. , n = i.getExtent();
  18137. return i.__fixMin && (e[0] = kr(e[0], n[0])),
  18138. i.__fixMax && (e[1] = kr(e[1], n[1])),
  18139. e
  18140. },
  18141. unionExtent: function(t) {
  18142. this._originalScale.unionExtent(t);
  18143. var e = this.base;
  18144. t[0] = ES(t[0]) / ES(e),
  18145. t[1] = ES(t[1]) / ES(e),
  18146. DS.unionExtent.call(this, t)
  18147. },
  18148. unionExtentFromData: function(t, e) {
  18149. this.unionExtent(t.getDataExtent(e, !0, function(t) {
  18150. return t > 0
  18151. }))
  18152. },
  18153. niceTicks: function(t) {
  18154. t = t || 10;
  18155. var e = this._extent
  18156. , i = e[1] - e[0];
  18157. if (!(i === 1 / 0 || i <= 0)) {
  18158. var n = ki(i);
  18159. for (t / i * n <= .5 && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && Math.abs(n) > 0; )
  18160. n *= 10;
  18161. var o = [wi(zS(e[0] / n) * n), wi(OS(e[1] / n) * n)];
  18162. this._interval = n,
  18163. this._niceExtent = o
  18164. }
  18165. },
  18166. niceExtent: function(t) {
  18167. LS.niceExtent.call(this, t);
  18168. var e = this._originalScale;
  18169. e.__fixMin = t.fixMin,
  18170. e.__fixMax = t.fixMax
  18171. }
  18172. });
  18173. c(["contain", "normalize"], function(t) {
  18174. RS.prototype[t] = function(e) {
  18175. return e = ES(e) / ES(this.base),
  18176. DS[t].call(this, e)
  18177. }
  18178. }),
  18179. RS.create = function() {
  18180. return new RS
  18181. }
  18182. ;
  18183. var VS = {
  18184. getFormattedLabels: function() {
  18185. return Er(this.axis, this.get("axisLabel.formatter"))
  18186. },
  18187. getCategories: function() {
  18188. return "category" === this.get("type") && d(this.get("data"), Vr)
  18189. },
  18190. getMin: function(t) {
  18191. var e = this.option
  18192. , i = t || null == e.rangeStart ? e.min : e.rangeStart;
  18193. return this.axis && null != i && "dataMin" !== i && "function" != typeof i && !S(i) && (i = this.axis.scale.parse(i)),
  18194. i
  18195. },
  18196. getMax: function(t) {
  18197. var e = this.option
  18198. , i = t || null == e.rangeEnd ? e.max : e.rangeEnd;
  18199. return this.axis && null != i && "dataMax" !== i && "function" != typeof i && !S(i) && (i = this.axis.scale.parse(i)),
  18200. i
  18201. },
  18202. getNeedCrossZero: function() {
  18203. var t = this.option;
  18204. return null == t.rangeStart && null == t.rangeEnd && !t.scale
  18205. },
  18206. getCoordSysModel: z,
  18207. setRange: function(t, e) {
  18208. this.option.rangeStart = t,
  18209. this.option.rangeEnd = e
  18210. },
  18211. resetRange: function() {
  18212. this.option.rangeStart = this.option.rangeEnd = null
  18213. }
  18214. }
  18215. , BS = Hn({
  18216. type: "triangle",
  18217. shape: {
  18218. cx: 0,
  18219. cy: 0,
  18220. width: 0,
  18221. height: 0
  18222. },
  18223. buildPath: function(t, e) {
  18224. var i = e.cx
  18225. , n = e.cy
  18226. , o = e.width / 2
  18227. , a = e.height / 2;
  18228. t.moveTo(i, n - a),
  18229. t.lineTo(i + o, n + a),
  18230. t.lineTo(i - o, n + a),
  18231. t.closePath()
  18232. }
  18233. })
  18234. , GS = Hn({
  18235. type: "diamond",
  18236. shape: {
  18237. cx: 0,
  18238. cy: 0,
  18239. width: 0,
  18240. height: 0
  18241. },
  18242. buildPath: function(t, e) {
  18243. var i = e.cx
  18244. , n = e.cy
  18245. , o = e.width / 2
  18246. , a = e.height / 2;
  18247. t.moveTo(i, n - a),
  18248. t.lineTo(i + o, n),
  18249. t.lineTo(i, n + a),
  18250. t.lineTo(i - o, n),
  18251. t.closePath()
  18252. }
  18253. })
  18254. , WS = Hn({
  18255. type: "pin",
  18256. shape: {
  18257. x: 0,
  18258. y: 0,
  18259. width: 0,
  18260. height: 0
  18261. },
  18262. buildPath: function(t, e) {
  18263. var i = e.x
  18264. , n = e.y
  18265. , o = e.width / 5 * 3
  18266. , a = Math.max(o, e.height)
  18267. , r = o / 2
  18268. , s = r * r / (a - r)
  18269. , l = n - a + r + s
  18270. , h = Math.asin(s / r)
  18271. , u = Math.cos(h) * r
  18272. , c = Math.sin(h)
  18273. , d = Math.cos(h)
  18274. , f = .6 * r
  18275. , g = .7 * r;
  18276. t.moveTo(i - u, l + s),
  18277. t.arc(i, l, r, Math.PI - h, 2 * Math.PI + h),
  18278. t.bezierCurveTo(i + u - c * f, l + s + d * f, i, n - g, i, n),
  18279. t.bezierCurveTo(i, n - g, i - u + c * f, l + s + d * f, i - u, l + s),
  18280. t.closePath()
  18281. }
  18282. })
  18283. , HS = Hn({
  18284. type: "arrow",
  18285. shape: {
  18286. x: 0,
  18287. y: 0,
  18288. width: 0,
  18289. height: 0
  18290. },
  18291. buildPath: function(t, e) {
  18292. var i = e.height
  18293. , n = e.width
  18294. , o = e.x
  18295. , a = e.y
  18296. , r = n / 3 * 2;
  18297. t.moveTo(o, a),
  18298. t.lineTo(o + r, a + i),
  18299. t.lineTo(o, a + i / 4 * 3),
  18300. t.lineTo(o - r, a + i),
  18301. t.lineTo(o, a),
  18302. t.closePath()
  18303. }
  18304. })
  18305. , FS = {
  18306. line: function(t, e, i, n, o) {
  18307. o.x1 = t,
  18308. o.y1 = e + n / 2,
  18309. o.x2 = t + i,
  18310. o.y2 = e + n / 2
  18311. },
  18312. rect: function(t, e, i, n, o) {
  18313. o.x = t,
  18314. o.y = e,
  18315. o.width = i,
  18316. o.height = n
  18317. },
  18318. roundRect: function(t, e, i, n, o) {
  18319. o.x = t,
  18320. o.y = e,
  18321. o.width = i,
  18322. o.height = n,
  18323. o.r = Math.min(i, n) / 4
  18324. },
  18325. square: function(t, e, i, n, o) {
  18326. var a = Math.min(i, n);
  18327. o.x = t,
  18328. o.y = e,
  18329. o.width = a,
  18330. o.height = a
  18331. },
  18332. circle: function(t, e, i, n, o) {
  18333. o.cx = t + i / 2,
  18334. o.cy = e + n / 2,
  18335. o.r = Math.min(i, n) / 2
  18336. },
  18337. diamond: function(t, e, i, n, o) {
  18338. o.cx = t + i / 2,
  18339. o.cy = e + n / 2,
  18340. o.width = i,
  18341. o.height = n
  18342. },
  18343. pin: function(t, e, i, n, o) {
  18344. o.x = t + i / 2,
  18345. o.y = e + n / 2,
  18346. o.width = i,
  18347. o.height = n
  18348. },
  18349. arrow: function(t, e, i, n, o) {
  18350. o.x = t + i / 2,
  18351. o.y = e + n / 2,
  18352. o.width = i,
  18353. o.height = n
  18354. },
  18355. triangle: function(t, e, i, n, o) {
  18356. o.cx = t + i / 2,
  18357. o.cy = e + n / 2,
  18358. o.width = i,
  18359. o.height = n
  18360. }
  18361. }
  18362. , ZS = {};
  18363. c({
  18364. line: mb,
  18365. rect: pb,
  18366. roundRect: pb,
  18367. square: pb,
  18368. circle: rb,
  18369. diamond: GS,
  18370. pin: WS,
  18371. arrow: HS,
  18372. triangle: BS
  18373. }, function(t, e) {
  18374. ZS[e] = new t
  18375. });
  18376. var US = Hn({
  18377. type: "symbol",
  18378. shape: {
  18379. symbolType: "",
  18380. x: 0,
  18381. y: 0,
  18382. width: 0,
  18383. height: 0
  18384. },
  18385. beforeBrush: function() {
  18386. var t = this.style;
  18387. "pin" === this.shape.symbolType && "inside" === t.textPosition && (t.textPosition = ["50%", "40%"],
  18388. t.textAlign = "center",
  18389. t.textVerticalAlign = "middle")
  18390. },
  18391. buildPath: function(t, e, i) {
  18392. var n = e.symbolType
  18393. , o = ZS[n];
  18394. "none" !== e.symbolType && (o || (o = ZS[n = "rect"]),
  18395. FS[n](e.x, e.y, e.width, e.height, o.shape),
  18396. o.buildPath(t, o.shape, i))
  18397. }
  18398. })
  18399. , jS = (Object.freeze || Object)({
  18400. createList: function(t) {
  18401. return br(t.get("data"), t, t.ecModel)
  18402. },
  18403. createScale: function(t, e) {
  18404. var i = e;
  18405. e instanceof Co || h(i = new Co(e), VS);
  18406. var n = zr(i);
  18407. return n.setExtent(t[0], t[1]),
  18408. Or(n, i),
  18409. n
  18410. },
  18411. mixinAxisModelCommonMethods: function(t) {
  18412. h(t, VS)
  18413. },
  18414. completeDimensions: vr,
  18415. createSymbol: Gr
  18416. })
  18417. , XS = _i
  18418. , qS = [0, 1]
  18419. , YS = function(t, e, i) {
  18420. this.dim = t,
  18421. this.scale = e,
  18422. this._extent = i || [0, 0],
  18423. this.inverse = !1,
  18424. this.onBand = !1,
  18425. this._labelInterval
  18426. };
  18427. YS.prototype = {
  18428. constructor: YS,
  18429. contain: function(t) {
  18430. var e = this._extent
  18431. , i = Math.min(e[0], e[1])
  18432. , n = Math.max(e[0], e[1]);
  18433. return t >= i && t <= n
  18434. },
  18435. containData: function(t) {
  18436. return this.contain(this.dataToCoord(t))
  18437. },
  18438. getExtent: function() {
  18439. return this._extent.slice()
  18440. },
  18441. getPixelPrecision: function(t) {
  18442. return Ti(t || this.scale.getExtent(), this._extent)
  18443. },
  18444. setExtent: function(t, e) {
  18445. var i = this._extent;
  18446. i[0] = t,
  18447. i[1] = e
  18448. },
  18449. dataToCoord: function(t, e) {
  18450. var i = this._extent
  18451. , n = this.scale;
  18452. return t = n.normalize(t),
  18453. this.onBand && "ordinal" === n.type && Wr(i = i.slice(), n.count()),
  18454. XS(t, qS, i, e)
  18455. },
  18456. coordToData: function(t, e) {
  18457. var i = this._extent
  18458. , n = this.scale;
  18459. this.onBand && "ordinal" === n.type && Wr(i = i.slice(), n.count());
  18460. var o = XS(t, i, qS, e);
  18461. return this.scale.scale(o)
  18462. },
  18463. pointToData: function(t, e) {},
  18464. getTicksCoords: function(t) {
  18465. if (this.onBand && !t) {
  18466. for (var e = this.getBands(), i = [], n = 0; n < e.length; n++)
  18467. i.push(e[n][0]);
  18468. return e[n - 1] && i.push(e[n - 1][1]),
  18469. i
  18470. }
  18471. return d(this.scale.getTicks(), this.dataToCoord, this)
  18472. },
  18473. getLabelsCoords: function() {
  18474. return d(this.scale.getTicks(), this.dataToCoord, this)
  18475. },
  18476. getBands: function() {
  18477. for (var t = this.getExtent(), e = [], i = this.scale.count(), n = t[0], o = t[1] - n, a = 0; a < i; a++)
  18478. e.push([o * a / i + n, o * (a + 1) / i + n]);
  18479. return e
  18480. },
  18481. getBandWidth: function() {
  18482. var t = this._extent
  18483. , e = this.scale.getExtent()
  18484. , i = e[1] - e[0] + (this.onBand ? 1 : 0);
  18485. 0 === i && (i = 1);
  18486. var n = Math.abs(t[1] - t[0]);
  18487. return Math.abs(n) / i
  18488. },
  18489. isHorizontal: null,
  18490. getRotate: null,
  18491. getLabelInterval: function() {
  18492. var t = this._labelInterval;
  18493. if (!t) {
  18494. var e = this.model
  18495. , i = e.getModel("axisLabel");
  18496. t = i.get("interval"),
  18497. "category" !== this.type || null != t && "auto" !== t || (t = Nr(d(this.scale.getTicks(), this.dataToCoord, this), e.getFormattedLabels(), i.getFont(), this.getRotate ? this.getRotate() : this.isHorizontal && !this.isHorizontal() ? 90 : 0, i.get("rotate"))),
  18498. this._labelInterval = t
  18499. }
  18500. return t
  18501. }
  18502. };
  18503. var $S = {};
  18504. c(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString", "isObject", "isFunction", "extend", "defaults", "clone", "merge"], function(t) {
  18505. $S[t] = ly[t]
  18506. });
  18507. var KS = (Object.freeze || Object)({
  18508. parse: function(t) {
  18509. var e;
  18510. if (!(e = "string" == typeof t ? (new DOMParser).parseFromString(t, "text/xml") : t) || e.getElementsByTagName("parsererror").length)
  18511. return null;
  18512. var i = jr(e, "gexf");
  18513. if (!i)
  18514. return null;
  18515. for (var n = jr(i, "graph"), o = Hr(jr(n, "attributes")), a = {}, r = 0; r < o.length; r++)
  18516. a[o[r].id] = o[r];
  18517. return {
  18518. nodes: Fr(jr(n, "nodes"), a),
  18519. links: Zr(jr(n, "edges"))
  18520. }
  18521. }
  18522. })
  18523. , JS = function(t, e) {
  18524. var i = (t.length - 1) * e + 1
  18525. , n = Math.floor(i)
  18526. , o = +t[n - 1]
  18527. , a = i - n;
  18528. return a ? o + a * (t[n] - o) : o
  18529. }
  18530. , QS = (Object.freeze || Object)({
  18531. version: "1.0.0",
  18532. gexf: KS,
  18533. prepareBoxplotData: function(t, e) {
  18534. for (var i = [], n = [], o = [], a = (e = e || []).boundIQR, r = "none" === a || 0 === a, s = 0; s < t.length; s++) {
  18535. o.push(s + "");
  18536. var l = Si(t[s].slice())
  18537. , h = JS(l, .25)
  18538. , u = JS(l, .5)
  18539. , c = JS(l, .75)
  18540. , d = l[0]
  18541. , f = l[l.length - 1]
  18542. , g = (null == a ? 1.5 : a) * (c - h)
  18543. , p = r ? d : Math.max(d, h - g)
  18544. , m = r ? f : Math.min(f, c + g);
  18545. i.push([p, h, u, c, m]);
  18546. for (var v = 0; v < l.length; v++) {
  18547. var y = l[v];
  18548. if (y < p || y > m) {
  18549. var x = [s, y];
  18550. "vertical" === e.layout && x.reverse(),
  18551. n.push(x)
  18552. }
  18553. }
  18554. }
  18555. return {
  18556. boxData: i,
  18557. outliers: n,
  18558. axisData: o
  18559. }
  18560. }
  18561. });
  18562. bw.extend({
  18563. type: "series.line",
  18564. dependencies: ["grid", "polar"],
  18565. getInitialData: function(t, e) {
  18566. return br(t.data, this, e)
  18567. },
  18568. defaultOption: {
  18569. zlevel: 0,
  18570. z: 2,
  18571. coordinateSystem: "cartesian2d",
  18572. legendHoverLink: !0,
  18573. hoverAnimation: !0,
  18574. clipOverflow: !0,
  18575. label: {
  18576. normal: {
  18577. position: "top"
  18578. }
  18579. },
  18580. lineStyle: {
  18581. normal: {
  18582. width: 2,
  18583. type: "solid"
  18584. }
  18585. },
  18586. step: !1,
  18587. smooth: !1,
  18588. smoothMonotone: null,
  18589. symbol: "emptyCircle",
  18590. symbolSize: 4,
  18591. symbolRotate: null,
  18592. showSymbol: !0,
  18593. showAllSymbol: !1,
  18594. connectNulls: !1,
  18595. sampling: "none",
  18596. animationEasing: "linear",
  18597. progressive: 0,
  18598. hoverLayerThreshold: 1 / 0
  18599. }
  18600. });
  18601. var tM = Kr.prototype;
  18602. tM._createSymbol = function(t, e, i, n) {
  18603. this.removeAll();
  18604. var o = Gr(t, -1, -1, 2, 2, e.getItemVisual(i, "color"));
  18605. o.attr({
  18606. z2: 100,
  18607. culling: !0,
  18608. scale: $r(n)
  18609. }),
  18610. o.drift = Jr,
  18611. this._symbolType = t,
  18612. this.add(o)
  18613. }
  18614. ,
  18615. tM.stopSymbolAnimation = function(t) {
  18616. this.childAt(0).stopAnimation(t)
  18617. }
  18618. ,
  18619. tM.getSymbolPath = function() {
  18620. return this.childAt(0)
  18621. }
  18622. ,
  18623. tM.getScale = function() {
  18624. return this.childAt(0).scale
  18625. }
  18626. ,
  18627. tM.highlight = function() {
  18628. this.childAt(0).trigger("emphasis")
  18629. }
  18630. ,
  18631. tM.downplay = function() {
  18632. this.childAt(0).trigger("normal")
  18633. }
  18634. ,
  18635. tM.setZ = function(t, e) {
  18636. var i = this.childAt(0);
  18637. i.zlevel = t,
  18638. i.z = e
  18639. }
  18640. ,
  18641. tM.setDraggable = function(t) {
  18642. var e = this.childAt(0);
  18643. e.draggable = t,
  18644. e.cursor = t ? "move" : "pointer"
  18645. }
  18646. ,
  18647. tM.updateData = function(t, e, i) {
  18648. this.silent = !1;
  18649. var n = t.getItemVisual(e, "symbol") || "circle"
  18650. , o = t.hostModel
  18651. , a = Yr(t, e)
  18652. , r = n !== this._symbolType;
  18653. if (r ? this._createSymbol(n, t, e, a) : ((s = this.childAt(0)).silent = !1,
  18654. _o(s, {
  18655. scale: $r(a)
  18656. }, o, e)),
  18657. this._updateCommon(t, e, a, i),
  18658. r) {
  18659. var s = this.childAt(0)
  18660. , l = i && i.fadeIn
  18661. , h = {
  18662. scale: s.scale.slice()
  18663. };
  18664. l && (h.style = {
  18665. opacity: s.style.opacity
  18666. }),
  18667. s.scale = [0, 0],
  18668. l && (s.style.opacity = 0),
  18669. bo(s, h, o, e)
  18670. }
  18671. this._seriesModel = o
  18672. }
  18673. ;
  18674. var eM = ["itemStyle", "normal"]
  18675. , iM = ["itemStyle", "emphasis"]
  18676. , nM = ["label", "normal"]
  18677. , oM = ["label", "emphasis"];
  18678. tM._updateCommon = function(t, e, i, n) {
  18679. var a = this.childAt(0)
  18680. , r = t.hostModel
  18681. , s = t.getItemVisual(e, "color");
  18682. "image" !== a.type && a.useStyle({
  18683. strokeNoScale: !0
  18684. });
  18685. var l = n && n.itemStyle
  18686. , h = n && n.hoverItemStyle
  18687. , u = n && n.symbolRotate
  18688. , c = n && n.symbolOffset
  18689. , d = n && n.labelModel
  18690. , f = n && n.hoverLabelModel
  18691. , g = n && n.hoverAnimation
  18692. , p = n && n.cursorStyle;
  18693. if (!n || t.hasItemOption) {
  18694. var m = n && n.itemModel ? n.itemModel : t.getItemModel(e);
  18695. l = m.getModel(eM).getItemStyle(["color"]),
  18696. h = m.getModel(iM).getItemStyle(),
  18697. u = m.getShallow("symbolRotate"),
  18698. c = m.getShallow("symbolOffset"),
  18699. d = m.getModel(nM),
  18700. f = m.getModel(oM),
  18701. g = m.getShallow("hoverAnimation"),
  18702. p = m.getShallow("cursor")
  18703. } else
  18704. h = o({}, h);
  18705. var v = a.style;
  18706. a.attr("rotation", (u || 0) * Math.PI / 180 || 0),
  18707. c && a.attr("position", [bi(c[0], i[0]), bi(c[1], i[1])]),
  18708. p && a.attr("cursor", p),
  18709. a.setColor(s, n && n.symbolInnerColor),
  18710. a.setStyle(l);
  18711. var y = t.getItemVisual(e, "opacity");
  18712. null != y && (v.opacity = y);
  18713. var x = n && n.useNameLabel
  18714. , _ = !x && qr(t);
  18715. (x || null != _) && ho(v, h, d, f, {
  18716. labelFetcher: r,
  18717. labelDataIndex: e,
  18718. defaultText: x ? t.getName(e) : t.get(_, e),
  18719. isRectText: !0,
  18720. autoColor: s
  18721. }),
  18722. a.off("mouseover").off("mouseout").off("emphasis").off("normal"),
  18723. a.hoverStyle = h,
  18724. lo(a);
  18725. var b = $r(i);
  18726. if (g && r.isAnimationEnabled()) {
  18727. var w = function() {
  18728. var t = b[1] / b[0];
  18729. this.animateTo({
  18730. scale: [Math.max(1.1 * b[0], b[0] + 3), Math.max(1.1 * b[1], b[1] + 3 * t)]
  18731. }, 400, "elasticOut")
  18732. }
  18733. , S = function() {
  18734. this.animateTo({
  18735. scale: b
  18736. }, 400, "elasticOut")
  18737. };
  18738. a.on("mouseover", w).on("mouseout", S).on("emphasis", w).on("normal", S)
  18739. }
  18740. }
  18741. ,
  18742. tM.fadeOut = function(t, e) {
  18743. var i = this.childAt(0);
  18744. this.silent = i.silent = !0,
  18745. !(e && e.keepLabel) && (i.style.text = null),
  18746. _o(i, {
  18747. style: {
  18748. opacity: 0
  18749. },
  18750. scale: [0, 0]
  18751. }, this._seriesModel, this.dataIndex, t)
  18752. }
  18753. ,
  18754. l(Kr, $y);
  18755. var aM = Qr.prototype;
  18756. aM.updateData = function(t, e) {
  18757. var i = this.group
  18758. , n = t.hostModel
  18759. , o = this._data
  18760. , a = this._symbolCtor
  18761. , r = {
  18762. itemStyle: n.getModel("itemStyle.normal").getItemStyle(["color"]),
  18763. hoverItemStyle: n.getModel("itemStyle.emphasis").getItemStyle(),
  18764. symbolRotate: n.get("symbolRotate"),
  18765. symbolOffset: n.get("symbolOffset"),
  18766. hoverAnimation: n.get("hoverAnimation"),
  18767. labelModel: n.getModel("label.normal"),
  18768. hoverLabelModel: n.getModel("label.emphasis"),
  18769. cursorStyle: n.get("cursor")
  18770. };
  18771. t.diff(o).add(function(n) {
  18772. var o = t.getItemLayout(n);
  18773. if (ts(t, n, e)) {
  18774. var s = new a(t,n,r);
  18775. s.attr("position", o),
  18776. t.setItemGraphicEl(n, s),
  18777. i.add(s)
  18778. }
  18779. }).update(function(s, l) {
  18780. var h = o.getItemGraphicEl(l)
  18781. , u = t.getItemLayout(s);
  18782. ts(t, s, e) ? (h ? (h.updateData(t, s, r),
  18783. _o(h, {
  18784. position: u
  18785. }, n)) : (h = new a(t,s)).attr("position", u),
  18786. i.add(h),
  18787. t.setItemGraphicEl(s, h)) : i.remove(h)
  18788. }).remove(function(t) {
  18789. var e = o.getItemGraphicEl(t);
  18790. e && e.fadeOut(function() {
  18791. i.remove(e)
  18792. })
  18793. }).execute(),
  18794. this._data = t
  18795. }
  18796. ,
  18797. aM.updateLayout = function() {
  18798. var t = this._data;
  18799. t && t.eachItemGraphicEl(function(e, i) {
  18800. var n = t.getItemLayout(i);
  18801. e.attr("position", n)
  18802. })
  18803. }
  18804. ,
  18805. aM.remove = function(t) {
  18806. var e = this.group
  18807. , i = this._data;
  18808. i && (t ? i.eachItemGraphicEl(function(t) {
  18809. t.fadeOut(function() {
  18810. e.remove(t)
  18811. })
  18812. }) : e.removeAll())
  18813. }
  18814. ;
  18815. var rM = function(t, e, i, n, o, a) {
  18816. for (var r = ns(t, e), s = [], l = [], h = [], u = [], c = [], d = [], f = [], g = a.dimensions, p = 0; p < r.length; p++) {
  18817. var m = r[p]
  18818. , v = !0;
  18819. switch (m.cmd) {
  18820. case "=":
  18821. var y = t.getItemLayout(m.idx)
  18822. , x = e.getItemLayout(m.idx1);
  18823. (isNaN(y[0]) || isNaN(y[1])) && (y = x.slice()),
  18824. s.push(y),
  18825. l.push(x),
  18826. h.push(i[m.idx]),
  18827. u.push(n[m.idx1]),
  18828. f.push(e.getRawIndex(m.idx1));
  18829. break;
  18830. case "+":
  18831. _ = m.idx;
  18832. s.push(o.dataToPoint([e.get(g[0], _, !0), e.get(g[1], _, !0)])),
  18833. l.push(e.getItemLayout(_).slice()),
  18834. h.push(is(o, e, _)),
  18835. u.push(n[_]),
  18836. f.push(e.getRawIndex(_));
  18837. break;
  18838. case "-":
  18839. var _ = m.idx
  18840. , b = t.getRawIndex(_);
  18841. b !== _ ? (s.push(t.getItemLayout(_)),
  18842. l.push(a.dataToPoint([t.get(g[0], _, !0), t.get(g[1], _, !0)])),
  18843. h.push(i[_]),
  18844. u.push(is(a, t, _)),
  18845. f.push(b)) : v = !1
  18846. }
  18847. v && (c.push(m),
  18848. d.push(d.length))
  18849. }
  18850. d.sort(function(t, e) {
  18851. return f[t] - f[e]
  18852. });
  18853. for (var w = [], S = [], M = [], I = [], T = [], p = 0; p < d.length; p++) {
  18854. _ = d[p];
  18855. w[p] = s[_],
  18856. S[p] = l[_],
  18857. M[p] = h[_],
  18858. I[p] = u[_],
  18859. T[p] = c[_]
  18860. }
  18861. return {
  18862. current: w,
  18863. next: S,
  18864. stackedOnCurrent: M,
  18865. stackedOnNext: I,
  18866. status: T
  18867. }
  18868. }
  18869. , sM = $
  18870. , lM = K
  18871. , hM = G
  18872. , uM = E
  18873. , cM = []
  18874. , dM = []
  18875. , fM = []
  18876. , gM = On.extend({
  18877. type: "ec-polyline",
  18878. shape: {
  18879. points: [],
  18880. smooth: 0,
  18881. smoothConstraint: !0,
  18882. smoothMonotone: null,
  18883. connectNulls: !1
  18884. },
  18885. style: {
  18886. fill: null,
  18887. stroke: "#000"
  18888. },
  18889. brush: lb(On.prototype.brush),
  18890. buildPath: function(t, e) {
  18891. var i = e.points
  18892. , n = 0
  18893. , o = i.length
  18894. , a = rs(i, e.smoothConstraint);
  18895. if (e.connectNulls) {
  18896. for (; o > 0 && os(i[o - 1]); o--)
  18897. ;
  18898. for (; n < o && os(i[n]); n++)
  18899. ;
  18900. }
  18901. for (; n < o; )
  18902. n += as(t, i, n, o, o, 1, a.min, a.max, e.smooth, e.smoothMonotone, e.connectNulls) + 1
  18903. }
  18904. })
  18905. , pM = On.extend({
  18906. type: "ec-polygon",
  18907. shape: {
  18908. points: [],
  18909. stackedOnPoints: [],
  18910. smooth: 0,
  18911. stackedOnSmooth: 0,
  18912. smoothConstraint: !0,
  18913. smoothMonotone: null,
  18914. connectNulls: !1
  18915. },
  18916. brush: lb(On.prototype.brush),
  18917. buildPath: function(t, e) {
  18918. var i = e.points
  18919. , n = e.stackedOnPoints
  18920. , o = 0
  18921. , a = i.length
  18922. , r = e.smoothMonotone
  18923. , s = rs(i, e.smoothConstraint)
  18924. , l = rs(n, e.smoothConstraint);
  18925. if (e.connectNulls) {
  18926. for (; a > 0 && os(i[a - 1]); a--)
  18927. ;
  18928. for (; o < a && os(i[o]); o++)
  18929. ;
  18930. }
  18931. for (; o < a; ) {
  18932. var h = as(t, i, o, a, a, 1, s.min, s.max, e.smooth, r, e.connectNulls);
  18933. as(t, n, o + h - 1, h, a, -1, l.min, l.max, e.stackedOnSmooth, r, e.connectNulls),
  18934. o += h + 1,
  18935. t.closePath()
  18936. }
  18937. }
  18938. });
  18939. Ia.extend({
  18940. type: "line",
  18941. init: function() {
  18942. var t = new $y
  18943. , e = new Qr;
  18944. this.group.add(e.group),
  18945. this._symbolDraw = e,
  18946. this._lineGroup = t
  18947. },
  18948. render: function(t, e, i) {
  18949. var n = t.coordinateSystem
  18950. , o = this.group
  18951. , r = t.getData()
  18952. , s = t.getModel("lineStyle.normal")
  18953. , l = t.getModel("areaStyle.normal")
  18954. , h = r.mapArray(r.getItemLayout, !0)
  18955. , u = "polar" === n.type
  18956. , c = this._coordSys
  18957. , d = this._symbolDraw
  18958. , f = this._polyline
  18959. , g = this._polygon
  18960. , p = this._lineGroup
  18961. , m = t.get("animation")
  18962. , v = !l.isEmpty()
  18963. , y = cs(n, r)
  18964. , x = t.get("showSymbol")
  18965. , _ = x && !u && !t.get("showAllSymbol") && this._getSymbolIgnoreFunc(r, n)
  18966. , b = this._data;
  18967. b && b.eachItemGraphicEl(function(t, e) {
  18968. t.__temp && (o.remove(t),
  18969. b.setItemGraphicEl(e, null))
  18970. }),
  18971. x || d.remove(),
  18972. o.add(p);
  18973. var w = !u && t.get("step");
  18974. f && c.type === n.type && w === this._step ? (v && !g ? g = this._newPolygon(h, y, n, m) : g && !v && (p.remove(g),
  18975. g = this._polygon = null),
  18976. p.setClipPath(gs(n, !1, t)),
  18977. x && d.updateData(r, _),
  18978. r.eachItemGraphicEl(function(t) {
  18979. t.stopAnimation(!0)
  18980. }),
  18981. ss(this._stackedOnPoints, y) && ss(this._points, h) || (m ? this._updateAnimation(r, y, n, i, w) : (w && (h = ps(h, n, w),
  18982. y = ps(y, n, w)),
  18983. f.setShape({
  18984. points: h
  18985. }),
  18986. g && g.setShape({
  18987. points: h,
  18988. stackedOnPoints: y
  18989. })))) : (x && d.updateData(r, _),
  18990. w && (h = ps(h, n, w),
  18991. y = ps(y, n, w)),
  18992. f = this._newPolyline(h, n, m),
  18993. v && (g = this._newPolygon(h, y, n, m)),
  18994. p.setClipPath(gs(n, !0, t)));
  18995. var S = ms(r, n) || r.getVisual("color");
  18996. f.useStyle(a(s.getLineStyle(), {
  18997. fill: "none",
  18998. stroke: S,
  18999. lineJoin: "bevel"
  19000. }));
  19001. var M = t.get("smooth");
  19002. if (M = ls(t.get("smooth")),
  19003. f.setShape({
  19004. smooth: M,
  19005. smoothMonotone: t.get("smoothMonotone"),
  19006. connectNulls: t.get("connectNulls")
  19007. }),
  19008. g) {
  19009. var I = r.stackedOn
  19010. , T = 0;
  19011. g.useStyle(a(l.getAreaStyle(), {
  19012. fill: S,
  19013. opacity: .7,
  19014. lineJoin: "bevel"
  19015. })),
  19016. I && (T = ls(I.hostModel.get("smooth"))),
  19017. g.setShape({
  19018. smooth: M,
  19019. stackedOnSmooth: T,
  19020. smoothMonotone: t.get("smoothMonotone"),
  19021. connectNulls: t.get("connectNulls")
  19022. })
  19023. }
  19024. this._data = r,
  19025. this._coordSys = n,
  19026. this._stackedOnPoints = y,
  19027. this._points = h,
  19028. this._step = w
  19029. },
  19030. dispose: function() {},
  19031. highlight: function(t, e, i, n) {
  19032. var o = t.getData()
  19033. , a = Go(o, n);
  19034. if (!(a instanceof Array) && null != a && a >= 0) {
  19035. var r = o.getItemGraphicEl(a);
  19036. if (!r) {
  19037. var s = o.getItemLayout(a);
  19038. if (!s)
  19039. return;
  19040. (r = new Kr(o,a)).position = s,
  19041. r.setZ(t.get("zlevel"), t.get("z")),
  19042. r.ignore = isNaN(s[0]) || isNaN(s[1]),
  19043. r.__temp = !0,
  19044. o.setItemGraphicEl(a, r),
  19045. r.stopSymbolAnimation(!0),
  19046. this.group.add(r)
  19047. }
  19048. r.highlight()
  19049. } else
  19050. Ia.prototype.highlight.call(this, t, e, i, n)
  19051. },
  19052. downplay: function(t, e, i, n) {
  19053. var o = t.getData()
  19054. , a = Go(o, n);
  19055. if (null != a && a >= 0) {
  19056. var r = o.getItemGraphicEl(a);
  19057. r && (r.__temp ? (o.setItemGraphicEl(a, null),
  19058. this.group.remove(r)) : r.downplay())
  19059. } else
  19060. Ia.prototype.downplay.call(this, t, e, i, n)
  19061. },
  19062. _newPolyline: function(t) {
  19063. var e = this._polyline;
  19064. return e && this._lineGroup.remove(e),
  19065. e = new gM({
  19066. shape: {
  19067. points: t
  19068. },
  19069. silent: !0,
  19070. z2: 10
  19071. }),
  19072. this._lineGroup.add(e),
  19073. this._polyline = e,
  19074. e
  19075. },
  19076. _newPolygon: function(t, e) {
  19077. var i = this._polygon;
  19078. return i && this._lineGroup.remove(i),
  19079. i = new pM({
  19080. shape: {
  19081. points: t,
  19082. stackedOnPoints: e
  19083. },
  19084. silent: !0
  19085. }),
  19086. this._lineGroup.add(i),
  19087. this._polygon = i,
  19088. i
  19089. },
  19090. _getSymbolIgnoreFunc: function(t, e) {
  19091. var i = e.getAxesByScale("ordinal")[0];
  19092. if (i && i.isLabelIgnored)
  19093. return p(i.isLabelIgnored, i)
  19094. },
  19095. _updateAnimation: function(t, e, i, n, o) {
  19096. var a = this._polyline
  19097. , r = this._polygon
  19098. , s = t.hostModel
  19099. , l = rM(this._data, t, this._stackedOnPoints, e, this._coordSys, i)
  19100. , h = l.current
  19101. , u = l.stackedOnCurrent
  19102. , c = l.next
  19103. , d = l.stackedOnNext;
  19104. o && (h = ps(l.current, i, o),
  19105. u = ps(l.stackedOnCurrent, i, o),
  19106. c = ps(l.next, i, o),
  19107. d = ps(l.stackedOnNext, i, o)),
  19108. a.shape.__points = l.current,
  19109. a.shape.points = h,
  19110. _o(a, {
  19111. shape: {
  19112. points: c
  19113. }
  19114. }, s),
  19115. r && (r.setShape({
  19116. points: h,
  19117. stackedOnPoints: u
  19118. }),
  19119. _o(r, {
  19120. shape: {
  19121. points: c,
  19122. stackedOnPoints: d
  19123. }
  19124. }, s));
  19125. for (var f = [], g = l.status, p = 0; p < g.length; p++)
  19126. if ("=" === g[p].cmd) {
  19127. var m = t.getItemGraphicEl(g[p].idx1);
  19128. m && f.push({
  19129. el: m,
  19130. ptIdx: p
  19131. })
  19132. }
  19133. a.animators && a.animators.length && a.animators[0].during(function() {
  19134. for (var t = 0; t < f.length; t++)
  19135. f[t].el.attr("position", a.shape.__points[f[t].ptIdx])
  19136. })
  19137. },
  19138. remove: function(t) {
  19139. var e = this.group
  19140. , i = this._data;
  19141. this._lineGroup.removeAll(),
  19142. this._symbolDraw.remove(!0),
  19143. i && i.eachItemGraphicEl(function(t, n) {
  19144. t.__temp && (e.remove(t),
  19145. i.setItemGraphicEl(n, null))
  19146. }),
  19147. this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._data = null
  19148. }
  19149. });
  19150. var mM = function(t, e, i, n, o) {
  19151. n.eachRawSeriesByType(t, function(t) {
  19152. var o = t.getData()
  19153. , a = t.get("symbol") || e
  19154. , r = t.get("symbolSize");
  19155. o.setVisual({
  19156. legendSymbol: i || a,
  19157. symbol: a,
  19158. symbolSize: r
  19159. }),
  19160. n.isSeriesFiltered(t) || ("function" == typeof r && o.each(function(e) {
  19161. var i = t.getRawValue(e)
  19162. , n = t.getDataParams(e);
  19163. o.setItemVisual(e, "symbolSize", r(i, n))
  19164. }),
  19165. o.each(function(t) {
  19166. var e = o.getItemModel(t)
  19167. , i = e.getShallow("symbol", !0)
  19168. , n = e.getShallow("symbolSize", !0);
  19169. null != i && o.setItemVisual(t, "symbol", i),
  19170. null != n && o.setItemVisual(t, "symbolSize", n)
  19171. }))
  19172. })
  19173. }
  19174. , vM = function(t, e) {
  19175. e.eachSeriesByType(t, function(t) {
  19176. var e = t.getData()
  19177. , i = t.coordinateSystem;
  19178. if (i) {
  19179. for (var n = [], o = i.dimensions, a = 0; a < o.length; a++)
  19180. n.push(t.coordDimToDataDim(i.dimensions[a])[0]);
  19181. 1 === n.length ? e.each(n[0], function(t, n) {
  19182. e.setItemLayout(n, isNaN(t) ? [NaN, NaN] : i.dataToPoint(t))
  19183. }) : 2 === n.length && e.each(n, function(t, n, o) {
  19184. e.setItemLayout(o, isNaN(t) || isNaN(n) ? [NaN, NaN] : i.dataToPoint([t, n]))
  19185. }, !0)
  19186. }
  19187. })
  19188. }
  19189. , yM = {
  19190. average: function(t) {
  19191. for (var e = 0, i = 0, n = 0; n < t.length; n++)
  19192. isNaN(t[n]) || (e += t[n],
  19193. i++);
  19194. return 0 === i ? NaN : e / i
  19195. },
  19196. sum: function(t) {
  19197. for (var e = 0, i = 0; i < t.length; i++)
  19198. e += t[i] || 0;
  19199. return e
  19200. },
  19201. max: function(t) {
  19202. for (var e = -1 / 0, i = 0; i < t.length; i++)
  19203. t[i] > e && (e = t[i]);
  19204. return e
  19205. },
  19206. min: function(t) {
  19207. for (var e = 1 / 0, i = 0; i < t.length; i++)
  19208. t[i] < e && (e = t[i]);
  19209. return e
  19210. },
  19211. nearest: function(t) {
  19212. return t[0]
  19213. }
  19214. }
  19215. , xM = function(t, e) {
  19216. return Math.round(t.length / 2)
  19217. }
  19218. , _M = function(t) {
  19219. this._axes = {},
  19220. this._dimList = [],
  19221. this.name = t || ""
  19222. };
  19223. _M.prototype = {
  19224. constructor: _M,
  19225. type: "cartesian",
  19226. getAxis: function(t) {
  19227. return this._axes[t]
  19228. },
  19229. getAxes: function() {
  19230. return d(this._dimList, vs, this)
  19231. },
  19232. getAxesByScale: function(t) {
  19233. return t = t.toLowerCase(),
  19234. g(this.getAxes(), function(e) {
  19235. return e.scale.type === t
  19236. })
  19237. },
  19238. addAxis: function(t) {
  19239. var e = t.dim;
  19240. this._axes[e] = t,
  19241. this._dimList.push(e)
  19242. },
  19243. dataToCoord: function(t) {
  19244. return this._dataCoordConvert(t, "dataToCoord")
  19245. },
  19246. coordToData: function(t) {
  19247. return this._dataCoordConvert(t, "coordToData")
  19248. },
  19249. _dataCoordConvert: function(t, e) {
  19250. for (var i = this._dimList, n = t instanceof Array ? [] : {}, o = 0; o < i.length; o++) {
  19251. var a = i[o]
  19252. , r = this._axes[a];
  19253. n[a] = r[e](t[a])
  19254. }
  19255. return n
  19256. }
  19257. },
  19258. ys.prototype = {
  19259. constructor: ys,
  19260. type: "cartesian2d",
  19261. dimensions: ["x", "y"],
  19262. getBaseAxis: function() {
  19263. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x")
  19264. },
  19265. containPoint: function(t) {
  19266. var e = this.getAxis("x")
  19267. , i = this.getAxis("y");
  19268. return e.contain(e.toLocalCoord(t[0])) && i.contain(i.toLocalCoord(t[1]))
  19269. },
  19270. containData: function(t) {
  19271. return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1])
  19272. },
  19273. dataToPoint: function(t, e) {
  19274. var i = this.getAxis("x")
  19275. , n = this.getAxis("y");
  19276. return [i.toGlobalCoord(i.dataToCoord(t[0], e)), n.toGlobalCoord(n.dataToCoord(t[1], e))]
  19277. },
  19278. pointToData: function(t, e) {
  19279. var i = this.getAxis("x")
  19280. , n = this.getAxis("y");
  19281. return [i.coordToData(i.toLocalCoord(t[0]), e), n.coordToData(n.toLocalCoord(t[1]), e)]
  19282. },
  19283. getOtherAxis: function(t) {
  19284. return this.getAxis("x" === t.dim ? "y" : "x")
  19285. }
  19286. },
  19287. l(ys, _M);
  19288. var bM = function(t, e, i, n, o) {
  19289. YS.call(this, t, e, i),
  19290. this.type = n || "value",
  19291. this.position = o || "bottom"
  19292. };
  19293. bM.prototype = {
  19294. constructor: bM,
  19295. index: 0,
  19296. onZero: !1,
  19297. model: null,
  19298. isHorizontal: function() {
  19299. var t = this.position;
  19300. return "top" === t || "bottom" === t
  19301. },
  19302. getGlobalExtent: function(t) {
  19303. var e = this.getExtent();
  19304. return e[0] = this.toGlobalCoord(e[0]),
  19305. e[1] = this.toGlobalCoord(e[1]),
  19306. t && e[0] > e[1] && e.reverse(),
  19307. e
  19308. },
  19309. getOtherAxis: function() {
  19310. this.grid.getOtherAxis()
  19311. },
  19312. isLabelIgnored: function(t) {
  19313. if ("category" === this.type) {
  19314. var e = this.getLabelInterval();
  19315. return "function" == typeof e && !e(t, this.scale.getLabel(t)) || t % (e + 1)
  19316. }
  19317. },
  19318. pointToData: function(t, e) {
  19319. return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e)
  19320. },
  19321. toLocalCoord: null,
  19322. toGlobalCoord: null
  19323. },
  19324. l(bM, YS);
  19325. var wM = {
  19326. show: !0,
  19327. zlevel: 0,
  19328. z: 0,
  19329. inverse: !1,
  19330. name: "",
  19331. nameLocation: "end",
  19332. nameRotate: null,
  19333. nameTruncate: {
  19334. maxWidth: null,
  19335. ellipsis: "...",
  19336. placeholder: "."
  19337. },
  19338. nameTextStyle: {},
  19339. nameGap: 15,
  19340. silent: !1,
  19341. triggerEvent: !1,
  19342. tooltip: {
  19343. show: !1
  19344. },
  19345. axisPointer: {},
  19346. axisLine: {
  19347. show: !0,
  19348. onZero: !0,
  19349. onZeroAxisIndex: null,
  19350. lineStyle: {
  19351. color: "#333",
  19352. width: 1,
  19353. type: "solid"
  19354. },
  19355. symbol: ["none", "none"],
  19356. symbolSize: [10, 15]
  19357. },
  19358. axisTick: {
  19359. show: !0,
  19360. inside: !1,
  19361. length: 5,
  19362. lineStyle: {
  19363. width: 1
  19364. }
  19365. },
  19366. axisLabel: {
  19367. show: !0,
  19368. inside: !1,
  19369. rotate: 0,
  19370. showMinLabel: null,
  19371. showMaxLabel: null,
  19372. margin: 8,
  19373. fontSize: 12
  19374. },
  19375. splitLine: {
  19376. show: !0,
  19377. lineStyle: {
  19378. color: ["#ccc"],
  19379. width: 1,
  19380. type: "solid"
  19381. }
  19382. },
  19383. splitArea: {
  19384. show: !1,
  19385. areaStyle: {
  19386. color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"]
  19387. }
  19388. }
  19389. }
  19390. , SM = {};
  19391. SM.categoryAxis = i({
  19392. boundaryGap: !0,
  19393. splitLine: {
  19394. show: !1
  19395. },
  19396. axisTick: {
  19397. alignWithLabel: !1,
  19398. interval: "auto"
  19399. },
  19400. axisLabel: {
  19401. interval: "auto"
  19402. }
  19403. }, wM),
  19404. SM.valueAxis = i({
  19405. boundaryGap: [0, 0],
  19406. splitNumber: 5
  19407. }, wM),
  19408. SM.timeAxis = a({
  19409. scale: !0,
  19410. min: "dataMin",
  19411. max: "dataMax"
  19412. }, SM.valueAxis),
  19413. SM.logAxis = a({
  19414. scale: !0,
  19415. logBase: 10
  19416. }, SM.valueAxis);
  19417. var MM = ["value", "category", "time", "log"]
  19418. , IM = function(t, e, o, a) {
  19419. c(MM, function(r) {
  19420. e.extend({
  19421. type: t + "Axis." + r,
  19422. mergeDefaultAndTheme: function(e, n) {
  19423. var a = this.layoutMode
  19424. , s = a ? Qo(e) : {};
  19425. i(e, n.getTheme().get(r + "Axis")),
  19426. i(e, this.getDefaultOption()),
  19427. e.type = o(t, e),
  19428. a && Jo(e, s, a)
  19429. },
  19430. defaultOption: n([{}, SM[r + "Axis"], a], !0)
  19431. })
  19432. }),
  19433. qb.registerSubTypeDefaulter(t + "Axis", m(o, t))
  19434. }
  19435. , TM = qb.extend({
  19436. type: "cartesian2dAxis",
  19437. axis: null,
  19438. init: function() {
  19439. TM.superApply(this, "init", arguments),
  19440. this.resetRange()
  19441. },
  19442. mergeOption: function() {
  19443. TM.superApply(this, "mergeOption", arguments),
  19444. this.resetRange()
  19445. },
  19446. restoreData: function() {
  19447. TM.superApply(this, "restoreData", arguments),
  19448. this.resetRange()
  19449. },
  19450. getCoordSysModel: function() {
  19451. return this.ecModel.queryComponents({
  19452. mainType: "grid",
  19453. index: this.option.gridIndex,
  19454. id: this.option.gridId
  19455. })[0]
  19456. }
  19457. });
  19458. i(TM.prototype, VS);
  19459. var AM = {
  19460. offset: 0
  19461. };
  19462. IM("x", TM, xs, AM),
  19463. IM("y", TM, xs, AM),
  19464. qb.extend({
  19465. type: "grid",
  19466. dependencies: ["xAxis", "yAxis"],
  19467. layoutMode: "box",
  19468. coordinateSystem: null,
  19469. defaultOption: {
  19470. show: !1,
  19471. zlevel: 0,
  19472. z: 0,
  19473. left: "10%",
  19474. top: 60,
  19475. right: "10%",
  19476. bottom: 60,
  19477. containLabel: !1,
  19478. backgroundColor: "rgba(0,0,0,0)",
  19479. borderWidth: 1,
  19480. borderColor: "#ccc"
  19481. }
  19482. });
  19483. var CM = c
  19484. , DM = function(t) {
  19485. var e = t.scale.getExtent()
  19486. , i = e[0]
  19487. , n = e[1];
  19488. return !(i > 0 && n > 0 || i < 0 && n < 0)
  19489. }
  19490. , LM = Or
  19491. , kM = Ss.prototype;
  19492. kM.type = "grid",
  19493. kM.axisPointerEnabled = !0,
  19494. kM.getRect = function() {
  19495. return this._rect
  19496. }
  19497. ,
  19498. kM.update = function(t, e) {
  19499. var i = this._axesMap;
  19500. this._updateScale(t, this.model),
  19501. CM(i.x, function(t) {
  19502. LM(t.scale, t.model)
  19503. }),
  19504. CM(i.y, function(t) {
  19505. LM(t.scale, t.model)
  19506. }),
  19507. CM(i.x, function(t) {
  19508. Ms(i, "y", t)
  19509. }),
  19510. CM(i.y, function(t) {
  19511. Ms(i, "x", t)
  19512. }),
  19513. this.resize(this.model, e)
  19514. }
  19515. ,
  19516. kM.resize = function(t, e, i) {
  19517. function n() {
  19518. CM(a, function(t) {
  19519. var e = t.isHorizontal()
  19520. , i = e ? [0, o.width] : [0, o.height]
  19521. , n = t.inverse ? 1 : 0;
  19522. t.setExtent(i[n], i[1 - n]),
  19523. Ts(t, e ? o.x : o.y)
  19524. })
  19525. }
  19526. var o = Yo(t.getBoxLayoutParams(), {
  19527. width: e.getWidth(),
  19528. height: e.getHeight()
  19529. });
  19530. this._rect = o;
  19531. var a = this._axesList;
  19532. n(),
  19533. !i && t.get("containLabel") && (CM(a, function(t) {
  19534. if (!t.model.get("axisLabel.inside")) {
  19535. var e = ws(t);
  19536. if (e) {
  19537. var i = t.isHorizontal() ? "height" : "width"
  19538. , n = t.model.get("axisLabel.margin");
  19539. o[i] -= e[i] + n,
  19540. "top" === t.position ? o.y += e.height + n : "left" === t.position && (o.x += e.width + n)
  19541. }
  19542. }
  19543. }),
  19544. n())
  19545. }
  19546. ,
  19547. kM.getAxis = function(t, e) {
  19548. var i = this._axesMap[t];
  19549. if (null != i) {
  19550. if (null == e)
  19551. for (var n in i)
  19552. if (i.hasOwnProperty(n))
  19553. return i[n];
  19554. return i[e]
  19555. }
  19556. }
  19557. ,
  19558. kM.getAxes = function() {
  19559. return this._axesList.slice()
  19560. }
  19561. ,
  19562. kM.getCartesian = function(t, e) {
  19563. if (null != t && null != e) {
  19564. var i = "x" + t + "y" + e;
  19565. return this._coordsMap[i]
  19566. }
  19567. _(t) && (e = t.yAxisIndex,
  19568. t = t.xAxisIndex);
  19569. for (var n = 0, o = this._coordsList; n < o.length; n++)
  19570. if (o[n].getAxis("x").index === t || o[n].getAxis("y").index === e)
  19571. return o[n]
  19572. }
  19573. ,
  19574. kM.getCartesians = function() {
  19575. return this._coordsList.slice()
  19576. }
  19577. ,
  19578. kM.convertToPixel = function(t, e, i) {
  19579. var n = this._findConvertTarget(t, e);
  19580. return n.cartesian ? n.cartesian.dataToPoint(i) : n.axis ? n.axis.toGlobalCoord(n.axis.dataToCoord(i)) : null
  19581. }
  19582. ,
  19583. kM.convertFromPixel = function(t, e, i) {
  19584. var n = this._findConvertTarget(t, e);
  19585. return n.cartesian ? n.cartesian.pointToData(i) : n.axis ? n.axis.coordToData(n.axis.toLocalCoord(i)) : null
  19586. }
  19587. ,
  19588. kM._findConvertTarget = function(t, e) {
  19589. var i, n, o = e.seriesModel, a = e.xAxisModel || o && o.getReferringComponents("xAxis")[0], r = e.yAxisModel || o && o.getReferringComponents("yAxis")[0], l = e.gridModel, h = this._coordsList;
  19590. return o ? s(h, i = o.coordinateSystem) < 0 && (i = null) : a && r ? i = this.getCartesian(a.componentIndex, r.componentIndex) : a ? n = this.getAxis("x", a.componentIndex) : r ? n = this.getAxis("y", r.componentIndex) : l && l.coordinateSystem === this && (i = this._coordsList[0]),
  19591. {
  19592. cartesian: i,
  19593. axis: n
  19594. }
  19595. }
  19596. ,
  19597. kM.containPoint = function(t) {
  19598. var e = this._coordsList[0];
  19599. if (e)
  19600. return e.containPoint(t)
  19601. }
  19602. ,
  19603. kM._initCartesian = function(t, e, i) {
  19604. function n(i) {
  19605. return function(n, s) {
  19606. if (_s(n, t, e)) {
  19607. var l = n.get("position");
  19608. "x" === i ? "top" !== l && "bottom" !== l && o[l = "bottom"] && (l = "top" === l ? "bottom" : "top") : "left" !== l && "right" !== l && o[l = "left"] && (l = "left" === l ? "right" : "left"),
  19609. o[l] = !0;
  19610. var h = new bM(i,zr(n),[0, 0],n.get("type"),l)
  19611. , u = "category" === h.type;
  19612. h.onBand = u && n.get("boundaryGap"),
  19613. h.inverse = n.get("inverse"),
  19614. h.onZero = n.get("axisLine.onZero"),
  19615. h.onZeroAxisIndex = n.get("axisLine.onZeroAxisIndex"),
  19616. n.axis = h,
  19617. h.model = n,
  19618. h.grid = this,
  19619. h.index = s,
  19620. this._axesList.push(h),
  19621. a[i][s] = h,
  19622. r[i]++
  19623. }
  19624. }
  19625. }
  19626. var o = {
  19627. left: !1,
  19628. right: !1,
  19629. top: !1,
  19630. bottom: !1
  19631. }
  19632. , a = {
  19633. x: {},
  19634. y: {}
  19635. }
  19636. , r = {
  19637. x: 0,
  19638. y: 0
  19639. };
  19640. if (e.eachComponent("xAxis", n("x"), this),
  19641. e.eachComponent("yAxis", n("y"), this),
  19642. !r.x || !r.y)
  19643. return this._axesMap = {},
  19644. void (this._axesList = []);
  19645. this._axesMap = a,
  19646. CM(a.x, function(e, i) {
  19647. CM(a.y, function(n, o) {
  19648. var a = "x" + i + "y" + o
  19649. , r = new ys(a);
  19650. r.grid = this,
  19651. r.model = t,
  19652. this._coordsMap[a] = r,
  19653. this._coordsList.push(r),
  19654. r.addAxis(e),
  19655. r.addAxis(n)
  19656. }, this)
  19657. }, this)
  19658. }
  19659. ,
  19660. kM._updateScale = function(t, e) {
  19661. function i(t, e, i) {
  19662. CM(i.coordDimToDataDim(e.dim), function(i) {
  19663. e.scale.unionExtentFromData(t, i)
  19664. })
  19665. }
  19666. c(this._axesList, function(t) {
  19667. t.scale.setExtent(1 / 0, -1 / 0)
  19668. }),
  19669. t.eachSeries(function(n) {
  19670. if (Cs(n)) {
  19671. var o = As(n)
  19672. , a = o[0]
  19673. , r = o[1];
  19674. if (!_s(a, e, t) || !_s(r, e, t))
  19675. return;
  19676. var s = this.getCartesian(a.componentIndex, r.componentIndex)
  19677. , l = n.getData()
  19678. , h = s.getAxis("x")
  19679. , u = s.getAxis("y");
  19680. "list" === l.type && (i(l, h, n),
  19681. i(l, u, n))
  19682. }
  19683. }, this)
  19684. }
  19685. ,
  19686. kM.getTooltipAxes = function(t) {
  19687. var e = []
  19688. , i = [];
  19689. return CM(this.getCartesians(), function(n) {
  19690. var o = null != t && "auto" !== t ? n.getAxis(t) : n.getBaseAxis()
  19691. , a = n.getOtherAxis(o);
  19692. s(e, o) < 0 && e.push(o),
  19693. s(i, a) < 0 && i.push(a)
  19694. }),
  19695. {
  19696. baseAxes: e,
  19697. otherAxes: i
  19698. }
  19699. }
  19700. ;
  19701. var PM = ["xAxis", "yAxis"];
  19702. Ss.create = function(t, e) {
  19703. var i = [];
  19704. return t.eachComponent("grid", function(n, o) {
  19705. var a = new Ss(n,t,e);
  19706. a.name = "grid_" + o,
  19707. a.resize(n, e, !0),
  19708. n.coordinateSystem = a,
  19709. i.push(a)
  19710. }),
  19711. t.eachSeries(function(t) {
  19712. if (Cs(t)) {
  19713. var e = As(t)
  19714. , i = e[0]
  19715. , n = e[1]
  19716. , o = i.getCoordSysModel()
  19717. , a = o.coordinateSystem;
  19718. t.coordinateSystem = a.getCartesian(i.componentIndex, n.componentIndex)
  19719. }
  19720. }),
  19721. i
  19722. }
  19723. ,
  19724. Ss.dimensions = Ss.prototype.dimensions = ys.prototype.dimensions,
  19725. ha.register("cartesian2d", Ss);
  19726. var OM = Math.PI
  19727. , zM = function(t, e) {
  19728. this.opt = e,
  19729. this.axisModel = t,
  19730. a(e, {
  19731. labelOffset: 0,
  19732. nameDirection: 1,
  19733. tickDirection: 1,
  19734. labelDirection: 1,
  19735. silent: !0
  19736. }),
  19737. this.group = new $y;
  19738. var i = new $y({
  19739. position: e.position.slice(),
  19740. rotation: e.rotation
  19741. });
  19742. i.updateTransform(),
  19743. this._transform = i.transform,
  19744. this._dumbGroup = i
  19745. };
  19746. zM.prototype = {
  19747. constructor: zM,
  19748. hasBuilder: function(t) {
  19749. return !!NM[t]
  19750. },
  19751. add: function(t) {
  19752. NM[t].call(this)
  19753. },
  19754. getGroup: function() {
  19755. return this.group
  19756. }
  19757. };
  19758. var NM = {
  19759. axisLine: function() {
  19760. var t = this.opt
  19761. , e = this.axisModel;
  19762. if (e.get("axisLine.show")) {
  19763. var i = this.axisModel.axis.getExtent()
  19764. , n = this._transform
  19765. , a = [i[0], 0]
  19766. , r = [i[1], 0];
  19767. n && (Y(a, a, n),
  19768. Y(r, r, n));
  19769. var s = o({
  19770. lineCap: "round"
  19771. }, e.getModel("axisLine.lineStyle").getLineStyle());
  19772. this.group.add(new mb(Xn({
  19773. anid: "line",
  19774. shape: {
  19775. x1: a[0],
  19776. y1: a[1],
  19777. x2: r[0],
  19778. y2: r[1]
  19779. },
  19780. style: s,
  19781. strokeContainThreshold: t.strokeContainThreshold || 5,
  19782. silent: !0,
  19783. z2: 1
  19784. })));
  19785. var l = e.get("axisLine.symbol")
  19786. , h = e.get("axisLine.symbolSize");
  19787. if (null != l) {
  19788. "string" == typeof l && (l = [l, l]),
  19789. "string" != typeof h && "number" != typeof h || (h = [h, h]);
  19790. var u = h[0]
  19791. , d = h[1];
  19792. c([[t.rotation + Math.PI / 2, a], [t.rotation - Math.PI / 2, r]], function(t, e) {
  19793. if ("none" !== l[e] && null != l[e]) {
  19794. var i = Gr(l[e], -u / 2, -d / 2, u, d, s.stroke, !0);
  19795. i.attr({
  19796. rotation: t[0],
  19797. position: t[1],
  19798. silent: !0
  19799. }),
  19800. this.group.add(i)
  19801. }
  19802. }, this)
  19803. }
  19804. }
  19805. },
  19806. axisTickLabel: function() {
  19807. var t = this.axisModel
  19808. , e = this.opt
  19809. , i = Es(this, t, e);
  19810. Ps(t, Rs(this, t, e), i)
  19811. },
  19812. axisName: function() {
  19813. var t = this.opt
  19814. , e = this.axisModel
  19815. , i = M(t.axisName, e.get("name"));
  19816. if (i) {
  19817. var n, a = e.get("nameLocation"), r = t.nameDirection, s = e.getModel("nameTextStyle"), l = e.get("nameGap") || 0, h = this.axisModel.axis.getExtent(), u = h[0] > h[1] ? -1 : 1, c = ["start" === a ? h[0] - u * l : "end" === a ? h[1] + u * l : (h[0] + h[1]) / 2, Ns(a) ? t.labelOffset + r * l : 0], d = e.get("nameRotate");
  19818. null != d && (d = d * OM / 180);
  19819. var f;
  19820. Ns(a) ? n = EM(t.rotation, null != d ? d : t.rotation, r) : (n = Ls(t, a, d || 0, h),
  19821. null != (f = t.axisNameAvailableWidth) && (f = Math.abs(f / Math.sin(n.rotation)),
  19822. !isFinite(f) && (f = null)));
  19823. var g = s.getFont()
  19824. , p = e.get("nameTruncate", !0) || {}
  19825. , m = p.ellipsis
  19826. , v = M(t.nameTruncateMaxWidth, p.maxWidth, f)
  19827. , y = null != m && null != v ? Yx(i, v, g, m, {
  19828. minChar: 2,
  19829. placeholder: p.placeholder
  19830. }) : i
  19831. , x = e.get("tooltip", !0)
  19832. , _ = e.mainType
  19833. , b = {
  19834. componentType: _,
  19835. name: i,
  19836. $vars: ["name"]
  19837. };
  19838. b[_ + "Index"] = e.componentIndex;
  19839. var w = new ab({
  19840. anid: "name",
  19841. __fullText: i,
  19842. __truncatedText: y,
  19843. position: c,
  19844. rotation: n.rotation,
  19845. silent: ks(e),
  19846. z2: 1,
  19847. tooltip: x && x.show ? o({
  19848. content: i,
  19849. formatter: function() {
  19850. return i
  19851. },
  19852. formatterParams: b
  19853. }, x) : null
  19854. });
  19855. uo(w.style, s, {
  19856. text: y,
  19857. textFont: g,
  19858. textFill: s.getTextColor() || e.get("axisLine.lineStyle.color"),
  19859. textAlign: n.textAlign,
  19860. textVerticalAlign: n.textVerticalAlign
  19861. }),
  19862. e.get("triggerEvent") && (w.eventData = Ds(e),
  19863. w.eventData.targetType = "axisName",
  19864. w.eventData.name = i),
  19865. this._dumbGroup.add(w),
  19866. w.updateTransform(),
  19867. this.group.add(w),
  19868. w.decomposeTransform()
  19869. }
  19870. }
  19871. }
  19872. , EM = zM.innerTextLayout = function(t, e, i) {
  19873. var n, o, a = Ci(e - t);
  19874. return Di(a) ? (o = i > 0 ? "top" : "bottom",
  19875. n = "center") : Di(a - OM) ? (o = i > 0 ? "bottom" : "top",
  19876. n = "center") : (o = "middle",
  19877. n = a > 0 && a < OM ? i > 0 ? "right" : "left" : i > 0 ? "left" : "right"),
  19878. {
  19879. rotation: a,
  19880. textAlign: n,
  19881. textVerticalAlign: o
  19882. }
  19883. }
  19884. , RM = zM.ifIgnoreOnTick = function(t, e, i, n, o, a) {
  19885. if (0 === e && o || e === n - 1 && a)
  19886. return !1;
  19887. var r, s = t.scale;
  19888. return "ordinal" === s.type && ("function" == typeof i ? (r = s.getTicks()[e],
  19889. !i(r, s.getLabel(r))) : e % (i + 1))
  19890. }
  19891. , VM = zM.getInterval = function(t, e) {
  19892. var i = t.get("interval");
  19893. return null != i && "auto" != i || (i = e),
  19894. i
  19895. }
  19896. , BM = c
  19897. , GM = m
  19898. , WM = sr({
  19899. type: "axis",
  19900. _axisPointer: null,
  19901. axisPointerClass: null,
  19902. render: function(t, e, i, n) {
  19903. this.axisPointerClass && Zs(t),
  19904. WM.superApply(this, "render", arguments),
  19905. Ys(this, t, 0, i, 0, !0)
  19906. },
  19907. updateAxisPointer: function(t, e, i, n, o) {
  19908. Ys(this, t, 0, i, 0, !1)
  19909. },
  19910. remove: function(t, e) {
  19911. var i = this._axisPointer;
  19912. i && i.remove(e),
  19913. WM.superApply(this, "remove", arguments)
  19914. },
  19915. dispose: function(t, e) {
  19916. $s(this, e),
  19917. WM.superApply(this, "dispose", arguments)
  19918. }
  19919. })
  19920. , HM = [];
  19921. WM.registerAxisPointerClass = function(t, e) {
  19922. HM[t] = e
  19923. }
  19924. ,
  19925. WM.getAxisPointerClass = function(t) {
  19926. return t && HM[t]
  19927. }
  19928. ;
  19929. var FM = zM.ifIgnoreOnTick
  19930. , ZM = zM.getInterval
  19931. , UM = ["axisLine", "axisTickLabel", "axisName"]
  19932. , jM = ["splitArea", "splitLine"]
  19933. , XM = WM.extend({
  19934. type: "cartesianAxis",
  19935. axisPointerClass: "CartesianAxisPointer",
  19936. render: function(t, e, i, n) {
  19937. this.group.removeAll();
  19938. var o = this._axisGroup;
  19939. if (this._axisGroup = new $y,
  19940. this.group.add(this._axisGroup),
  19941. t.get("show")) {
  19942. var a = t.getCoordSysModel()
  19943. , r = Ks(a, t)
  19944. , s = new zM(t,r);
  19945. c(UM, s.add, s),
  19946. this._axisGroup.add(s.getGroup()),
  19947. c(jM, function(e) {
  19948. t.get(e + ".show") && this["_" + e](t, a, r.labelInterval)
  19949. }, this),
  19950. Io(o, this._axisGroup, t),
  19951. XM.superCall(this, "render", t, e, i, n)
  19952. }
  19953. },
  19954. _splitLine: function(t, e, i) {
  19955. var n = t.axis;
  19956. if (!n.scale.isBlank()) {
  19957. var o = t.getModel("splitLine")
  19958. , r = o.getModel("lineStyle")
  19959. , s = r.get("color")
  19960. , l = ZM(o, i);
  19961. s = v(s) ? s : [s];
  19962. for (var h = e.coordinateSystem.getRect(), u = n.isHorizontal(), c = 0, d = n.getTicksCoords(), f = n.scale.getTicks(), g = t.get("axisLabel.showMinLabel"), p = t.get("axisLabel.showMaxLabel"), m = [], y = [], x = r.getLineStyle(), _ = 0; _ < d.length; _++)
  19963. if (!FM(n, _, l, d.length, g, p)) {
  19964. var b = n.toGlobalCoord(d[_]);
  19965. u ? (m[0] = b,
  19966. m[1] = h.y,
  19967. y[0] = b,
  19968. y[1] = h.y + h.height) : (m[0] = h.x,
  19969. m[1] = b,
  19970. y[0] = h.x + h.width,
  19971. y[1] = b);
  19972. var w = c++ % s.length;
  19973. this._axisGroup.add(new mb(Xn({
  19974. anid: "line_" + f[_],
  19975. shape: {
  19976. x1: m[0],
  19977. y1: m[1],
  19978. x2: y[0],
  19979. y2: y[1]
  19980. },
  19981. style: a({
  19982. stroke: s[w]
  19983. }, x),
  19984. silent: !0
  19985. })))
  19986. }
  19987. }
  19988. },
  19989. _splitArea: function(t, e, i) {
  19990. var n = t.axis;
  19991. if (!n.scale.isBlank()) {
  19992. var o = t.getModel("splitArea")
  19993. , r = o.getModel("areaStyle")
  19994. , s = r.get("color")
  19995. , l = e.coordinateSystem.getRect()
  19996. , h = n.getTicksCoords()
  19997. , u = n.scale.getTicks()
  19998. , c = n.toGlobalCoord(h[0])
  19999. , d = n.toGlobalCoord(h[0])
  20000. , f = 0
  20001. , g = ZM(o, i)
  20002. , p = r.getAreaStyle();
  20003. s = v(s) ? s : [s];
  20004. for (var m = t.get("axisLabel.showMinLabel"), y = t.get("axisLabel.showMaxLabel"), x = 1; x < h.length; x++)
  20005. if (!FM(n, x, g, h.length, m, y)) {
  20006. var _, b, w, S, M = n.toGlobalCoord(h[x]);
  20007. n.isHorizontal() ? (_ = c,
  20008. b = l.y,
  20009. w = M - _,
  20010. S = l.height) : (_ = l.x,
  20011. b = d,
  20012. w = l.width,
  20013. S = M - b);
  20014. var I = f++ % s.length;
  20015. this._axisGroup.add(new pb({
  20016. anid: "area_" + u[x],
  20017. shape: {
  20018. x: _,
  20019. y: b,
  20020. width: w,
  20021. height: S
  20022. },
  20023. style: a({
  20024. fill: s[I]
  20025. }, p),
  20026. silent: !0
  20027. })),
  20028. c = _ + w,
  20029. d = b + S
  20030. }
  20031. }
  20032. }
  20033. });
  20034. XM.extend({
  20035. type: "xAxis"
  20036. }),
  20037. XM.extend({
  20038. type: "yAxis"
  20039. }),
  20040. sr({
  20041. type: "grid",
  20042. render: function(t, e) {
  20043. this.group.removeAll(),
  20044. t.get("show") && this.group.add(new pb({
  20045. shape: t.coordinateSystem.getRect(),
  20046. style: a({
  20047. fill: t.get("backgroundColor")
  20048. }, t.getItemStyle()),
  20049. silent: !0,
  20050. z2: -1
  20051. }))
  20052. }
  20053. }),
  20054. Qa(function(t) {
  20055. t.xAxis && t.yAxis && !t.grid && (t.grid = {})
  20056. }),
  20057. or(m(mM, "line", "circle", "line")),
  20058. nr(m(vM, "line")),
  20059. tr(Ew.PROCESSOR.STATISTIC, m(function(t, e, i) {
  20060. e.eachSeriesByType(t, function(t) {
  20061. var e = t.getData()
  20062. , i = t.get("sampling")
  20063. , n = t.coordinateSystem;
  20064. if ("cartesian2d" === n.type && i) {
  20065. var o = n.getBaseAxis()
  20066. , a = n.getOtherAxis(o)
  20067. , r = o.getExtent()
  20068. , s = r[1] - r[0]
  20069. , l = Math.round(e.count() / s);
  20070. if (l > 1) {
  20071. var h;
  20072. "string" == typeof i ? h = yM[i] : "function" == typeof i && (h = i),
  20073. h && (e = e.downSample(a.dim, 1 / l, h, xM),
  20074. t.setData(e))
  20075. }
  20076. }
  20077. }, this)
  20078. }, "line"));
  20079. var qM = "__ec_stack_";
  20080. il.getLayoutOnAxis = function(t, e) {
  20081. var i = []
  20082. , n = t.axis;
  20083. if ("category" === n.type) {
  20084. for (var o = n.getBandWidth(), r = 0; r < t.count; r++)
  20085. i.push(a({
  20086. bandWidth: o,
  20087. axisKey: "axis0",
  20088. stackId: qM + r
  20089. }, t));
  20090. for (var s = el(i), l = [], r = 0; r < t.count; r++) {
  20091. var h = s.axis0[qM + r];
  20092. h.offsetCenter = h.offset + h.width / 2,
  20093. l.push(h)
  20094. }
  20095. return l
  20096. }
  20097. }
  20098. ;
  20099. var YM = bw.extend({
  20100. type: "series.__base_bar__",
  20101. getInitialData: function(t, e) {
  20102. return br(t.data, this, e)
  20103. },
  20104. getMarkerPosition: function(t) {
  20105. var e = this.coordinateSystem;
  20106. if (e) {
  20107. var i = e.dataToPoint(t, !0)
  20108. , n = this.getData()
  20109. , o = n.getLayout("offset")
  20110. , a = n.getLayout("size");
  20111. return i[e.getBaseAxis().isHorizontal() ? 0 : 1] += o + a / 2,
  20112. i
  20113. }
  20114. return [NaN, NaN]
  20115. },
  20116. defaultOption: {
  20117. zlevel: 0,
  20118. z: 2,
  20119. coordinateSystem: "cartesian2d",
  20120. legendHoverLink: !0,
  20121. barMinHeight: 0,
  20122. barMinAngle: 0,
  20123. itemStyle: {}
  20124. }
  20125. });
  20126. YM.extend({
  20127. type: "series.bar",
  20128. dependencies: ["grid", "polar"],
  20129. brushSelector: "rect"
  20130. });
  20131. var $M = e_([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["stroke", "barBorderColor"], ["lineWidth", "barBorderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]])
  20132. , KM = {
  20133. getBarItemStyle: function(t) {
  20134. var e = $M(this, t);
  20135. if (this.getBorderLineDash) {
  20136. var i = this.getBorderLineDash();
  20137. i && (e.lineDash = i)
  20138. }
  20139. return e
  20140. }
  20141. }
  20142. , JM = ["itemStyle", "normal", "barBorderWidth"];
  20143. o(Co.prototype, KM),
  20144. hr({
  20145. type: "bar",
  20146. render: function(t, e, i) {
  20147. var n = t.get("coordinateSystem");
  20148. return "cartesian2d" !== n && "polar" !== n || this._render(t, e, i),
  20149. this.group
  20150. },
  20151. dispose: z,
  20152. _render: function(t, e, i) {
  20153. var n, o = this.group, a = t.getData(), r = this._data, s = t.coordinateSystem, l = s.getBaseAxis();
  20154. "cartesian2d" === s.type ? n = l.isHorizontal() : "polar" === s.type && (n = "angle" === l.dim);
  20155. var h = t.isAnimationEnabled() ? t : null;
  20156. a.diff(r).add(function(e) {
  20157. if (a.hasValue(e)) {
  20158. var i = a.getItemModel(e)
  20159. , r = tI[s.type](a, e, i)
  20160. , l = QM[s.type](a, e, i, r, n, h);
  20161. a.setItemGraphicEl(e, l),
  20162. o.add(l),
  20163. sl(l, a, e, i, r, t, n, "polar" === s.type)
  20164. }
  20165. }).update(function(e, i) {
  20166. var l = r.getItemGraphicEl(i);
  20167. if (a.hasValue(e)) {
  20168. var u = a.getItemModel(e)
  20169. , c = tI[s.type](a, e, u);
  20170. l ? _o(l, {
  20171. shape: c
  20172. }, h, e) : l = QM[s.type](a, e, u, c, n, h, !0),
  20173. a.setItemGraphicEl(e, l),
  20174. o.add(l),
  20175. sl(l, a, e, u, c, t, n, "polar" === s.type)
  20176. } else
  20177. o.remove(l)
  20178. }).remove(function(t) {
  20179. var e = r.getItemGraphicEl(t);
  20180. "cartesian2d" === s.type ? e && al(t, h, e) : e && rl(t, h, e)
  20181. }).execute(),
  20182. this._data = a
  20183. },
  20184. remove: function(t, e) {
  20185. var i = this.group
  20186. , n = this._data;
  20187. t.get("animation") ? n && n.eachItemGraphicEl(function(e) {
  20188. "sector" === e.type ? rl(e.dataIndex, t, e) : al(e.dataIndex, t, e)
  20189. }) : i.removeAll()
  20190. }
  20191. });
  20192. var QM = {
  20193. cartesian2d: function(t, e, i, n, a, r, s) {
  20194. var l = new pb({
  20195. shape: o({}, n)
  20196. });
  20197. if (r) {
  20198. var h = l.shape
  20199. , u = a ? "height" : "width"
  20200. , c = {};
  20201. h[u] = 0,
  20202. c[u] = n[u],
  20203. Db[s ? "updateProps" : "initProps"](l, {
  20204. shape: c
  20205. }, r, e)
  20206. }
  20207. return l
  20208. },
  20209. polar: function(t, e, i, n, a, r, s) {
  20210. var l = new hb({
  20211. shape: o({}, n)
  20212. });
  20213. if (r) {
  20214. var h = l.shape
  20215. , u = a ? "r" : "endAngle"
  20216. , c = {};
  20217. h[u] = a ? 0 : n.startAngle,
  20218. c[u] = n[u],
  20219. Db[s ? "updateProps" : "initProps"](l, {
  20220. shape: c
  20221. }, r, e)
  20222. }
  20223. return l
  20224. }
  20225. }
  20226. , tI = {
  20227. cartesian2d: function(t, e, i) {
  20228. var n = t.getItemLayout(e)
  20229. , o = ll(i, n)
  20230. , a = n.width > 0 ? 1 : -1
  20231. , r = n.height > 0 ? 1 : -1;
  20232. return {
  20233. x: n.x + a * o / 2,
  20234. y: n.y + r * o / 2,
  20235. width: n.width - a * o,
  20236. height: n.height - r * o
  20237. }
  20238. },
  20239. polar: function(t, e, i) {
  20240. var n = t.getItemLayout(e);
  20241. return {
  20242. cx: n.cx,
  20243. cy: n.cy,
  20244. r0: n.r0,
  20245. r: n.r,
  20246. startAngle: n.startAngle,
  20247. endAngle: n.endAngle
  20248. }
  20249. }
  20250. };
  20251. nr(m(il, "bar")),
  20252. or(function(t) {
  20253. t.eachSeriesByType("bar", function(t) {
  20254. t.getData().setVisual("legendSymbol", "roundRect")
  20255. })
  20256. });
  20257. var eI = {
  20258. updateSelectedMap: function(t) {
  20259. this._targetList = t.slice(),
  20260. this._selectTargetMap = f(t || [], function(t, e) {
  20261. return t.set(e.name, e),
  20262. t
  20263. }, O())
  20264. },
  20265. select: function(t, e) {
  20266. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  20267. "single" === this.get("selectedMode") && this._selectTargetMap.each(function(t) {
  20268. t.selected = !1
  20269. }),
  20270. i && (i.selected = !0)
  20271. },
  20272. unSelect: function(t, e) {
  20273. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  20274. i && (i.selected = !1)
  20275. },
  20276. toggleSelected: function(t, e) {
  20277. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  20278. if (null != i)
  20279. return this[i.selected ? "unSelect" : "select"](t, e),
  20280. i.selected
  20281. },
  20282. isSelected: function(t, e) {
  20283. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  20284. return i && i.selected
  20285. }
  20286. }
  20287. , iI = lr({
  20288. type: "series.pie",
  20289. init: function(t) {
  20290. iI.superApply(this, "init", arguments),
  20291. this.legendDataProvider = function() {
  20292. return this.getRawData()
  20293. }
  20294. ,
  20295. this.updateSelectedMap(t.data),
  20296. this._defaultLabelLine(t)
  20297. },
  20298. mergeOption: function(t) {
  20299. iI.superCall(this, "mergeOption", t),
  20300. this.updateSelectedMap(this.option.data)
  20301. },
  20302. getInitialData: function(t, e) {
  20303. var i = vr(["value"], t.data)
  20304. , n = new lS(i,this);
  20305. return n.initData(t.data),
  20306. n
  20307. },
  20308. getDataParams: function(t) {
  20309. var e = this.getData()
  20310. , i = iI.superCall(this, "getDataParams", t)
  20311. , n = [];
  20312. return e.each("value", function(t) {
  20313. n.push(t)
  20314. }),
  20315. i.percent = Ai(n, t, e.hostModel.get("percentPrecision")),
  20316. i.$vars.push("percent"),
  20317. i
  20318. },
  20319. _defaultLabelLine: function(t) {
  20320. Po(t.labelLine, ["show"]);
  20321. var e = t.labelLine.normal
  20322. , i = t.labelLine.emphasis;
  20323. e.show = e.show && t.label.normal.show,
  20324. i.show = i.show && t.label.emphasis.show
  20325. },
  20326. defaultOption: {
  20327. zlevel: 0,
  20328. z: 2,
  20329. legendHoverLink: !0,
  20330. hoverAnimation: !0,
  20331. center: ["50%", "50%"],
  20332. radius: [0, "75%"],
  20333. clockwise: !0,
  20334. startAngle: 90,
  20335. minAngle: 0,
  20336. selectedOffset: 10,
  20337. hoverOffset: 10,
  20338. avoidLabelOverlap: !0,
  20339. percentPrecision: 2,
  20340. stillShowZeroSum: !0,
  20341. label: {
  20342. normal: {
  20343. rotate: !1,
  20344. show: !0,
  20345. position: "outer"
  20346. },
  20347. emphasis: {}
  20348. },
  20349. labelLine: {
  20350. normal: {
  20351. show: !0,
  20352. length: 15,
  20353. length2: 15,
  20354. smooth: !1,
  20355. lineStyle: {
  20356. width: 1,
  20357. type: "solid"
  20358. }
  20359. }
  20360. },
  20361. itemStyle: {
  20362. normal: {
  20363. borderWidth: 1
  20364. },
  20365. emphasis: {}
  20366. },
  20367. animationType: "expansion",
  20368. animationEasing: "cubicOut",
  20369. data: []
  20370. }
  20371. });
  20372. h(iI, eI);
  20373. var nI = cl.prototype;
  20374. nI.updateData = function(t, e, i) {
  20375. function n() {
  20376. s.stopAnimation(!0),
  20377. s.animateTo({
  20378. shape: {
  20379. r: u.r + l.get("hoverOffset")
  20380. }
  20381. }, 300, "elasticOut")
  20382. }
  20383. function r() {
  20384. s.stopAnimation(!0),
  20385. s.animateTo({
  20386. shape: {
  20387. r: u.r
  20388. }
  20389. }, 300, "elasticOut")
  20390. }
  20391. var s = this.childAt(0)
  20392. , l = t.hostModel
  20393. , h = t.getItemModel(e)
  20394. , u = t.getItemLayout(e)
  20395. , c = o({}, u);
  20396. c.label = null,
  20397. i ? (s.setShape(c),
  20398. "scale" === l.getShallow("animationType") ? (s.shape.r = u.r0,
  20399. bo(s, {
  20400. shape: {
  20401. r: u.r
  20402. }
  20403. }, l, e)) : (s.shape.endAngle = u.startAngle,
  20404. _o(s, {
  20405. shape: {
  20406. endAngle: u.endAngle
  20407. }
  20408. }, l, e))) : _o(s, {
  20409. shape: c
  20410. }, l, e);
  20411. var d = h.getModel("itemStyle")
  20412. , f = t.getItemVisual(e, "color");
  20413. s.useStyle(a({
  20414. lineJoin: "bevel",
  20415. fill: f
  20416. }, d.getModel("normal").getItemStyle())),
  20417. s.hoverStyle = d.getModel("emphasis").getItemStyle();
  20418. var g = h.getShallow("cursor");
  20419. g && s.attr("cursor", g),
  20420. ul(this, t.getItemLayout(e), h.get("selected"), l.get("selectedOffset"), l.get("animation")),
  20421. s.off("mouseover").off("mouseout").off("emphasis").off("normal"),
  20422. h.get("hoverAnimation") && l.isAnimationEnabled() && s.on("mouseover", n).on("mouseout", r).on("emphasis", n).on("normal", r),
  20423. this._updateLabel(t, e),
  20424. lo(this)
  20425. }
  20426. ,
  20427. nI._updateLabel = function(t, e) {
  20428. var i = this.childAt(1)
  20429. , n = this.childAt(2)
  20430. , o = t.hostModel
  20431. , a = t.getItemModel(e)
  20432. , r = t.getItemLayout(e).label
  20433. , s = t.getItemVisual(e, "color");
  20434. _o(i, {
  20435. shape: {
  20436. points: r.linePoints || [[r.x, r.y], [r.x, r.y], [r.x, r.y]]
  20437. }
  20438. }, o, e),
  20439. _o(n, {
  20440. style: {
  20441. x: r.x,
  20442. y: r.y
  20443. }
  20444. }, o, e),
  20445. n.attr({
  20446. rotation: r.rotation,
  20447. origin: [r.x, r.y],
  20448. z2: 10
  20449. });
  20450. var l = a.getModel("label.normal")
  20451. , h = a.getModel("label.emphasis")
  20452. , u = a.getModel("labelLine.normal")
  20453. , c = a.getModel("labelLine.emphasis")
  20454. , s = t.getItemVisual(e, "color");
  20455. ho(n.style, n.hoverStyle = {}, l, h, {
  20456. labelFetcher: t.hostModel,
  20457. labelDataIndex: e,
  20458. defaultText: t.getName(e),
  20459. autoColor: s,
  20460. useInsideStyle: !!r.inside
  20461. }, {
  20462. textAlign: r.textAlign,
  20463. textVerticalAlign: r.verticalAlign,
  20464. opacity: t.getItemVisual(e, "opacity")
  20465. }),
  20466. n.ignore = n.normalIgnore = !l.get("show"),
  20467. n.hoverIgnore = !h.get("show"),
  20468. i.ignore = i.normalIgnore = !u.get("show"),
  20469. i.hoverIgnore = !c.get("show"),
  20470. i.setStyle({
  20471. stroke: s,
  20472. opacity: t.getItemVisual(e, "opacity")
  20473. }),
  20474. i.setStyle(u.getModel("lineStyle").getLineStyle()),
  20475. i.hoverStyle = c.getModel("lineStyle").getLineStyle();
  20476. var d = u.get("smooth");
  20477. d && !0 === d && (d = .4),
  20478. i.setShape({
  20479. smooth: d
  20480. })
  20481. }
  20482. ,
  20483. l(cl, $y);
  20484. Ia.extend({
  20485. type: "pie",
  20486. init: function() {
  20487. var t = new $y;
  20488. this._sectorGroup = t
  20489. },
  20490. render: function(t, e, i, n) {
  20491. if (!n || n.from !== this.uid) {
  20492. var o = t.getData()
  20493. , a = this._data
  20494. , r = this.group
  20495. , s = e.get("animation")
  20496. , l = !a
  20497. , h = t.get("animationType")
  20498. , u = m(hl, this.uid, t, s, i)
  20499. , c = t.get("selectedMode");
  20500. if (o.diff(a).add(function(t) {
  20501. var e = new cl(o,t);
  20502. l && "scale" !== h && e.eachChild(function(t) {
  20503. t.stopAnimation(!0)
  20504. }),
  20505. c && e.on("click", u),
  20506. o.setItemGraphicEl(t, e),
  20507. r.add(e)
  20508. }).update(function(t, e) {
  20509. var i = a.getItemGraphicEl(e);
  20510. i.updateData(o, t),
  20511. i.off("click"),
  20512. c && i.on("click", u),
  20513. r.add(i),
  20514. o.setItemGraphicEl(t, i)
  20515. }).remove(function(t) {
  20516. var e = a.getItemGraphicEl(t);
  20517. r.remove(e)
  20518. }).execute(),
  20519. s && l && o.count() > 0 && "scale" !== h) {
  20520. var d = o.getItemLayout(0)
  20521. , f = Math.max(i.getWidth(), i.getHeight()) / 2
  20522. , g = p(r.removeClipPath, r);
  20523. r.setClipPath(this._createClipPath(d.cx, d.cy, f, d.startAngle, d.clockwise, g, t))
  20524. }
  20525. this._data = o
  20526. }
  20527. },
  20528. dispose: function() {},
  20529. _createClipPath: function(t, e, i, n, o, a, r) {
  20530. var s = new hb({
  20531. shape: {
  20532. cx: t,
  20533. cy: e,
  20534. r0: 0,
  20535. r: i,
  20536. startAngle: n,
  20537. endAngle: n,
  20538. clockwise: o
  20539. }
  20540. });
  20541. return bo(s, {
  20542. shape: {
  20543. endAngle: n + (o ? 1 : -1) * Math.PI * 2
  20544. }
  20545. }, r, a),
  20546. s
  20547. },
  20548. containPoint: function(t, e) {
  20549. var i = e.getData().getItemLayout(0);
  20550. if (i) {
  20551. var n = t[0] - i.cx
  20552. , o = t[1] - i.cy
  20553. , a = Math.sqrt(n * n + o * o);
  20554. return a <= i.r && a >= i.r0
  20555. }
  20556. }
  20557. });
  20558. var oI = function(t, e) {
  20559. c(e, function(e) {
  20560. e.update = "updateView",
  20561. er(e, function(i, n) {
  20562. var o = {};
  20563. return n.eachComponent({
  20564. mainType: "series",
  20565. subType: t,
  20566. query: i
  20567. }, function(t) {
  20568. t[e.method] && t[e.method](i.name, i.dataIndex);
  20569. var n = t.getData();
  20570. n.each(function(e) {
  20571. var i = n.getName(e);
  20572. o[i] = t.isSelected(i) || !1
  20573. })
  20574. }),
  20575. {
  20576. name: i.name,
  20577. selected: o
  20578. }
  20579. })
  20580. })
  20581. }
  20582. , aI = function(t, e) {
  20583. var i = {};
  20584. e.eachRawSeriesByType(t, function(t) {
  20585. var n = t.getRawData()
  20586. , o = {};
  20587. if (!e.isSeriesFiltered(t)) {
  20588. var a = t.getData();
  20589. a.each(function(t) {
  20590. var e = a.getRawIndex(t);
  20591. o[e] = t
  20592. }),
  20593. n.each(function(e) {
  20594. var r = o[e]
  20595. , s = null != r && a.getItemVisual(r, "color", !0);
  20596. if (s)
  20597. n.setItemVisual(e, "color", s);
  20598. else {
  20599. var l = n.getItemModel(e).get("itemStyle.normal.color") || t.getColorFromPalette(n.getName(e), i);
  20600. n.setItemVisual(e, "color", l),
  20601. null != r && a.setItemVisual(r, "color", l)
  20602. }
  20603. })
  20604. }
  20605. })
  20606. }
  20607. , rI = function(t, e, i, n) {
  20608. var o, a, r = t.getData(), s = [], l = !1;
  20609. r.each(function(i) {
  20610. var n, h, u, c, d = r.getItemLayout(i), f = r.getItemModel(i), g = f.getModel("label.normal"), p = g.get("position") || f.get("label.emphasis.position"), m = f.getModel("labelLine.normal"), v = m.get("length"), y = m.get("length2"), x = (d.startAngle + d.endAngle) / 2, _ = Math.cos(x), b = Math.sin(x);
  20611. o = d.cx,
  20612. a = d.cy;
  20613. var w = "inside" === p || "inner" === p;
  20614. if ("center" === p)
  20615. n = d.cx,
  20616. h = d.cy,
  20617. c = "center";
  20618. else {
  20619. var S = (w ? (d.r + d.r0) / 2 * _ : d.r * _) + o
  20620. , M = (w ? (d.r + d.r0) / 2 * b : d.r * b) + a;
  20621. if (n = S + 3 * _,
  20622. h = M + 3 * b,
  20623. !w) {
  20624. var I = S + _ * (v + e - d.r)
  20625. , T = M + b * (v + e - d.r)
  20626. , A = I + (_ < 0 ? -1 : 1) * y
  20627. , C = T;
  20628. n = A + (_ < 0 ? -5 : 5),
  20629. h = C,
  20630. u = [[S, M], [I, T], [A, C]]
  20631. }
  20632. c = w ? "center" : _ > 0 ? "left" : "right"
  20633. }
  20634. var D = g.getFont()
  20635. , L = g.get("rotate") ? _ < 0 ? -x + Math.PI : -x : 0
  20636. , k = ce(t.getFormattedLabel(i, "normal") || r.getName(i), D, c, "top");
  20637. l = !!L,
  20638. d.label = {
  20639. x: n,
  20640. y: h,
  20641. position: p,
  20642. height: k.height,
  20643. len: v,
  20644. len2: y,
  20645. linePoints: u,
  20646. textAlign: c,
  20647. verticalAlign: "middle",
  20648. rotation: L,
  20649. inside: w
  20650. },
  20651. w || s.push(d.label)
  20652. }),
  20653. !l && t.get("avoidLabelOverlap") && fl(s, o, a, e, i, n)
  20654. }
  20655. , sI = 2 * Math.PI
  20656. , lI = Math.PI / 180
  20657. , hI = function(t, e) {
  20658. var i = e.findComponents({
  20659. mainType: "legend"
  20660. });
  20661. i && i.length && e.eachSeriesByType(t, function(t) {
  20662. var e = t.getData();
  20663. e.filterSelf(function(t) {
  20664. for (var n = e.getName(t), o = 0; o < i.length; o++)
  20665. if (!i[o].isSelected(n))
  20666. return !1;
  20667. return !0
  20668. }, this)
  20669. }, this)
  20670. };
  20671. oI("pie", [{
  20672. type: "pieToggleSelect",
  20673. event: "pieselectchanged",
  20674. method: "toggleSelected"
  20675. }, {
  20676. type: "pieSelect",
  20677. event: "pieselected",
  20678. method: "select"
  20679. }, {
  20680. type: "pieUnSelect",
  20681. event: "pieunselected",
  20682. method: "unSelect"
  20683. }]),
  20684. or(m(aI, "pie")),
  20685. nr(m(function(t, e, i, n) {
  20686. e.eachSeriesByType(t, function(t) {
  20687. var e = t.get("center")
  20688. , n = t.get("radius");
  20689. v(n) || (n = [0, n]),
  20690. v(e) || (e = [e, e]);
  20691. var o = i.getWidth()
  20692. , a = i.getHeight()
  20693. , r = Math.min(o, a)
  20694. , s = bi(e[0], o)
  20695. , l = bi(e[1], a)
  20696. , h = bi(n[0], r / 2)
  20697. , u = bi(n[1], r / 2)
  20698. , c = t.getData()
  20699. , d = -t.get("startAngle") * lI
  20700. , f = t.get("minAngle") * lI
  20701. , g = 0;
  20702. c.each("value", function(t) {
  20703. !isNaN(t) && g++
  20704. });
  20705. var p = c.getSum("value")
  20706. , m = Math.PI / (p || g) * 2
  20707. , y = t.get("clockwise")
  20708. , x = t.get("roseType")
  20709. , _ = t.get("stillShowZeroSum")
  20710. , b = c.getDataExtent("value");
  20711. b[0] = 0;
  20712. var w = sI
  20713. , S = 0
  20714. , M = d
  20715. , I = y ? 1 : -1;
  20716. if (c.each("value", function(t, e) {
  20717. var i;
  20718. if (isNaN(t))
  20719. c.setItemLayout(e, {
  20720. angle: NaN,
  20721. startAngle: NaN,
  20722. endAngle: NaN,
  20723. clockwise: y,
  20724. cx: s,
  20725. cy: l,
  20726. r0: h,
  20727. r: x ? NaN : u
  20728. });
  20729. else {
  20730. (i = "area" !== x ? 0 === p && _ ? m : t * m : sI / g) < f ? (i = f,
  20731. w -= f) : S += t;
  20732. var n = M + I * i;
  20733. c.setItemLayout(e, {
  20734. angle: i,
  20735. startAngle: M,
  20736. endAngle: n,
  20737. clockwise: y,
  20738. cx: s,
  20739. cy: l,
  20740. r0: h,
  20741. r: x ? _i(t, b, [h, u]) : u
  20742. }),
  20743. M = n
  20744. }
  20745. }, !0),
  20746. w < sI && g)
  20747. if (w <= .001) {
  20748. var T = sI / g;
  20749. c.each("value", function(t, e) {
  20750. if (!isNaN(t)) {
  20751. var i = c.getItemLayout(e);
  20752. i.angle = T,
  20753. i.startAngle = d + I * e * T,
  20754. i.endAngle = d + I * (e + 1) * T
  20755. }
  20756. })
  20757. } else
  20758. m = w / S,
  20759. M = d,
  20760. c.each("value", function(t, e) {
  20761. if (!isNaN(t)) {
  20762. var i = c.getItemLayout(e)
  20763. , n = i.angle === f ? f : t * m;
  20764. i.startAngle = M,
  20765. i.endAngle = M + I * n,
  20766. M += I * n
  20767. }
  20768. });
  20769. rI(t, u, o, a)
  20770. })
  20771. }, "pie")),
  20772. tr(m(hI, "pie")),
  20773. bw.extend({
  20774. type: "series.scatter",
  20775. dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"],
  20776. getInitialData: function(t, e) {
  20777. return br(t.data, this, e)
  20778. },
  20779. brushSelector: "point",
  20780. defaultOption: {
  20781. coordinateSystem: "cartesian2d",
  20782. zlevel: 0,
  20783. z: 2,
  20784. legendHoverLink: !0,
  20785. hoverAnimation: !0,
  20786. symbolSize: 10,
  20787. large: !1,
  20788. largeThreshold: 2e3,
  20789. itemStyle: {
  20790. normal: {
  20791. opacity: .8
  20792. }
  20793. }
  20794. }
  20795. });
  20796. var uI = Hn({
  20797. shape: {
  20798. points: null,
  20799. sizes: null
  20800. },
  20801. symbolProxy: null,
  20802. buildPath: function(t, e) {
  20803. for (var i = e.points, n = e.sizes, o = this.symbolProxy, a = o.shape, r = 0; r < i.length; r++) {
  20804. var s = i[r];
  20805. if (!isNaN(s[0]) && !isNaN(s[1])) {
  20806. var l = n[r];
  20807. l[0] < 4 ? t.rect(s[0] - l[0] / 2, s[1] - l[1] / 2, l[0], l[1]) : (a.x = s[0] - l[0] / 2,
  20808. a.y = s[1] - l[1] / 2,
  20809. a.width = l[0],
  20810. a.height = l[1],
  20811. o.buildPath(t, a, !0))
  20812. }
  20813. }
  20814. },
  20815. findDataIndex: function(t, e) {
  20816. for (var i = this.shape, n = i.points, o = i.sizes, a = n.length - 1; a >= 0; a--) {
  20817. var r = n[a]
  20818. , s = o[a]
  20819. , l = r[0] - s[0] / 2
  20820. , h = r[1] - s[1] / 2;
  20821. if (t >= l && e >= h && t <= l + s[0] && e <= h + s[1])
  20822. return a
  20823. }
  20824. return -1
  20825. }
  20826. })
  20827. , cI = gl.prototype;
  20828. cI.updateData = function(t) {
  20829. this.group.removeAll();
  20830. var e = this._symbolEl
  20831. , i = t.hostModel;
  20832. e.setShape({
  20833. points: t.mapArray(t.getItemLayout),
  20834. sizes: t.mapArray(function(e) {
  20835. var i = t.getItemVisual(e, "symbolSize");
  20836. return i instanceof Array || (i = [i, i]),
  20837. i
  20838. })
  20839. }),
  20840. e.symbolProxy = Gr(t.getVisual("symbol"), 0, 0, 0, 0),
  20841. e.setColor = e.symbolProxy.setColor,
  20842. e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));
  20843. var n = t.getVisual("color");
  20844. n && e.setColor(n),
  20845. e.seriesIndex = i.seriesIndex,
  20846. e.on("mousemove", function(t) {
  20847. e.dataIndex = null;
  20848. var i = e.findDataIndex(t.offsetX, t.offsetY);
  20849. i >= 0 && (e.dataIndex = i)
  20850. }),
  20851. this.group.add(e)
  20852. }
  20853. ,
  20854. cI.updateLayout = function(t) {
  20855. var e = t.getData();
  20856. this._symbolEl.setShape({
  20857. points: e.mapArray(e.getItemLayout)
  20858. })
  20859. }
  20860. ,
  20861. cI.remove = function() {
  20862. this.group.removeAll()
  20863. }
  20864. ,
  20865. hr({
  20866. type: "scatter",
  20867. init: function() {
  20868. this._normalSymbolDraw = new Qr,
  20869. this._largeSymbolDraw = new gl
  20870. },
  20871. render: function(t, e, i) {
  20872. var n = t.getData()
  20873. , o = this._largeSymbolDraw
  20874. , a = this._normalSymbolDraw
  20875. , r = this.group
  20876. , s = t.get("large") && n.count() > t.get("largeThreshold") ? o : a;
  20877. this._symbolDraw = s,
  20878. s.updateData(n),
  20879. r.add(s.group),
  20880. r.remove(s === o ? a.group : o.group)
  20881. },
  20882. updateLayout: function(t) {
  20883. this._symbolDraw.updateLayout(t)
  20884. },
  20885. remove: function(t, e) {
  20886. this._symbolDraw && this._symbolDraw.remove(e, !0)
  20887. },
  20888. dispose: function() {}
  20889. }),
  20890. or(m(mM, "scatter", "circle", null)),
  20891. nr(m(vM, "scatter")),
  20892. l(pl, YS),
  20893. ml.prototype.getIndicatorAxes = function() {
  20894. return this._indicatorAxes
  20895. }
  20896. ,
  20897. ml.prototype.dataToPoint = function(t, e) {
  20898. var i = this._indicatorAxes[e];
  20899. return this.coordToPoint(i.dataToCoord(t), e)
  20900. }
  20901. ,
  20902. ml.prototype.coordToPoint = function(t, e) {
  20903. var i = this._indicatorAxes[e].angle;
  20904. return [this.cx + t * Math.cos(i), this.cy - t * Math.sin(i)]
  20905. }
  20906. ,
  20907. ml.prototype.pointToData = function(t) {
  20908. var e = t[0] - this.cx
  20909. , i = t[1] - this.cy
  20910. , n = Math.sqrt(e * e + i * i);
  20911. e /= n,
  20912. i /= n;
  20913. for (var o, a = Math.atan2(-i, e), r = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) {
  20914. var h = this._indicatorAxes[l]
  20915. , u = Math.abs(a - h.angle);
  20916. u < r && (o = h,
  20917. s = l,
  20918. r = u)
  20919. }
  20920. return [s, +(o && o.coodToData(n))]
  20921. }
  20922. ,
  20923. ml.prototype.resize = function(t, e) {
  20924. var i = t.get("center")
  20925. , n = e.getWidth()
  20926. , o = e.getHeight()
  20927. , a = Math.min(n, o) / 2;
  20928. this.cx = bi(i[0], n),
  20929. this.cy = bi(i[1], o),
  20930. this.startAngle = t.get("startAngle") * Math.PI / 180,
  20931. this.r = bi(t.get("radius"), a),
  20932. c(this._indicatorAxes, function(t, e) {
  20933. t.setExtent(0, this.r);
  20934. var i = this.startAngle + e * Math.PI * 2 / this._indicatorAxes.length;
  20935. i = Math.atan2(Math.sin(i), Math.cos(i)),
  20936. t.angle = i
  20937. }, this)
  20938. }
  20939. ,
  20940. ml.prototype.update = function(t, e) {
  20941. function i(t) {
  20942. var e = Math.pow(10, Math.floor(Math.log(t) / Math.LN10))
  20943. , i = t / e;
  20944. return 2 === i ? i = 5 : i *= 2,
  20945. i * e
  20946. }
  20947. var n = this._indicatorAxes
  20948. , o = this._model;
  20949. c(n, function(t) {
  20950. t.scale.setExtent(1 / 0, -1 / 0)
  20951. }),
  20952. t.eachSeriesByType("radar", function(e, i) {
  20953. if ("radar" === e.get("coordinateSystem") && t.getComponent("radar", e.get("radarIndex")) === o) {
  20954. var a = e.getData();
  20955. c(n, function(t) {
  20956. t.scale.unionExtentFromData(a, t.dim)
  20957. })
  20958. }
  20959. }, this);
  20960. var a = o.get("splitNumber");
  20961. c(n, function(t, e) {
  20962. var n = Pr(t.scale, t.model);
  20963. Or(t.scale, t.model);
  20964. var o = t.model
  20965. , r = t.scale
  20966. , s = o.getMin()
  20967. , l = o.getMax()
  20968. , h = r.getInterval();
  20969. if (null != s && null != l)
  20970. r.setExtent(+s, +l),
  20971. r.setInterval((l - s) / a);
  20972. else if (null != s) {
  20973. var u;
  20974. do {
  20975. u = s + h * a,
  20976. r.setExtent(+s, u),
  20977. r.setInterval(h),
  20978. h = i(h)
  20979. } while (u < n[1] && isFinite(u) && isFinite(n[1]))
  20980. } else if (null != l) {
  20981. var c;
  20982. do {
  20983. c = l - h * a,
  20984. r.setExtent(c, +l),
  20985. r.setInterval(h),
  20986. h = i(h)
  20987. } while (c > n[0] && isFinite(c) && isFinite(n[0]))
  20988. } else {
  20989. r.getTicks().length - 1 > a && (h = i(h));
  20990. var d = Math.round((n[0] + n[1]) / 2 / h) * h
  20991. , f = Math.round(a / 2);
  20992. r.setExtent(wi(d - f * h), wi(d + (a - f) * h)),
  20993. r.setInterval(h)
  20994. }
  20995. })
  20996. }
  20997. ,
  20998. ml.dimensions = [],
  20999. ml.create = function(t, e) {
  21000. var i = [];
  21001. return t.eachComponent("radar", function(n) {
  21002. var o = new ml(n,t,e);
  21003. i.push(o),
  21004. n.coordinateSystem = o
  21005. }),
  21006. t.eachSeriesByType("radar", function(t) {
  21007. "radar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("radarIndex") || 0])
  21008. }),
  21009. i
  21010. }
  21011. ,
  21012. ha.register("radar", ml);
  21013. var dI = SM.valueAxis
  21014. , fI = (rr({
  21015. type: "radar",
  21016. optionUpdated: function() {
  21017. var t = this.get("boundaryGap")
  21018. , n = this.get("splitNumber")
  21019. , r = this.get("scale")
  21020. , s = this.get("axisLine")
  21021. , l = this.get("axisTick")
  21022. , h = this.get("axisLabel")
  21023. , u = this.get("name")
  21024. , c = this.get("name.show")
  21025. , f = this.get("name.formatter")
  21026. , g = this.get("nameGap")
  21027. , p = this.get("triggerEvent")
  21028. , m = d(this.get("indicator") || [], function(d) {
  21029. null != d.max && d.max > 0 && !d.min ? d.min = 0 : null != d.min && d.min < 0 && !d.max && (d.max = 0);
  21030. var m = u;
  21031. if (null != d.color && (m = a({
  21032. color: d.color
  21033. }, u)),
  21034. d = i(e(d), {
  21035. boundaryGap: t,
  21036. splitNumber: n,
  21037. scale: r,
  21038. axisLine: s,
  21039. axisTick: l,
  21040. axisLabel: h,
  21041. name: d.text,
  21042. nameLocation: "end",
  21043. nameGap: g,
  21044. nameTextStyle: m,
  21045. triggerEvent: p
  21046. }, !1),
  21047. c || (d.name = ""),
  21048. "string" == typeof f) {
  21049. var v = d.name;
  21050. d.name = f.replace("{value}", null != v ? v : "")
  21051. } else
  21052. "function" == typeof f && (d.name = f(d.name, d));
  21053. var y = o(new Co(d,null,this.ecModel), VS);
  21054. return y.mainType = "radar",
  21055. y.componentIndex = this.componentIndex,
  21056. y
  21057. }, this);
  21058. this.getIndicatorModels = function() {
  21059. return m
  21060. }
  21061. },
  21062. defaultOption: {
  21063. zlevel: 0,
  21064. z: 0,
  21065. center: ["50%", "50%"],
  21066. radius: "75%",
  21067. startAngle: 90,
  21068. name: {
  21069. show: !0
  21070. },
  21071. boundaryGap: [0, 0],
  21072. splitNumber: 5,
  21073. nameGap: 15,
  21074. scale: !1,
  21075. shape: "polygon",
  21076. axisLine: i({
  21077. lineStyle: {
  21078. color: "#bbb"
  21079. }
  21080. }, dI.axisLine),
  21081. axisLabel: vl(dI.axisLabel, !1),
  21082. axisTick: vl(dI.axisTick, !1),
  21083. splitLine: vl(dI.splitLine, !0),
  21084. splitArea: vl(dI.splitArea, !0),
  21085. indicator: []
  21086. }
  21087. }),
  21088. ["axisLine", "axisTickLabel", "axisName"]);
  21089. sr({
  21090. type: "radar",
  21091. render: function(t, e, i) {
  21092. this.group.removeAll(),
  21093. this._buildAxes(t),
  21094. this._buildSplitLineAndArea(t)
  21095. },
  21096. _buildAxes: function(t) {
  21097. var e = t.coordinateSystem;
  21098. c(d(e.getIndicatorAxes(), function(t) {
  21099. return new zM(t.model,{
  21100. position: [e.cx, e.cy],
  21101. rotation: t.angle,
  21102. labelDirection: -1,
  21103. tickDirection: -1,
  21104. nameDirection: 1
  21105. })
  21106. }), function(t) {
  21107. c(fI, t.add, t),
  21108. this.group.add(t.getGroup())
  21109. }, this)
  21110. },
  21111. _buildSplitLineAndArea: function(t) {
  21112. function e(t, e, i) {
  21113. var n = i % e.length;
  21114. return t[n] = t[n] || [],
  21115. n
  21116. }
  21117. var i = t.coordinateSystem
  21118. , n = i.getIndicatorAxes();
  21119. if (n.length) {
  21120. var o = t.get("shape")
  21121. , r = t.getModel("splitLine")
  21122. , s = t.getModel("splitArea")
  21123. , l = r.getModel("lineStyle")
  21124. , h = s.getModel("areaStyle")
  21125. , u = r.get("show")
  21126. , f = s.get("show")
  21127. , g = l.get("color")
  21128. , p = h.get("color");
  21129. g = v(g) ? g : [g],
  21130. p = v(p) ? p : [p];
  21131. var m = []
  21132. , y = [];
  21133. if ("circle" === o)
  21134. for (var x = n[0].getTicksCoords(), _ = i.cx, b = i.cy, w = 0; w < x.length; w++)
  21135. u && m[C = e(m, g, w)].push(new rb({
  21136. shape: {
  21137. cx: _,
  21138. cy: b,
  21139. r: x[w]
  21140. }
  21141. })),
  21142. f && w < x.length - 1 && y[C = e(y, p, w)].push(new ub({
  21143. shape: {
  21144. cx: _,
  21145. cy: b,
  21146. r0: x[w],
  21147. r: x[w + 1]
  21148. }
  21149. }));
  21150. else
  21151. for (var S, M = d(n, function(t, e) {
  21152. var n = t.getTicksCoords();
  21153. return S = null == S ? n.length - 1 : Math.min(n.length - 1, S),
  21154. d(n, function(t) {
  21155. return i.coordToPoint(t, e)
  21156. })
  21157. }), I = [], w = 0; w <= S; w++) {
  21158. for (var T = [], A = 0; A < n.length; A++)
  21159. T.push(M[A][w]);
  21160. if (T[0] && T.push(T[0].slice()),
  21161. u && m[C = e(m, g, w)].push(new gb({
  21162. shape: {
  21163. points: T
  21164. }
  21165. })),
  21166. f && I) {
  21167. var C = e(y, p, w - 1);
  21168. y[C].push(new fb({
  21169. shape: {
  21170. points: T.concat(I)
  21171. }
  21172. }))
  21173. }
  21174. I = T.slice().reverse()
  21175. }
  21176. var D = l.getLineStyle()
  21177. , L = h.getAreaStyle();
  21178. c(y, function(t, e) {
  21179. this.group.add(Cb(t, {
  21180. style: a({
  21181. stroke: "none",
  21182. fill: p[e % p.length]
  21183. }, L),
  21184. silent: !0
  21185. }))
  21186. }, this),
  21187. c(m, function(t, e) {
  21188. this.group.add(Cb(t, {
  21189. style: a({
  21190. fill: "none",
  21191. stroke: g[e % g.length]
  21192. }, D),
  21193. silent: !0
  21194. }))
  21195. }, this)
  21196. }
  21197. }
  21198. });
  21199. var gI = bw.extend({
  21200. type: "series.radar",
  21201. dependencies: ["radar"],
  21202. init: function(t) {
  21203. gI.superApply(this, "init", arguments),
  21204. this.legendDataProvider = function() {
  21205. return this.getRawData()
  21206. }
  21207. },
  21208. getInitialData: function(t, e) {
  21209. var i = t.data || []
  21210. , n = vr([], i, {
  21211. extraPrefix: "indicator_",
  21212. extraFromZero: !0
  21213. })
  21214. , o = new lS(n,this);
  21215. return o.initData(i),
  21216. o
  21217. },
  21218. formatTooltip: function(t) {
  21219. var e = this.getRawValue(t)
  21220. , i = this.coordinateSystem.getIndicatorAxes()
  21221. , n = this.getData().getName(t);
  21222. return Vi("" === n ? this.name : n) + "<br/>" + d(i, function(t, i) {
  21223. return Vi(t.name + " : " + e[i])
  21224. }).join("<br />")
  21225. },
  21226. defaultOption: {
  21227. zlevel: 0,
  21228. z: 2,
  21229. coordinateSystem: "radar",
  21230. legendHoverLink: !0,
  21231. radarIndex: 0,
  21232. lineStyle: {
  21233. normal: {
  21234. width: 2,
  21235. type: "solid"
  21236. }
  21237. },
  21238. label: {
  21239. normal: {
  21240. position: "top"
  21241. }
  21242. },
  21243. symbol: "emptyCircle",
  21244. symbolSize: 4
  21245. }
  21246. });
  21247. hr({
  21248. type: "radar",
  21249. render: function(t, i, n) {
  21250. function o(t, e) {
  21251. var i = t.getItemVisual(e, "symbol") || "circle"
  21252. , n = t.getItemVisual(e, "color");
  21253. if ("none" !== i) {
  21254. var o = yl(t.getItemVisual(e, "symbolSize"))
  21255. , a = Gr(i, -1, -1, 2, 2, n);
  21256. return a.attr({
  21257. style: {
  21258. strokeNoScale: !0
  21259. },
  21260. z2: 100,
  21261. scale: [o[0] / 2, o[1] / 2]
  21262. }),
  21263. a
  21264. }
  21265. }
  21266. function r(e, i, n, a, r, s) {
  21267. n.removeAll();
  21268. for (var l = 0; l < i.length - 1; l++) {
  21269. var h = o(a, r);
  21270. h && (h.__dimIdx = l,
  21271. e[l] ? (h.attr("position", e[l]),
  21272. Db[s ? "initProps" : "updateProps"](h, {
  21273. position: i[l]
  21274. }, t, r)) : h.attr("position", i[l]),
  21275. n.add(h))
  21276. }
  21277. }
  21278. function s(t) {
  21279. return d(t, function(t) {
  21280. return [l.cx, l.cy]
  21281. })
  21282. }
  21283. var l = t.coordinateSystem
  21284. , h = this.group
  21285. , u = t.getData()
  21286. , c = this._data;
  21287. u.diff(c).add(function(e) {
  21288. var i = u.getItemLayout(e);
  21289. if (i) {
  21290. var n = new fb
  21291. , o = new gb
  21292. , a = {
  21293. shape: {
  21294. points: i
  21295. }
  21296. };
  21297. n.shape.points = s(i),
  21298. o.shape.points = s(i),
  21299. bo(n, a, t, e),
  21300. bo(o, a, t, e);
  21301. var l = new $y
  21302. , h = new $y;
  21303. l.add(o),
  21304. l.add(n),
  21305. l.add(h),
  21306. r(o.shape.points, i, h, u, e, !0),
  21307. u.setItemGraphicEl(e, l)
  21308. }
  21309. }).update(function(e, i) {
  21310. var n = c.getItemGraphicEl(i)
  21311. , o = n.childAt(0)
  21312. , a = n.childAt(1)
  21313. , s = n.childAt(2)
  21314. , l = {
  21315. shape: {
  21316. points: u.getItemLayout(e)
  21317. }
  21318. };
  21319. l.shape.points && (r(o.shape.points, l.shape.points, s, u, e, !1),
  21320. _o(o, l, t),
  21321. _o(a, l, t),
  21322. u.setItemGraphicEl(e, n))
  21323. }).remove(function(t) {
  21324. h.remove(c.getItemGraphicEl(t))
  21325. }).execute(),
  21326. u.eachItemGraphicEl(function(t, i) {
  21327. function n() {
  21328. l.attr("ignore", m)
  21329. }
  21330. function o() {
  21331. l.attr("ignore", p)
  21332. }
  21333. var r = u.getItemModel(i)
  21334. , s = t.childAt(0)
  21335. , l = t.childAt(1)
  21336. , c = t.childAt(2)
  21337. , d = u.getItemVisual(i, "color");
  21338. h.add(t),
  21339. s.useStyle(a(r.getModel("lineStyle.normal").getLineStyle(), {
  21340. fill: "none",
  21341. stroke: d
  21342. })),
  21343. s.hoverStyle = r.getModel("lineStyle.emphasis").getLineStyle();
  21344. var f = r.getModel("areaStyle.normal")
  21345. , g = r.getModel("areaStyle.emphasis")
  21346. , p = f.isEmpty() && f.parentModel.isEmpty()
  21347. , m = g.isEmpty() && g.parentModel.isEmpty();
  21348. m = m && p,
  21349. l.ignore = p,
  21350. l.useStyle(a(f.getAreaStyle(), {
  21351. fill: d,
  21352. opacity: .7
  21353. })),
  21354. l.hoverStyle = g.getAreaStyle();
  21355. var v = r.getModel("itemStyle.normal").getItemStyle(["color"])
  21356. , y = r.getModel("itemStyle.emphasis").getItemStyle()
  21357. , x = r.getModel("label.normal")
  21358. , _ = r.getModel("label.emphasis");
  21359. c.eachChild(function(t) {
  21360. t.setStyle(v),
  21361. t.hoverStyle = e(y),
  21362. ho(t.style, t.hoverStyle, x, _, {
  21363. labelFetcher: u.hostModel,
  21364. labelDataIndex: i,
  21365. labelDimIndex: t.__dimIdx,
  21366. defaultText: u.get(u.dimensions[t.__dimIdx], i),
  21367. autoColor: d,
  21368. isRectText: !0
  21369. })
  21370. }),
  21371. t.off("mouseover").off("mouseout").off("normal").off("emphasis"),
  21372. t.on("emphasis", n).on("mouseover", n).on("normal", o).on("mouseout", o),
  21373. lo(t)
  21374. }),
  21375. this._data = u
  21376. },
  21377. remove: function() {
  21378. this.group.removeAll(),
  21379. this._data = null
  21380. },
  21381. dispose: function() {}
  21382. });
  21383. or(m(aI, "radar")),
  21384. or(m(mM, "radar", "circle", null)),
  21385. nr(function(t) {
  21386. t.eachSeriesByType("radar", function(t) {
  21387. var e = t.getData()
  21388. , i = []
  21389. , n = t.coordinateSystem;
  21390. if (n) {
  21391. for (var o = 0; o < n.getIndicatorAxes().length; o++) {
  21392. var a = e.dimensions[o];
  21393. e.each(a, function(t, e) {
  21394. i[e] = i[e] || [],
  21395. i[e][o] = n.dataToPoint(t, o)
  21396. })
  21397. }
  21398. e.each(function(t) {
  21399. i[t][0] && i[t].push(i[t][0].slice()),
  21400. e.setItemLayout(t, i[t])
  21401. })
  21402. }
  21403. })
  21404. }),
  21405. tr(m(hI, "radar")),
  21406. Qa(function(t) {
  21407. var e = t.polar;
  21408. if (e) {
  21409. v(e) || (e = [e]);
  21410. var i = [];
  21411. c(e, function(e, n) {
  21412. e.indicator ? (e.type && !e.shape && (e.shape = e.type),
  21413. t.radar = t.radar || [],
  21414. v(t.radar) || (t.radar = [t.radar]),
  21415. t.radar.push(e)) : i.push(e)
  21416. }),
  21417. t.polar = i
  21418. }
  21419. c(t.series, function(t) {
  21420. t && "radar" === t.type && t.polarIndex && (t.radarIndex = t.polarIndex)
  21421. })
  21422. });
  21423. var pI = 1e-8;
  21424. bl.prototype = {
  21425. constructor: bl,
  21426. properties: null,
  21427. getBoundingRect: function() {
  21428. var t = this._rect;
  21429. if (t)
  21430. return t;
  21431. for (var e = Number.MAX_VALUE, i = [e, e], n = [-e, -e], o = [], a = [], r = this.geometries, s = 0; s < r.length; s++)
  21432. "polygon" === r[s].type && (gn(r[s].exterior, o, a),
  21433. $(i, i, o),
  21434. K(n, n, a));
  21435. return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0),
  21436. this._rect = new jt(i[0],i[1],n[0] - i[0],n[1] - i[1])
  21437. },
  21438. contain: function(t) {
  21439. var e = this.getBoundingRect()
  21440. , i = this.geometries;
  21441. if (!e.contain(t[0], t[1]))
  21442. return !1;
  21443. t: for (var n = 0, o = i.length; n < o; n++)
  21444. if ("polygon" === i[n].type) {
  21445. var a = i[n].exterior
  21446. , r = i[n].interiors;
  21447. if (_l(a, t[0], t[1])) {
  21448. for (var s = 0; s < (r ? r.length : 0); s++)
  21449. if (_l(r[s]))
  21450. continue t;
  21451. return !0
  21452. }
  21453. }
  21454. return !1
  21455. },
  21456. transformTo: function(t, e, i, n) {
  21457. var o = this.getBoundingRect()
  21458. , a = o.width / o.height;
  21459. i ? n || (n = i / a) : i = a * n;
  21460. for (var r = new jt(t,e,i,n), s = o.calculateTransform(r), l = this.geometries, h = 0; h < l.length; h++)
  21461. if ("polygon" === l[h].type) {
  21462. for (var u = l[h].exterior, c = l[h].interiors, d = 0; d < u.length; d++)
  21463. Y(u[d], u[d], s);
  21464. for (var f = 0; f < (c ? c.length : 0); f++)
  21465. for (d = 0; d < c[f].length; d++)
  21466. Y(c[f][d], c[f][d], s)
  21467. }
  21468. (o = this._rect).copy(r),
  21469. this.center = [o.x + o.width / 2, o.y + o.height / 2]
  21470. }
  21471. };
  21472. var mI = function(t) {
  21473. return wl(t),
  21474. d(g(t.features, function(t) {
  21475. return t.geometry && t.properties && t.geometry.coordinates.length > 0
  21476. }), function(t) {
  21477. var e = t.properties
  21478. , i = t.geometry
  21479. , n = i.coordinates
  21480. , o = [];
  21481. "Polygon" === i.type && o.push({
  21482. type: "polygon",
  21483. exterior: n[0],
  21484. interiors: n.slice(1)
  21485. }),
  21486. "MultiPolygon" === i.type && c(n, function(t) {
  21487. t[0] && o.push({
  21488. type: "polygon",
  21489. exterior: t[0],
  21490. interiors: t.slice(1)
  21491. })
  21492. });
  21493. var a = new bl(e.name,o,e.cp);
  21494. return a.properties = e,
  21495. a
  21496. })
  21497. }
  21498. , vI = Y;
  21499. h(Ml, My),
  21500. Il.prototype = {
  21501. constructor: Il,
  21502. type: "view",
  21503. dimensions: ["x", "y"],
  21504. setBoundingRect: function(t, e, i, n) {
  21505. return this._rect = new jt(t,e,i,n),
  21506. this._rect
  21507. },
  21508. getBoundingRect: function() {
  21509. return this._rect
  21510. },
  21511. setViewRect: function(t, e, i, n) {
  21512. this.transformTo(t, e, i, n),
  21513. this._viewRect = new jt(t,e,i,n)
  21514. },
  21515. transformTo: function(t, e, i, n) {
  21516. var o = this.getBoundingRect()
  21517. , a = this._viewTransform;
  21518. a.transform = o.calculateTransform(new jt(t,e,i,n)),
  21519. a.decomposeTransform(),
  21520. this._updateTransform()
  21521. },
  21522. setCenter: function(t) {
  21523. t && (this._center = t,
  21524. this._updateCenterAndZoom())
  21525. },
  21526. setZoom: function(t) {
  21527. t = t || 1;
  21528. var e = this.zoomLimit;
  21529. e && (null != e.max && (t = Math.min(e.max, t)),
  21530. null != e.min && (t = Math.max(e.min, t))),
  21531. this._zoom = t,
  21532. this._updateCenterAndZoom()
  21533. },
  21534. getDefaultCenter: function() {
  21535. var t = this.getBoundingRect();
  21536. return [t.x + t.width / 2, t.y + t.height / 2]
  21537. },
  21538. getCenter: function() {
  21539. return this._center || this.getDefaultCenter()
  21540. },
  21541. getZoom: function() {
  21542. return this._zoom || 1
  21543. },
  21544. getRoamTransform: function() {
  21545. return this._roamTransform
  21546. },
  21547. _updateCenterAndZoom: function() {
  21548. var t = this._viewTransform.getLocalTransform()
  21549. , e = this._roamTransform
  21550. , i = this.getDefaultCenter()
  21551. , n = this.getCenter()
  21552. , o = this.getZoom();
  21553. n = Y([], n, t),
  21554. i = Y([], i, t),
  21555. e.origin = n,
  21556. e.position = [i[0] - n[0], i[1] - n[1]],
  21557. e.scale = [o, o],
  21558. this._updateTransform()
  21559. },
  21560. _updateTransform: function() {
  21561. var t = this._roamTransform
  21562. , e = this._viewTransform;
  21563. e.parent = t,
  21564. t.updateTransform(),
  21565. e.updateTransform(),
  21566. e.transform && at(this.transform || (this.transform = []), e.transform),
  21567. this.transform ? (this.invTransform = this.invTransform || [],
  21568. ut(this.invTransform, this.transform)) : this.invTransform = null,
  21569. this.decomposeTransform()
  21570. },
  21571. getViewRect: function() {
  21572. return this._viewRect
  21573. },
  21574. getViewRectAfterRoam: function() {
  21575. var t = this.getBoundingRect().clone();
  21576. return t.applyTransform(this.transform),
  21577. t
  21578. },
  21579. dataToPoint: function(t) {
  21580. var e = this.transform;
  21581. return e ? vI([], t, e) : [t[0], t[1]]
  21582. },
  21583. pointToData: function(t) {
  21584. var e = this.invTransform;
  21585. return e ? vI([], t, e) : [t[0], t[1]]
  21586. },
  21587. convertToPixel: m(Tl, "dataToPoint"),
  21588. convertFromPixel: m(Tl, "pointToData"),
  21589. containPoint: function(t) {
  21590. return this.getViewRectAfterRoam().contain(t[0], t[1])
  21591. }
  21592. },
  21593. h(Il, My);
  21594. for (var yI = [126, 25], xI = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, .7], [52, .7], [56, 7.7], [59, .7], [64, .7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]], _I = 0; _I < xI.length; _I++)
  21595. for (var bI = 0; bI < xI[_I].length; bI++)
  21596. xI[_I][bI][0] /= 10.5,
  21597. xI[_I][bI][1] /= -14,
  21598. xI[_I][bI][0] += yI[0],
  21599. xI[_I][bI][1] += yI[1];
  21600. var wI = {
  21601. "南海诸岛": [32, 80],
  21602. "广东": [0, -10],
  21603. "香港": [10, 5],
  21604. "澳门": [-10, 10],
  21605. "天津": [5, 5]
  21606. }
  21607. , SI = {
  21608. Russia: [100, 60],
  21609. "United States": [-99, 38],
  21610. "United States of America": [-99, 38]
  21611. }
  21612. , MI = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]]
  21613. , II = [function(t) {
  21614. "china" === t.map && t.regions.push(new bl("南海诸岛",d(xI, function(t) {
  21615. return {
  21616. type: "polygon",
  21617. exterior: t
  21618. }
  21619. }),yI))
  21620. }
  21621. , function(t) {
  21622. c(t.regions, function(t) {
  21623. var e = wI[t.name];
  21624. if (e) {
  21625. var i = t.center;
  21626. i[0] += e[0] / 10.5,
  21627. i[1] += -e[1] / 14
  21628. }
  21629. })
  21630. }
  21631. , function(t) {
  21632. c(t.regions, function(t) {
  21633. var e = SI[t.name];
  21634. if (e) {
  21635. var i = t.center;
  21636. i[0] = e[0],
  21637. i[1] = e[1]
  21638. }
  21639. })
  21640. }
  21641. , function(t) {
  21642. if ("china" === t.map)
  21643. for (var e = 0, i = t.regions.length; e < i; ++e)
  21644. "台湾" === t.regions[e].name && t.regions[e].geometries.push({
  21645. type: "polygon",
  21646. exterior: MI[0]
  21647. })
  21648. }
  21649. ];
  21650. Al.prototype = {
  21651. constructor: Al,
  21652. type: "geo",
  21653. dimensions: ["lng", "lat"],
  21654. containCoord: function(t) {
  21655. for (var e = this.regions, i = 0; i < e.length; i++)
  21656. if (e[i].contain(t))
  21657. return !0;
  21658. return !1
  21659. },
  21660. loadGeoJson: function(t, e, i) {
  21661. try {
  21662. this.regions = t ? mI(t) : []
  21663. } catch (t) {
  21664. throw "Invalid geoJson format\n" + t.message
  21665. }
  21666. e = e || {},
  21667. i = i || {};
  21668. for (var n = this.regions, o = O(), a = 0; a < n.length; a++) {
  21669. var r = n[a].name;
  21670. r = i.hasOwnProperty(r) ? i[r] : r,
  21671. n[a].name = r,
  21672. o.set(r, n[a]),
  21673. this.addGeoCoord(r, n[a].center);
  21674. var s = e[r];
  21675. s && n[a].transformTo(s.left, s.top, s.width, s.height)
  21676. }
  21677. this._regionsMap = o,
  21678. this._rect = null,
  21679. c(II, function(t) {
  21680. t(this)
  21681. }, this)
  21682. },
  21683. transformTo: function(t, e, i, n) {
  21684. var o = this.getBoundingRect();
  21685. (o = o.clone()).y = -o.y - o.height;
  21686. var a = this._viewTransform;
  21687. a.transform = o.calculateTransform(new jt(t,e,i,n)),
  21688. a.decomposeTransform();
  21689. var r = a.scale;
  21690. r[1] = -r[1],
  21691. a.updateTransform(),
  21692. this._updateTransform()
  21693. },
  21694. getRegion: function(t) {
  21695. return this._regionsMap.get(t)
  21696. },
  21697. getRegionByCoord: function(t) {
  21698. for (var e = this.regions, i = 0; i < e.length; i++)
  21699. if (e[i].contain(t))
  21700. return e[i]
  21701. },
  21702. addGeoCoord: function(t, e) {
  21703. this._nameCoordMap.set(t, e)
  21704. },
  21705. getGeoCoord: function(t) {
  21706. return this._nameCoordMap.get(t)
  21707. },
  21708. getBoundingRect: function() {
  21709. if (this._rect)
  21710. return this._rect;
  21711. for (var t, e = this.regions, i = 0; i < e.length; i++) {
  21712. var n = e[i].getBoundingRect();
  21713. (t = t || n.clone()).union(n)
  21714. }
  21715. return this._rect = t || new jt(0,0,0,0)
  21716. },
  21717. dataToPoint: function(t) {
  21718. if ("string" == typeof t && (t = this.getGeoCoord(t)),
  21719. t)
  21720. return Il.prototype.dataToPoint.call(this, t)
  21721. },
  21722. convertToPixel: m(Cl, "dataToPoint"),
  21723. convertFromPixel: m(Cl, "pointToData")
  21724. },
  21725. h(Al, Il);
  21726. var TI = {}
  21727. , AI = {
  21728. dimensions: Al.prototype.dimensions,
  21729. create: function(t, e) {
  21730. var i = [];
  21731. t.eachComponent("geo", function(t, n) {
  21732. var o = t.get("map")
  21733. , a = TI[o]
  21734. , r = new Al(o + n,o,a && a.geoJson,a && a.specialAreas,t.get("nameMap"));
  21735. r.zoomLimit = t.get("scaleLimit"),
  21736. i.push(r),
  21737. Ll(r, t),
  21738. t.coordinateSystem = r,
  21739. r.model = t,
  21740. r.resize = Dl,
  21741. r.resize(t, e)
  21742. }),
  21743. t.eachSeries(function(t) {
  21744. if ("geo" === t.get("coordinateSystem")) {
  21745. var e = t.get("geoIndex") || 0;
  21746. t.coordinateSystem = i[e]
  21747. }
  21748. });
  21749. var o = {};
  21750. return t.eachSeriesByType("map", function(t) {
  21751. if (!t.getHostGeoModel()) {
  21752. var e = t.getMapType();
  21753. o[e] = o[e] || [],
  21754. o[e].push(t)
  21755. }
  21756. }),
  21757. c(o, function(t, o) {
  21758. var a = TI[o]
  21759. , r = d(t, function(t) {
  21760. return t.get("nameMap")
  21761. })
  21762. , s = new Al(o,o,a && a.geoJson,a && a.specialAreas,n(r));
  21763. s.zoomLimit = M.apply(null, d(t, function(t) {
  21764. return t.get("scaleLimit")
  21765. })),
  21766. i.push(s),
  21767. s.resize = Dl,
  21768. s.resize(t[0], e),
  21769. c(t, function(t) {
  21770. t.coordinateSystem = s,
  21771. Ll(s, t)
  21772. })
  21773. }),
  21774. i
  21775. },
  21776. registerMap: function(t, e, i) {
  21777. e.geoJson && !e.features && (i = e.specialAreas,
  21778. e = e.geoJson),
  21779. "string" == typeof e && (e = "undefined" != typeof JSON && JSON.parse ? JSON.parse(e) : new Function("return (" + e + ");")()),
  21780. TI[t] = {
  21781. geoJson: e,
  21782. specialAreas: i
  21783. }
  21784. },
  21785. getMap: function(t) {
  21786. return TI[t]
  21787. },
  21788. getFilledRegions: function(t, e, i) {
  21789. var n = (t || []).slice();
  21790. i = i || {};
  21791. var o = AI.getMap(e)
  21792. , a = o && o.geoJson;
  21793. if (!a)
  21794. return t;
  21795. for (var r = O(), s = a.features, l = 0; l < n.length; l++)
  21796. r.set(n[l].name, n[l]);
  21797. for (l = 0; l < s.length; l++) {
  21798. var h = s[l].properties.name;
  21799. r.get(h) || (i.hasOwnProperty(h) && (h = i[h]),
  21800. n.push({
  21801. name: h
  21802. }))
  21803. }
  21804. return n
  21805. }
  21806. };
  21807. nS.registerMap(AI.registerMap),
  21808. nS.getMap(AI.getMap),
  21809. nS.parseGeoJSON(mI),
  21810. ir("geo", AI);
  21811. var CI = bw.extend({
  21812. type: "series.map",
  21813. dependencies: ["geo"],
  21814. layoutMode: "box",
  21815. needsDrawMap: !1,
  21816. seriesGroup: [],
  21817. init: function(t) {
  21818. this._fillOption(t, this.getMapType()),
  21819. CI.superApply(this, "init", arguments),
  21820. this.updateSelectedMap(t.data)
  21821. },
  21822. getInitialData: function(t) {
  21823. var e = vr(["value"], t.data || [])
  21824. , i = new lS(e,this);
  21825. return i.initData(t.data),
  21826. i
  21827. },
  21828. mergeOption: function(t) {
  21829. this._fillOption(t, this.getMapType()),
  21830. CI.superApply(this, "mergeOption", arguments),
  21831. this.updateSelectedMap(this.option.data)
  21832. },
  21833. getHostGeoModel: function() {
  21834. var t = this.option.geoIndex;
  21835. return null != t ? this.dependentModels.geo[t] : null
  21836. },
  21837. getMapType: function() {
  21838. return (this.getHostGeoModel() || this).option.map
  21839. },
  21840. _fillOption: function(t, e) {
  21841. t.data = AI.getFilledRegions(t.data, e, t.nameMap)
  21842. },
  21843. getRawValue: function(t) {
  21844. return this.getData().get("value", t)
  21845. },
  21846. getRegionModel: function(t) {
  21847. var e = this.getData();
  21848. return e.getItemModel(e.indexOfName(t))
  21849. },
  21850. formatTooltip: function(t) {
  21851. for (var e = this.getData(), i = Ei(this.getRawValue(t)), n = e.getName(t), o = this.seriesGroup, a = [], r = 0; r < o.length; r++) {
  21852. var s = o[r].originalData.indexOfName(n);
  21853. isNaN(o[r].originalData.get("value", s)) || a.push(Vi(o[r].name))
  21854. }
  21855. return a.join(", ") + "<br />" + Vi(n + " : " + i)
  21856. },
  21857. getTooltipPosition: function(t) {
  21858. if (null != t) {
  21859. var e = this.getData().getName(t)
  21860. , i = this.coordinateSystem
  21861. , n = i.getRegion(e);
  21862. return n && i.dataToPoint(n.center)
  21863. }
  21864. },
  21865. setZoom: function(t) {
  21866. this.option.zoom = t
  21867. },
  21868. setCenter: function(t) {
  21869. this.option.center = t
  21870. },
  21871. defaultOption: {
  21872. zlevel: 0,
  21873. z: 2,
  21874. coordinateSystem: "geo",
  21875. map: "",
  21876. left: "center",
  21877. top: "center",
  21878. aspectScale: .75,
  21879. showLegendSymbol: !0,
  21880. dataRangeHoverLink: !0,
  21881. boundingCoords: null,
  21882. center: null,
  21883. zoom: 1,
  21884. scaleLimit: null,
  21885. label: {
  21886. normal: {
  21887. show: !1,
  21888. color: "#000"
  21889. },
  21890. emphasis: {
  21891. show: !0,
  21892. color: "rgb(100,0,0)"
  21893. }
  21894. },
  21895. itemStyle: {
  21896. normal: {
  21897. borderWidth: .5,
  21898. borderColor: "#444",
  21899. areaColor: "#eee"
  21900. },
  21901. emphasis: {
  21902. areaColor: "rgba(255,215,0,0.8)"
  21903. }
  21904. }
  21905. }
  21906. });
  21907. h(CI, eI);
  21908. var DI = "\0_ec_interaction_mutex";
  21909. er({
  21910. type: "takeGlobalCursor",
  21911. event: "globalCursorTaken",
  21912. update: "update"
  21913. }, function() {}),
  21914. h(Nl, my);
  21915. var LI = {
  21916. axisPointer: 1,
  21917. tooltip: 1,
  21918. brush: 1
  21919. };
  21920. Yl.prototype = {
  21921. constructor: Yl,
  21922. draw: function(t, e, i, n, o) {
  21923. var a = "geo" === t.mainType
  21924. , r = t.getData && t.getData();
  21925. a && e.eachComponent({
  21926. mainType: "series",
  21927. subType: "map"
  21928. }, function(e) {
  21929. r || e.getHostGeoModel() !== t || (r = e.getData())
  21930. });
  21931. var s = t.coordinateSystem
  21932. , l = this.group
  21933. , h = s.scale
  21934. , u = {
  21935. position: s.position,
  21936. scale: h
  21937. };
  21938. !l.childAt(0) || o ? l.attr(u) : _o(l, u, t),
  21939. l.removeAll();
  21940. var d = ["itemStyle", "normal"]
  21941. , f = ["itemStyle", "emphasis"]
  21942. , g = ["label", "normal"]
  21943. , p = ["label", "emphasis"]
  21944. , m = O();
  21945. c(s.regions, function(e) {
  21946. var i = m.get(e.name) || m.set(e.name, new $y)
  21947. , n = new _b({
  21948. shape: {
  21949. paths: []
  21950. }
  21951. });
  21952. i.add(n);
  21953. var o, s = (D = t.getRegionModel(e.name) || t).getModel(d), u = D.getModel(f), v = jl(s), y = jl(u), x = D.getModel(g), _ = D.getModel(p);
  21954. if (r) {
  21955. o = r.indexOfName(e.name);
  21956. var b = r.getItemVisual(o, "color", !0);
  21957. b && (v.fill = b)
  21958. }
  21959. c(e.geometries, function(t) {
  21960. if ("polygon" === t.type) {
  21961. n.shape.paths.push(new fb({
  21962. shape: {
  21963. points: t.exterior
  21964. }
  21965. }));
  21966. for (var e = 0; e < (t.interiors ? t.interiors.length : 0); e++)
  21967. n.shape.paths.push(new fb({
  21968. shape: {
  21969. points: t.interiors[e]
  21970. }
  21971. }))
  21972. }
  21973. }),
  21974. n.setStyle(v),
  21975. n.style.strokeNoScale = !0,
  21976. n.culling = !0;
  21977. var w = x.get("show")
  21978. , S = _.get("show")
  21979. , M = r && isNaN(r.get("value", o))
  21980. , I = r && r.getItemLayout(o);
  21981. if (a || M && (w || S) || I && I.showLabel) {
  21982. var T, A = a ? e.name : o;
  21983. (!r || o >= 0) && (T = t);
  21984. var C = new ab({
  21985. position: e.center.slice(),
  21986. scale: [1 / h[0], 1 / h[1]],
  21987. z2: 10,
  21988. silent: !0
  21989. });
  21990. ho(C.style, C.hoverStyle = {}, x, _, {
  21991. labelFetcher: T,
  21992. labelDataIndex: A,
  21993. defaultText: e.name,
  21994. useInsideStyle: !1
  21995. }, {
  21996. textAlign: "center",
  21997. textVerticalAlign: "middle"
  21998. }),
  21999. i.add(C)
  22000. }
  22001. if (r)
  22002. r.setItemGraphicEl(o, i);
  22003. else {
  22004. var D = t.getRegionModel(e.name);
  22005. n.eventData = {
  22006. componentType: "geo",
  22007. geoIndex: t.componentIndex,
  22008. name: e.name,
  22009. region: D && D.option || {}
  22010. }
  22011. }
  22012. (i.__regions || (i.__regions = [])).push(e),
  22013. lo(i, y, {
  22014. hoverSilentOnTouch: !!t.get("selectedMode")
  22015. }),
  22016. l.add(i)
  22017. }),
  22018. this._updateController(t, e, i),
  22019. Xl(this, t, l, i, n),
  22020. ql(t, l)
  22021. },
  22022. remove: function() {
  22023. this.group.removeAll(),
  22024. this._controller.dispose(),
  22025. this._controllerHost = {}
  22026. },
  22027. _updateController: function(t, e, i) {
  22028. function n() {
  22029. var e = {
  22030. type: "geoRoam",
  22031. componentType: l
  22032. };
  22033. return e[l + "Id"] = t.id,
  22034. e
  22035. }
  22036. var a = t.coordinateSystem
  22037. , r = this._controller
  22038. , s = this._controllerHost;
  22039. s.zoomLimit = t.get("scaleLimit"),
  22040. s.zoom = a.getZoom(),
  22041. r.enable(t.get("roam") || !1);
  22042. var l = t.mainType;
  22043. r.off("pan").on("pan", function(t, e) {
  22044. this._mouseDownFlag = !1,
  22045. Fl(s, t, e),
  22046. i.dispatchAction(o(n(), {
  22047. dx: t,
  22048. dy: e
  22049. }))
  22050. }, this),
  22051. r.off("zoom").on("zoom", function(t, e, a) {
  22052. if (this._mouseDownFlag = !1,
  22053. Zl(s, t, e, a),
  22054. i.dispatchAction(o(n(), {
  22055. zoom: t,
  22056. originX: e,
  22057. originY: a
  22058. })),
  22059. this._updateGroup) {
  22060. var r = this.group
  22061. , l = r.scale;
  22062. r.traverse(function(t) {
  22063. "text" === t.type && t.attr("scale", [1 / l[0], 1 / l[1]])
  22064. })
  22065. }
  22066. }, this),
  22067. r.setPointerChecker(function(e, n, o) {
  22068. return a.getViewRectAfterRoam().contain(n, o) && !Ul(e, i, t)
  22069. })
  22070. }
  22071. },
  22072. hr({
  22073. type: "map",
  22074. render: function(t, e, i, n) {
  22075. if (!n || "mapToggleSelect" !== n.type || n.from !== this.uid) {
  22076. var o = this.group;
  22077. if (o.removeAll(),
  22078. !t.getHostGeoModel()) {
  22079. if (n && "geoRoam" === n.type && "series" === n.componentType && n.seriesId === t.id)
  22080. (a = this._mapDraw) && o.add(a.group);
  22081. else if (t.needsDrawMap) {
  22082. var a = this._mapDraw || new Yl(i,!0);
  22083. o.add(a.group),
  22084. a.draw(t, e, i, this, n),
  22085. this._mapDraw = a
  22086. } else
  22087. this._mapDraw && this._mapDraw.remove(),
  22088. this._mapDraw = null;
  22089. t.get("showLegendSymbol") && e.getComponent("legend") && this._renderSymbols(t, e, i)
  22090. }
  22091. }
  22092. },
  22093. remove: function() {
  22094. this._mapDraw && this._mapDraw.remove(),
  22095. this._mapDraw = null,
  22096. this.group.removeAll()
  22097. },
  22098. dispose: function() {
  22099. this._mapDraw && this._mapDraw.remove(),
  22100. this._mapDraw = null
  22101. },
  22102. _renderSymbols: function(t, e, i) {
  22103. var n = t.originalData
  22104. , o = this.group;
  22105. n.each("value", function(e, i) {
  22106. if (!isNaN(e)) {
  22107. var a = n.getItemLayout(i);
  22108. if (a && a.point) {
  22109. var r = a.point
  22110. , s = a.offset
  22111. , l = new rb({
  22112. style: {
  22113. fill: t.getData().getVisual("color")
  22114. },
  22115. shape: {
  22116. cx: r[0] + 9 * s,
  22117. cy: r[1],
  22118. r: 3
  22119. },
  22120. silent: !0,
  22121. z2: s ? 8 : 10
  22122. });
  22123. if (!s) {
  22124. var h = t.mainSeries.getData()
  22125. , u = n.getName(i)
  22126. , c = h.indexOfName(u)
  22127. , d = n.getItemModel(i)
  22128. , f = d.getModel("label.normal")
  22129. , g = d.getModel("label.emphasis")
  22130. , p = h.getItemGraphicEl(c)
  22131. , m = I(t.getFormattedLabel(i, "normal"), u)
  22132. , v = I(t.getFormattedLabel(i, "emphasis"), m)
  22133. , y = function() {
  22134. var t = uo({}, g, {
  22135. text: g.get("show") ? v : null
  22136. }, {
  22137. isRectText: !0,
  22138. useInsideStyle: !1
  22139. }, !0);
  22140. l.style.extendFrom(t),
  22141. l.__mapOriginalZ2 = l.z2,
  22142. l.z2 += 1
  22143. }
  22144. , x = function() {
  22145. uo(l.style, f, {
  22146. text: f.get("show") ? m : null,
  22147. textPosition: f.getShallow("position") || "bottom"
  22148. }, {
  22149. isRectText: !0,
  22150. useInsideStyle: !1
  22151. }),
  22152. null != l.__mapOriginalZ2 && (l.z2 = l.__mapOriginalZ2,
  22153. l.__mapOriginalZ2 = null)
  22154. };
  22155. p.on("mouseover", y).on("mouseout", x).on("emphasis", y).on("normal", x),
  22156. x()
  22157. }
  22158. o.add(l)
  22159. }
  22160. }
  22161. })
  22162. }
  22163. }),
  22164. er({
  22165. type: "geoRoam",
  22166. event: "geoRoam",
  22167. update: "updateLayout"
  22168. }, function(t, e) {
  22169. var i = t.componentType || "series";
  22170. e.eachComponent({
  22171. mainType: i,
  22172. query: t
  22173. }, function(e) {
  22174. var n = e.coordinateSystem;
  22175. if ("geo" === n.type) {
  22176. var o = $l(n, t, e.get("scaleLimit"));
  22177. e.setCenter && e.setCenter(o.center),
  22178. e.setZoom && e.setZoom(o.zoom),
  22179. "series" === i && c(e.seriesGroup, function(t) {
  22180. t.setCenter(o.center),
  22181. t.setZoom(o.zoom)
  22182. })
  22183. }
  22184. })
  22185. });
  22186. nr(function(t) {
  22187. var e = {};
  22188. t.eachSeriesByType("map", function(i) {
  22189. var n = i.getMapType();
  22190. if (!i.getHostGeoModel() && !e[n]) {
  22191. var o = {};
  22192. c(i.seriesGroup, function(e) {
  22193. var i = e.coordinateSystem
  22194. , n = e.originalData;
  22195. e.get("showLegendSymbol") && t.getComponent("legend") && n.each("value", function(t, e) {
  22196. var a = n.getName(e)
  22197. , r = i.getRegion(a);
  22198. if (r && !isNaN(t)) {
  22199. var s = o[a] || 0
  22200. , l = i.dataToPoint(r.center);
  22201. o[a] = s + 1,
  22202. n.setItemLayout(e, {
  22203. point: l,
  22204. offset: s
  22205. })
  22206. }
  22207. })
  22208. });
  22209. var a = i.getData();
  22210. a.each(function(t) {
  22211. var e = a.getName(t)
  22212. , i = a.getItemLayout(t) || {};
  22213. i.showLabel = !o[e],
  22214. a.setItemLayout(t, i)
  22215. }),
  22216. e[n] = !0
  22217. }
  22218. })
  22219. }),
  22220. or(function(t) {
  22221. t.eachSeriesByType("map", function(t) {
  22222. var e = t.get("color")
  22223. , i = t.getModel("itemStyle.normal")
  22224. , n = i.get("areaColor")
  22225. , o = i.get("color") || e[t.seriesIndex % e.length];
  22226. t.getData().setVisual({
  22227. areaColor: n,
  22228. color: o
  22229. })
  22230. })
  22231. }),
  22232. tr(Ew.PROCESSOR.STATISTIC, function(t) {
  22233. var e = {};
  22234. t.eachSeriesByType("map", function(t) {
  22235. var i = t.getHostGeoModel()
  22236. , n = i ? "o" + i.id : "i" + t.getMapType();
  22237. (e[n] = e[n] || []).push(t)
  22238. }),
  22239. c(e, function(t, e) {
  22240. for (var i = Kl(d(t, function(t) {
  22241. return t.getData()
  22242. }), t[0].get("mapValueCalculation")), n = 0; n < t.length; n++)
  22243. t[n].originalData = t[n].getData();
  22244. for (n = 0; n < t.length; n++)
  22245. t[n].seriesGroup = t,
  22246. t[n].needsDrawMap = 0 === n && !t[n].getHostGeoModel(),
  22247. t[n].setData(i.cloneShallow()),
  22248. t[n].mainSeries = t[0]
  22249. })
  22250. }),
  22251. Qa(function(t) {
  22252. var e = [];
  22253. c(t.series, function(t) {
  22254. t && "map" === t.type && (e.push(t),
  22255. t.map = t.map || t.mapType,
  22256. a(t, t.mapLocation))
  22257. })
  22258. }),
  22259. oI("map", [{
  22260. type: "mapToggleSelect",
  22261. event: "mapselectchanged",
  22262. method: "toggleSelected"
  22263. }, {
  22264. type: "mapSelect",
  22265. event: "mapselected",
  22266. method: "select"
  22267. }, {
  22268. type: "mapUnSelect",
  22269. event: "mapunselected",
  22270. method: "unSelect"
  22271. }]);
  22272. var kI = c
  22273. , PI = "\0__link_datas"
  22274. , OI = "\0__link_mainData"
  22275. , zI = function(t, e) {
  22276. this.name = t || "",
  22277. this.depth = 0,
  22278. this.height = 0,
  22279. this.parentNode = null,
  22280. this.dataIndex = -1,
  22281. this.children = [],
  22282. this.viewChildren = [],
  22283. this.hostTree = e
  22284. };
  22285. zI.prototype = {
  22286. constructor: zI,
  22287. isRemoved: function() {
  22288. return this.dataIndex < 0
  22289. },
  22290. eachNode: function(t, e, i) {
  22291. "function" == typeof t && (i = e,
  22292. e = t,
  22293. t = null),
  22294. x(t = t || {}) && (t = {
  22295. order: t
  22296. });
  22297. var n, o = t.order || "preorder", a = this[t.attr || "children"];
  22298. "preorder" === o && (n = e.call(i, this));
  22299. for (var r = 0; !n && r < a.length; r++)
  22300. a[r].eachNode(t, e, i);
  22301. "postorder" === o && e.call(i, this)
  22302. },
  22303. updateDepthAndHeight: function(t) {
  22304. var e = 0;
  22305. this.depth = t;
  22306. for (var i = 0; i < this.children.length; i++) {
  22307. var n = this.children[i];
  22308. n.updateDepthAndHeight(t + 1),
  22309. n.height > e && (e = n.height)
  22310. }
  22311. this.height = e + 1
  22312. },
  22313. getNodeById: function(t) {
  22314. if (this.getId() === t)
  22315. return this;
  22316. for (var e = 0, i = this.children, n = i.length; e < n; e++) {
  22317. var o = i[e].getNodeById(t);
  22318. if (o)
  22319. return o
  22320. }
  22321. },
  22322. contains: function(t) {
  22323. if (t === this)
  22324. return !0;
  22325. for (var e = 0, i = this.children, n = i.length; e < n; e++) {
  22326. var o = i[e].contains(t);
  22327. if (o)
  22328. return o
  22329. }
  22330. },
  22331. getAncestors: function(t) {
  22332. for (var e = [], i = t ? this : this.parentNode; i; )
  22333. e.push(i),
  22334. i = i.parentNode;
  22335. return e.reverse(),
  22336. e
  22337. },
  22338. getValue: function(t) {
  22339. var e = this.hostTree.data;
  22340. return e.get(e.getDimension(t || "value"), this.dataIndex)
  22341. },
  22342. setLayout: function(t, e) {
  22343. this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, t, e)
  22344. },
  22345. getLayout: function() {
  22346. return this.hostTree.data.getItemLayout(this.dataIndex)
  22347. },
  22348. getModel: function(t) {
  22349. if (!(this.dataIndex < 0)) {
  22350. var e, i = this.hostTree, n = i.data.getItemModel(this.dataIndex), o = this.getLevelModel();
  22351. return o || 0 !== this.children.length && (0 === this.children.length || !1 !== this.isExpand) || (e = this.getLeavesModel()),
  22352. n.getModel(t, (o || e || i.hostModel).getModel(t))
  22353. }
  22354. },
  22355. getLevelModel: function() {
  22356. return (this.hostTree.levelModels || [])[this.depth]
  22357. },
  22358. getLeavesModel: function() {
  22359. return this.hostTree.leavesModel
  22360. },
  22361. setVisual: function(t, e) {
  22362. this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, t, e)
  22363. },
  22364. getVisual: function(t, e) {
  22365. return this.hostTree.data.getItemVisual(this.dataIndex, t, e)
  22366. },
  22367. getRawIndex: function() {
  22368. return this.hostTree.data.getRawIndex(this.dataIndex)
  22369. },
  22370. getId: function() {
  22371. return this.hostTree.data.getId(this.dataIndex)
  22372. }
  22373. },
  22374. rh.prototype = {
  22375. constructor: rh,
  22376. type: "tree",
  22377. eachNode: function(t, e, i) {
  22378. this.root.eachNode(t, e, i)
  22379. },
  22380. getNodeByDataIndex: function(t) {
  22381. var e = this.data.getRawIndex(t);
  22382. return this._nodes[e]
  22383. },
  22384. getNodeByName: function(t) {
  22385. return this.root.getNodeByName(t)
  22386. },
  22387. update: function() {
  22388. for (var t = this.data, e = this._nodes, i = 0, n = e.length; i < n; i++)
  22389. e[i].dataIndex = -1;
  22390. for (var i = 0, n = t.count(); i < n; i++)
  22391. e[t.getRawIndex(i)].dataIndex = i
  22392. },
  22393. clearLayouts: function() {
  22394. this.data.clearItemLayouts()
  22395. }
  22396. },
  22397. rh.createTree = function(t, e, i) {
  22398. function n(t, e) {
  22399. var i = t.value;
  22400. r = Math.max(r, v(i) ? i.length : 1),
  22401. a.push(t);
  22402. var s = new zI(t.name,o);
  22403. e ? sh(s, e) : o.root = s,
  22404. o._nodes.push(s);
  22405. var l = t.children;
  22406. if (l)
  22407. for (var h = 0; h < l.length; h++)
  22408. n(l[h], s)
  22409. }
  22410. var o = new rh(e,i.levels,i.leaves)
  22411. , a = []
  22412. , r = 1;
  22413. n(t),
  22414. o.root.updateDepthAndHeight(0);
  22415. var s = vr([{
  22416. name: "value"
  22417. }], a, {
  22418. dimCount: r
  22419. })
  22420. , l = new lS(s,e);
  22421. return l.initData(a),
  22422. Jl({
  22423. mainData: l,
  22424. struct: o,
  22425. structAttr: "tree"
  22426. }),
  22427. o.update(),
  22428. o
  22429. }
  22430. ,
  22431. bw.extend({
  22432. type: "series.tree",
  22433. layoutInfo: null,
  22434. layoutMode: "box",
  22435. getInitialData: function(t) {
  22436. var e = {
  22437. name: t.name,
  22438. children: t.data
  22439. }
  22440. , i = t.leaves || {}
  22441. , n = {};
  22442. n.leaves = i;
  22443. var o = rh.createTree(e, this, n)
  22444. , a = 0;
  22445. o.eachNode("preorder", function(t) {
  22446. t.depth > a && (a = t.depth)
  22447. });
  22448. var r = t.expandAndCollapse && t.initialTreeDepth >= 0 ? t.initialTreeDepth : a;
  22449. return o.root.eachNode("preorder", function(t) {
  22450. var e = t.hostTree.data.getRawDataItem(t.dataIndex);
  22451. t.isExpand = e && null != e.collapsed ? !e.collapsed : t.depth <= r
  22452. }),
  22453. o.data
  22454. },
  22455. formatTooltip: function(t) {
  22456. for (var e = this.getData().tree, i = e.root.children[0], n = e.getNodeByDataIndex(t), o = n.getValue(), a = n.name; n && n !== i; )
  22457. a = n.parentNode.name + "." + a,
  22458. n = n.parentNode;
  22459. return Vi(a + (isNaN(o) || null == o ? "" : " : " + o))
  22460. },
  22461. defaultOption: {
  22462. zlevel: 0,
  22463. z: 2,
  22464. left: "12%",
  22465. top: "12%",
  22466. right: "12%",
  22467. bottom: "12%",
  22468. layout: "orthogonal",
  22469. orient: "horizontal",
  22470. symbol: "emptyCircle",
  22471. symbolSize: 7,
  22472. expandAndCollapse: !0,
  22473. initialTreeDepth: 2,
  22474. lineStyle: {
  22475. normal: {
  22476. color: "#ccc",
  22477. width: 1.5,
  22478. curveness: .5
  22479. }
  22480. },
  22481. itemStyle: {
  22482. normal: {
  22483. color: "lightsteelblue",
  22484. borderColor: "#c23531",
  22485. borderWidth: 1.5
  22486. }
  22487. },
  22488. label: {
  22489. normal: {
  22490. show: !0,
  22491. color: "#555"
  22492. }
  22493. },
  22494. leaves: {
  22495. label: {
  22496. normal: {
  22497. show: !0
  22498. }
  22499. }
  22500. },
  22501. animationEasing: "linear",
  22502. animationDuration: 700,
  22503. animationDurationUpdate: 1e3
  22504. }
  22505. }),
  22506. hr({
  22507. type: "tree",
  22508. init: function(t, e) {
  22509. this._oldTree,
  22510. this._mainGroup = new $y,
  22511. this.group.add(this._mainGroup)
  22512. },
  22513. render: function(t, e, i, n) {
  22514. var o = t.getData()
  22515. , a = t.layoutInfo
  22516. , r = this._mainGroup
  22517. , s = t.get("layout");
  22518. "radial" === s ? r.attr("position", [a.x + a.width / 2, a.y + a.height / 2]) : r.attr("position", [a.x, a.y]);
  22519. var l = this._data
  22520. , h = {
  22521. expandAndCollapse: t.get("expandAndCollapse"),
  22522. layout: s,
  22523. orient: t.get("orient"),
  22524. curvature: t.get("lineStyle.normal.curveness"),
  22525. symbolRotate: t.get("symbolRotate"),
  22526. symbolOffset: t.get("symbolOffset"),
  22527. hoverAnimation: t.get("hoverAnimation"),
  22528. useNameLabel: !0,
  22529. fadeIn: !0
  22530. };
  22531. o.diff(l).add(function(e) {
  22532. bh(o, e) && Sh(o, e, null, r, t, h)
  22533. }).update(function(e, i) {
  22534. var n = l.getItemGraphicEl(i);
  22535. bh(o, e) ? Sh(o, e, n, r, t, h) : n && Mh(o, e, n, r, t, h)
  22536. }).remove(function(e) {
  22537. var i = l.getItemGraphicEl(e);
  22538. Mh(o, e, i, r, t, h)
  22539. }).execute(),
  22540. !0 === h.expandAndCollapse && o.eachItemGraphicEl(function(e, n) {
  22541. e.off("click").on("click", function() {
  22542. i.dispatchAction({
  22543. type: "treeExpandAndCollapse",
  22544. seriesId: t.id,
  22545. dataIndex: n
  22546. })
  22547. })
  22548. }),
  22549. this._data = o
  22550. },
  22551. dispose: function() {},
  22552. remove: function() {
  22553. this._mainGroup.removeAll(),
  22554. this._data = null
  22555. }
  22556. }),
  22557. er({
  22558. type: "treeExpandAndCollapse",
  22559. event: "treeExpandAndCollapse",
  22560. update: "update"
  22561. }, function(t, e) {
  22562. e.eachComponent({
  22563. mainType: "series",
  22564. subType: "tree",
  22565. query: t
  22566. }, function(e) {
  22567. var i = t.dataIndex
  22568. , n = e.getData().tree.getNodeByDataIndex(i);
  22569. n.isExpand = !n.isExpand
  22570. })
  22571. });
  22572. var NI = function(t, e) {
  22573. var i = fh(t, e);
  22574. t.layoutInfo = i;
  22575. var n = t.get("layout")
  22576. , o = 0
  22577. , a = 0
  22578. , r = null;
  22579. "radial" === n ? (o = 2 * Math.PI,
  22580. a = Math.min(i.height, i.width) / 2,
  22581. r = ch(function(t, e) {
  22582. return (t.parentNode === e.parentNode ? 1 : 2) / t.depth
  22583. })) : (o = i.width,
  22584. a = i.height,
  22585. r = ch());
  22586. var s = t.getData().tree.root
  22587. , l = s.children[0];
  22588. lh(s),
  22589. Th(l, hh, r),
  22590. s.hierNode.modifier = -l.hierNode.prelim,
  22591. Ah(l, uh);
  22592. var h = l
  22593. , u = l
  22594. , c = l;
  22595. Ah(l, function(t) {
  22596. var e = t.getLayout().x;
  22597. e < h.getLayout().x && (h = t),
  22598. e > u.getLayout().x && (u = t),
  22599. t.depth > c.depth && (c = t)
  22600. });
  22601. var d = h === u ? 1 : r(h, u) / 2
  22602. , f = d - h.getLayout().x
  22603. , g = 0
  22604. , p = 0
  22605. , m = 0
  22606. , v = 0;
  22607. "radial" === n ? (g = o / (u.getLayout().x + d + f),
  22608. p = a / (c.depth - 1 || 1),
  22609. Ah(l, function(t) {
  22610. m = (t.getLayout().x + f) * g,
  22611. v = (t.depth - 1) * p;
  22612. var e = dh(m, v);
  22613. t.setLayout({
  22614. x: e.x,
  22615. y: e.y,
  22616. rawX: m,
  22617. rawY: v
  22618. }, !0)
  22619. })) : "horizontal" === t.get("orient") ? (p = a / (u.getLayout().x + d + f),
  22620. g = o / (c.depth - 1 || 1),
  22621. Ah(l, function(t) {
  22622. v = (t.getLayout().x + f) * p,
  22623. m = (t.depth - 1) * g,
  22624. t.setLayout({
  22625. x: m,
  22626. y: v
  22627. }, !0)
  22628. })) : (g = o / (u.getLayout().x + d + f),
  22629. p = a / (c.depth - 1 || 1),
  22630. Ah(l, function(t) {
  22631. m = (t.getLayout().x + f) * g,
  22632. v = (t.depth - 1) * p,
  22633. t.setLayout({
  22634. x: m,
  22635. y: v
  22636. }, !0)
  22637. }))
  22638. };
  22639. or(m(mM, "tree", "circle", null)),
  22640. nr(function(t, e) {
  22641. t.eachSeriesByType("tree", function(t) {
  22642. NI(t, e)
  22643. })
  22644. }),
  22645. nr(function(t, e) {
  22646. t.eachSeriesByType("tree", function(t) {
  22647. NI(t, e)
  22648. })
  22649. }),
  22650. bw.extend({
  22651. type: "series.treemap",
  22652. layoutMode: "box",
  22653. dependencies: ["grid", "polar"],
  22654. _viewRoot: null,
  22655. defaultOption: {
  22656. progressive: 0,
  22657. hoverLayerThreshold: 1 / 0,
  22658. left: "center",
  22659. top: "middle",
  22660. right: null,
  22661. bottom: null,
  22662. width: "80%",
  22663. height: "80%",
  22664. sort: !0,
  22665. clipWindow: "origin",
  22666. squareRatio: .5 * (1 + Math.sqrt(5)),
  22667. leafDepth: null,
  22668. drillDownIcon: "▶",
  22669. zoomToNodeRatio: .1024,
  22670. roam: !0,
  22671. nodeClick: "zoomToNode",
  22672. animation: !0,
  22673. animationDurationUpdate: 900,
  22674. animationEasing: "quinticInOut",
  22675. breadcrumb: {
  22676. show: !0,
  22677. height: 22,
  22678. left: "center",
  22679. top: "bottom",
  22680. emptyItemWidth: 25,
  22681. itemStyle: {
  22682. normal: {
  22683. color: "rgba(0,0,0,0.7)",
  22684. borderColor: "rgba(255,255,255,0.7)",
  22685. borderWidth: 1,
  22686. shadowColor: "rgba(150,150,150,1)",
  22687. shadowBlur: 3,
  22688. shadowOffsetX: 0,
  22689. shadowOffsetY: 0,
  22690. textStyle: {
  22691. color: "#fff"
  22692. }
  22693. },
  22694. emphasis: {
  22695. textStyle: {}
  22696. }
  22697. }
  22698. },
  22699. label: {
  22700. normal: {
  22701. show: !0,
  22702. distance: 0,
  22703. padding: 5,
  22704. position: "inside",
  22705. color: "#fff",
  22706. ellipsis: !0
  22707. }
  22708. },
  22709. upperLabel: {
  22710. normal: {
  22711. show: !1,
  22712. position: [0, "50%"],
  22713. height: 20,
  22714. color: "#fff",
  22715. ellipsis: !0,
  22716. verticalAlign: "middle"
  22717. },
  22718. emphasis: {
  22719. show: !0,
  22720. position: [0, "50%"],
  22721. color: "#fff",
  22722. ellipsis: !0,
  22723. verticalAlign: "middle"
  22724. }
  22725. },
  22726. itemStyle: {
  22727. normal: {
  22728. color: null,
  22729. colorAlpha: null,
  22730. colorSaturation: null,
  22731. borderWidth: 0,
  22732. gapWidth: 0,
  22733. borderColor: "#fff",
  22734. borderColorSaturation: null
  22735. },
  22736. emphasis: {}
  22737. },
  22738. visualDimension: 0,
  22739. visualMin: null,
  22740. visualMax: null,
  22741. color: [],
  22742. colorAlpha: null,
  22743. colorSaturation: null,
  22744. colorMappingBy: "index",
  22745. visibleMin: 10,
  22746. childrenVisibleMin: null,
  22747. levels: []
  22748. },
  22749. getInitialData: function(t, e) {
  22750. var i = {
  22751. name: t.name,
  22752. children: t.data
  22753. };
  22754. Ph(i);
  22755. var n = t.levels || [];
  22756. n = t.levels = Oh(n, e);
  22757. var o = {};
  22758. return o.levels = n,
  22759. rh.createTree(i, this, o).data
  22760. },
  22761. optionUpdated: function() {
  22762. this.resetViewRoot()
  22763. },
  22764. formatTooltip: function(t) {
  22765. var e = this.getData()
  22766. , i = this.getRawValue(t)
  22767. , n = Ei(v(i) ? i[0] : i);
  22768. return Vi(e.getName(t) + ": " + n)
  22769. },
  22770. getDataParams: function(t) {
  22771. var e = bw.prototype.getDataParams.apply(this, arguments)
  22772. , i = this.getData().tree.getNodeByDataIndex(t);
  22773. return e.treePathInfo = kh(i, this),
  22774. e
  22775. },
  22776. setLayoutInfo: function(t) {
  22777. this.layoutInfo = this.layoutInfo || {},
  22778. o(this.layoutInfo, t)
  22779. },
  22780. mapIdToIndex: function(t) {
  22781. var e = this._idIndexMap;
  22782. e || (e = this._idIndexMap = O(),
  22783. this._idIndexMapCount = 0);
  22784. var i = e.get(t);
  22785. return null == i && e.set(t, i = this._idIndexMapCount++),
  22786. i
  22787. },
  22788. getViewRoot: function() {
  22789. return this._viewRoot
  22790. },
  22791. resetViewRoot: function(t) {
  22792. t ? this._viewRoot = t : t = this._viewRoot;
  22793. var e = this.getData().tree.root;
  22794. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  22795. }
  22796. });
  22797. var EI = 5;
  22798. zh.prototype = {
  22799. constructor: zh,
  22800. render: function(t, e, i, n) {
  22801. var o = t.getModel("breadcrumb")
  22802. , a = this.group;
  22803. if (a.removeAll(),
  22804. o.get("show") && i) {
  22805. var r = o.getModel("itemStyle.normal")
  22806. , s = r.getModel("textStyle")
  22807. , l = {
  22808. pos: {
  22809. left: o.get("left"),
  22810. right: o.get("right"),
  22811. top: o.get("top"),
  22812. bottom: o.get("bottom")
  22813. },
  22814. box: {
  22815. width: e.getWidth(),
  22816. height: e.getHeight()
  22817. },
  22818. emptyItemWidth: o.get("emptyItemWidth"),
  22819. totalWidth: 0,
  22820. renderList: []
  22821. };
  22822. this._prepare(i, l, s),
  22823. this._renderContent(t, l, r, s, n),
  22824. $o(a, l.pos, l.box)
  22825. }
  22826. },
  22827. _prepare: function(t, e, i) {
  22828. for (var n = t; n; n = n.parentNode) {
  22829. var o = n.getModel().get("name")
  22830. , a = i.getTextRect(o)
  22831. , r = Math.max(a.width + 16, e.emptyItemWidth);
  22832. e.totalWidth += r + 8,
  22833. e.renderList.push({
  22834. node: n,
  22835. text: o,
  22836. width: r
  22837. })
  22838. }
  22839. },
  22840. _renderContent: function(t, e, i, n, o) {
  22841. for (var r = 0, s = e.emptyItemWidth, l = t.get("breadcrumb.height"), h = qo(e.pos, e.box), u = e.totalWidth, c = e.renderList, d = c.length - 1; d >= 0; d--) {
  22842. var f = c[d]
  22843. , g = f.node
  22844. , p = f.width
  22845. , v = f.text;
  22846. u > h.width && (u -= p - s,
  22847. p = s,
  22848. v = null);
  22849. var y = new fb({
  22850. shape: {
  22851. points: Nh(r, 0, p, l, d === c.length - 1, 0 === d)
  22852. },
  22853. style: a(i.getItemStyle(), {
  22854. lineJoin: "bevel",
  22855. text: v,
  22856. textFill: n.getTextColor(),
  22857. textFont: n.getFont()
  22858. }),
  22859. z: 10,
  22860. onclick: m(o, g)
  22861. });
  22862. this.group.add(y),
  22863. Eh(y, t, g),
  22864. r += p + 8
  22865. }
  22866. },
  22867. remove: function() {
  22868. this.group.removeAll()
  22869. }
  22870. };
  22871. var RI = p
  22872. , VI = $y
  22873. , BI = pb
  22874. , GI = c
  22875. , WI = ["label", "normal"]
  22876. , HI = ["label", "emphasis"]
  22877. , FI = ["upperLabel", "normal"]
  22878. , ZI = ["upperLabel", "emphasis"]
  22879. , UI = 10
  22880. , jI = 1
  22881. , XI = 2
  22882. , qI = e_([["fill", "color"], ["stroke", "strokeColor"], ["lineWidth", "strokeWidth"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]])
  22883. , YI = function(t) {
  22884. var e = qI(t);
  22885. return e.stroke = e.fill = e.lineWidth = null,
  22886. e
  22887. };
  22888. hr({
  22889. type: "treemap",
  22890. init: function(t, e) {
  22891. this._containerGroup,
  22892. this._storage = {
  22893. nodeGroup: [],
  22894. background: [],
  22895. content: []
  22896. },
  22897. this._oldTree,
  22898. this._breadcrumb,
  22899. this._controller,
  22900. this._state = "ready"
  22901. },
  22902. render: function(t, e, i, n) {
  22903. if (!(s(e.findComponents({
  22904. mainType: "series",
  22905. subType: "treemap",
  22906. query: n
  22907. }), t) < 0)) {
  22908. this.seriesModel = t,
  22909. this.api = i,
  22910. this.ecModel = e;
  22911. var o = Ch(n, t)
  22912. , a = n && n.type
  22913. , r = t.layoutInfo
  22914. , l = !this._oldTree
  22915. , h = this._storage
  22916. , u = "treemapRootToNode" === a && o && h ? {
  22917. rootNodeGroup: h.nodeGroup[o.node.getRawIndex()],
  22918. direction: n.direction
  22919. } : null
  22920. , c = this._giveContainerGroup(r)
  22921. , d = this._doRender(c, t, u);
  22922. l || a && "treemapZoomToNode" !== a && "treemapRootToNode" !== a ? d.renderFinally() : this._doAnimation(c, d, t, u),
  22923. this._resetController(i),
  22924. this._renderBreadcrumb(t, i, o)
  22925. }
  22926. },
  22927. _giveContainerGroup: function(t) {
  22928. var e = this._containerGroup;
  22929. return e || (e = this._containerGroup = new VI,
  22930. this._initEvents(e),
  22931. this.group.add(e)),
  22932. e.attr("position", [t.x, t.y]),
  22933. e
  22934. },
  22935. _doRender: function(t, e, i) {
  22936. function n(t, e, i, o, a) {
  22937. function r(t) {
  22938. return t.getId()
  22939. }
  22940. function s(r, s) {
  22941. var l = null != r ? t[r] : null
  22942. , h = null != s ? e[s] : null
  22943. , c = u(l, h, i, a);
  22944. c && n(l && l.viewChildren || [], h && h.viewChildren || [], c, o, a + 1)
  22945. }
  22946. o ? (e = t,
  22947. GI(t, function(t, e) {
  22948. !t.isRemoved() && s(e, e)
  22949. })) : new cr(e,t,r,r).add(s).update(s).remove(m(s, null)).execute()
  22950. }
  22951. var o = e.getData().tree
  22952. , a = this._oldTree
  22953. , r = {
  22954. nodeGroup: [],
  22955. background: [],
  22956. content: []
  22957. }
  22958. , s = {
  22959. nodeGroup: [],
  22960. background: [],
  22961. content: []
  22962. }
  22963. , l = this._storage
  22964. , h = []
  22965. , u = m(Vh, e, s, l, i, r, h);
  22966. n(o.root ? [o.root] : [], a && a.root ? [a.root] : [], t, o === a || !a, 0);
  22967. var c = function(t) {
  22968. var e = {
  22969. nodeGroup: [],
  22970. background: [],
  22971. content: []
  22972. };
  22973. return t && GI(t, function(t, i) {
  22974. var n = e[i];
  22975. GI(t, function(t) {
  22976. t && (n.push(t),
  22977. t.__tmWillDelete = 1)
  22978. })
  22979. }),
  22980. e
  22981. }(l);
  22982. return this._oldTree = o,
  22983. this._storage = s,
  22984. {
  22985. lastsForAnimation: r,
  22986. willDeleteEls: c,
  22987. renderFinally: function() {
  22988. GI(c, function(t) {
  22989. GI(t, function(t) {
  22990. t.parent && t.parent.remove(t)
  22991. })
  22992. }),
  22993. GI(h, function(t) {
  22994. t.invisible = !0,
  22995. t.dirty()
  22996. })
  22997. }
  22998. }
  22999. },
  23000. _doAnimation: function(t, e, i, n) {
  23001. if (i.get("animation")) {
  23002. var a = i.get("animationDurationUpdate")
  23003. , r = i.get("animationEasing")
  23004. , s = Rh();
  23005. GI(e.willDeleteEls, function(t, e) {
  23006. GI(t, function(t, i) {
  23007. if (!t.invisible) {
  23008. var o, l = t.parent;
  23009. if (n && "drillDown" === n.direction)
  23010. o = l === n.rootNodeGroup ? {
  23011. shape: {
  23012. x: 0,
  23013. y: 0,
  23014. width: l.__tmNodeWidth,
  23015. height: l.__tmNodeHeight
  23016. },
  23017. style: {
  23018. opacity: 0
  23019. }
  23020. } : {
  23021. style: {
  23022. opacity: 0
  23023. }
  23024. };
  23025. else {
  23026. var h = 0
  23027. , u = 0;
  23028. l.__tmWillDelete || (h = l.__tmNodeWidth / 2,
  23029. u = l.__tmNodeHeight / 2),
  23030. o = "nodeGroup" === e ? {
  23031. position: [h, u],
  23032. style: {
  23033. opacity: 0
  23034. }
  23035. } : {
  23036. shape: {
  23037. x: h,
  23038. y: u,
  23039. width: 0,
  23040. height: 0
  23041. },
  23042. style: {
  23043. opacity: 0
  23044. }
  23045. }
  23046. }
  23047. o && s.add(t, o, a, r)
  23048. }
  23049. })
  23050. }),
  23051. GI(this._storage, function(t, i) {
  23052. GI(t, function(t, n) {
  23053. var l = e.lastsForAnimation[i][n]
  23054. , h = {};
  23055. l && ("nodeGroup" === i ? l.old && (h.position = t.position.slice(),
  23056. t.attr("position", l.old)) : (l.old && (h.shape = o({}, t.shape),
  23057. t.setShape(l.old)),
  23058. l.fadein ? (t.setStyle("opacity", 0),
  23059. h.style = {
  23060. opacity: 1
  23061. }) : 1 !== t.style.opacity && (h.style = {
  23062. opacity: 1
  23063. })),
  23064. s.add(t, h, a, r))
  23065. })
  23066. }, this),
  23067. this._state = "animating",
  23068. s.done(RI(function() {
  23069. this._state = "ready",
  23070. e.renderFinally()
  23071. }, this)).start()
  23072. }
  23073. },
  23074. _resetController: function(t) {
  23075. var e = this._controller;
  23076. e || ((e = this._controller = new Nl(t.getZr())).enable(this.seriesModel.get("roam")),
  23077. e.on("pan", RI(this._onPan, this)),
  23078. e.on("zoom", RI(this._onZoom, this)));
  23079. var i = new jt(0,0,t.getWidth(),t.getHeight());
  23080. e.setPointerChecker(function(t, e, n) {
  23081. return i.contain(e, n)
  23082. })
  23083. },
  23084. _clearController: function() {
  23085. var t = this._controller;
  23086. t && (t.dispose(),
  23087. t = null)
  23088. },
  23089. _onPan: function(t, e) {
  23090. if ("animating" !== this._state && (Math.abs(t) > 3 || Math.abs(e) > 3)) {
  23091. var i = this.seriesModel.getData().tree.root;
  23092. if (!i)
  23093. return;
  23094. var n = i.getLayout();
  23095. if (!n)
  23096. return;
  23097. this.api.dispatchAction({
  23098. type: "treemapMove",
  23099. from: this.uid,
  23100. seriesId: this.seriesModel.id,
  23101. rootRect: {
  23102. x: n.x + t,
  23103. y: n.y + e,
  23104. width: n.width,
  23105. height: n.height
  23106. }
  23107. })
  23108. }
  23109. },
  23110. _onZoom: function(t, e, i) {
  23111. if ("animating" !== this._state) {
  23112. var n = this.seriesModel.getData().tree.root;
  23113. if (!n)
  23114. return;
  23115. var o = n.getLayout();
  23116. if (!o)
  23117. return;
  23118. var a = new jt(o.x,o.y,o.width,o.height)
  23119. , r = this.seriesModel.layoutInfo;
  23120. e -= r.x,
  23121. i -= r.y;
  23122. var s = nt();
  23123. st(s, s, [-e, -i]),
  23124. ht(s, s, [t, t]),
  23125. st(s, s, [e, i]),
  23126. a.applyTransform(s),
  23127. this.api.dispatchAction({
  23128. type: "treemapRender",
  23129. from: this.uid,
  23130. seriesId: this.seriesModel.id,
  23131. rootRect: {
  23132. x: a.x,
  23133. y: a.y,
  23134. width: a.width,
  23135. height: a.height
  23136. }
  23137. })
  23138. }
  23139. },
  23140. _initEvents: function(t) {
  23141. t.on("click", function(t) {
  23142. if ("ready" === this._state) {
  23143. var e = this.seriesModel.get("nodeClick", !0);
  23144. if (e) {
  23145. var i = this.findTarget(t.offsetX, t.offsetY);
  23146. if (i) {
  23147. var n = i.node;
  23148. if (n.getLayout().isLeafRoot)
  23149. this._rootToNode(i);
  23150. else if ("zoomToNode" === e)
  23151. this._zoomToNode(i);
  23152. else if ("link" === e) {
  23153. var o = n.hostTree.data.getItemModel(n.dataIndex)
  23154. , a = o.get("link", !0)
  23155. , r = o.get("target", !0) || "blank";
  23156. a && window.open(a, r)
  23157. }
  23158. }
  23159. }
  23160. }
  23161. }, this)
  23162. },
  23163. _renderBreadcrumb: function(t, e, i) {
  23164. i || (i = null != t.get("leafDepth", !0) ? {
  23165. node: t.getViewRoot()
  23166. } : this.findTarget(e.getWidth() / 2, e.getHeight() / 2)) || (i = {
  23167. node: t.getData().tree.root
  23168. }),
  23169. (this._breadcrumb || (this._breadcrumb = new zh(this.group))).render(t, e, i.node, RI(function(e) {
  23170. "animating" !== this._state && (Lh(t.getViewRoot(), e) ? this._rootToNode({
  23171. node: e
  23172. }) : this._zoomToNode({
  23173. node: e
  23174. }))
  23175. }, this))
  23176. },
  23177. remove: function() {
  23178. this._clearController(),
  23179. this._containerGroup && this._containerGroup.removeAll(),
  23180. this._storage = {
  23181. nodeGroup: [],
  23182. background: [],
  23183. content: []
  23184. },
  23185. this._state = "ready",
  23186. this._breadcrumb && this._breadcrumb.remove()
  23187. },
  23188. dispose: function() {
  23189. this._clearController()
  23190. },
  23191. _zoomToNode: function(t) {
  23192. this.api.dispatchAction({
  23193. type: "treemapZoomToNode",
  23194. from: this.uid,
  23195. seriesId: this.seriesModel.id,
  23196. targetNode: t.node
  23197. })
  23198. },
  23199. _rootToNode: function(t) {
  23200. this.api.dispatchAction({
  23201. type: "treemapRootToNode",
  23202. from: this.uid,
  23203. seriesId: this.seriesModel.id,
  23204. targetNode: t.node
  23205. })
  23206. },
  23207. findTarget: function(t, e) {
  23208. var i;
  23209. return this.seriesModel.getViewRoot().eachNode({
  23210. attr: "viewChildren",
  23211. order: "preorder"
  23212. }, function(n) {
  23213. var o = this._storage.background[n.getRawIndex()];
  23214. if (o) {
  23215. var a = o.transformCoordToLocal(t, e)
  23216. , r = o.shape;
  23217. if (!(r.x <= a[0] && a[0] <= r.x + r.width && r.y <= a[1] && a[1] <= r.y + r.height))
  23218. return !1;
  23219. i = {
  23220. node: n,
  23221. offsetX: a[0],
  23222. offsetY: a[1]
  23223. }
  23224. }
  23225. }, this),
  23226. i
  23227. }
  23228. });
  23229. for (var $I = ["treemapZoomToNode", "treemapRender", "treemapMove"], KI = 0; KI < $I.length; KI++)
  23230. er({
  23231. type: $I[KI],
  23232. update: "updateView"
  23233. }, function() {});
  23234. er({
  23235. type: "treemapRootToNode",
  23236. update: "updateView"
  23237. }, function(t, e) {
  23238. e.eachComponent({
  23239. mainType: "series",
  23240. subType: "treemap",
  23241. query: t
  23242. }, function(e, i) {
  23243. var n = Ch(t, e);
  23244. if (n) {
  23245. var o = e.getViewRoot();
  23246. o && (t.direction = Lh(o, n.node) ? "rollUp" : "drillDown"),
  23247. e.resetViewRoot(n.node)
  23248. }
  23249. })
  23250. });
  23251. var JI = c
  23252. , QI = _
  23253. , tT = -1
  23254. , eT = function(t) {
  23255. var i = t.mappingMethod
  23256. , n = t.type
  23257. , o = this.option = e(t);
  23258. this.type = n,
  23259. this.mappingMethod = i,
  23260. this._normalizeData = nT[i];
  23261. var a = iT[n];
  23262. this.applyVisual = a.applyVisual,
  23263. this.getColorMapper = a.getColorMapper,
  23264. this._doMap = a._doMap[i],
  23265. "piecewise" === i ? (Hh(o),
  23266. Gh(o)) : "category" === i ? o.categories ? Wh(o) : Hh(o, !0) : (D("linear" !== i || o.dataExtent),
  23267. Hh(o))
  23268. };
  23269. eT.prototype = {
  23270. constructor: eT,
  23271. mapValueToVisual: function(t) {
  23272. var e = this._normalizeData(t);
  23273. return this._doMap(e, t)
  23274. },
  23275. getNormalizer: function() {
  23276. return p(this._normalizeData, this)
  23277. }
  23278. };
  23279. var iT = eT.visualHandlers = {
  23280. color: {
  23281. applyVisual: Uh("color"),
  23282. getColorMapper: function() {
  23283. var t = this.option;
  23284. return p("category" === t.mappingMethod ? function(t, e) {
  23285. return !e && (t = this._normalizeData(t)),
  23286. jh.call(this, t)
  23287. }
  23288. : function(e, i, n) {
  23289. var o = !!n;
  23290. return !i && (e = this._normalizeData(e)),
  23291. n = Ct(e, t.parsedVisual, n),
  23292. o ? n : Pt(n, "rgba")
  23293. }
  23294. , this)
  23295. },
  23296. _doMap: {
  23297. linear: function(t) {
  23298. return Pt(Ct(t, this.option.parsedVisual), "rgba")
  23299. },
  23300. category: jh,
  23301. piecewise: function(t, e) {
  23302. var i = Yh.call(this, e);
  23303. return null == i && (i = Pt(Ct(t, this.option.parsedVisual), "rgba")),
  23304. i
  23305. },
  23306. fixed: Xh
  23307. }
  23308. },
  23309. colorHue: Fh(function(t, e) {
  23310. return Lt(t, e)
  23311. }),
  23312. colorSaturation: Fh(function(t, e) {
  23313. return Lt(t, null, e)
  23314. }),
  23315. colorLightness: Fh(function(t, e) {
  23316. return Lt(t, null, null, e)
  23317. }),
  23318. colorAlpha: Fh(function(t, e) {
  23319. return kt(t, e)
  23320. }),
  23321. opacity: {
  23322. applyVisual: Uh("opacity"),
  23323. _doMap: qh([0, 1])
  23324. },
  23325. symbol: {
  23326. applyVisual: function(t, e, i) {
  23327. var n = this.mapValueToVisual(t);
  23328. if (x(n))
  23329. i("symbol", n);
  23330. else if (QI(n))
  23331. for (var o in n)
  23332. n.hasOwnProperty(o) && i(o, n[o])
  23333. },
  23334. _doMap: {
  23335. linear: Zh,
  23336. category: jh,
  23337. piecewise: function(t, e) {
  23338. var i = Yh.call(this, e);
  23339. return null == i && (i = Zh.call(this, t)),
  23340. i
  23341. },
  23342. fixed: Xh
  23343. }
  23344. },
  23345. symbolSize: {
  23346. applyVisual: Uh("symbolSize"),
  23347. _doMap: qh([0, 1])
  23348. }
  23349. }
  23350. , nT = {
  23351. linear: function(t) {
  23352. return _i(t, this.option.dataExtent, [0, 1], !0)
  23353. },
  23354. piecewise: function(t) {
  23355. var e = this.option.pieceList
  23356. , i = eT.findPieceIndex(t, e, !0);
  23357. if (null != i)
  23358. return _i(i, [0, e.length - 1], [0, 1], !0)
  23359. },
  23360. category: function(t) {
  23361. var e = this.option.categories ? this.option.categoryMap[t] : t;
  23362. return null == e ? tT : e
  23363. },
  23364. fixed: z
  23365. };
  23366. eT.listVisualTypes = function() {
  23367. var t = [];
  23368. return c(iT, function(e, i) {
  23369. t.push(i)
  23370. }),
  23371. t
  23372. }
  23373. ,
  23374. eT.addVisualHandler = function(t, e) {
  23375. iT[t] = e
  23376. }
  23377. ,
  23378. eT.isValidType = function(t) {
  23379. return iT.hasOwnProperty(t)
  23380. }
  23381. ,
  23382. eT.eachVisual = function(t, e, i) {
  23383. _(t) ? c(t, e, i) : e.call(i, t)
  23384. }
  23385. ,
  23386. eT.mapVisual = function(t, e, i) {
  23387. var n, o = v(t) ? [] : _(t) ? {} : (n = !0,
  23388. null);
  23389. return eT.eachVisual(t, function(t, a) {
  23390. var r = e.call(i, t, a);
  23391. n ? o = r : o[a] = r
  23392. }),
  23393. o
  23394. }
  23395. ,
  23396. eT.retrieveVisuals = function(t) {
  23397. var e, i = {};
  23398. return t && JI(iT, function(n, o) {
  23399. t.hasOwnProperty(o) && (i[o] = t[o],
  23400. e = !0)
  23401. }),
  23402. e ? i : null
  23403. }
  23404. ,
  23405. eT.prepareVisualTypes = function(t) {
  23406. if (QI(t)) {
  23407. var e = [];
  23408. JI(t, function(t, i) {
  23409. e.push(i)
  23410. }),
  23411. t = e
  23412. } else {
  23413. if (!v(t))
  23414. return [];
  23415. t = t.slice()
  23416. }
  23417. return t.sort(function(t, e) {
  23418. return "color" === e && "color" !== t && 0 === t.indexOf("color") ? 1 : -1
  23419. }),
  23420. t
  23421. }
  23422. ,
  23423. eT.dependsOn = function(t, e) {
  23424. return "color" === e ? !(!t || 0 !== t.indexOf(e)) : t === e
  23425. }
  23426. ,
  23427. eT.findPieceIndex = function(t, e, i) {
  23428. function n(e, i) {
  23429. var n = Math.abs(e - t);
  23430. n < a && (a = n,
  23431. o = i)
  23432. }
  23433. for (var o, a = 1 / 0, r = 0, s = e.length; r < s; r++) {
  23434. var l = e[r].value;
  23435. if (null != l) {
  23436. if (l === t || "string" == typeof l && l === t + "")
  23437. return r;
  23438. i && n(l, r)
  23439. }
  23440. }
  23441. for (var r = 0, s = e.length; r < s; r++) {
  23442. var h = e[r]
  23443. , u = h.interval
  23444. , c = h.close;
  23445. if (u) {
  23446. if (u[0] === -1 / 0) {
  23447. if (Kh(c[1], t, u[1]))
  23448. return r
  23449. } else if (u[1] === 1 / 0) {
  23450. if (Kh(c[0], u[0], t))
  23451. return r
  23452. } else if (Kh(c[0], u[0], t) && Kh(c[1], t, u[1]))
  23453. return r;
  23454. i && n(u[0], r),
  23455. i && n(u[1], r)
  23456. }
  23457. }
  23458. if (i)
  23459. return t === 1 / 0 ? e.length - 1 : t === -1 / 0 ? 0 : o
  23460. }
  23461. ;
  23462. var oT = v
  23463. , aT = "itemStyle.normal"
  23464. , rT = Math.max
  23465. , sT = Math.min
  23466. , lT = M
  23467. , hT = c
  23468. , uT = ["itemStyle", "normal", "borderWidth"]
  23469. , cT = ["itemStyle", "normal", "gapWidth"]
  23470. , dT = ["upperLabel", "normal", "show"]
  23471. , fT = ["upperLabel", "normal", "height"];
  23472. or(function(t, e, i) {
  23473. var n = {
  23474. mainType: "series",
  23475. subType: "treemap",
  23476. query: i
  23477. };
  23478. t.eachComponent(n, function(t) {
  23479. var e = t.getData().tree
  23480. , i = e.root
  23481. , n = t.getModel(aT);
  23482. i.isRemoved() || Jh(i, {}, d(e.levelModels, function(t) {
  23483. return t ? t.get(aT) : null
  23484. }), n, t.getViewRoot().getAncestors(), t)
  23485. })
  23486. }),
  23487. nr(function(t, e, i) {
  23488. var n = {
  23489. mainType: "series",
  23490. subType: "treemap",
  23491. query: i
  23492. };
  23493. t.eachComponent(n, function(t) {
  23494. var n = e.getWidth()
  23495. , a = e.getHeight()
  23496. , r = t.option
  23497. , s = Yo(t.getBoxLayoutParams(), {
  23498. width: e.getWidth(),
  23499. height: e.getHeight()
  23500. })
  23501. , l = r.size || []
  23502. , h = bi(lT(s.width, l[0]), n)
  23503. , u = bi(lT(s.height, l[1]), a)
  23504. , c = i && i.type
  23505. , d = Ch(i, t)
  23506. , f = "treemapRender" === c || "treemapMove" === c ? i.rootRect : null
  23507. , g = t.getViewRoot()
  23508. , p = Dh(g);
  23509. if ("treemapMove" !== c) {
  23510. var m = "treemapZoomToNode" === c ? fu(t, d, g, h, u) : f ? [f.width, f.height] : [h, u]
  23511. , v = r.sort;
  23512. v && "asc" !== v && "desc" !== v && (v = "desc");
  23513. var y = {
  23514. squareRatio: r.squareRatio,
  23515. sort: v,
  23516. leafDepth: r.leafDepth
  23517. };
  23518. g.hostTree.clearLayouts(),
  23519. x = {
  23520. x: 0,
  23521. y: 0,
  23522. width: m[0],
  23523. height: m[1],
  23524. area: m[0] * m[1]
  23525. },
  23526. g.setLayout(x),
  23527. ru(g, y, !1, 0);
  23528. var x = g.getLayout();
  23529. hT(p, function(t, e) {
  23530. var i = (p[e + 1] || g).getValue();
  23531. t.setLayout(o({
  23532. dataExtent: [i, i],
  23533. borderWidth: 0,
  23534. upperHeight: 0
  23535. }, x))
  23536. })
  23537. }
  23538. var _ = t.getData().tree.root;
  23539. _.setLayout(gu(s, f, d), !0),
  23540. t.setLayoutInfo(s),
  23541. pu(_, new jt(-s.x,-s.y,n,a), p, g, 0)
  23542. })
  23543. });
  23544. var gT = function(t) {
  23545. this._directed = t || !1,
  23546. this.nodes = [],
  23547. this.edges = [],
  23548. this._nodesMap = {},
  23549. this._edgesMap = {},
  23550. this.data,
  23551. this.edgeData
  23552. }
  23553. , pT = gT.prototype;
  23554. pT.type = "graph",
  23555. pT.isDirected = function() {
  23556. return this._directed
  23557. }
  23558. ,
  23559. pT.addNode = function(t, e) {
  23560. t = t || "" + e;
  23561. var i = this._nodesMap;
  23562. if (!i[vu(t)]) {
  23563. var n = new yu(t,e);
  23564. return n.hostGraph = this,
  23565. this.nodes.push(n),
  23566. i[vu(t)] = n,
  23567. n
  23568. }
  23569. }
  23570. ,
  23571. pT.getNodeByIndex = function(t) {
  23572. var e = this.data.getRawIndex(t);
  23573. return this.nodes[e]
  23574. }
  23575. ,
  23576. pT.getNodeById = function(t) {
  23577. return this._nodesMap[vu(t)]
  23578. }
  23579. ,
  23580. pT.addEdge = function(t, e, i) {
  23581. var n = this._nodesMap
  23582. , o = this._edgesMap;
  23583. if ("number" == typeof t && (t = this.nodes[t]),
  23584. "number" == typeof e && (e = this.nodes[e]),
  23585. t instanceof yu || (t = n[vu(t)]),
  23586. e instanceof yu || (e = n[vu(e)]),
  23587. t && e) {
  23588. var a = t.id + "-" + e.id;
  23589. if (!o[a]) {
  23590. var r = new xu(t,e,i);
  23591. return r.hostGraph = this,
  23592. this._directed && (t.outEdges.push(r),
  23593. e.inEdges.push(r)),
  23594. t.edges.push(r),
  23595. t !== e && e.edges.push(r),
  23596. this.edges.push(r),
  23597. o[a] = r,
  23598. r
  23599. }
  23600. }
  23601. }
  23602. ,
  23603. pT.getEdgeByIndex = function(t) {
  23604. var e = this.edgeData.getRawIndex(t);
  23605. return this.edges[e]
  23606. }
  23607. ,
  23608. pT.getEdge = function(t, e) {
  23609. t instanceof yu && (t = t.id),
  23610. e instanceof yu && (e = e.id);
  23611. var i = this._edgesMap;
  23612. return this._directed ? i[t + "-" + e] : i[t + "-" + e] || i[e + "-" + t]
  23613. }
  23614. ,
  23615. pT.eachNode = function(t, e) {
  23616. for (var i = this.nodes, n = i.length, o = 0; o < n; o++)
  23617. i[o].dataIndex >= 0 && t.call(e, i[o], o)
  23618. }
  23619. ,
  23620. pT.eachEdge = function(t, e) {
  23621. for (var i = this.edges, n = i.length, o = 0; o < n; o++)
  23622. i[o].dataIndex >= 0 && i[o].node1.dataIndex >= 0 && i[o].node2.dataIndex >= 0 && t.call(e, i[o], o)
  23623. }
  23624. ,
  23625. pT.breadthFirstTraverse = function(t, e, i, n) {
  23626. if (e instanceof yu || (e = this._nodesMap[vu(e)]),
  23627. e) {
  23628. for (var o = "out" === i ? "outEdges" : "in" === i ? "inEdges" : "edges", a = 0; a < this.nodes.length; a++)
  23629. this.nodes[a].__visited = !1;
  23630. if (!t.call(n, e, null))
  23631. for (var r = [e]; r.length; )
  23632. for (var s = r.shift(), l = s[o], a = 0; a < l.length; a++) {
  23633. var h = l[a]
  23634. , u = h.node1 === s ? h.node2 : h.node1;
  23635. if (!u.__visited) {
  23636. if (t.call(n, u, s))
  23637. return;
  23638. r.push(u),
  23639. u.__visited = !0
  23640. }
  23641. }
  23642. }
  23643. }
  23644. ,
  23645. pT.update = function() {
  23646. for (var t = this.data, e = this.edgeData, i = this.nodes, n = this.edges, o = 0, a = i.length; o < a; o++)
  23647. i[o].dataIndex = -1;
  23648. for (var o = 0, a = t.count(); o < a; o++)
  23649. i[t.getRawIndex(o)].dataIndex = o;
  23650. e.filterSelf(function(t) {
  23651. var i = n[e.getRawIndex(t)];
  23652. return i.node1.dataIndex >= 0 && i.node2.dataIndex >= 0
  23653. });
  23654. for (var o = 0, a = n.length; o < a; o++)
  23655. n[o].dataIndex = -1;
  23656. for (var o = 0, a = e.count(); o < a; o++)
  23657. n[e.getRawIndex(o)].dataIndex = o
  23658. }
  23659. ,
  23660. pT.clone = function() {
  23661. for (var t = new gT(this._directed), e = this.nodes, i = this.edges, n = 0; n < e.length; n++)
  23662. t.addNode(e[n].id, e[n].dataIndex);
  23663. for (n = 0; n < i.length; n++) {
  23664. var o = i[n];
  23665. t.addEdge(o.node1.id, o.node2.id, o.dataIndex)
  23666. }
  23667. return t
  23668. }
  23669. ,
  23670. yu.prototype = {
  23671. constructor: yu,
  23672. degree: function() {
  23673. return this.edges.length
  23674. },
  23675. inDegree: function() {
  23676. return this.inEdges.length
  23677. },
  23678. outDegree: function() {
  23679. return this.outEdges.length
  23680. },
  23681. getModel: function(t) {
  23682. if (!(this.dataIndex < 0))
  23683. return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)
  23684. }
  23685. },
  23686. xu.prototype.getModel = function(t) {
  23687. if (!(this.dataIndex < 0))
  23688. return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)
  23689. }
  23690. ;
  23691. var mT = function(t, e) {
  23692. return {
  23693. getValue: function(i) {
  23694. var n = this[t][e];
  23695. return n.get(n.getDimension(i || "value"), this.dataIndex)
  23696. },
  23697. setVisual: function(i, n) {
  23698. this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, i, n)
  23699. },
  23700. getVisual: function(i, n) {
  23701. return this[t][e].getItemVisual(this.dataIndex, i, n)
  23702. },
  23703. setLayout: function(i, n) {
  23704. this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, i, n)
  23705. },
  23706. getLayout: function() {
  23707. return this[t][e].getItemLayout(this.dataIndex)
  23708. },
  23709. getGraphicEl: function() {
  23710. return this[t][e].getItemGraphicEl(this.dataIndex)
  23711. },
  23712. getRawIndex: function() {
  23713. return this[t][e].getRawIndex(this.dataIndex)
  23714. }
  23715. }
  23716. };
  23717. h(yu, mT("hostGraph", "data")),
  23718. h(xu, mT("hostGraph", "edgeData")),
  23719. gT.Node = yu,
  23720. gT.Edge = xu;
  23721. var vT = function(t, e, i, n, o) {
  23722. for (var a = new gT(n), r = 0; r < t.length; r++)
  23723. a.addNode(M(t[r].id, t[r].name, r), r);
  23724. for (var s = [], l = [], h = 0, r = 0; r < e.length; r++) {
  23725. var u = e[r]
  23726. , c = u.source
  23727. , d = u.target;
  23728. a.addEdge(c, d, h) && (l.push(u),
  23729. s.push(M(u.id, c + " > " + d)),
  23730. h++)
  23731. }
  23732. var f, g = i.get("coordinateSystem");
  23733. if ("cartesian2d" === g || "polar" === g)
  23734. f = br(t, i, i.ecModel);
  23735. else {
  23736. var p = ha.get(g)
  23737. , m = vr((p && "view" !== p.type ? p.dimensions || [] : []).concat(["value"]), t);
  23738. (f = new lS(m,i)).initData(t)
  23739. }
  23740. var v = new lS(["value"],i);
  23741. return v.initData(l, s),
  23742. o && o(f, v),
  23743. Jl({
  23744. mainData: f,
  23745. struct: a,
  23746. structAttr: "graph",
  23747. datas: {
  23748. node: f,
  23749. edge: v
  23750. },
  23751. datasAttr: {
  23752. node: "data",
  23753. edge: "edgeData"
  23754. }
  23755. }),
  23756. a.update(),
  23757. a
  23758. }
  23759. , yT = lr({
  23760. type: "series.graph",
  23761. init: function(t) {
  23762. yT.superApply(this, "init", arguments),
  23763. this.legendDataProvider = function() {
  23764. return this._categoriesData
  23765. }
  23766. ,
  23767. this.fillDataTextStyle(t.edges || t.links),
  23768. this._updateCategoriesData()
  23769. },
  23770. mergeOption: function(t) {
  23771. yT.superApply(this, "mergeOption", arguments),
  23772. this.fillDataTextStyle(t.edges || t.links),
  23773. this._updateCategoriesData()
  23774. },
  23775. mergeDefaultAndTheme: function(t) {
  23776. yT.superApply(this, "mergeDefaultAndTheme", arguments),
  23777. Po(t.edgeLabel, ["show"])
  23778. },
  23779. getInitialData: function(t, e) {
  23780. var i = t.edges || t.links || []
  23781. , n = t.data || t.nodes || []
  23782. , o = this;
  23783. if (n && i)
  23784. return vT(n, i, this, !0, function(t, i) {
  23785. function n(t) {
  23786. return (t = this.parsePath(t)) && "label" === t[0] ? r : this.parentModel
  23787. }
  23788. t.wrapMethod("getItemModel", function(t) {
  23789. var e = o._categoriesModels[t.getShallow("category")];
  23790. return e && (e.parentModel = t.parentModel,
  23791. t.parentModel = e),
  23792. t
  23793. });
  23794. var a = o.getModel("edgeLabel")
  23795. , r = new Co({
  23796. label: a.option
  23797. },a.parentModel,e);
  23798. i.wrapMethod("getItemModel", function(t) {
  23799. return t.customizeGetParent(n),
  23800. t
  23801. })
  23802. }).data
  23803. },
  23804. getGraph: function() {
  23805. return this.getData().graph
  23806. },
  23807. getEdgeData: function() {
  23808. return this.getGraph().edgeData
  23809. },
  23810. getCategoriesData: function() {
  23811. return this._categoriesData
  23812. },
  23813. formatTooltip: function(t, e, i) {
  23814. if ("edge" === i) {
  23815. var n = this.getData()
  23816. , o = this.getDataParams(t, i)
  23817. , a = n.graph.getEdgeByIndex(t)
  23818. , r = n.getName(a.node1.dataIndex)
  23819. , s = n.getName(a.node2.dataIndex)
  23820. , l = [];
  23821. return null != r && l.push(r),
  23822. null != s && l.push(s),
  23823. l = Vi(l.join(" > ")),
  23824. o.value && (l += " : " + Vi(o.value)),
  23825. l
  23826. }
  23827. return yT.superApply(this, "formatTooltip", arguments)
  23828. },
  23829. _updateCategoriesData: function() {
  23830. var t = d(this.option.categories || [], function(t) {
  23831. return null != t.value ? t : o({
  23832. value: 0
  23833. }, t)
  23834. })
  23835. , e = new lS(["value"],this);
  23836. e.initData(t),
  23837. this._categoriesData = e,
  23838. this._categoriesModels = e.mapArray(function(t) {
  23839. return e.getItemModel(t, !0)
  23840. })
  23841. },
  23842. setZoom: function(t) {
  23843. this.option.zoom = t
  23844. },
  23845. setCenter: function(t) {
  23846. this.option.center = t
  23847. },
  23848. isAnimationEnabled: function() {
  23849. return yT.superCall(this, "isAnimationEnabled") && !("force" === this.get("layout") && this.get("force.layoutAnimation"))
  23850. },
  23851. defaultOption: {
  23852. zlevel: 0,
  23853. z: 2,
  23854. coordinateSystem: "view",
  23855. legendHoverLink: !0,
  23856. hoverAnimation: !0,
  23857. layout: null,
  23858. focusNodeAdjacency: !1,
  23859. circular: {
  23860. rotateLabel: !1
  23861. },
  23862. force: {
  23863. initLayout: null,
  23864. repulsion: [0, 50],
  23865. gravity: .1,
  23866. edgeLength: 30,
  23867. layoutAnimation: !0
  23868. },
  23869. left: "center",
  23870. top: "center",
  23871. symbol: "circle",
  23872. symbolSize: 10,
  23873. edgeSymbol: ["none", "none"],
  23874. edgeSymbolSize: 10,
  23875. edgeLabel: {
  23876. normal: {
  23877. position: "middle"
  23878. },
  23879. emphasis: {}
  23880. },
  23881. draggable: !1,
  23882. roam: !1,
  23883. center: null,
  23884. zoom: 1,
  23885. nodeScaleRatio: .6,
  23886. label: {
  23887. normal: {
  23888. show: !1,
  23889. formatter: "{b}"
  23890. },
  23891. emphasis: {
  23892. show: !0
  23893. }
  23894. },
  23895. itemStyle: {
  23896. normal: {},
  23897. emphasis: {}
  23898. },
  23899. lineStyle: {
  23900. normal: {
  23901. color: "#aaa",
  23902. width: 1,
  23903. curveness: 0,
  23904. opacity: .5
  23905. },
  23906. emphasis: {}
  23907. }
  23908. }
  23909. })
  23910. , xT = mb.prototype
  23911. , _T = yb.prototype
  23912. , bT = Hn({
  23913. type: "ec-line",
  23914. style: {
  23915. stroke: "#000",
  23916. fill: null
  23917. },
  23918. shape: {
  23919. x1: 0,
  23920. y1: 0,
  23921. x2: 0,
  23922. y2: 0,
  23923. percent: 1,
  23924. cpx1: null,
  23925. cpy1: null
  23926. },
  23927. buildPath: function(t, e) {
  23928. (_u(e) ? xT : _T).buildPath(t, e)
  23929. },
  23930. pointAt: function(t) {
  23931. return _u(this.shape) ? xT.pointAt.call(this, t) : _T.pointAt.call(this, t)
  23932. },
  23933. tangentAt: function(t) {
  23934. var e = this.shape
  23935. , i = _u(e) ? [e.x2 - e.x1, e.y2 - e.y1] : _T.tangentAt.call(this, t);
  23936. return U(i, i)
  23937. }
  23938. })
  23939. , wT = ["fromSymbol", "toSymbol"]
  23940. , ST = Iu.prototype;
  23941. ST.beforeUpdate = function() {
  23942. var t = this
  23943. , e = t.childOfName("fromSymbol")
  23944. , i = t.childOfName("toSymbol")
  23945. , n = t.childOfName("label");
  23946. if (e || i || !n.ignore) {
  23947. for (var o = 1, a = this.parent; a; )
  23948. a.scale && (o /= a.scale[0]),
  23949. a = a.parent;
  23950. var r = t.childOfName("line");
  23951. if (this.__dirty || r.__dirty) {
  23952. var s = r.shape.percent
  23953. , l = r.pointAt(0)
  23954. , h = r.pointAt(s)
  23955. , u = W([], h, l);
  23956. if (U(u, u),
  23957. e && (e.attr("position", l),
  23958. c = r.tangentAt(0),
  23959. e.attr("rotation", Math.PI / 2 - Math.atan2(c[1], c[0])),
  23960. e.attr("scale", [o * s, o * s])),
  23961. i) {
  23962. i.attr("position", h);
  23963. var c = r.tangentAt(1);
  23964. i.attr("rotation", -Math.PI / 2 - Math.atan2(c[1], c[0])),
  23965. i.attr("scale", [o * s, o * s])
  23966. }
  23967. if (!n.ignore) {
  23968. n.attr("position", h);
  23969. var d, f, g, p = 5 * o;
  23970. if ("end" === n.__position)
  23971. d = [u[0] * p + h[0], u[1] * p + h[1]],
  23972. f = u[0] > .8 ? "left" : u[0] < -.8 ? "right" : "center",
  23973. g = u[1] > .8 ? "top" : u[1] < -.8 ? "bottom" : "middle";
  23974. else if ("middle" === n.__position) {
  23975. var m = s / 2
  23976. , v = [(c = r.tangentAt(m))[1], -c[0]]
  23977. , y = r.pointAt(m);
  23978. v[1] > 0 && (v[0] = -v[0],
  23979. v[1] = -v[1]),
  23980. d = [y[0] + v[0] * p, y[1] + v[1] * p],
  23981. f = "center",
  23982. g = "bottom";
  23983. var x = -Math.atan2(c[1], c[0]);
  23984. h[0] < l[0] && (x = Math.PI + x),
  23985. n.attr("rotation", x)
  23986. } else
  23987. d = [-u[0] * p + l[0], -u[1] * p + l[1]],
  23988. f = u[0] > .8 ? "right" : u[0] < -.8 ? "left" : "center",
  23989. g = u[1] > .8 ? "bottom" : u[1] < -.8 ? "top" : "middle";
  23990. n.attr({
  23991. style: {
  23992. textVerticalAlign: n.__verticalAlign || g,
  23993. textAlign: n.__textAlign || f
  23994. },
  23995. position: d,
  23996. scale: [o, o]
  23997. })
  23998. }
  23999. }
  24000. }
  24001. }
  24002. ,
  24003. ST._createLine = function(t, e, i) {
  24004. var n = t.hostModel
  24005. , o = Su(t.getItemLayout(e));
  24006. o.shape.percent = 0,
  24007. bo(o, {
  24008. shape: {
  24009. percent: 1
  24010. }
  24011. }, n, e),
  24012. this.add(o);
  24013. var a = new ab({
  24014. name: "label"
  24015. });
  24016. this.add(a),
  24017. c(wT, function(i) {
  24018. var n = wu(i, t, e);
  24019. this.add(n),
  24020. this[bu(i)] = t.getItemVisual(e, i)
  24021. }, this),
  24022. this._updateCommonStl(t, e, i)
  24023. }
  24024. ,
  24025. ST.updateData = function(t, e, i) {
  24026. var n = t.hostModel
  24027. , o = this.childOfName("line")
  24028. , a = t.getItemLayout(e)
  24029. , r = {
  24030. shape: {}
  24031. };
  24032. Mu(r.shape, a),
  24033. _o(o, r, n, e),
  24034. c(wT, function(i) {
  24035. var n = t.getItemVisual(e, i)
  24036. , o = bu(i);
  24037. if (this[o] !== n) {
  24038. this.remove(this.childOfName(i));
  24039. var a = wu(i, t, e);
  24040. this.add(a)
  24041. }
  24042. this[o] = n
  24043. }, this),
  24044. this._updateCommonStl(t, e, i)
  24045. }
  24046. ,
  24047. ST._updateCommonStl = function(t, e, i) {
  24048. var n = t.hostModel
  24049. , o = this.childOfName("line")
  24050. , r = i && i.lineStyle
  24051. , s = i && i.hoverLineStyle
  24052. , l = i && i.labelModel
  24053. , h = i && i.hoverLabelModel;
  24054. if (!i || t.hasItemOption) {
  24055. var u = t.getItemModel(e);
  24056. r = u.getModel("lineStyle.normal").getLineStyle(),
  24057. s = u.getModel("lineStyle.emphasis").getLineStyle(),
  24058. l = u.getModel("label.normal"),
  24059. h = u.getModel("label.emphasis")
  24060. }
  24061. var d = t.getItemVisual(e, "color")
  24062. , f = T(t.getItemVisual(e, "opacity"), r.opacity, 1);
  24063. o.useStyle(a({
  24064. strokeNoScale: !0,
  24065. fill: "none",
  24066. stroke: d,
  24067. opacity: f
  24068. }, r)),
  24069. o.hoverStyle = s,
  24070. c(wT, function(t) {
  24071. var e = this.childOfName(t);
  24072. e && (e.setColor(d),
  24073. e.setStyle({
  24074. opacity: f
  24075. }))
  24076. }, this);
  24077. var g, p, m, v, y = l.getShallow("show"), x = h.getShallow("show"), _ = this.childOfName("label");
  24078. if (y || x) {
  24079. var b = n.getRawValue(e);
  24080. p = null == b ? p = t.getName(e) : isFinite(b) ? wi(b) : b,
  24081. g = d || "#000",
  24082. m = I(n.getFormattedLabel(e, "normal", t.dataType), p),
  24083. v = I(n.getFormattedLabel(e, "emphasis", t.dataType), m)
  24084. }
  24085. if (y) {
  24086. var w = uo(_.style, l, {
  24087. text: m
  24088. }, {
  24089. autoColor: g
  24090. });
  24091. _.__textAlign = w.textAlign,
  24092. _.__verticalAlign = w.textVerticalAlign,
  24093. _.__position = l.get("position") || "middle"
  24094. } else
  24095. _.setStyle("text", null);
  24096. _.hoverStyle = x ? {
  24097. text: v,
  24098. textFill: h.getTextColor(!0),
  24099. fontStyle: h.getShallow("fontStyle"),
  24100. fontWeight: h.getShallow("fontWeight"),
  24101. fontSize: h.getShallow("fontSize"),
  24102. fontFamily: h.getShallow("fontFamily")
  24103. } : {
  24104. text: null
  24105. },
  24106. _.ignore = !y && !x,
  24107. lo(this)
  24108. }
  24109. ,
  24110. ST.highlight = function() {
  24111. this.trigger("emphasis")
  24112. }
  24113. ,
  24114. ST.downplay = function() {
  24115. this.trigger("normal")
  24116. }
  24117. ,
  24118. ST.updateLayout = function(t, e) {
  24119. this.setLinePoints(t.getItemLayout(e))
  24120. }
  24121. ,
  24122. ST.setLinePoints = function(t) {
  24123. var e = this.childOfName("line");
  24124. Mu(e.shape, t),
  24125. e.dirty()
  24126. }
  24127. ,
  24128. l(Iu, $y);
  24129. var MT = Cu.prototype;
  24130. MT.updateData = function(t) {
  24131. var e = this._lineData
  24132. , i = this.group
  24133. , n = this._ctor
  24134. , o = t.hostModel
  24135. , a = {
  24136. lineStyle: o.getModel("lineStyle.normal").getLineStyle(),
  24137. hoverLineStyle: o.getModel("lineStyle.emphasis").getLineStyle(),
  24138. labelModel: o.getModel("label.normal"),
  24139. hoverLabelModel: o.getModel("label.emphasis")
  24140. };
  24141. t.diff(e).add(function(e) {
  24142. if (Au(t.getItemLayout(e))) {
  24143. var o = new n(t,e,a);
  24144. t.setItemGraphicEl(e, o),
  24145. i.add(o)
  24146. }
  24147. }).update(function(o, r) {
  24148. var s = e.getItemGraphicEl(r);
  24149. Au(t.getItemLayout(o)) ? (s ? s.updateData(t, o, a) : s = new n(t,o,a),
  24150. t.setItemGraphicEl(o, s),
  24151. i.add(s)) : i.remove(s)
  24152. }).remove(function(t) {
  24153. i.remove(e.getItemGraphicEl(t))
  24154. }).execute(),
  24155. this._lineData = t
  24156. }
  24157. ,
  24158. MT.updateLayout = function() {
  24159. var t = this._lineData;
  24160. t.eachItemGraphicEl(function(e, i) {
  24161. e.updateLayout(t, i)
  24162. }, this)
  24163. }
  24164. ,
  24165. MT.remove = function() {
  24166. this.group.removeAll()
  24167. }
  24168. ;
  24169. var IT = []
  24170. , TT = []
  24171. , AT = []
  24172. , CT = ln
  24173. , DT = fy
  24174. , LT = Math.abs
  24175. , kT = function(t, e) {
  24176. function i(t) {
  24177. var e = t.getVisual("symbolSize");
  24178. return e instanceof Array && (e = (e[0] + e[1]) / 2),
  24179. e
  24180. }
  24181. var n = []
  24182. , o = dn
  24183. , a = [[], [], []]
  24184. , r = [[], []]
  24185. , s = [];
  24186. e /= 2,
  24187. t.eachEdge(function(t, l) {
  24188. var h = t.getLayout()
  24189. , u = t.getVisual("fromSymbol")
  24190. , c = t.getVisual("toSymbol");
  24191. h.__original || (h.__original = [R(h[0]), R(h[1])],
  24192. h[2] && h.__original.push(R(h[2])));
  24193. var d = h.__original;
  24194. if (null != h[2]) {
  24195. if (E(a[0], d[0]),
  24196. E(a[1], d[2]),
  24197. E(a[2], d[1]),
  24198. u && "none" != u) {
  24199. var f = i(t.node1)
  24200. , g = Du(a, d[0], f * e);
  24201. o(a[0][0], a[1][0], a[2][0], g, n),
  24202. a[0][0] = n[3],
  24203. a[1][0] = n[4],
  24204. o(a[0][1], a[1][1], a[2][1], g, n),
  24205. a[0][1] = n[3],
  24206. a[1][1] = n[4]
  24207. }
  24208. if (c && "none" != c) {
  24209. var f = i(t.node2)
  24210. , g = Du(a, d[1], f * e);
  24211. o(a[0][0], a[1][0], a[2][0], g, n),
  24212. a[1][0] = n[1],
  24213. a[2][0] = n[2],
  24214. o(a[0][1], a[1][1], a[2][1], g, n),
  24215. a[1][1] = n[1],
  24216. a[2][1] = n[2]
  24217. }
  24218. E(h[0], a[0]),
  24219. E(h[1], a[2]),
  24220. E(h[2], a[1])
  24221. } else {
  24222. if (E(r[0], d[0]),
  24223. E(r[1], d[1]),
  24224. W(s, r[1], r[0]),
  24225. U(s, s),
  24226. u && "none" != u) {
  24227. f = i(t.node1);
  24228. G(r[0], r[0], s, f * e)
  24229. }
  24230. if (c && "none" != c) {
  24231. f = i(t.node2);
  24232. G(r[1], r[1], s, -f * e)
  24233. }
  24234. E(h[0], r[0]),
  24235. E(h[1], r[1])
  24236. }
  24237. })
  24238. }
  24239. , PT = ["itemStyle", "normal", "opacity"]
  24240. , OT = ["lineStyle", "normal", "opacity"];
  24241. hr({
  24242. type: "graph",
  24243. init: function(t, e) {
  24244. var i = new Qr
  24245. , n = new Cu
  24246. , o = this.group;
  24247. this._controller = new Nl(e.getZr()),
  24248. this._controllerHost = {
  24249. target: o
  24250. },
  24251. o.add(i.group),
  24252. o.add(n.group),
  24253. this._symbolDraw = i,
  24254. this._lineDraw = n,
  24255. this._firstRender = !0
  24256. },
  24257. render: function(t, e, i) {
  24258. var n = t.coordinateSystem;
  24259. this._model = t,
  24260. this._nodeScaleRatio = t.get("nodeScaleRatio");
  24261. var o = this._symbolDraw
  24262. , a = this._lineDraw
  24263. , r = this.group;
  24264. if ("view" === n.type) {
  24265. var s = {
  24266. position: n.position,
  24267. scale: n.scale
  24268. };
  24269. this._firstRender ? r.attr(s) : _o(r, s, t)
  24270. }
  24271. kT(t.getGraph(), this._getNodeGlobalScale(t));
  24272. var l = t.getData();
  24273. o.updateData(l);
  24274. var h = t.getEdgeData();
  24275. a.updateData(h),
  24276. this._updateNodeAndLinkScale(),
  24277. this._updateController(t, e, i),
  24278. clearTimeout(this._layoutTimeout);
  24279. var u = t.forceLayout
  24280. , c = t.get("force.layoutAnimation");
  24281. u && this._startForceLayoutIteration(u, c),
  24282. l.eachItemGraphicEl(function(e, n) {
  24283. var o = l.getItemModel(n);
  24284. e.off("drag").off("dragend");
  24285. var a = l.getItemModel(n).get("draggable");
  24286. a && e.on("drag", function() {
  24287. u && (u.warmUp(),
  24288. !this._layouting && this._startForceLayoutIteration(u, c),
  24289. u.setFixed(n),
  24290. l.setItemLayout(n, e.position))
  24291. }, this).on("dragend", function() {
  24292. u && u.setUnfixed(n)
  24293. }, this),
  24294. e.setDraggable(a && u),
  24295. e.off("mouseover", e.__focusNodeAdjacency),
  24296. e.off("mouseout", e.__unfocusNodeAdjacency),
  24297. o.get("focusNodeAdjacency") && (e.on("mouseover", e.__focusNodeAdjacency = function() {
  24298. i.dispatchAction({
  24299. type: "focusNodeAdjacency",
  24300. seriesId: t.id,
  24301. dataIndex: e.dataIndex
  24302. })
  24303. }
  24304. ),
  24305. e.on("mouseout", e.__unfocusNodeAdjacency = function() {
  24306. i.dispatchAction({
  24307. type: "unfocusNodeAdjacency",
  24308. seriesId: t.id
  24309. })
  24310. }
  24311. ))
  24312. }, this),
  24313. l.graph.eachEdge(function(e) {
  24314. var n = e.getGraphicEl();
  24315. n.off("mouseover", n.__focusNodeAdjacency),
  24316. n.off("mouseout", n.__unfocusNodeAdjacency),
  24317. e.getModel().get("focusNodeAdjacency") && (n.on("mouseover", n.__focusNodeAdjacency = function() {
  24318. i.dispatchAction({
  24319. type: "focusNodeAdjacency",
  24320. seriesId: t.id,
  24321. edgeDataIndex: e.dataIndex
  24322. })
  24323. }
  24324. ),
  24325. n.on("mouseout", n.__unfocusNodeAdjacency = function() {
  24326. i.dispatchAction({
  24327. type: "unfocusNodeAdjacency",
  24328. seriesId: t.id
  24329. })
  24330. }
  24331. ))
  24332. });
  24333. var d = "circular" === t.get("layout") && t.get("circular.rotateLabel")
  24334. , f = l.getLayout("cx")
  24335. , g = l.getLayout("cy");
  24336. l.eachItemGraphicEl(function(t, e) {
  24337. var i = t.getSymbolPath();
  24338. if (d) {
  24339. var n = l.getItemLayout(e)
  24340. , o = Math.atan2(n[1] - g, n[0] - f);
  24341. o < 0 && (o = 2 * Math.PI + o);
  24342. var a = n[0] < f;
  24343. a && (o -= Math.PI);
  24344. var r = a ? "left" : "right";
  24345. i.setStyle({
  24346. textRotation: -o,
  24347. textPosition: r,
  24348. textOrigin: "center"
  24349. }),
  24350. i.hoverStyle && (i.hoverStyle.textPosition = r)
  24351. } else
  24352. i.setStyle({
  24353. textRotation: 0
  24354. })
  24355. }),
  24356. this._firstRender = !1
  24357. },
  24358. dispose: function() {
  24359. this._controller && this._controller.dispose(),
  24360. this._controllerHost = {}
  24361. },
  24362. focusNodeAdjacency: function(t, e, i, n) {
  24363. var o = this._model.getData().graph
  24364. , a = n.dataIndex
  24365. , r = n.edgeDataIndex
  24366. , s = o.getNodeByIndex(a)
  24367. , l = o.getEdgeByIndex(r);
  24368. (s || l) && (o.eachNode(function(t) {
  24369. ku(t, PT, .1)
  24370. }),
  24371. o.eachEdge(function(t) {
  24372. ku(t, OT, .1)
  24373. }),
  24374. s && (Pu(s, PT),
  24375. c(s.edges, function(t) {
  24376. t.dataIndex < 0 || (Pu(t, OT),
  24377. Pu(t.node1, PT),
  24378. Pu(t.node2, PT))
  24379. })),
  24380. l && (Pu(l, OT),
  24381. Pu(l.node1, PT),
  24382. Pu(l.node2, PT)))
  24383. },
  24384. unfocusNodeAdjacency: function(t, e, i, n) {
  24385. var o = this._model.getData().graph;
  24386. o.eachNode(function(t) {
  24387. ku(t, PT)
  24388. }),
  24389. o.eachEdge(function(t) {
  24390. ku(t, OT)
  24391. })
  24392. },
  24393. _startForceLayoutIteration: function(t, e) {
  24394. var i = this;
  24395. !function n() {
  24396. t.step(function(t) {
  24397. i.updateLayout(i._model),
  24398. (i._layouting = !t) && (e ? i._layoutTimeout = setTimeout(n, 16) : n())
  24399. })
  24400. }()
  24401. },
  24402. _updateController: function(t, e, i) {
  24403. var n = this._controller
  24404. , o = this._controllerHost
  24405. , a = this.group;
  24406. n.setPointerChecker(function(e, n, o) {
  24407. var r = a.getBoundingRect();
  24408. return r.applyTransform(a.transform),
  24409. r.contain(n, o) && !Ul(e, i, t)
  24410. }),
  24411. "view" === t.coordinateSystem.type ? (n.enable(t.get("roam")),
  24412. o.zoomLimit = t.get("scaleLimit"),
  24413. o.zoom = t.coordinateSystem.getZoom(),
  24414. n.off("pan").off("zoom").on("pan", function(e, n) {
  24415. Fl(o, e, n),
  24416. i.dispatchAction({
  24417. seriesId: t.id,
  24418. type: "graphRoam",
  24419. dx: e,
  24420. dy: n
  24421. })
  24422. }).on("zoom", function(e, n, a) {
  24423. Zl(o, e, n, a),
  24424. i.dispatchAction({
  24425. seriesId: t.id,
  24426. type: "graphRoam",
  24427. zoom: e,
  24428. originX: n,
  24429. originY: a
  24430. }),
  24431. this._updateNodeAndLinkScale(),
  24432. kT(t.getGraph(), this._getNodeGlobalScale(t)),
  24433. this._lineDraw.updateLayout()
  24434. }, this)) : n.disable()
  24435. },
  24436. _updateNodeAndLinkScale: function() {
  24437. var t = this._model
  24438. , e = t.getData()
  24439. , i = this._getNodeGlobalScale(t)
  24440. , n = [i, i];
  24441. e.eachItemGraphicEl(function(t, e) {
  24442. t.attr("scale", n)
  24443. })
  24444. },
  24445. _getNodeGlobalScale: function(t) {
  24446. var e = t.coordinateSystem;
  24447. if ("view" !== e.type)
  24448. return 1;
  24449. var i = this._nodeScaleRatio
  24450. , n = e.scale
  24451. , o = n && n[0] || 1;
  24452. return ((e.getZoom() - 1) * i + 1) / o
  24453. },
  24454. updateLayout: function(t) {
  24455. kT(t.getGraph(), this._getNodeGlobalScale(t)),
  24456. this._symbolDraw.updateLayout(),
  24457. this._lineDraw.updateLayout()
  24458. },
  24459. remove: function(t, e) {
  24460. this._symbolDraw && this._symbolDraw.remove(),
  24461. this._lineDraw && this._lineDraw.remove()
  24462. }
  24463. }),
  24464. er({
  24465. type: "graphRoam",
  24466. event: "graphRoam",
  24467. update: "none"
  24468. }, function(t, e) {
  24469. e.eachComponent({
  24470. mainType: "series",
  24471. query: t
  24472. }, function(e) {
  24473. var i = $l(e.coordinateSystem, t);
  24474. e.setCenter && e.setCenter(i.center),
  24475. e.setZoom && e.setZoom(i.zoom)
  24476. })
  24477. }),
  24478. er({
  24479. type: "focusNodeAdjacency",
  24480. event: "focusNodeAdjacency",
  24481. update: "series.graph:focusNodeAdjacency"
  24482. }, function() {}),
  24483. er({
  24484. type: "unfocusNodeAdjacency",
  24485. event: "unfocusNodeAdjacency",
  24486. update: "series.graph:unfocusNodeAdjacency"
  24487. }, function() {});
  24488. var zT = G;
  24489. tr(function(t) {
  24490. var e = t.findComponents({
  24491. mainType: "legend"
  24492. });
  24493. e && e.length && t.eachSeriesByType("graph", function(t) {
  24494. var i = t.getCategoriesData()
  24495. , n = t.getGraph().data
  24496. , o = i.mapArray(i.getName);
  24497. n.filterSelf(function(t) {
  24498. var i = n.getItemModel(t).getShallow("category");
  24499. if (null != i) {
  24500. "number" == typeof i && (i = o[i]);
  24501. for (var a = 0; a < e.length; a++)
  24502. if (!e[a].isSelected(i))
  24503. return !1
  24504. }
  24505. return !0
  24506. })
  24507. }, this)
  24508. }),
  24509. or(m(mM, "graph", "circle", null)),
  24510. or(function(t) {
  24511. var e = {};
  24512. t.eachSeriesByType("graph", function(t) {
  24513. var i = t.getCategoriesData()
  24514. , n = t.getData()
  24515. , o = {};
  24516. i.each(function(n) {
  24517. var a = i.getName(n);
  24518. o["ec-" + a] = n;
  24519. var r = i.getItemModel(n).get("itemStyle.normal.color") || t.getColorFromPalette(a, e);
  24520. i.setItemVisual(n, "color", r)
  24521. }),
  24522. i.count() && n.each(function(t) {
  24523. var e = n.getItemModel(t).getShallow("category");
  24524. null != e && ("string" == typeof e && (e = o["ec-" + e]),
  24525. n.getItemVisual(t, "color", !0) || n.setItemVisual(t, "color", i.getItemVisual(e, "color")))
  24526. })
  24527. })
  24528. }),
  24529. or(function(t) {
  24530. t.eachSeriesByType("graph", function(t) {
  24531. var e = t.getGraph()
  24532. , i = t.getEdgeData()
  24533. , n = Ou(t.get("edgeSymbol"))
  24534. , o = Ou(t.get("edgeSymbolSize"))
  24535. , a = "lineStyle.normal.color".split(".")
  24536. , r = "lineStyle.normal.opacity".split(".");
  24537. i.setVisual("fromSymbol", n && n[0]),
  24538. i.setVisual("toSymbol", n && n[1]),
  24539. i.setVisual("fromSymbolSize", o && o[0]),
  24540. i.setVisual("toSymbolSize", o && o[1]),
  24541. i.setVisual("color", t.get(a)),
  24542. i.setVisual("opacity", t.get(r)),
  24543. i.each(function(t) {
  24544. var n = i.getItemModel(t)
  24545. , o = e.getEdgeByIndex(t)
  24546. , s = Ou(n.getShallow("symbol", !0))
  24547. , l = Ou(n.getShallow("symbolSize", !0))
  24548. , h = n.get(a)
  24549. , u = n.get(r);
  24550. switch (h) {
  24551. case "source":
  24552. h = o.node1.getVisual("color");
  24553. break;
  24554. case "target":
  24555. h = o.node2.getVisual("color")
  24556. }
  24557. s[0] && o.setVisual("fromSymbol", s[0]),
  24558. s[1] && o.setVisual("toSymbol", s[1]),
  24559. l[0] && o.setVisual("fromSymbolSize", l[0]),
  24560. l[1] && o.setVisual("toSymbolSize", l[1]),
  24561. o.setVisual("color", h),
  24562. o.setVisual("opacity", u)
  24563. })
  24564. })
  24565. }),
  24566. nr(function(t, e) {
  24567. t.eachSeriesByType("graph", function(t) {
  24568. var e = t.get("layout")
  24569. , i = t.coordinateSystem;
  24570. if (i && "view" !== i.type) {
  24571. var n = t.getData()
  24572. , o = i.dimensions;
  24573. n.each(o, function() {
  24574. for (var t, e = arguments, a = [], r = 0; r < o.length; r++)
  24575. isNaN(e[r]) || (t = !0),
  24576. a.push(e[r]);
  24577. var s = e[e.length - 1];
  24578. t ? n.setItemLayout(s, i.dataToPoint(a)) : n.setItemLayout(s, [NaN, NaN])
  24579. }),
  24580. Nu(n.graph)
  24581. } else
  24582. e && "none" !== e || zu(t)
  24583. })
  24584. }),
  24585. nr(function(t) {
  24586. t.eachSeriesByType("graph", function(t) {
  24587. "circular" === t.get("layout") && Eu(t)
  24588. })
  24589. }),
  24590. nr(function(t) {
  24591. t.eachSeriesByType("graph", function(t) {
  24592. var e = t.coordinateSystem;
  24593. if (!e || "view" === e.type)
  24594. if ("force" === t.get("layout")) {
  24595. var i = t.preservedPoints || {}
  24596. , n = t.getGraph()
  24597. , o = n.data
  24598. , a = n.edgeData
  24599. , r = t.getModel("force")
  24600. , s = r.get("initLayout");
  24601. t.preservedPoints ? o.each(function(t) {
  24602. var e = o.getId(t);
  24603. o.setItemLayout(t, i[e] || [NaN, NaN])
  24604. }) : s && "none" !== s ? "circular" === s && Eu(t) : zu(t);
  24605. var l = o.getDataExtent("value")
  24606. , h = a.getDataExtent("value")
  24607. , u = r.get("repulsion")
  24608. , c = r.get("edgeLength");
  24609. v(u) || (u = [u, u]),
  24610. v(c) || (c = [c, c]),
  24611. c = [c[1], c[0]];
  24612. var d = o.mapArray("value", function(t, e) {
  24613. var i = o.getItemLayout(e)
  24614. , n = _i(t, l, u);
  24615. return isNaN(n) && (n = (u[0] + u[1]) / 2),
  24616. {
  24617. w: n,
  24618. rep: n,
  24619. fixed: o.getItemModel(e).get("fixed"),
  24620. p: !i || isNaN(i[0]) || isNaN(i[1]) ? null : i
  24621. }
  24622. })
  24623. , f = a.mapArray("value", function(t, e) {
  24624. var i = n.getEdgeByIndex(e)
  24625. , o = _i(t, h, c);
  24626. return isNaN(o) && (o = (c[0] + c[1]) / 2),
  24627. {
  24628. n1: d[i.node1.dataIndex],
  24629. n2: d[i.node2.dataIndex],
  24630. d: o,
  24631. curveness: i.getModel().get("lineStyle.normal.curveness") || 0
  24632. }
  24633. })
  24634. , g = (e = t.coordinateSystem).getBoundingRect()
  24635. , p = Ru(d, f, {
  24636. rect: g,
  24637. gravity: r.get("gravity")
  24638. })
  24639. , m = p.step;
  24640. p.step = function(t) {
  24641. for (var e = 0, a = d.length; e < a; e++)
  24642. d[e].fixed && E(d[e].p, n.getNodeByIndex(e).getLayout());
  24643. m(function(e, a, r) {
  24644. for (var s = 0, l = e.length; s < l; s++)
  24645. e[s].fixed || n.getNodeByIndex(s).setLayout(e[s].p),
  24646. i[o.getId(s)] = e[s].p;
  24647. for (var s = 0, l = a.length; s < l; s++) {
  24648. var h = a[s]
  24649. , u = n.getEdgeByIndex(s)
  24650. , c = h.n1.p
  24651. , d = h.n2.p
  24652. , f = u.getLayout();
  24653. (f = f ? f.slice() : [])[0] = f[0] || [],
  24654. f[1] = f[1] || [],
  24655. E(f[0], c),
  24656. E(f[1], d),
  24657. +h.curveness && (f[2] = [(c[0] + d[0]) / 2 - (c[1] - d[1]) * h.curveness, (c[1] + d[1]) / 2 - (d[0] - c[0]) * h.curveness]),
  24658. u.setLayout(f)
  24659. }
  24660. t && t(r)
  24661. })
  24662. }
  24663. ,
  24664. t.forceLayout = p,
  24665. t.preservedPoints = i,
  24666. p.step()
  24667. } else
  24668. t.forceLayout = null
  24669. })
  24670. }),
  24671. ir("graphView", {
  24672. create: function(t, e) {
  24673. var i = [];
  24674. return t.eachSeriesByType("graph", function(t) {
  24675. var n = t.get("coordinateSystem");
  24676. if (!n || "view" === n) {
  24677. var o = t.getData()
  24678. , a = []
  24679. , r = [];
  24680. gn(o.mapArray(function(t) {
  24681. var e = o.getItemModel(t);
  24682. return [+e.get("x"), +e.get("y")]
  24683. }), a, r),
  24684. r[0] - a[0] == 0 && (r[0] += 1,
  24685. a[0] -= 1),
  24686. r[1] - a[1] == 0 && (r[1] += 1,
  24687. a[1] -= 1);
  24688. var s = (r[0] - a[0]) / (r[1] - a[1])
  24689. , l = Vu(t, e, s);
  24690. isNaN(s) && (a = [l.x, l.y],
  24691. r = [l.x + l.width, l.y + l.height]);
  24692. var h = r[0] - a[0]
  24693. , u = r[1] - a[1]
  24694. , c = l.width
  24695. , d = l.height
  24696. , f = t.coordinateSystem = new Il;
  24697. f.zoomLimit = t.get("scaleLimit"),
  24698. f.setBoundingRect(a[0], a[1], h, u),
  24699. f.setViewRect(l.x, l.y, c, d),
  24700. f.setCenter(t.get("center")),
  24701. f.setZoom(t.get("zoom")),
  24702. i.push(f)
  24703. }
  24704. }),
  24705. i
  24706. }
  24707. });
  24708. bw.extend({
  24709. type: "series.gauge",
  24710. getInitialData: function(t, e) {
  24711. var i = new lS(["value"],this)
  24712. , n = t.data || [];
  24713. return v(n) || (n = [n]),
  24714. i.initData(n),
  24715. i
  24716. },
  24717. defaultOption: {
  24718. zlevel: 0,
  24719. z: 2,
  24720. center: ["50%", "50%"],
  24721. legendHoverLink: !0,
  24722. radius: "75%",
  24723. startAngle: 225,
  24724. endAngle: -45,
  24725. clockwise: !0,
  24726. min: 0,
  24727. max: 100,
  24728. splitNumber: 10,
  24729. axisLine: {
  24730. show: !0,
  24731. lineStyle: {
  24732. color: [[.2, "#91c7ae"], [.8, "#63869e"], [1, "#c23531"]],
  24733. width: 30
  24734. }
  24735. },
  24736. splitLine: {
  24737. show: !0,
  24738. length: 30,
  24739. lineStyle: {
  24740. color: "#eee",
  24741. width: 2,
  24742. type: "solid"
  24743. }
  24744. },
  24745. axisTick: {
  24746. show: !0,
  24747. splitNumber: 5,
  24748. length: 8,
  24749. lineStyle: {
  24750. color: "#eee",
  24751. width: 1,
  24752. type: "solid"
  24753. }
  24754. },
  24755. axisLabel: {
  24756. show: !0,
  24757. distance: 5,
  24758. color: "auto"
  24759. },
  24760. pointer: {
  24761. show: !0,
  24762. length: "80%",
  24763. width: 8
  24764. },
  24765. itemStyle: {
  24766. normal: {
  24767. color: "auto"
  24768. }
  24769. },
  24770. title: {
  24771. show: !0,
  24772. offsetCenter: [0, "-40%"],
  24773. color: "#333",
  24774. fontSize: 15
  24775. },
  24776. detail: {
  24777. show: !0,
  24778. backgroundColor: "rgba(0,0,0,0)",
  24779. borderWidth: 0,
  24780. borderColor: "#ccc",
  24781. width: 100,
  24782. height: null,
  24783. padding: [5, 10],
  24784. offsetCenter: [0, "40%"],
  24785. color: "auto",
  24786. fontSize: 30
  24787. }
  24788. }
  24789. });
  24790. var NT = On.extend({
  24791. type: "echartsGaugePointer",
  24792. shape: {
  24793. angle: 0,
  24794. width: 10,
  24795. r: 10,
  24796. x: 0,
  24797. y: 0
  24798. },
  24799. buildPath: function(t, e) {
  24800. var i = Math.cos
  24801. , n = Math.sin
  24802. , o = e.r
  24803. , a = e.width
  24804. , r = e.angle
  24805. , s = e.x - i(r) * a * (a >= o / 3 ? 1 : 2)
  24806. , l = e.y - n(r) * a * (a >= o / 3 ? 1 : 2);
  24807. r = e.angle - Math.PI / 2,
  24808. t.moveTo(s, l),
  24809. t.lineTo(e.x + i(r) * a, e.y + n(r) * a),
  24810. t.lineTo(e.x + i(e.angle) * o, e.y + n(e.angle) * o),
  24811. t.lineTo(e.x - i(r) * a, e.y - n(r) * a),
  24812. t.lineTo(s, l)
  24813. }
  24814. })
  24815. , ET = 2 * Math.PI
  24816. , RT = (Ia.extend({
  24817. type: "gauge",
  24818. render: function(t, e, i) {
  24819. this.group.removeAll();
  24820. var n = t.get("axisLine.lineStyle.color")
  24821. , o = Bu(t, i);
  24822. this._renderMain(t, e, i, n, o)
  24823. },
  24824. dispose: function() {},
  24825. _renderMain: function(t, e, i, n, o) {
  24826. for (var a = this.group, r = t.getModel("axisLine").getModel("lineStyle"), s = t.get("clockwise"), l = -t.get("startAngle") / 180 * Math.PI, h = -t.get("endAngle") / 180 * Math.PI, u = (h - l) % ET, c = l, d = r.get("width"), f = 0; f < n.length; f++) {
  24827. var g = Math.min(Math.max(n[f][0], 0), 1)
  24828. , p = new hb({
  24829. shape: {
  24830. startAngle: c,
  24831. endAngle: h = l + u * g,
  24832. cx: o.cx,
  24833. cy: o.cy,
  24834. clockwise: s,
  24835. r0: o.r - d,
  24836. r: o.r
  24837. },
  24838. silent: !0
  24839. });
  24840. p.setStyle({
  24841. fill: n[f][1]
  24842. }),
  24843. p.setStyle(r.getLineStyle(["color", "borderWidth", "borderColor"])),
  24844. a.add(p),
  24845. c = h
  24846. }
  24847. var m = function(t) {
  24848. if (t <= 0)
  24849. return n[0][1];
  24850. for (var e = 0; e < n.length; e++)
  24851. if (n[e][0] >= t && (0 === e ? 0 : n[e - 1][0]) < t)
  24852. return n[e][1];
  24853. return n[e - 1][1]
  24854. };
  24855. if (!s) {
  24856. var v = l;
  24857. l = h,
  24858. h = v
  24859. }
  24860. this._renderTicks(t, e, i, m, o, l, h, s),
  24861. this._renderPointer(t, e, i, m, o, l, h, s),
  24862. this._renderTitle(t, e, i, m, o),
  24863. this._renderDetail(t, e, i, m, o)
  24864. },
  24865. _renderTicks: function(t, e, i, n, o, a, r, s) {
  24866. for (var l = this.group, h = o.cx, u = o.cy, c = o.r, d = +t.get("min"), f = +t.get("max"), g = t.getModel("splitLine"), p = t.getModel("axisTick"), m = t.getModel("axisLabel"), v = t.get("splitNumber"), y = p.get("splitNumber"), x = bi(g.get("length"), c), _ = bi(p.get("length"), c), b = a, w = (r - a) / v, S = w / y, M = g.getModel("lineStyle").getLineStyle(), I = p.getModel("lineStyle").getLineStyle(), T = 0; T <= v; T++) {
  24867. var A = Math.cos(b)
  24868. , C = Math.sin(b);
  24869. if (g.get("show")) {
  24870. var D = new mb({
  24871. shape: {
  24872. x1: A * c + h,
  24873. y1: C * c + u,
  24874. x2: A * (c - x) + h,
  24875. y2: C * (c - x) + u
  24876. },
  24877. style: M,
  24878. silent: !0
  24879. });
  24880. "auto" === M.stroke && D.setStyle({
  24881. stroke: n(T / v)
  24882. }),
  24883. l.add(D)
  24884. }
  24885. if (m.get("show")) {
  24886. var L = Gu(wi(T / v * (f - d) + d), m.get("formatter"))
  24887. , k = m.get("distance")
  24888. , P = n(T / v);
  24889. l.add(new ab({
  24890. style: uo({}, m, {
  24891. text: L,
  24892. x: A * (c - x - k) + h,
  24893. y: C * (c - x - k) + u,
  24894. textVerticalAlign: C < -.4 ? "top" : C > .4 ? "bottom" : "middle",
  24895. textAlign: A < -.4 ? "left" : A > .4 ? "right" : "center"
  24896. }, {
  24897. autoColor: P
  24898. }),
  24899. silent: !0
  24900. }))
  24901. }
  24902. if (p.get("show") && T !== v) {
  24903. for (var O = 0; O <= y; O++) {
  24904. var A = Math.cos(b)
  24905. , C = Math.sin(b)
  24906. , z = new mb({
  24907. shape: {
  24908. x1: A * c + h,
  24909. y1: C * c + u,
  24910. x2: A * (c - _) + h,
  24911. y2: C * (c - _) + u
  24912. },
  24913. silent: !0,
  24914. style: I
  24915. });
  24916. "auto" === I.stroke && z.setStyle({
  24917. stroke: n((T + O / y) / v)
  24918. }),
  24919. l.add(z),
  24920. b += S
  24921. }
  24922. b -= S
  24923. } else
  24924. b += w
  24925. }
  24926. },
  24927. _renderPointer: function(t, e, i, n, o, a, r, s) {
  24928. var l = this.group
  24929. , h = this._data;
  24930. if (t.get("pointer.show")) {
  24931. var u = [+t.get("min"), +t.get("max")]
  24932. , c = [a, r]
  24933. , d = t.getData();
  24934. d.diff(h).add(function(e) {
  24935. var i = new NT({
  24936. shape: {
  24937. angle: a
  24938. }
  24939. });
  24940. bo(i, {
  24941. shape: {
  24942. angle: _i(d.get("value", e), u, c, !0)
  24943. }
  24944. }, t),
  24945. l.add(i),
  24946. d.setItemGraphicEl(e, i)
  24947. }).update(function(e, i) {
  24948. var n = h.getItemGraphicEl(i);
  24949. _o(n, {
  24950. shape: {
  24951. angle: _i(d.get("value", e), u, c, !0)
  24952. }
  24953. }, t),
  24954. l.add(n),
  24955. d.setItemGraphicEl(e, n)
  24956. }).remove(function(t) {
  24957. var e = h.getItemGraphicEl(t);
  24958. l.remove(e)
  24959. }).execute(),
  24960. d.eachItemGraphicEl(function(t, e) {
  24961. var i = d.getItemModel(e)
  24962. , a = i.getModel("pointer");
  24963. t.setShape({
  24964. x: o.cx,
  24965. y: o.cy,
  24966. width: bi(a.get("width"), o.r),
  24967. r: bi(a.get("length"), o.r)
  24968. }),
  24969. t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),
  24970. "auto" === t.style.fill && t.setStyle("fill", n(_i(d.get("value", e), u, [0, 1], !0))),
  24971. lo(t, i.getModel("itemStyle.emphasis").getItemStyle())
  24972. }),
  24973. this._data = d
  24974. } else
  24975. h && h.eachItemGraphicEl(function(t) {
  24976. l.remove(t)
  24977. })
  24978. },
  24979. _renderTitle: function(t, e, i, n, o) {
  24980. var a = t.getModel("title");
  24981. if (a.get("show")) {
  24982. var r = a.get("offsetCenter")
  24983. , s = o.cx + bi(r[0], o.r)
  24984. , l = o.cy + bi(r[1], o.r)
  24985. , h = +t.get("min")
  24986. , u = +t.get("max")
  24987. , c = n(_i(t.getData().get("value", 0), [h, u], [0, 1], !0));
  24988. this.group.add(new ab({
  24989. silent: !0,
  24990. style: uo({}, a, {
  24991. x: s,
  24992. y: l,
  24993. text: t.getData().getName(0),
  24994. textAlign: "center",
  24995. textVerticalAlign: "middle"
  24996. }, {
  24997. autoColor: c,
  24998. forceRich: !0
  24999. })
  25000. }))
  25001. }
  25002. },
  25003. _renderDetail: function(t, e, i, n, o) {
  25004. var a = t.getModel("detail")
  25005. , r = +t.get("min")
  25006. , s = +t.get("max");
  25007. if (a.get("show")) {
  25008. var l = a.get("offsetCenter")
  25009. , h = o.cx + bi(l[0], o.r)
  25010. , u = o.cy + bi(l[1], o.r)
  25011. , c = bi(a.get("width"), o.r)
  25012. , d = bi(a.get("height"), o.r)
  25013. , f = t.getData().get("value", 0)
  25014. , g = n(_i(f, [r, s], [0, 1], !0));
  25015. this.group.add(new ab({
  25016. silent: !0,
  25017. style: uo({}, a, {
  25018. x: h,
  25019. y: u,
  25020. text: Gu(f, a.get("formatter")),
  25021. textWidth: isNaN(c) ? null : c,
  25022. textHeight: isNaN(d) ? null : d,
  25023. textAlign: "center",
  25024. textVerticalAlign: "middle"
  25025. }, {
  25026. autoColor: g,
  25027. forceRich: !0
  25028. })
  25029. }))
  25030. }
  25031. }
  25032. }),
  25033. lr({
  25034. type: "series.funnel",
  25035. init: function(t) {
  25036. RT.superApply(this, "init", arguments),
  25037. this.legendDataProvider = function() {
  25038. return this.getRawData()
  25039. }
  25040. ,
  25041. this._defaultLabelLine(t)
  25042. },
  25043. getInitialData: function(t, e) {
  25044. var i = vr(["value"], t.data)
  25045. , n = new lS(i,this);
  25046. return n.initData(t.data),
  25047. n
  25048. },
  25049. _defaultLabelLine: function(t) {
  25050. Po(t.labelLine, ["show"]);
  25051. var e = t.labelLine.normal
  25052. , i = t.labelLine.emphasis;
  25053. e.show = e.show && t.label.normal.show,
  25054. i.show = i.show && t.label.emphasis.show
  25055. },
  25056. getDataParams: function(t) {
  25057. var e = this.getData()
  25058. , i = RT.superCall(this, "getDataParams", t)
  25059. , n = e.getSum("value");
  25060. return i.percent = n ? +(e.get("value", t) / n * 100).toFixed(2) : 0,
  25061. i.$vars.push("percent"),
  25062. i
  25063. },
  25064. defaultOption: {
  25065. zlevel: 0,
  25066. z: 2,
  25067. legendHoverLink: !0,
  25068. left: 80,
  25069. top: 60,
  25070. right: 80,
  25071. bottom: 60,
  25072. minSize: "0%",
  25073. maxSize: "100%",
  25074. sort: "descending",
  25075. gap: 0,
  25076. funnelAlign: "center",
  25077. label: {
  25078. normal: {
  25079. show: !0,
  25080. position: "outer"
  25081. },
  25082. emphasis: {
  25083. show: !0
  25084. }
  25085. },
  25086. labelLine: {
  25087. normal: {
  25088. show: !0,
  25089. length: 20,
  25090. lineStyle: {
  25091. width: 1,
  25092. type: "solid"
  25093. }
  25094. },
  25095. emphasis: {}
  25096. },
  25097. itemStyle: {
  25098. normal: {
  25099. borderColor: "#fff",
  25100. borderWidth: 1
  25101. },
  25102. emphasis: {}
  25103. }
  25104. }
  25105. }))
  25106. , VT = Wu.prototype
  25107. , BT = ["itemStyle", "normal", "opacity"];
  25108. VT.updateData = function(t, e, i) {
  25109. var n = this.childAt(0)
  25110. , o = t.hostModel
  25111. , r = t.getItemModel(e)
  25112. , s = t.getItemLayout(e)
  25113. , l = t.getItemModel(e).get(BT);
  25114. l = null == l ? 1 : l,
  25115. n.useStyle({}),
  25116. i ? (n.setShape({
  25117. points: s.points
  25118. }),
  25119. n.setStyle({
  25120. opacity: 0
  25121. }),
  25122. bo(n, {
  25123. style: {
  25124. opacity: l
  25125. }
  25126. }, o, e)) : _o(n, {
  25127. style: {
  25128. opacity: l
  25129. },
  25130. shape: {
  25131. points: s.points
  25132. }
  25133. }, o, e);
  25134. var h = r.getModel("itemStyle")
  25135. , u = t.getItemVisual(e, "color");
  25136. n.setStyle(a({
  25137. lineJoin: "round",
  25138. fill: u
  25139. }, h.getModel("normal").getItemStyle(["opacity"]))),
  25140. n.hoverStyle = h.getModel("emphasis").getItemStyle(),
  25141. this._updateLabel(t, e),
  25142. lo(this)
  25143. }
  25144. ,
  25145. VT._updateLabel = function(t, e) {
  25146. var i = this.childAt(1)
  25147. , n = this.childAt(2)
  25148. , o = t.hostModel
  25149. , a = t.getItemModel(e)
  25150. , r = t.getItemLayout(e).label
  25151. , s = t.getItemVisual(e, "color");
  25152. _o(i, {
  25153. shape: {
  25154. points: r.linePoints || r.linePoints
  25155. }
  25156. }, o, e),
  25157. _o(n, {
  25158. style: {
  25159. x: r.x,
  25160. y: r.y
  25161. }
  25162. }, o, e),
  25163. n.attr({
  25164. rotation: r.rotation,
  25165. origin: [r.x, r.y],
  25166. z2: 10
  25167. });
  25168. var l = a.getModel("label.normal")
  25169. , h = a.getModel("label.emphasis")
  25170. , u = a.getModel("labelLine.normal")
  25171. , c = a.getModel("labelLine.emphasis")
  25172. , s = t.getItemVisual(e, "color");
  25173. ho(n.style, n.hoverStyle = {}, l, h, {
  25174. labelFetcher: t.hostModel,
  25175. labelDataIndex: e,
  25176. defaultText: t.getName(e),
  25177. autoColor: s,
  25178. useInsideStyle: !!r.inside
  25179. }, {
  25180. textAlign: r.textAlign,
  25181. textVerticalAlign: r.verticalAlign
  25182. }),
  25183. n.ignore = n.normalIgnore = !l.get("show"),
  25184. n.hoverIgnore = !h.get("show"),
  25185. i.ignore = i.normalIgnore = !u.get("show"),
  25186. i.hoverIgnore = !c.get("show"),
  25187. i.setStyle({
  25188. stroke: s
  25189. }),
  25190. i.setStyle(u.getModel("lineStyle").getLineStyle()),
  25191. i.hoverStyle = c.getModel("lineStyle").getLineStyle()
  25192. }
  25193. ,
  25194. l(Wu, $y);
  25195. Ia.extend({
  25196. type: "funnel",
  25197. render: function(t, e, i) {
  25198. var n = t.getData()
  25199. , o = this._data
  25200. , a = this.group;
  25201. n.diff(o).add(function(t) {
  25202. var e = new Wu(n,t);
  25203. n.setItemGraphicEl(t, e),
  25204. a.add(e)
  25205. }).update(function(t, e) {
  25206. var i = o.getItemGraphicEl(e);
  25207. i.updateData(n, t),
  25208. a.add(i),
  25209. n.setItemGraphicEl(t, i)
  25210. }).remove(function(t) {
  25211. var e = o.getItemGraphicEl(t);
  25212. a.remove(e)
  25213. }).execute(),
  25214. this._data = n
  25215. },
  25216. remove: function() {
  25217. this.group.removeAll(),
  25218. this._data = null
  25219. },
  25220. dispose: function() {}
  25221. });
  25222. or(m(aI, "funnel")),
  25223. nr(function(t, e, i) {
  25224. t.eachSeriesByType("funnel", function(t) {
  25225. var i = t.getData()
  25226. , n = t.get("sort")
  25227. , o = Hu(t, e)
  25228. , a = Fu(i, n)
  25229. , r = [bi(t.get("minSize"), o.width), bi(t.get("maxSize"), o.width)]
  25230. , s = i.getDataExtent("value")
  25231. , l = t.get("min")
  25232. , h = t.get("max");
  25233. null == l && (l = Math.min(s[0], 0)),
  25234. null == h && (h = s[1]);
  25235. var u = t.get("funnelAlign")
  25236. , c = t.get("gap")
  25237. , d = (o.height - c * (i.count() - 1)) / i.count()
  25238. , f = o.y
  25239. , g = function(t, e) {
  25240. var n, a = _i(i.get("value", t) || 0, [l, h], r, !0);
  25241. switch (u) {
  25242. case "left":
  25243. n = o.x;
  25244. break;
  25245. case "center":
  25246. n = o.x + (o.width - a) / 2;
  25247. break;
  25248. case "right":
  25249. n = o.x + o.width - a
  25250. }
  25251. return [[n, e], [n + a, e]]
  25252. };
  25253. "ascending" === n && (d = -d,
  25254. c = -c,
  25255. f += o.height,
  25256. a = a.reverse());
  25257. for (var p = 0; p < a.length; p++) {
  25258. var m = a[p]
  25259. , v = a[p + 1]
  25260. , y = g(m, f)
  25261. , x = g(v, f + d);
  25262. f += d + c,
  25263. i.setItemLayout(m, {
  25264. points: y.concat(x.slice().reverse())
  25265. })
  25266. }
  25267. Zu(i)
  25268. })
  25269. }),
  25270. tr(m(hI, "funnel"));
  25271. var GT = function(t, e, i, n, o) {
  25272. YS.call(this, t, e, i),
  25273. this.type = n || "value",
  25274. this.axisIndex = o
  25275. };
  25276. GT.prototype = {
  25277. constructor: GT,
  25278. model: null,
  25279. isHorizontal: function() {
  25280. return "horizontal" !== this.coordinateSystem.getModel().get("layout")
  25281. }
  25282. },
  25283. l(GT, YS);
  25284. var WT = function(t, e, i, n, o, a) {
  25285. e[0] = qu(e[0], i),
  25286. e[1] = qu(e[1], i),
  25287. t = t || 0;
  25288. var r = i[1] - i[0];
  25289. null != o && (o = qu(o, [0, r])),
  25290. null != a && (a = Math.max(a, null != o ? o : 0)),
  25291. "all" === n && (o = a = Math.abs(e[1] - e[0]),
  25292. n = 0);
  25293. var s = Xu(e, n);
  25294. e[n] += t;
  25295. var l = o || 0
  25296. , h = i.slice();
  25297. s.sign < 0 ? h[0] += l : h[1] -= l,
  25298. e[n] = qu(e[n], h);
  25299. u = Xu(e, n);
  25300. null != o && (u.sign !== s.sign || u.span < o) && (e[1 - n] = e[n] + s.sign * o);
  25301. var u = Xu(e, n);
  25302. return null != a && u.span > a && (e[1 - n] = e[n] + u.sign * a),
  25303. e
  25304. }
  25305. , HT = c
  25306. , FT = Math.min
  25307. , ZT = Math.max
  25308. , UT = Math.floor
  25309. , jT = Math.ceil
  25310. , XT = wi
  25311. , qT = Math.PI;
  25312. Yu.prototype = {
  25313. type: "parallel",
  25314. constructor: Yu,
  25315. _init: function(t, e, i) {
  25316. var n = t.dimensions
  25317. , o = t.parallelAxisIndex;
  25318. HT(n, function(t, i) {
  25319. var n = o[i]
  25320. , a = e.getComponent("parallelAxis", n)
  25321. , r = this._axesMap.set(t, new GT(t,zr(a),[0, 0],a.get("type"),n))
  25322. , s = "category" === r.type;
  25323. r.onBand = s && a.get("boundaryGap"),
  25324. r.inverse = a.get("inverse"),
  25325. a.axis = r,
  25326. r.model = a,
  25327. r.coordinateSystem = a.coordinateSystem = this
  25328. }, this)
  25329. },
  25330. update: function(t, e) {
  25331. this._updateAxesFromSeries(this._model, t)
  25332. },
  25333. containPoint: function(t) {
  25334. var e = this._makeLayoutInfo()
  25335. , i = e.axisBase
  25336. , n = e.layoutBase
  25337. , o = e.pixelDimIndex
  25338. , a = t[1 - o]
  25339. , r = t[o];
  25340. return a >= i && a <= i + e.axisLength && r >= n && r <= n + e.layoutLength
  25341. },
  25342. getModel: function() {
  25343. return this._model
  25344. },
  25345. _updateAxesFromSeries: function(t, e) {
  25346. e.eachSeries(function(i) {
  25347. if (t.contains(i, e)) {
  25348. var n = i.getData();
  25349. HT(this.dimensions, function(t) {
  25350. var e = this._axesMap.get(t);
  25351. e.scale.unionExtentFromData(n, t),
  25352. Or(e.scale, e.model)
  25353. }, this)
  25354. }
  25355. }, this)
  25356. },
  25357. resize: function(t, e) {
  25358. this._rect = Yo(t.getBoxLayoutParams(), {
  25359. width: e.getWidth(),
  25360. height: e.getHeight()
  25361. }),
  25362. this._layoutAxes()
  25363. },
  25364. getRect: function() {
  25365. return this._rect
  25366. },
  25367. _makeLayoutInfo: function() {
  25368. var t, e = this._model, i = this._rect, n = ["x", "y"], o = ["width", "height"], a = e.get("layout"), r = "horizontal" === a ? 0 : 1, s = i[o[r]], l = [0, s], h = this.dimensions.length, u = $u(e.get("axisExpandWidth"), l), c = $u(e.get("axisExpandCount") || 0, [0, h]), d = e.get("axisExpandable") && h > 3 && h > c && c > 1 && u > 0 && s > 0, f = e.get("axisExpandWindow");
  25369. f ? (t = $u(f[1] - f[0], l),
  25370. f[1] = f[0] + t) : (t = $u(u * (c - 1), l),
  25371. (f = [u * (e.get("axisExpandCenter") || UT(h / 2)) - t / 2])[1] = f[0] + t);
  25372. var g = (s - t) / (h - c);
  25373. g < 3 && (g = 0);
  25374. var p = [UT(XT(f[0] / u, 1)) + 1, jT(XT(f[1] / u, 1)) - 1]
  25375. , m = g / u * f[0];
  25376. return {
  25377. layout: a,
  25378. pixelDimIndex: r,
  25379. layoutBase: i[n[r]],
  25380. layoutLength: s,
  25381. axisBase: i[n[1 - r]],
  25382. axisLength: i[o[1 - r]],
  25383. axisExpandable: d,
  25384. axisExpandWidth: u,
  25385. axisCollapseWidth: g,
  25386. axisExpandWindow: f,
  25387. axisCount: h,
  25388. winInnerIndices: p,
  25389. axisExpandWindow0Pos: m
  25390. }
  25391. },
  25392. _layoutAxes: function() {
  25393. var t = this._rect
  25394. , e = this._axesMap
  25395. , i = this.dimensions
  25396. , n = this._makeLayoutInfo()
  25397. , o = n.layout;
  25398. e.each(function(t) {
  25399. var e = [0, n.axisLength]
  25400. , i = t.inverse ? 1 : 0;
  25401. t.setExtent(e[i], e[1 - i])
  25402. }),
  25403. HT(i, function(i, a) {
  25404. var r = (n.axisExpandable ? Ju : Ku)(a, n)
  25405. , s = {
  25406. horizontal: {
  25407. x: r.position,
  25408. y: n.axisLength
  25409. },
  25410. vertical: {
  25411. x: 0,
  25412. y: r.position
  25413. }
  25414. }
  25415. , l = {
  25416. horizontal: qT / 2,
  25417. vertical: 0
  25418. }
  25419. , h = [s[o].x + t.x, s[o].y + t.y]
  25420. , u = l[o]
  25421. , c = nt();
  25422. lt(c, c, u),
  25423. st(c, c, h),
  25424. this._axesLayout[i] = {
  25425. position: h,
  25426. rotation: u,
  25427. transform: c,
  25428. axisNameAvailableWidth: r.axisNameAvailableWidth,
  25429. axisLabelShow: r.axisLabelShow,
  25430. nameTruncateMaxWidth: r.nameTruncateMaxWidth,
  25431. tickDirection: 1,
  25432. labelDirection: 1,
  25433. labelInterval: e.get(i).getLabelInterval()
  25434. }
  25435. }, this)
  25436. },
  25437. getAxis: function(t) {
  25438. return this._axesMap.get(t)
  25439. },
  25440. dataToPoint: function(t, e) {
  25441. return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t), e)
  25442. },
  25443. eachActiveState: function(t, e, i) {
  25444. for (var n = this.dimensions, o = this._axesMap, a = this.hasAxisBrushed(), r = 0, s = t.count(); r < s; r++) {
  25445. var l, h = t.getValues(n, r);
  25446. if (a) {
  25447. l = "active";
  25448. for (var u = 0, c = n.length; u < c; u++) {
  25449. var d = n[u];
  25450. if ("inactive" === o.get(d).model.getActiveState(h[u], u)) {
  25451. l = "inactive";
  25452. break
  25453. }
  25454. }
  25455. } else
  25456. l = "normal";
  25457. e.call(i, l, r)
  25458. }
  25459. },
  25460. hasAxisBrushed: function() {
  25461. for (var t = this.dimensions, e = this._axesMap, i = !1, n = 0, o = t.length; n < o; n++)
  25462. "normal" !== e.get(t[n]).model.getActiveState() && (i = !0);
  25463. return i
  25464. },
  25465. axisCoordToPoint: function(t, e) {
  25466. return So([t, 0], this._axesLayout[e].transform)
  25467. },
  25468. getAxisLayout: function(t) {
  25469. return e(this._axesLayout[t])
  25470. },
  25471. getSlidedAxisExpandWindow: function(t) {
  25472. var e = this._makeLayoutInfo()
  25473. , i = e.pixelDimIndex
  25474. , n = e.axisExpandWindow.slice()
  25475. , o = n[1] - n[0]
  25476. , a = [0, e.axisExpandWidth * (e.axisCount - 1)];
  25477. if (!this.containPoint(t))
  25478. return {
  25479. behavior: "none",
  25480. axisExpandWindow: n
  25481. };
  25482. var r, s = t[i] - e.layoutBase - e.axisExpandWindow0Pos, l = "slide", h = e.axisCollapseWidth, u = this._model.get("axisExpandSlideTriggerArea"), c = null != u[0];
  25483. if (h)
  25484. c && h && s < o * u[0] ? (l = "jump",
  25485. r = s - o * u[2]) : c && h && s > o * (1 - u[0]) ? (l = "jump",
  25486. r = s - o * (1 - u[2])) : (r = s - o * u[1]) >= 0 && (r = s - o * (1 - u[1])) <= 0 && (r = 0),
  25487. (r *= e.axisExpandWidth / h) ? WT(r, n, a, "all") : l = "none";
  25488. else {
  25489. o = n[1] - n[0];
  25490. (n = [ZT(0, a[1] * s / o - o / 2)])[1] = FT(a[1], n[0] + o),
  25491. n[0] = n[1] - o
  25492. }
  25493. return {
  25494. axisExpandWindow: n,
  25495. behavior: l
  25496. }
  25497. }
  25498. },
  25499. ha.register("parallel", {
  25500. create: function(t, e) {
  25501. var i = [];
  25502. return t.eachComponent("parallel", function(n, o) {
  25503. var a = new Yu(n,t,e);
  25504. a.name = "parallel_" + o,
  25505. a.resize(n, e),
  25506. n.coordinateSystem = a,
  25507. a.model = n,
  25508. i.push(a)
  25509. }),
  25510. t.eachSeries(function(e) {
  25511. if ("parallel" === e.get("coordinateSystem")) {
  25512. var i = t.queryComponents({
  25513. mainType: "parallel",
  25514. index: e.get("parallelIndex"),
  25515. id: e.get("parallelId")
  25516. })[0];
  25517. e.coordinateSystem = i.coordinateSystem
  25518. }
  25519. }),
  25520. i
  25521. }
  25522. });
  25523. var YT = qb.extend({
  25524. type: "baseParallelAxis",
  25525. axis: null,
  25526. activeIntervals: [],
  25527. getAreaSelectStyle: function() {
  25528. return e_([["fill", "color"], ["lineWidth", "borderWidth"], ["stroke", "borderColor"], ["width", "width"], ["opacity", "opacity"]])(this.getModel("areaSelectStyle"))
  25529. },
  25530. setActiveIntervals: function(t) {
  25531. var i = this.activeIntervals = e(t);
  25532. if (i)
  25533. for (var n = i.length - 1; n >= 0; n--)
  25534. Si(i[n])
  25535. },
  25536. getActiveState: function(t) {
  25537. var e = this.activeIntervals;
  25538. if (!e.length)
  25539. return "normal";
  25540. if (null == t)
  25541. return "inactive";
  25542. for (var i = 0, n = e.length; i < n; i++)
  25543. if (e[i][0] <= t && t <= e[i][1])
  25544. return "active";
  25545. return "inactive"
  25546. }
  25547. })
  25548. , $T = {
  25549. type: "value",
  25550. dim: null,
  25551. areaSelectStyle: {
  25552. width: 20,
  25553. borderWidth: 1,
  25554. borderColor: "rgba(160,197,232)",
  25555. color: "rgba(160,197,232)",
  25556. opacity: .3
  25557. },
  25558. realtime: !0,
  25559. z: 10
  25560. };
  25561. i(YT.prototype, VS),
  25562. IM("parallel", YT, function(t, e) {
  25563. return e.type || (e.data ? "category" : "value")
  25564. }, $T),
  25565. qb.extend({
  25566. type: "parallel",
  25567. dependencies: ["parallelAxis"],
  25568. coordinateSystem: null,
  25569. dimensions: null,
  25570. parallelAxisIndex: null,
  25571. layoutMode: "box",
  25572. defaultOption: {
  25573. zlevel: 0,
  25574. z: 0,
  25575. left: 80,
  25576. top: 60,
  25577. right: 80,
  25578. bottom: 60,
  25579. layout: "horizontal",
  25580. axisExpandable: !1,
  25581. axisExpandCenter: null,
  25582. axisExpandCount: 0,
  25583. axisExpandWidth: 50,
  25584. axisExpandRate: 17,
  25585. axisExpandDebounce: 50,
  25586. axisExpandSlideTriggerArea: [-.15, .05, .4],
  25587. axisExpandTriggerOn: "click",
  25588. parallelAxisDefault: null
  25589. },
  25590. init: function() {
  25591. qb.prototype.init.apply(this, arguments),
  25592. this.mergeOption({})
  25593. },
  25594. mergeOption: function(t) {
  25595. var e = this.option;
  25596. t && i(e, t, !0),
  25597. this._initDimensions()
  25598. },
  25599. contains: function(t, e) {
  25600. var i = t.get("parallelIndex");
  25601. return null != i && e.getComponent("parallel", i) === this
  25602. },
  25603. setAxisExpand: function(t) {
  25604. c(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(e) {
  25605. t.hasOwnProperty(e) && (this.option[e] = t[e])
  25606. }, this)
  25607. },
  25608. _initDimensions: function() {
  25609. var t = this.dimensions = []
  25610. , e = this.parallelAxisIndex = [];
  25611. c(g(this.dependentModels.parallelAxis, function(t) {
  25612. return (t.get("parallelIndex") || 0) === this.componentIndex
  25613. }, this), function(i) {
  25614. t.push("dim" + i.get("dim")),
  25615. e.push(i.componentIndex)
  25616. })
  25617. }
  25618. }),
  25619. er({
  25620. type: "axisAreaSelect",
  25621. event: "axisAreaSelected",
  25622. update: "updateVisual"
  25623. }, function(t, e) {
  25624. e.eachComponent({
  25625. mainType: "parallelAxis",
  25626. query: t
  25627. }, function(e) {
  25628. e.axis.model.setActiveIntervals(t.intervals)
  25629. })
  25630. }),
  25631. er("parallelAxisExpand", function(t, e) {
  25632. e.eachComponent({
  25633. mainType: "parallel",
  25634. query: t
  25635. }, function(e) {
  25636. e.setAxisExpand(t)
  25637. })
  25638. });
  25639. var KT = m
  25640. , JT = c
  25641. , QT = d
  25642. , tA = Math.min
  25643. , eA = Math.max
  25644. , iA = Math.pow
  25645. , nA = 1e4
  25646. , oA = 6
  25647. , aA = 6
  25648. , rA = "globalPan"
  25649. , sA = {
  25650. w: [0, 0],
  25651. e: [0, 1],
  25652. n: [1, 0],
  25653. s: [1, 1]
  25654. }
  25655. , lA = {
  25656. w: "ew",
  25657. e: "ew",
  25658. n: "ns",
  25659. s: "ns",
  25660. ne: "nesw",
  25661. sw: "nesw",
  25662. nw: "nwse",
  25663. se: "nwse"
  25664. }
  25665. , hA = {
  25666. brushStyle: {
  25667. lineWidth: 2,
  25668. stroke: "rgba(0,0,0,0.3)",
  25669. fill: "rgba(0,0,0,0.1)"
  25670. },
  25671. transformable: !0,
  25672. brushMode: "single",
  25673. removeOnClick: !1
  25674. }
  25675. , uA = 0;
  25676. Qu.prototype = {
  25677. constructor: Qu,
  25678. enableBrush: function(t) {
  25679. return this._brushType && ec(this),
  25680. t.brushType && tc(this, t),
  25681. this
  25682. },
  25683. setPanels: function(t) {
  25684. if (t && t.length) {
  25685. var i = this._panels = {};
  25686. c(t, function(t) {
  25687. i[t.panelId] = e(t)
  25688. })
  25689. } else
  25690. this._panels = null;
  25691. return this
  25692. },
  25693. mount: function(t) {
  25694. t = t || {},
  25695. this._enableGlobalPan = t.enableGlobalPan;
  25696. var e = this.group;
  25697. return this._zr.add(e),
  25698. e.attr({
  25699. position: t.position || [0, 0],
  25700. rotation: t.rotation || 0,
  25701. scale: t.scale || [1, 1]
  25702. }),
  25703. this._transform = e.getLocalTransform(),
  25704. this
  25705. },
  25706. eachCover: function(t, e) {
  25707. JT(this._covers, t, e)
  25708. },
  25709. updateCovers: function(t) {
  25710. function n(t, e) {
  25711. return (null != t.id ? t.id : a + e) + "-" + t.brushType
  25712. }
  25713. function o(e, i) {
  25714. var n = t[e];
  25715. if (null != i && r[i] === h)
  25716. s[e] = r[i];
  25717. else {
  25718. var o = s[e] = null != i ? (r[i].__brushOption = n,
  25719. r[i]) : nc(l, ic(l, n));
  25720. rc(l, o)
  25721. }
  25722. }
  25723. t = d(t, function(t) {
  25724. return i(e(hA), t, !0)
  25725. });
  25726. var a = "\0-brush-index-"
  25727. , r = this._covers
  25728. , s = this._covers = []
  25729. , l = this
  25730. , h = this._creatingCover;
  25731. return new cr(r,t,function(t, e) {
  25732. return n(t.__brushOption, e)
  25733. }
  25734. ,n).add(o).update(o).remove(function(t) {
  25735. r[t] !== h && l.group.remove(r[t])
  25736. }).execute(),
  25737. this
  25738. },
  25739. unmount: function() {
  25740. return this.enableBrush(!1),
  25741. uc(this),
  25742. this._zr.remove(this.group),
  25743. this
  25744. },
  25745. dispose: function() {
  25746. this.unmount(),
  25747. this.off()
  25748. }
  25749. },
  25750. h(Qu, my);
  25751. var cA = {
  25752. mousedown: function(t) {
  25753. if (this._dragging)
  25754. Pc.call(this, t);
  25755. else if (!t.target || !t.target.draggable) {
  25756. Cc(t);
  25757. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  25758. this._creatingCover = null,
  25759. (this._creatingPanel = lc(this, t, e)) && (this._dragging = !0,
  25760. this._track = [e.slice()])
  25761. }
  25762. },
  25763. mousemove: function(t) {
  25764. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  25765. if (Ac(this, t, e),
  25766. this._dragging) {
  25767. Cc(t);
  25768. var i = Lc(this, t, e, !1);
  25769. i && cc(this, i)
  25770. }
  25771. },
  25772. mouseup: Pc
  25773. }
  25774. , dA = {
  25775. lineX: Oc(0),
  25776. lineY: Oc(1),
  25777. rect: {
  25778. createCover: function(t, e) {
  25779. return gc(KT(wc, function(t) {
  25780. return t
  25781. }, function(t) {
  25782. return t
  25783. }), t, e, ["w", "e", "n", "s", "se", "sw", "ne", "nw"])
  25784. },
  25785. getCreatingRange: function(t) {
  25786. var e = fc(t);
  25787. return xc(e[1][0], e[1][1], e[0][0], e[0][1])
  25788. },
  25789. updateCoverShape: function(t, e, i, n) {
  25790. pc(t, e, i, n)
  25791. },
  25792. updateCommon: mc,
  25793. contain: Dc
  25794. },
  25795. polygon: {
  25796. createCover: function(t, e) {
  25797. var i = new $y;
  25798. return i.add(new gb({
  25799. name: "main",
  25800. style: yc(e),
  25801. silent: !0
  25802. })),
  25803. i
  25804. },
  25805. getCreatingRange: function(t) {
  25806. return t
  25807. },
  25808. endCreating: function(t, e) {
  25809. e.remove(e.childAt(0)),
  25810. e.add(new fb({
  25811. name: "main",
  25812. draggable: !0,
  25813. drift: KT(Sc, t, e),
  25814. ondragend: KT(cc, t, {
  25815. isEnd: !0
  25816. })
  25817. }))
  25818. },
  25819. updateCoverShape: function(t, e, i, n) {
  25820. e.childAt(0).setShape({
  25821. points: Ic(t, e, i)
  25822. })
  25823. },
  25824. updateCommon: mc,
  25825. contain: Dc
  25826. }
  25827. }
  25828. , fA = ["axisLine", "axisTickLabel", "axisName"]
  25829. , gA = sr({
  25830. type: "parallelAxis",
  25831. init: function(t, e) {
  25832. gA.superApply(this, "init", arguments),
  25833. (this._brushController = new Qu(e.getZr())).on("brush", p(this._onBrush, this))
  25834. },
  25835. render: function(t, e, i, n) {
  25836. if (!Vc(t, e, n)) {
  25837. this.axisModel = t,
  25838. this.api = i,
  25839. this.group.removeAll();
  25840. var a = this._axisGroup;
  25841. if (this._axisGroup = new $y,
  25842. this.group.add(this._axisGroup),
  25843. t.get("show")) {
  25844. var r = Gc(t, e)
  25845. , s = r.coordinateSystem
  25846. , l = t.getAreaSelectStyle()
  25847. , h = l.width
  25848. , u = t.axis.dim
  25849. , d = o({
  25850. strokeContainThreshold: h
  25851. }, s.getAxisLayout(u))
  25852. , f = new zM(t,d);
  25853. c(fA, f.add, f),
  25854. this._axisGroup.add(f.getGroup()),
  25855. this._refreshBrushController(d, l, t, r, h, i);
  25856. var g = n && !1 === n.animation ? null : t;
  25857. Io(a, this._axisGroup, g)
  25858. }
  25859. }
  25860. },
  25861. updateVisual: function(t, e, i, n) {
  25862. this._brushController && this._brushController.updateCovers(Bc(t))
  25863. },
  25864. _refreshBrushController: function(t, e, i, n, o, a) {
  25865. var r = i.axis.getExtent()
  25866. , s = r[1] - r[0]
  25867. , l = Math.min(30, .1 * Math.abs(s))
  25868. , h = jt.create({
  25869. x: r[0],
  25870. y: -o / 2,
  25871. width: s,
  25872. height: o
  25873. });
  25874. h.x -= l,
  25875. h.width += 2 * l,
  25876. this._brushController.mount({
  25877. enableGlobalPan: !0,
  25878. rotation: t.rotation,
  25879. position: t.position
  25880. }).setPanels([{
  25881. panelId: "pl",
  25882. clipPath: zc(h),
  25883. isTargetByCursor: Ec(h, a, n),
  25884. getLinearBrushOtherExtent: Nc(h, 0)
  25885. }]).enableBrush({
  25886. brushType: "lineX",
  25887. brushStyle: e,
  25888. removeOnClick: !0
  25889. }).updateCovers(Bc(i))
  25890. },
  25891. _onBrush: function(t, e) {
  25892. var i = this.axisModel
  25893. , n = i.axis
  25894. , o = d(t, function(t) {
  25895. return [n.coordToData(t.range[0], !0), n.coordToData(t.range[1], !0)]
  25896. });
  25897. (!i.option.realtime === e.isEnd || e.removeOnClick) && this.api.dispatchAction({
  25898. type: "axisAreaSelect",
  25899. parallelAxisId: i.id,
  25900. intervals: o
  25901. })
  25902. },
  25903. dispose: function() {
  25904. this._brushController.dispose()
  25905. }
  25906. });
  25907. sr({
  25908. type: "parallel",
  25909. render: function(t, e, i) {
  25910. this._model = t,
  25911. this._api = i,
  25912. this._handlers || (this._handlers = {},
  25913. c(pA, function(t, e) {
  25914. i.getZr().on(e, this._handlers[e] = p(t, this))
  25915. }, this)),
  25916. Da(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate")
  25917. },
  25918. dispose: function(t, e) {
  25919. c(this._handlers, function(t, i) {
  25920. e.getZr().off(i, t)
  25921. }),
  25922. this._handlers = null
  25923. },
  25924. _throttledDispatchExpand: function(t) {
  25925. this._dispatchExpand(t)
  25926. },
  25927. _dispatchExpand: function(t) {
  25928. t && this._api.dispatchAction(o({
  25929. type: "parallelAxisExpand"
  25930. }, t))
  25931. }
  25932. });
  25933. var pA = {
  25934. mousedown: function(t) {
  25935. Wc(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY])
  25936. },
  25937. mouseup: function(t) {
  25938. var e = this._mouseDownPoint;
  25939. if (Wc(this, "click") && e) {
  25940. var i = [t.offsetX, t.offsetY];
  25941. if (Math.pow(e[0] - i[0], 2) + Math.pow(e[1] - i[1], 2) > 5)
  25942. return;
  25943. var n = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
  25944. "none" !== n.behavior && this._dispatchExpand({
  25945. axisExpandWindow: n.axisExpandWindow
  25946. })
  25947. }
  25948. this._mouseDownPoint = null
  25949. },
  25950. mousemove: function(t) {
  25951. if (!this._mouseDownPoint && Wc(this, "mousemove")) {
  25952. var e = this._model
  25953. , i = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY])
  25954. , n = i.behavior;
  25955. "jump" === n && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),
  25956. this._throttledDispatchExpand("none" === n ? null : {
  25957. axisExpandWindow: i.axisExpandWindow,
  25958. animation: "jump" === n && null
  25959. })
  25960. }
  25961. }
  25962. };
  25963. Qa(function(t) {
  25964. Uu(t),
  25965. ju(t)
  25966. }),
  25967. bw.extend({
  25968. type: "series.parallel",
  25969. dependencies: ["parallel"],
  25970. visualColorAccessPath: "lineStyle.normal.color",
  25971. getInitialData: function(t, e) {
  25972. var i = e.getComponent("parallel", this.get("parallelIndex"))
  25973. , n = i.parallelAxisIndex
  25974. , o = t.data
  25975. , a = i.dimensions
  25976. , r = d(Zc(a, o), function(t, i) {
  25977. var r = s(a, t)
  25978. , l = r >= 0 && e.getComponent("parallelAxis", n[r]);
  25979. return l && "category" === l.get("type") ? (Hc(l, t, o),
  25980. {
  25981. name: t,
  25982. type: "ordinal"
  25983. }) : r < 0 && vr.guessOrdinal(o, i) ? {
  25984. name: t,
  25985. type: "ordinal"
  25986. } : t
  25987. })
  25988. , l = new lS(r,this);
  25989. return l.initData(o),
  25990. this.option.progressive && (this.option.animation = !1),
  25991. l
  25992. },
  25993. getRawIndicesByActiveState: function(t) {
  25994. var e = this.coordinateSystem
  25995. , i = this.getData()
  25996. , n = [];
  25997. return e.eachActiveState(i, function(e, o) {
  25998. t === e && n.push(i.getRawIndex(o))
  25999. }),
  26000. n
  26001. },
  26002. defaultOption: {
  26003. zlevel: 0,
  26004. z: 2,
  26005. coordinateSystem: "parallel",
  26006. parallelIndex: 0,
  26007. label: {
  26008. normal: {
  26009. show: !1
  26010. },
  26011. emphasis: {
  26012. show: !1
  26013. }
  26014. },
  26015. inactiveOpacity: .05,
  26016. activeOpacity: 1,
  26017. lineStyle: {
  26018. normal: {
  26019. width: 1,
  26020. opacity: .45,
  26021. type: "solid"
  26022. }
  26023. },
  26024. progressive: !1,
  26025. smooth: !1,
  26026. animationEasing: "linear"
  26027. }
  26028. });
  26029. Ia.extend({
  26030. type: "parallel",
  26031. init: function() {
  26032. this._dataGroup = new $y,
  26033. this.group.add(this._dataGroup),
  26034. this._data
  26035. },
  26036. render: function(t, e, i, n) {
  26037. this._renderForNormal(t, n)
  26038. },
  26039. dispose: function() {},
  26040. _renderForNormal: function(t, e) {
  26041. var i = this._dataGroup
  26042. , n = t.getData()
  26043. , o = this._data
  26044. , a = t.coordinateSystem
  26045. , r = a.dimensions
  26046. , s = t.option.smooth ? .3 : null;
  26047. if (n.diff(o).add(function(t) {
  26048. Xc(n, i, t, r, a)
  26049. }).update(function(i, s) {
  26050. var l = o.getItemGraphicEl(s)
  26051. , h = jc(n, i, r, a);
  26052. n.setItemGraphicEl(i, l),
  26053. _o(l, {
  26054. shape: {
  26055. points: h
  26056. }
  26057. }, e && !1 === e.animation ? null : t, i)
  26058. }).remove(function(t) {
  26059. var e = o.getItemGraphicEl(t);
  26060. i.remove(e)
  26061. }).execute(),
  26062. qc(n, s),
  26063. !this._data) {
  26064. var l = Uc(a, t, function() {
  26065. setTimeout(function() {
  26066. i.removeClipPath()
  26067. })
  26068. });
  26069. i.setClipPath(l)
  26070. }
  26071. this._data = n
  26072. },
  26073. remove: function() {
  26074. this._dataGroup && this._dataGroup.removeAll(),
  26075. this._data = null
  26076. }
  26077. });
  26078. var mA = ["lineStyle", "normal", "opacity"];
  26079. or(function(t) {
  26080. t.eachSeriesByType("parallel", function(e) {
  26081. var i = e.getModel("itemStyle.normal")
  26082. , n = e.getModel("lineStyle.normal")
  26083. , o = t.get("color")
  26084. , a = n.get("color") || i.get("color") || o[e.seriesIndex % o.length]
  26085. , r = e.get("inactiveOpacity")
  26086. , s = e.get("activeOpacity")
  26087. , l = e.getModel("lineStyle.normal").getLineStyle()
  26088. , h = e.coordinateSystem
  26089. , u = e.getData()
  26090. , c = {
  26091. normal: l.opacity,
  26092. active: s,
  26093. inactive: r
  26094. };
  26095. h.eachActiveState(u, function(t, e) {
  26096. var i = u.getItemModel(e)
  26097. , n = c[t];
  26098. if ("normal" === t) {
  26099. var o = i.get(mA, !0);
  26100. null != o && (n = o)
  26101. }
  26102. u.setItemVisual(e, "opacity", n)
  26103. }),
  26104. u.setVisual("color", a)
  26105. })
  26106. });
  26107. var vA = bw.extend({
  26108. type: "series.sankey",
  26109. layoutInfo: null,
  26110. getInitialData: function(t) {
  26111. var e = t.edges || t.links
  26112. , i = t.data || t.nodes;
  26113. if (i && e)
  26114. return vT(i, e, this, !0).data
  26115. },
  26116. getGraph: function() {
  26117. return this.getData().graph
  26118. },
  26119. getEdgeData: function() {
  26120. return this.getGraph().edgeData
  26121. },
  26122. formatTooltip: function(t, e, i) {
  26123. if ("edge" === i) {
  26124. var n = this.getDataParams(t, i)
  26125. , o = n.data
  26126. , a = o.source + " -- " + o.target;
  26127. return n.value && (a += " : " + n.value),
  26128. Vi(a)
  26129. }
  26130. return vA.superCall(this, "formatTooltip", t, e)
  26131. },
  26132. defaultOption: {
  26133. zlevel: 0,
  26134. z: 2,
  26135. coordinateSystem: "view",
  26136. layout: null,
  26137. left: "5%",
  26138. top: "5%",
  26139. right: "20%",
  26140. bottom: "5%",
  26141. nodeWidth: 20,
  26142. nodeGap: 8,
  26143. layoutIterations: 32,
  26144. label: {
  26145. normal: {
  26146. show: !0,
  26147. position: "right",
  26148. color: "#000",
  26149. fontSize: 12
  26150. },
  26151. emphasis: {
  26152. show: !0
  26153. }
  26154. },
  26155. itemStyle: {
  26156. normal: {
  26157. borderWidth: 1,
  26158. borderColor: "#333"
  26159. }
  26160. },
  26161. lineStyle: {
  26162. normal: {
  26163. color: "#314656",
  26164. opacity: .2,
  26165. curveness: .5
  26166. },
  26167. emphasis: {
  26168. opacity: .6
  26169. }
  26170. },
  26171. animationEasing: "linear",
  26172. animationDuration: 1e3
  26173. }
  26174. })
  26175. , yA = Hn({
  26176. shape: {
  26177. x1: 0,
  26178. y1: 0,
  26179. x2: 0,
  26180. y2: 0,
  26181. cpx1: 0,
  26182. cpy1: 0,
  26183. cpx2: 0,
  26184. cpy2: 0,
  26185. extent: 0
  26186. },
  26187. buildPath: function(t, e) {
  26188. var i = e.extent / 2;
  26189. t.moveTo(e.x1, e.y1 - i),
  26190. t.bezierCurveTo(e.cpx1, e.cpy1 - i, e.cpx2, e.cpy2 - i, e.x2, e.y2 - i),
  26191. t.lineTo(e.x2, e.y2 + i),
  26192. t.bezierCurveTo(e.cpx2, e.cpy2 + i, e.cpx1, e.cpy1 + i, e.x1, e.y1 + i),
  26193. t.closePath()
  26194. }
  26195. });
  26196. hr({
  26197. type: "sankey",
  26198. _model: null,
  26199. render: function(t, e, i) {
  26200. var n = t.getGraph()
  26201. , o = this.group
  26202. , a = t.layoutInfo
  26203. , r = t.getData()
  26204. , s = t.getData("edge");
  26205. this._model = t,
  26206. o.removeAll(),
  26207. o.attr("position", [a.x, a.y]),
  26208. n.eachEdge(function(e) {
  26209. var i = new yA;
  26210. i.dataIndex = e.dataIndex,
  26211. i.seriesIndex = t.seriesIndex,
  26212. i.dataType = "edge";
  26213. var n = e.getModel("lineStyle.normal")
  26214. , a = n.get("curveness")
  26215. , r = e.node1.getLayout()
  26216. , l = e.node2.getLayout()
  26217. , h = e.getLayout();
  26218. i.shape.extent = Math.max(1, h.dy);
  26219. var u = r.x + r.dx
  26220. , c = r.y + h.sy + h.dy / 2
  26221. , d = l.x
  26222. , f = l.y + h.ty + h.dy / 2
  26223. , g = u * (1 - a) + d * a
  26224. , p = c
  26225. , m = u * a + d * (1 - a)
  26226. , v = f;
  26227. switch (i.setShape({
  26228. x1: u,
  26229. y1: c,
  26230. x2: d,
  26231. y2: f,
  26232. cpx1: g,
  26233. cpy1: p,
  26234. cpx2: m,
  26235. cpy2: v
  26236. }),
  26237. i.setStyle(n.getItemStyle()),
  26238. i.style.fill) {
  26239. case "source":
  26240. i.style.fill = e.node1.getVisual("color");
  26241. break;
  26242. case "target":
  26243. i.style.fill = e.node2.getVisual("color")
  26244. }
  26245. lo(i, e.getModel("lineStyle.emphasis").getItemStyle()),
  26246. o.add(i),
  26247. s.setItemGraphicEl(e.dataIndex, i)
  26248. }),
  26249. n.eachNode(function(e) {
  26250. var i = e.getLayout()
  26251. , n = e.getModel()
  26252. , a = n.getModel("label.normal")
  26253. , s = n.getModel("label.emphasis")
  26254. , l = new pb({
  26255. shape: {
  26256. x: i.x,
  26257. y: i.y,
  26258. width: e.getLayout().dx,
  26259. height: e.getLayout().dy
  26260. },
  26261. style: n.getModel("itemStyle.normal").getItemStyle()
  26262. })
  26263. , h = e.getModel("itemStyle.emphasis").getItemStyle();
  26264. ho(l.style, h, a, s, {
  26265. labelFetcher: t,
  26266. labelDataIndex: e.dataIndex,
  26267. defaultText: e.id,
  26268. isRectText: !0
  26269. }),
  26270. l.setStyle("fill", e.getVisual("color")),
  26271. lo(l, h),
  26272. o.add(l),
  26273. r.setItemGraphicEl(e.dataIndex, l),
  26274. l.dataType = "node"
  26275. }),
  26276. !this._data && t.get("animation") && o.setClipPath($c(o.getBoundingRect(), t, function() {
  26277. o.removeClipPath()
  26278. })),
  26279. this._data = t.getData()
  26280. },
  26281. dispose: function() {}
  26282. });
  26283. nr(function(t, e, i) {
  26284. t.eachSeriesByType("sankey", function(t) {
  26285. var i = t.get("nodeWidth")
  26286. , n = t.get("nodeGap")
  26287. , o = Jc(t, e);
  26288. t.layoutInfo = o;
  26289. var a = o.width
  26290. , r = o.height
  26291. , s = t.getGraph()
  26292. , l = s.nodes
  26293. , h = s.edges;
  26294. td(l),
  26295. Qc(l, h, i, n, a, r, 0 !== g(l, function(t) {
  26296. return 0 === t.getLayout().value
  26297. }).length ? 0 : t.get("layoutIterations"))
  26298. })
  26299. }),
  26300. or(function(t, e) {
  26301. t.eachSeriesByType("sankey", function(t) {
  26302. var e = t.getGraph().nodes;
  26303. e.sort(function(t, e) {
  26304. return t.getLayout().value - e.getLayout().value
  26305. });
  26306. var i = e[0].getLayout().value
  26307. , n = e[e.length - 1].getLayout().value;
  26308. c(e, function(e) {
  26309. var o = new eT({
  26310. type: "color",
  26311. mappingMethod: "linear",
  26312. dataExtent: [i, n],
  26313. visual: t.get("color")
  26314. }).mapValueToVisual(e.getLayout().value);
  26315. e.setVisual("color", o);
  26316. var a = e.getModel().get("itemStyle.normal.color");
  26317. null != a && e.setVisual("color", a)
  26318. })
  26319. })
  26320. });
  26321. var xA = On.extend({
  26322. type: "whiskerInBox",
  26323. shape: {},
  26324. buildPath: function(t, e) {
  26325. for (var i in e)
  26326. if (e.hasOwnProperty(i) && 0 === i.indexOf("ends")) {
  26327. var n = e[i];
  26328. t.moveTo(n[0][0], n[0][1]),
  26329. t.lineTo(n[1][0], n[1][1])
  26330. }
  26331. }
  26332. })
  26333. , _A = xd.prototype;
  26334. _A._createContent = function(t, e, i) {
  26335. var n = t.getItemLayout(e)
  26336. , o = "horizontal" === n.chartLayout ? 1 : 0
  26337. , a = 0;
  26338. this.add(new fb({
  26339. shape: {
  26340. points: i ? _d(n.bodyEnds, o, n) : n.bodyEnds
  26341. },
  26342. style: {
  26343. strokeNoScale: !0
  26344. },
  26345. z2: 100
  26346. })),
  26347. this.bodyIndex = a++;
  26348. var r = d(n.whiskerEnds, function(t) {
  26349. return i ? _d(t, o, n) : t
  26350. });
  26351. this.add(new xA({
  26352. shape: bd(r),
  26353. style: {
  26354. strokeNoScale: !0
  26355. },
  26356. z2: 100
  26357. })),
  26358. this.whiskerIndex = a++
  26359. }
  26360. ,
  26361. _A.updateData = function(t, e, i) {
  26362. var n = this._seriesModel = t.hostModel
  26363. , o = t.getItemLayout(e)
  26364. , a = Db[i ? "initProps" : "updateProps"];
  26365. a(this.childAt(this.bodyIndex), {
  26366. shape: {
  26367. points: o.bodyEnds
  26368. }
  26369. }, n, e),
  26370. a(this.childAt(this.whiskerIndex), {
  26371. shape: bd(o.whiskerEnds)
  26372. }, n, e),
  26373. this.styleUpdater.call(null, this, t, e)
  26374. }
  26375. ,
  26376. l(xd, $y);
  26377. var bA = wd.prototype;
  26378. bA.updateData = function(t) {
  26379. var e = this.group
  26380. , i = this._data
  26381. , n = this.styleUpdater;
  26382. t.diff(i).add(function(i) {
  26383. if (t.hasValue(i)) {
  26384. var o = new xd(t,i,n,!0);
  26385. t.setItemGraphicEl(i, o),
  26386. e.add(o)
  26387. }
  26388. }).update(function(o, a) {
  26389. var r = i.getItemGraphicEl(a);
  26390. t.hasValue(o) ? (r ? r.updateData(t, o) : r = new xd(t,o,n),
  26391. e.add(r),
  26392. t.setItemGraphicEl(o, r)) : e.remove(r)
  26393. }).remove(function(t) {
  26394. var n = i.getItemGraphicEl(t);
  26395. n && e.remove(n)
  26396. }).execute(),
  26397. this._data = t
  26398. }
  26399. ,
  26400. bA.remove = function() {
  26401. var t = this.group
  26402. , e = this._data;
  26403. this._data = null,
  26404. e && e.eachItemGraphicEl(function(e) {
  26405. e && t.remove(e)
  26406. })
  26407. }
  26408. ;
  26409. var wA = {
  26410. _baseAxisDim: null,
  26411. getInitialData: function(t, e) {
  26412. var i, n, o = e.getComponent("xAxis", this.get("xAxisIndex")), a = e.getComponent("yAxis", this.get("yAxisIndex")), r = o.get("type"), s = a.get("type");
  26413. "category" === r ? (t.layout = "horizontal",
  26414. i = o.getCategories(),
  26415. n = !0) : "category" === s ? (t.layout = "vertical",
  26416. i = a.getCategories(),
  26417. n = !0) : t.layout = t.layout || "horizontal";
  26418. var l = ["x", "y"]
  26419. , h = "horizontal" === t.layout ? 0 : 1
  26420. , u = this._baseAxisDim = l[h]
  26421. , d = l[1 - h]
  26422. , f = t.data;
  26423. n && c(f, function(t, e) {
  26424. t.value && v(t.value) ? t.value.unshift(e) : v(t) && t.unshift(e)
  26425. });
  26426. var g = this.defaultValueDimensions
  26427. , p = [{
  26428. name: u,
  26429. otherDims: {
  26430. tooltip: !1
  26431. },
  26432. dimsDef: ["base"]
  26433. }, {
  26434. name: d,
  26435. dimsDef: g.slice()
  26436. }];
  26437. p = vr(p, f, {
  26438. encodeDef: this.get("encode"),
  26439. dimsDef: this.get("dimensions"),
  26440. dimCount: g.length + 1
  26441. });
  26442. var m = new lS(p,this);
  26443. return m.initData(f, i ? i.slice() : null),
  26444. m
  26445. },
  26446. getBaseAxis: function() {
  26447. var t = this._baseAxisDim;
  26448. return this.ecModel.getComponent(t + "Axis", this.get(t + "AxisIndex")).axis
  26449. }
  26450. }
  26451. , SA = {
  26452. init: function() {
  26453. var t = this._whiskerBoxDraw = new wd(this.getStyleUpdater());
  26454. this.group.add(t.group)
  26455. },
  26456. render: function(t, e, i) {
  26457. this._whiskerBoxDraw.updateData(t.getData())
  26458. },
  26459. remove: function(t) {
  26460. this._whiskerBoxDraw.remove()
  26461. }
  26462. };
  26463. h(bw.extend({
  26464. type: "series.boxplot",
  26465. dependencies: ["xAxis", "yAxis", "grid"],
  26466. defaultValueDimensions: ["min", "Q1", "median", "Q3", "max"],
  26467. dimensions: null,
  26468. defaultOption: {
  26469. zlevel: 0,
  26470. z: 2,
  26471. coordinateSystem: "cartesian2d",
  26472. legendHoverLink: !0,
  26473. hoverAnimation: !0,
  26474. layout: null,
  26475. boxWidth: [7, 50],
  26476. itemStyle: {
  26477. normal: {
  26478. color: "#fff",
  26479. borderWidth: 1
  26480. },
  26481. emphasis: {
  26482. borderWidth: 2,
  26483. shadowBlur: 5,
  26484. shadowOffsetX: 2,
  26485. shadowOffsetY: 2,
  26486. shadowColor: "rgba(0,0,0,0.4)"
  26487. }
  26488. },
  26489. animationEasing: "elasticOut",
  26490. animationDuration: 800
  26491. }
  26492. }), wA, !0),
  26493. h(Ia.extend({
  26494. type: "boxplot",
  26495. getStyleUpdater: function() {
  26496. return Sd
  26497. },
  26498. dispose: z
  26499. }), SA, !0);
  26500. var MA = ["itemStyle", "normal"]
  26501. , IA = ["itemStyle", "emphasis"]
  26502. , TA = ["itemStyle", "normal", "borderColor"]
  26503. , AA = c;
  26504. or(function(t, e) {
  26505. var i = t.get("color");
  26506. t.eachRawSeriesByType("boxplot", function(e) {
  26507. var n = i[e.seriesIndex % i.length]
  26508. , o = e.getData();
  26509. o.setVisual({
  26510. legendSymbol: "roundRect",
  26511. color: e.get(TA) || n
  26512. }),
  26513. t.isSeriesFiltered(e) || o.each(function(t) {
  26514. var e = o.getItemModel(t);
  26515. o.setItemVisual(t, {
  26516. color: e.get(TA, !0)
  26517. })
  26518. })
  26519. })
  26520. }),
  26521. nr(function(t) {
  26522. var e = Md(t);
  26523. AA(e, function(t) {
  26524. var e = t.seriesModels;
  26525. e.length && (Id(t),
  26526. AA(e, function(e, i) {
  26527. Td(e, t.boxOffsetList[i], t.boxWidthList[i])
  26528. }))
  26529. })
  26530. }),
  26531. h(bw.extend({
  26532. type: "series.candlestick",
  26533. dependencies: ["xAxis", "yAxis", "grid"],
  26534. defaultValueDimensions: ["open", "close", "lowest", "highest"],
  26535. dimensions: null,
  26536. defaultOption: {
  26537. zlevel: 0,
  26538. z: 2,
  26539. coordinateSystem: "cartesian2d",
  26540. legendHoverLink: !0,
  26541. hoverAnimation: !0,
  26542. layout: null,
  26543. itemStyle: {
  26544. normal: {
  26545. color: "#c23531",
  26546. color0: "#314656",
  26547. borderWidth: 1,
  26548. borderColor: "#c23531",
  26549. borderColor0: "#314656"
  26550. },
  26551. emphasis: {
  26552. borderWidth: 2
  26553. }
  26554. },
  26555. barMaxWidth: null,
  26556. barMinWidth: null,
  26557. barWidth: null,
  26558. animationUpdate: !1,
  26559. animationEasing: "linear",
  26560. animationDuration: 300
  26561. },
  26562. getShadowDim: function() {
  26563. return "open"
  26564. },
  26565. brushSelector: function(t, e, i) {
  26566. var n = e.getItemLayout(t);
  26567. return i.rect(n.brushRect)
  26568. }
  26569. }), wA, !0),
  26570. h(Ia.extend({
  26571. type: "candlestick",
  26572. getStyleUpdater: function() {
  26573. return Ad
  26574. },
  26575. dispose: z
  26576. }), SA, !0);
  26577. var CA = ["itemStyle", "normal"]
  26578. , DA = ["itemStyle", "emphasis"]
  26579. , LA = ["itemStyle", "normal", "borderColor"]
  26580. , kA = ["itemStyle", "normal", "borderColor0"]
  26581. , PA = ["itemStyle", "normal", "color"]
  26582. , OA = ["itemStyle", "normal", "color0"]
  26583. , zA = I;
  26584. Qa(function(t) {
  26585. t && v(t.series) && c(t.series, function(t) {
  26586. _(t) && "k" === t.type && (t.type = "candlestick")
  26587. })
  26588. }),
  26589. or(function(t, e) {
  26590. t.eachRawSeriesByType("candlestick", function(e) {
  26591. var i = e.getData();
  26592. i.setVisual({
  26593. legendSymbol: "roundRect"
  26594. }),
  26595. t.isSeriesFiltered(e) || i.each(function(t) {
  26596. var e = i.getItemModel(t)
  26597. , n = i.getItemLayout(t).sign;
  26598. i.setItemVisual(t, {
  26599. color: e.get(n > 0 ? PA : OA),
  26600. borderColor: e.get(n > 0 ? LA : kA)
  26601. })
  26602. })
  26603. })
  26604. }),
  26605. nr(function(t) {
  26606. t.eachSeriesByType("candlestick", function(t) {
  26607. var e, i = t.coordinateSystem, n = t.getData(), o = Cd(t, n), a = t.get("layout"), r = "horizontal" === a ? 0 : 1, s = 1 - r, l = ["x", "y"], h = [];
  26608. if (c(n.dimensions, function(t) {
  26609. var i = n.getDimensionInfo(t).coordDim;
  26610. i === l[s] ? h.push(t) : i === l[r] && (e = t)
  26611. }),
  26612. !(null == e || h.length < 4)) {
  26613. var u = 0;
  26614. n.each([e].concat(h), function() {
  26615. function t(t) {
  26616. var e = [];
  26617. return e[r] = d,
  26618. e[s] = t,
  26619. isNaN(d) || isNaN(t) ? [NaN, NaN] : i.dataToPoint(e)
  26620. }
  26621. function e(t, e) {
  26622. var i = t.slice()
  26623. , n = t.slice();
  26624. i[r] = Yn(i[r] + o / 2, 1, !1),
  26625. n[r] = Yn(n[r] - o / 2, 1, !0),
  26626. e ? M.push(i, n) : M.push(n, i)
  26627. }
  26628. function l(t) {
  26629. return t[r] = Yn(t[r], 1),
  26630. t
  26631. }
  26632. var c = arguments
  26633. , d = c[0]
  26634. , f = c[h.length + 1]
  26635. , g = c[1]
  26636. , p = c[2]
  26637. , m = c[3]
  26638. , v = c[4]
  26639. , y = Math.min(g, p)
  26640. , x = Math.max(g, p)
  26641. , _ = t(y)
  26642. , b = t(x)
  26643. , w = t(m)
  26644. , S = [[l(t(v)), l(b)], [l(w), l(_)]]
  26645. , M = [];
  26646. e(b, 0),
  26647. e(_, 1);
  26648. var I;
  26649. I = g > p ? -1 : g < p ? 1 : u > 0 ? n.getItemModel(u - 1).get()[2] <= p ? 1 : -1 : 1,
  26650. n.setItemLayout(f, {
  26651. chartLayout: a,
  26652. sign: I,
  26653. initBaseline: g > p ? b[s] : _[s],
  26654. bodyEnds: M,
  26655. whiskerEnds: S,
  26656. brushRect: function() {
  26657. var e = t(Math.min(g, p, m, v))
  26658. , i = t(Math.max(g, p, m, v));
  26659. return e[r] -= o / 2,
  26660. i[r] -= o / 2,
  26661. {
  26662. x: e[0],
  26663. y: e[1],
  26664. width: s ? o : i[0] - e[0],
  26665. height: s ? i[1] - e[1] : o
  26666. }
  26667. }()
  26668. }),
  26669. ++u
  26670. }, !0)
  26671. }
  26672. })
  26673. }),
  26674. bw.extend({
  26675. type: "series.effectScatter",
  26676. dependencies: ["grid", "polar"],
  26677. getInitialData: function(t, e) {
  26678. return br(t.data, this, e)
  26679. },
  26680. brushSelector: "point",
  26681. defaultOption: {
  26682. coordinateSystem: "cartesian2d",
  26683. zlevel: 0,
  26684. z: 2,
  26685. legendHoverLink: !0,
  26686. effectType: "ripple",
  26687. progressive: 0,
  26688. showEffectOn: "render",
  26689. rippleEffect: {
  26690. period: 4,
  26691. scale: 2.5,
  26692. brushType: "fill"
  26693. },
  26694. symbolSize: 10
  26695. }
  26696. });
  26697. var NA = kd.prototype;
  26698. NA.stopEffectAnimation = function() {
  26699. this.childAt(1).removeAll()
  26700. }
  26701. ,
  26702. NA.startEffectAnimation = function(t) {
  26703. for (var e = t.symbolType, i = t.color, n = this.childAt(1), o = 0; o < 3; o++) {
  26704. var a = Gr(e, -1, -1, 2, 2, i);
  26705. a.attr({
  26706. style: {
  26707. strokeNoScale: !0
  26708. },
  26709. z2: 99,
  26710. silent: !0,
  26711. scale: [.5, .5]
  26712. });
  26713. var r = -o / 3 * t.period + t.effectOffset;
  26714. a.animate("", !0).when(t.period, {
  26715. scale: [t.rippleScale / 2, t.rippleScale / 2]
  26716. }).delay(r).start(),
  26717. a.animateStyle(!0).when(t.period, {
  26718. opacity: 0
  26719. }).delay(r).start(),
  26720. n.add(a)
  26721. }
  26722. Ld(n, t)
  26723. }
  26724. ,
  26725. NA.updateEffectAnimation = function(t) {
  26726. for (var e = this._effectCfg, i = this.childAt(1), n = ["symbolType", "period", "rippleScale"], o = 0; o < n.length; o++) {
  26727. var a = n[o];
  26728. if (e[a] !== t[a])
  26729. return this.stopEffectAnimation(),
  26730. void this.startEffectAnimation(t)
  26731. }
  26732. Ld(i, t)
  26733. }
  26734. ,
  26735. NA.highlight = function() {
  26736. this.trigger("emphasis")
  26737. }
  26738. ,
  26739. NA.downplay = function() {
  26740. this.trigger("normal")
  26741. }
  26742. ,
  26743. NA.updateData = function(t, e) {
  26744. var i = t.hostModel;
  26745. this.childAt(0).updateData(t, e);
  26746. var n = this.childAt(1)
  26747. , o = t.getItemModel(e)
  26748. , a = t.getItemVisual(e, "symbol")
  26749. , r = Dd(t.getItemVisual(e, "symbolSize"))
  26750. , s = t.getItemVisual(e, "color");
  26751. n.attr("scale", r),
  26752. n.traverse(function(t) {
  26753. t.attr({
  26754. fill: s
  26755. })
  26756. });
  26757. var l = o.getShallow("symbolOffset");
  26758. if (l) {
  26759. var h = n.position;
  26760. h[0] = bi(l[0], r[0]),
  26761. h[1] = bi(l[1], r[1])
  26762. }
  26763. n.rotation = (o.getShallow("symbolRotate") || 0) * Math.PI / 180 || 0;
  26764. var u = {};
  26765. if (u.showEffectOn = i.get("showEffectOn"),
  26766. u.rippleScale = o.get("rippleEffect.scale"),
  26767. u.brushType = o.get("rippleEffect.brushType"),
  26768. u.period = 1e3 * o.get("rippleEffect.period"),
  26769. u.effectOffset = e / t.count(),
  26770. u.z = o.getShallow("z") || 0,
  26771. u.zlevel = o.getShallow("zlevel") || 0,
  26772. u.symbolType = a,
  26773. u.color = s,
  26774. this.off("mouseover").off("mouseout").off("emphasis").off("normal"),
  26775. "render" === u.showEffectOn)
  26776. this._effectCfg ? this.updateEffectAnimation(u) : this.startEffectAnimation(u),
  26777. this._effectCfg = u;
  26778. else {
  26779. this._effectCfg = null,
  26780. this.stopEffectAnimation();
  26781. var c = this.childAt(0)
  26782. , d = function() {
  26783. c.highlight(),
  26784. "render" !== u.showEffectOn && this.startEffectAnimation(u)
  26785. }
  26786. , f = function() {
  26787. c.downplay(),
  26788. "render" !== u.showEffectOn && this.stopEffectAnimation()
  26789. };
  26790. this.on("mouseover", d, this).on("mouseout", f, this).on("emphasis", d, this).on("normal", f, this)
  26791. }
  26792. this._effectCfg = u
  26793. }
  26794. ,
  26795. NA.fadeOut = function(t) {
  26796. this.off("mouseover").off("mouseout").off("emphasis").off("normal"),
  26797. t && t()
  26798. }
  26799. ,
  26800. l(kd, $y),
  26801. hr({
  26802. type: "effectScatter",
  26803. init: function() {
  26804. this._symbolDraw = new Qr(kd)
  26805. },
  26806. render: function(t, e, i) {
  26807. var n = t.getData()
  26808. , o = this._symbolDraw;
  26809. o.updateData(n),
  26810. this.group.add(o.group)
  26811. },
  26812. updateLayout: function() {
  26813. this._symbolDraw.updateLayout()
  26814. },
  26815. remove: function(t, e) {
  26816. this._symbolDraw && this._symbolDraw.remove(e)
  26817. },
  26818. dispose: function() {}
  26819. }),
  26820. or(m(mM, "effectScatter", "circle", null)),
  26821. nr(m(vM, "effectScatter"));
  26822. var EA = bw.extend({
  26823. type: "series.lines",
  26824. dependencies: ["grid", "polar"],
  26825. visualColorAccessPath: "lineStyle.normal.color",
  26826. init: function(t) {
  26827. Pd(t),
  26828. EA.superApply(this, "init", arguments)
  26829. },
  26830. mergeOption: function(t) {
  26831. Pd(t),
  26832. EA.superApply(this, "mergeOption", arguments)
  26833. },
  26834. getInitialData: function(t, e) {
  26835. var i = new lS(["value"],this);
  26836. return i.hasItemOption = !1,
  26837. i.initData(t.data, [], function(t, e, n, o) {
  26838. if (t instanceof Array)
  26839. return NaN;
  26840. i.hasItemOption = !0;
  26841. var a = t.value;
  26842. return null != a ? a instanceof Array ? a[o] : a : void 0
  26843. }),
  26844. i
  26845. },
  26846. formatTooltip: function(t) {
  26847. var e = this.getData().getItemModel(t)
  26848. , i = e.get("name");
  26849. if (i)
  26850. return i;
  26851. var n = e.get("fromName")
  26852. , o = e.get("toName")
  26853. , a = [];
  26854. return null != n && a.push(n),
  26855. null != o && a.push(o),
  26856. Vi(a.join(" > "))
  26857. },
  26858. defaultOption: {
  26859. coordinateSystem: "geo",
  26860. zlevel: 0,
  26861. z: 2,
  26862. legendHoverLink: !0,
  26863. hoverAnimation: !0,
  26864. xAxisIndex: 0,
  26865. yAxisIndex: 0,
  26866. symbol: ["none", "none"],
  26867. symbolSize: [10, 10],
  26868. geoIndex: 0,
  26869. effect: {
  26870. show: !1,
  26871. period: 4,
  26872. constantSpeed: 0,
  26873. symbol: "circle",
  26874. symbolSize: 3,
  26875. loop: !0,
  26876. trailLength: .2
  26877. },
  26878. large: !1,
  26879. largeThreshold: 2e3,
  26880. polyline: !1,
  26881. label: {
  26882. normal: {
  26883. show: !1,
  26884. position: "end"
  26885. }
  26886. },
  26887. lineStyle: {
  26888. normal: {
  26889. opacity: .5
  26890. }
  26891. }
  26892. }
  26893. })
  26894. , RA = Od.prototype;
  26895. RA.createLine = function(t, e, i) {
  26896. return new Iu(t,e,i)
  26897. }
  26898. ,
  26899. RA._updateEffectSymbol = function(t, e) {
  26900. var i = t.getItemModel(e).getModel("effect")
  26901. , n = i.get("symbolSize")
  26902. , o = i.get("symbol");
  26903. v(n) || (n = [n, n]);
  26904. var a = i.get("color") || t.getItemVisual(e, "color")
  26905. , r = this.childAt(1);
  26906. this._symbolType !== o && (this.remove(r),
  26907. (r = Gr(o, -.5, -.5, 1, 1, a)).z2 = 100,
  26908. r.culling = !0,
  26909. this.add(r)),
  26910. r && (r.setStyle("shadowColor", a),
  26911. r.setStyle(i.getItemStyle(["color"])),
  26912. r.attr("scale", n),
  26913. r.setColor(a),
  26914. r.attr("scale", n),
  26915. this._symbolType = o,
  26916. this._updateEffectAnimation(t, i, e))
  26917. }
  26918. ,
  26919. RA._updateEffectAnimation = function(t, e, i) {
  26920. var n = this.childAt(1);
  26921. if (n) {
  26922. var o = this
  26923. , a = t.getItemLayout(i)
  26924. , r = 1e3 * e.get("period")
  26925. , s = e.get("loop")
  26926. , l = e.get("constantSpeed")
  26927. , h = M(e.get("delay"), function(e) {
  26928. return e / t.count() * r / 3
  26929. })
  26930. , u = "function" == typeof h;
  26931. if (n.ignore = !0,
  26932. this.updateAnimationPoints(n, a),
  26933. l > 0 && (r = this.getLineLength(n) / l * 1e3),
  26934. r !== this._period || s !== this._loop) {
  26935. n.stopAnimation();
  26936. var c = h;
  26937. u && (c = h(i)),
  26938. n.__t > 0 && (c = -r * n.__t),
  26939. n.__t = 0;
  26940. var d = n.animate("", s).when(r, {
  26941. __t: 1
  26942. }).delay(c).during(function() {
  26943. o.updateSymbolPosition(n)
  26944. });
  26945. s || d.done(function() {
  26946. o.remove(n)
  26947. }),
  26948. d.start()
  26949. }
  26950. this._period = r,
  26951. this._loop = s
  26952. }
  26953. }
  26954. ,
  26955. RA.getLineLength = function(t) {
  26956. return dy(t.__p1, t.__cp1) + dy(t.__cp1, t.__p2)
  26957. }
  26958. ,
  26959. RA.updateAnimationPoints = function(t, e) {
  26960. t.__p1 = e[0],
  26961. t.__p2 = e[1],
  26962. t.__cp1 = e[2] || [(e[0][0] + e[1][0]) / 2, (e[0][1] + e[1][1]) / 2]
  26963. }
  26964. ,
  26965. RA.updateData = function(t, e, i) {
  26966. this.childAt(0).updateData(t, e, i),
  26967. this._updateEffectSymbol(t, e)
  26968. }
  26969. ,
  26970. RA.updateSymbolPosition = function(t) {
  26971. var e = t.__p1
  26972. , i = t.__p2
  26973. , n = t.__cp1
  26974. , o = t.__t
  26975. , a = t.position
  26976. , r = ln
  26977. , s = hn;
  26978. a[0] = r(e[0], n[0], i[0], o),
  26979. a[1] = r(e[1], n[1], i[1], o);
  26980. var l = s(e[0], n[0], i[0], o)
  26981. , h = s(e[1], n[1], i[1], o);
  26982. t.rotation = -Math.atan2(h, l) - Math.PI / 2,
  26983. t.ignore = !1
  26984. }
  26985. ,
  26986. RA.updateLayout = function(t, e) {
  26987. this.childAt(0).updateLayout(t, e);
  26988. var i = t.getItemModel(e).getModel("effect");
  26989. this._updateEffectAnimation(t, i, e)
  26990. }
  26991. ,
  26992. l(Od, $y);
  26993. var VA = zd.prototype;
  26994. VA._createPolyline = function(t, e, i) {
  26995. var n = t.getItemLayout(e)
  26996. , o = new gb({
  26997. shape: {
  26998. points: n
  26999. }
  27000. });
  27001. this.add(o),
  27002. this._updateCommonStl(t, e, i)
  27003. }
  27004. ,
  27005. VA.updateData = function(t, e, i) {
  27006. var n = t.hostModel;
  27007. _o(this.childAt(0), {
  27008. shape: {
  27009. points: t.getItemLayout(e)
  27010. }
  27011. }, n, e),
  27012. this._updateCommonStl(t, e, i)
  27013. }
  27014. ,
  27015. VA._updateCommonStl = function(t, e, i) {
  27016. var n = this.childAt(0)
  27017. , o = t.getItemModel(e)
  27018. , r = t.getItemVisual(e, "color")
  27019. , s = i && i.lineStyle
  27020. , l = i && i.hoverLineStyle;
  27021. i && !t.hasItemOption || (s = o.getModel("lineStyle.normal").getLineStyle(),
  27022. l = o.getModel("lineStyle.emphasis").getLineStyle()),
  27023. n.useStyle(a({
  27024. strokeNoScale: !0,
  27025. fill: "none",
  27026. stroke: r
  27027. }, s)),
  27028. n.hoverStyle = l,
  27029. lo(this)
  27030. }
  27031. ,
  27032. VA.updateLayout = function(t, e) {
  27033. this.childAt(0).setShape("points", t.getItemLayout(e))
  27034. }
  27035. ,
  27036. l(zd, $y);
  27037. var BA = Nd.prototype;
  27038. BA.createLine = function(t, e, i) {
  27039. return new zd(t,e,i)
  27040. }
  27041. ,
  27042. BA.updateAnimationPoints = function(t, e) {
  27043. this._points = e;
  27044. for (var i = [0], n = 0, o = 1; o < e.length; o++) {
  27045. var a = e[o - 1]
  27046. , r = e[o];
  27047. n += dy(a, r),
  27048. i.push(n)
  27049. }
  27050. if (0 !== n) {
  27051. for (o = 0; o < i.length; o++)
  27052. i[o] /= n;
  27053. this._offsets = i,
  27054. this._length = n
  27055. }
  27056. }
  27057. ,
  27058. BA.getLineLength = function(t) {
  27059. return this._length
  27060. }
  27061. ,
  27062. BA.updateSymbolPosition = function(t) {
  27063. var e = t.__t
  27064. , i = this._points
  27065. , n = this._offsets
  27066. , o = i.length;
  27067. if (n) {
  27068. var a = this._lastFrame;
  27069. if (e < this._lastFramePercent) {
  27070. for (r = Math.min(a + 1, o - 1); r >= 0 && !(n[r] <= e); r--)
  27071. ;
  27072. r = Math.min(r, o - 2)
  27073. } else {
  27074. for (var r = a; r < o && !(n[r] > e); r++)
  27075. ;
  27076. r = Math.min(r - 1, o - 2)
  27077. }
  27078. q(t.position, i[r], i[r + 1], (e - n[r]) / (n[r + 1] - n[r]));
  27079. var s = i[r + 1][0] - i[r][0]
  27080. , l = i[r + 1][1] - i[r][1];
  27081. t.rotation = -Math.atan2(l, s) - Math.PI / 2,
  27082. this._lastFrame = r,
  27083. this._lastFramePercent = e,
  27084. t.ignore = !1
  27085. }
  27086. }
  27087. ,
  27088. l(Nd, Od);
  27089. var GA = Hn({
  27090. shape: {
  27091. polyline: !1,
  27092. segs: []
  27093. },
  27094. buildPath: function(t, e) {
  27095. for (var i = e.segs, n = e.polyline, o = 0; o < i.length; o++) {
  27096. var a = i[o];
  27097. if (n) {
  27098. t.moveTo(a[0][0], a[0][1]);
  27099. for (var r = 1; r < a.length; r++)
  27100. t.lineTo(a[r][0], a[r][1])
  27101. } else
  27102. t.moveTo(a[0][0], a[0][1]),
  27103. a.length > 2 ? t.quadraticCurveTo(a[2][0], a[2][1], a[1][0], a[1][1]) : t.lineTo(a[1][0], a[1][1])
  27104. }
  27105. },
  27106. findDataIndex: function(t, e) {
  27107. for (var i = this.shape, n = i.segs, o = i.polyline, a = Math.max(this.style.lineWidth, 1), r = 0; r < n.length; r++) {
  27108. var s = n[r];
  27109. if (o) {
  27110. for (var l = 1; l < s.length; l++)
  27111. if (xn(s[l - 1][0], s[l - 1][1], s[l][0], s[l][1], a, t, e))
  27112. return r
  27113. } else if (s.length > 2) {
  27114. if (bn(s[0][0], s[0][1], s[2][0], s[2][1], s[1][0], s[1][1], a, t, e))
  27115. return r
  27116. } else if (xn(s[0][0], s[0][1], s[1][0], s[1][1], a, t, e))
  27117. return r
  27118. }
  27119. return -1
  27120. }
  27121. })
  27122. , WA = Ed.prototype;
  27123. WA.updateData = function(t) {
  27124. this.group.removeAll();
  27125. var e = this._lineEl
  27126. , i = t.hostModel;
  27127. e.setShape({
  27128. segs: t.mapArray(t.getItemLayout),
  27129. polyline: i.get("polyline")
  27130. }),
  27131. e.useStyle(i.getModel("lineStyle.normal").getLineStyle());
  27132. var n = t.getVisual("color");
  27133. n && e.setStyle("stroke", n),
  27134. e.setStyle("fill"),
  27135. e.seriesIndex = i.seriesIndex,
  27136. e.on("mousemove", function(t) {
  27137. e.dataIndex = null;
  27138. var i = e.findDataIndex(t.offsetX, t.offsetY);
  27139. i > 0 && (e.dataIndex = i)
  27140. }),
  27141. this.group.add(e)
  27142. }
  27143. ,
  27144. WA.updateLayout = function(t) {
  27145. var e = t.getData();
  27146. this._lineEl.setShape({
  27147. segs: e.mapArray(e.getItemLayout)
  27148. })
  27149. }
  27150. ,
  27151. WA.remove = function() {
  27152. this.group.removeAll()
  27153. }
  27154. ,
  27155. hr({
  27156. type: "lines",
  27157. init: function() {},
  27158. render: function(t, e, i) {
  27159. var n = t.getData()
  27160. , o = this._lineDraw
  27161. , a = t.get("effect.show")
  27162. , r = t.get("polyline")
  27163. , s = t.get("large") && n.count() >= t.get("largeThreshold");
  27164. a === this._hasEffet && r === this._isPolyline && s === this._isLarge || (o && o.remove(),
  27165. o = this._lineDraw = s ? new Ed : new Cu(r ? a ? Nd : zd : a ? Od : Iu),
  27166. this._hasEffet = a,
  27167. this._isPolyline = r,
  27168. this._isLarge = s);
  27169. var l = t.get("zlevel")
  27170. , h = t.get("effect.trailLength")
  27171. , u = i.getZr()
  27172. , c = "svg" === u.painter.getType();
  27173. if (c || u.painter.getLayer(l).clear(!0),
  27174. null == this._lastZlevel || c || u.configLayer(this._lastZlevel, {
  27175. motionBlur: !1
  27176. }),
  27177. a && h) {
  27178. c || u.configLayer(l, {
  27179. motionBlur: !0,
  27180. lastFrameAlpha: Math.max(Math.min(h / 10 + .9, 1), 0)
  27181. })
  27182. }
  27183. this.group.add(o.group),
  27184. o.updateData(n),
  27185. this._lastZlevel = l
  27186. },
  27187. updateLayout: function(t, e, i) {
  27188. this._lineDraw.updateLayout(t);
  27189. var n = i.getZr();
  27190. "svg" === n.painter.getType() || n.painter.getLayer(this._lastZlevel).clear(!0)
  27191. },
  27192. remove: function(t, e) {
  27193. this._lineDraw && this._lineDraw.remove(e, !0);
  27194. var i = e.getZr();
  27195. "svg" === i.painter.getType() || i.painter.getLayer(this._lastZlevel).clear(!0)
  27196. },
  27197. dispose: function() {}
  27198. });
  27199. nr(function(t) {
  27200. t.eachSeriesByType("lines", function(t) {
  27201. var e = t.coordinateSystem
  27202. , i = t.getData();
  27203. i.each(function(n) {
  27204. var o = i.getItemModel(n)
  27205. , a = o.option instanceof Array ? o.option : o.get("coords")
  27206. , r = [];
  27207. if (t.get("polyline"))
  27208. for (var s = 0; s < a.length; s++)
  27209. r.push(e.dataToPoint(a[s]));
  27210. else {
  27211. r[0] = e.dataToPoint(a[0]),
  27212. r[1] = e.dataToPoint(a[1]);
  27213. var l = o.get("lineStyle.normal.curveness");
  27214. +l && (r[2] = [(r[0][0] + r[1][0]) / 2 - (r[0][1] - r[1][1]) * l, (r[0][1] + r[1][1]) / 2 - (r[1][0] - r[0][0]) * l])
  27215. }
  27216. i.setItemLayout(n, r)
  27217. })
  27218. })
  27219. }),
  27220. or(function(t) {
  27221. t.eachSeriesByType("lines", function(t) {
  27222. var e = t.getData()
  27223. , i = Rd(t.get("symbol"))
  27224. , n = Rd(t.get("symbolSize"))
  27225. , o = "lineStyle.normal.opacity".split(".");
  27226. e.setVisual("fromSymbol", i && i[0]),
  27227. e.setVisual("toSymbol", i && i[1]),
  27228. e.setVisual("fromSymbolSize", n && n[0]),
  27229. e.setVisual("toSymbolSize", n && n[1]),
  27230. e.setVisual("opacity", t.get(o)),
  27231. e.each(function(t) {
  27232. var i = e.getItemModel(t)
  27233. , n = Rd(i.getShallow("symbol", !0))
  27234. , a = Rd(i.getShallow("symbolSize", !0))
  27235. , r = i.get(o);
  27236. n[0] && e.setItemVisual(t, "fromSymbol", n[0]),
  27237. n[1] && e.setItemVisual(t, "toSymbol", n[1]),
  27238. a[0] && e.setItemVisual(t, "fromSymbolSize", a[0]),
  27239. a[1] && e.setItemVisual(t, "toSymbolSize", a[1]),
  27240. e.setItemVisual(t, "opacity", r)
  27241. })
  27242. })
  27243. }),
  27244. bw.extend({
  27245. type: "series.heatmap",
  27246. getInitialData: function(t, e) {
  27247. return br(t.data, this, e)
  27248. },
  27249. defaultOption: {
  27250. coordinateSystem: "cartesian2d",
  27251. zlevel: 0,
  27252. z: 2,
  27253. geoIndex: 0,
  27254. blurSize: 30,
  27255. pointSize: 20,
  27256. maxOpacity: 1,
  27257. minOpacity: 0
  27258. }
  27259. });
  27260. Vd.prototype = {
  27261. update: function(t, e, i, n, o, a) {
  27262. var r = this._getBrush()
  27263. , s = this._getGradient(t, o, "inRange")
  27264. , l = this._getGradient(t, o, "outOfRange")
  27265. , h = this.pointSize + this.blurSize
  27266. , u = this.canvas
  27267. , c = u.getContext("2d")
  27268. , d = t.length;
  27269. u.width = e,
  27270. u.height = i;
  27271. for (var f = 0; f < d; ++f) {
  27272. var g = t[f]
  27273. , p = g[0]
  27274. , m = g[1]
  27275. , v = n(g[2]);
  27276. c.globalAlpha = v,
  27277. c.drawImage(r, p - h, m - h)
  27278. }
  27279. if (!u.width || !u.height)
  27280. return u;
  27281. for (var y = c.getImageData(0, 0, u.width, u.height), x = y.data, _ = 0, b = x.length, w = this.minOpacity, S = this.maxOpacity - w; _ < b; ) {
  27282. var v = x[_ + 3] / 256
  27283. , M = 4 * Math.floor(255 * v);
  27284. if (v > 0) {
  27285. var I = a(v) ? s : l;
  27286. v > 0 && (v = v * S + w),
  27287. x[_++] = I[M],
  27288. x[_++] = I[M + 1],
  27289. x[_++] = I[M + 2],
  27290. x[_++] = I[M + 3] * v * 256
  27291. } else
  27292. _ += 4
  27293. }
  27294. return c.putImageData(y, 0, 0),
  27295. u
  27296. },
  27297. _getBrush: function() {
  27298. var t = this._brushCanvas || (this._brushCanvas = ay())
  27299. , e = this.pointSize + this.blurSize
  27300. , i = 2 * e;
  27301. t.width = i,
  27302. t.height = i;
  27303. var n = t.getContext("2d");
  27304. return n.clearRect(0, 0, i, i),
  27305. n.shadowOffsetX = i,
  27306. n.shadowBlur = this.blurSize,
  27307. n.shadowColor = "#000",
  27308. n.beginPath(),
  27309. n.arc(-e, e, this.pointSize, 0, 2 * Math.PI, !0),
  27310. n.closePath(),
  27311. n.fill(),
  27312. t
  27313. },
  27314. _getGradient: function(t, e, i) {
  27315. for (var n = this._gradientPixels, o = n[i] || (n[i] = new Uint8ClampedArray(1024)), a = [0, 0, 0, 0], r = 0, s = 0; s < 256; s++)
  27316. e[i](s / 255, !0, a),
  27317. o[r++] = a[0],
  27318. o[r++] = a[1],
  27319. o[r++] = a[2],
  27320. o[r++] = a[3];
  27321. return o
  27322. }
  27323. },
  27324. hr({
  27325. type: "heatmap",
  27326. render: function(t, e, i) {
  27327. var n;
  27328. e.eachComponent("visualMap", function(e) {
  27329. e.eachTargetSeries(function(i) {
  27330. i === t && (n = e)
  27331. })
  27332. }),
  27333. this.group.removeAll();
  27334. var o = t.coordinateSystem;
  27335. "cartesian2d" === o.type || "calendar" === o.type ? this._renderOnCartesianAndCalendar(o, t, i) : Wd(o) && this._renderOnGeo(o, t, n, i)
  27336. },
  27337. dispose: function() {},
  27338. _renderOnCartesianAndCalendar: function(t, e, i) {
  27339. if ("cartesian2d" === t.type)
  27340. var n = t.getAxis("x")
  27341. , a = t.getAxis("y")
  27342. , r = n.getBandWidth()
  27343. , s = a.getBandWidth();
  27344. var l = this.group
  27345. , h = e.getData()
  27346. , u = e.getModel("itemStyle.normal").getItemStyle(["color"])
  27347. , c = e.getModel("itemStyle.emphasis").getItemStyle()
  27348. , d = e.getModel("label.normal")
  27349. , f = e.getModel("label.emphasis")
  27350. , g = t.type
  27351. , p = "cartesian2d" === g ? [e.coordDimToDataDim("x")[0], e.coordDimToDataDim("y")[0], e.coordDimToDataDim("value")[0]] : [e.coordDimToDataDim("time")[0], e.coordDimToDataDim("value")[0]];
  27352. h.each(function(i) {
  27353. var n;
  27354. if ("cartesian2d" === g) {
  27355. if (isNaN(h.get(p[2], i)))
  27356. return;
  27357. var a = t.dataToPoint([h.get(p[0], i), h.get(p[1], i)]);
  27358. n = new pb({
  27359. shape: {
  27360. x: a[0] - r / 2,
  27361. y: a[1] - s / 2,
  27362. width: r,
  27363. height: s
  27364. },
  27365. style: {
  27366. fill: h.getItemVisual(i, "color"),
  27367. opacity: h.getItemVisual(i, "opacity")
  27368. }
  27369. })
  27370. } else {
  27371. if (isNaN(h.get(p[1], i)))
  27372. return;
  27373. n = new pb({
  27374. z2: 1,
  27375. shape: t.dataToRect([h.get(p[0], i)]).contentShape,
  27376. style: {
  27377. fill: h.getItemVisual(i, "color"),
  27378. opacity: h.getItemVisual(i, "opacity")
  27379. }
  27380. })
  27381. }
  27382. var m = h.getItemModel(i);
  27383. h.hasItemOption && (u = m.getModel("itemStyle.normal").getItemStyle(["color"]),
  27384. c = m.getModel("itemStyle.emphasis").getItemStyle(),
  27385. d = m.getModel("label.normal"),
  27386. f = m.getModel("label.emphasis"));
  27387. var v = e.getRawValue(i)
  27388. , y = "-";
  27389. v && null != v[2] && (y = v[2]),
  27390. ho(u, c, d, f, {
  27391. labelFetcher: e,
  27392. labelDataIndex: i,
  27393. defaultText: y,
  27394. isRectText: !0
  27395. }),
  27396. n.setStyle(u),
  27397. lo(n, h.hasItemOption ? c : o({}, c)),
  27398. l.add(n),
  27399. h.setItemGraphicEl(i, n)
  27400. })
  27401. },
  27402. _renderOnGeo: function(t, e, i, n) {
  27403. var o = i.targetVisuals.inRange
  27404. , a = i.targetVisuals.outOfRange
  27405. , r = e.getData()
  27406. , s = this._hmLayer || this._hmLayer || new Vd;
  27407. s.blurSize = e.get("blurSize"),
  27408. s.pointSize = e.get("pointSize"),
  27409. s.minOpacity = e.get("minOpacity"),
  27410. s.maxOpacity = e.get("maxOpacity");
  27411. var l = t.getViewRect().clone()
  27412. , h = t.getRoamTransform().transform;
  27413. l.applyTransform(h);
  27414. var u = Math.max(l.x, 0)
  27415. , c = Math.max(l.y, 0)
  27416. , d = Math.min(l.width + l.x, n.getWidth())
  27417. , f = Math.min(l.height + l.y, n.getHeight())
  27418. , g = d - u
  27419. , p = f - c
  27420. , m = r.mapArray(["lng", "lat", "value"], function(e, i, n) {
  27421. var o = t.dataToPoint([e, i]);
  27422. return o[0] -= u,
  27423. o[1] -= c,
  27424. o.push(n),
  27425. o
  27426. })
  27427. , v = i.getExtent()
  27428. , y = "visualMap.continuous" === i.type ? Gd(v, i.option.range) : Bd(v, i.getPieceList(), i.option.selected);
  27429. s.update(m, g, p, o.color.getNormalizer(), {
  27430. inRange: o.color.getColorMapper(),
  27431. outOfRange: a.color.getColorMapper()
  27432. }, y);
  27433. var x = new je({
  27434. style: {
  27435. width: g,
  27436. height: p,
  27437. x: u,
  27438. y: c,
  27439. image: s.canvas
  27440. },
  27441. silent: !0
  27442. });
  27443. this.group.add(x)
  27444. }
  27445. });
  27446. var HA = YM.extend({
  27447. type: "series.pictorialBar",
  27448. dependencies: ["grid"],
  27449. defaultOption: {
  27450. symbol: "circle",
  27451. symbolSize: null,
  27452. symbolRotate: null,
  27453. symbolPosition: null,
  27454. symbolOffset: null,
  27455. symbolMargin: null,
  27456. symbolRepeat: !1,
  27457. symbolRepeatDirection: "end",
  27458. symbolClip: !1,
  27459. symbolBoundingData: null,
  27460. symbolPatternSize: 400,
  27461. barGap: "-100%",
  27462. progressive: 0,
  27463. hoverAnimation: !1
  27464. },
  27465. getInitialData: function(t) {
  27466. return t.stack = null,
  27467. HA.superApply(this, "getInitialData", arguments)
  27468. }
  27469. })
  27470. , FA = ["itemStyle", "normal", "borderWidth"]
  27471. , ZA = [{
  27472. xy: "x",
  27473. wh: "width",
  27474. index: 0,
  27475. posDesc: ["left", "right"]
  27476. }, {
  27477. xy: "y",
  27478. wh: "height",
  27479. index: 1,
  27480. posDesc: ["top", "bottom"]
  27481. }]
  27482. , UA = new rb;
  27483. hr({
  27484. type: "pictorialBar",
  27485. render: function(t, e, i) {
  27486. var n = this.group
  27487. , o = t.getData()
  27488. , a = this._data
  27489. , r = t.coordinateSystem
  27490. , s = !!r.getBaseAxis().isHorizontal()
  27491. , l = r.grid.getRect()
  27492. , h = {
  27493. ecSize: {
  27494. width: i.getWidth(),
  27495. height: i.getHeight()
  27496. },
  27497. seriesModel: t,
  27498. coordSys: r,
  27499. coordSysExtent: [[l.x, l.x + l.width], [l.y, l.y + l.height]],
  27500. isHorizontal: s,
  27501. valueDim: ZA[+s],
  27502. categoryDim: ZA[1 - s]
  27503. };
  27504. return o.diff(a).add(function(t) {
  27505. if (o.hasValue(t)) {
  27506. var e = Qd(o, t)
  27507. , i = Hd(o, t, e, h)
  27508. , a = of(o, h, i);
  27509. o.setItemGraphicEl(t, a),
  27510. n.add(a),
  27511. uf(a, h, i)
  27512. }
  27513. }).update(function(t, e) {
  27514. var i = a.getItemGraphicEl(e);
  27515. if (o.hasValue(t)) {
  27516. var r = Qd(o, t)
  27517. , s = Hd(o, t, r, h)
  27518. , l = sf(o, s);
  27519. i && l !== i.__pictorialShapeStr && (n.remove(i),
  27520. o.setItemGraphicEl(t, null),
  27521. i = null),
  27522. i ? af(i, h, s) : i = of(o, h, s, !0),
  27523. o.setItemGraphicEl(t, i),
  27524. i.__pictorialSymbolMeta = s,
  27525. n.add(i),
  27526. uf(i, h, s)
  27527. } else
  27528. n.remove(i)
  27529. }).remove(function(t) {
  27530. var e = a.getItemGraphicEl(t);
  27531. e && rf(a, t, e.__pictorialSymbolMeta.animationModel, e)
  27532. }).execute(),
  27533. this._data = o,
  27534. this.group
  27535. },
  27536. dispose: z,
  27537. remove: function(t, e) {
  27538. var i = this.group
  27539. , n = this._data;
  27540. t.get("animation") ? n && n.eachItemGraphicEl(function(e) {
  27541. rf(n, e.dataIndex, t, e)
  27542. }) : i.removeAll()
  27543. }
  27544. });
  27545. nr(m(il, "pictorialBar")),
  27546. or(m(mM, "pictorialBar", "roundRect", null));
  27547. var jA = function(t, e, i, n, o) {
  27548. YS.call(this, t, e, i),
  27549. this.type = n || "value",
  27550. this.position = o || "bottom",
  27551. this.orient = null,
  27552. this._labelInterval = null
  27553. };
  27554. jA.prototype = {
  27555. constructor: jA,
  27556. model: null,
  27557. isHorizontal: function() {
  27558. var t = this.position;
  27559. return "top" === t || "bottom" === t
  27560. },
  27561. pointToData: function(t, e) {
  27562. return this.coordinateSystem.pointToData(t, e)[0]
  27563. },
  27564. toGlobalCoord: null,
  27565. toLocalCoord: null
  27566. },
  27567. l(jA, YS),
  27568. df.prototype = {
  27569. type: "singleAxis",
  27570. axisPointerEnabled: !0,
  27571. constructor: df,
  27572. _init: function(t, e, i) {
  27573. var n = this.dimension
  27574. , o = new jA(n,zr(t),[0, 0],t.get("type"),t.get("position"))
  27575. , a = "category" === o.type;
  27576. o.onBand = a && t.get("boundaryGap"),
  27577. o.inverse = t.get("inverse"),
  27578. o.orient = t.get("orient"),
  27579. t.axis = o,
  27580. o.model = t,
  27581. o.coordinateSystem = this,
  27582. this._axis = o
  27583. },
  27584. update: function(t, e) {
  27585. t.eachSeries(function(t) {
  27586. if (t.coordinateSystem === this) {
  27587. var e = t.getData()
  27588. , i = this.dimension;
  27589. this._axis.scale.unionExtentFromData(e, t.coordDimToDataDim(i)),
  27590. Or(this._axis.scale, this._axis.model)
  27591. }
  27592. }, this)
  27593. },
  27594. resize: function(t, e) {
  27595. this._rect = Yo({
  27596. left: t.get("left"),
  27597. top: t.get("top"),
  27598. right: t.get("right"),
  27599. bottom: t.get("bottom"),
  27600. width: t.get("width"),
  27601. height: t.get("height")
  27602. }, {
  27603. width: e.getWidth(),
  27604. height: e.getHeight()
  27605. }),
  27606. this._adjustAxis()
  27607. },
  27608. getRect: function() {
  27609. return this._rect
  27610. },
  27611. _adjustAxis: function() {
  27612. var t = this._rect
  27613. , e = this._axis
  27614. , i = e.isHorizontal()
  27615. , n = i ? [0, t.width] : [0, t.height]
  27616. , o = e.reverse ? 1 : 0;
  27617. e.setExtent(n[o], n[1 - o]),
  27618. this._updateAxisTransform(e, i ? t.x : t.y)
  27619. },
  27620. _updateAxisTransform: function(t, e) {
  27621. var i = t.getExtent()
  27622. , n = i[0] + i[1]
  27623. , o = t.isHorizontal();
  27624. t.toGlobalCoord = o ? function(t) {
  27625. return t + e
  27626. }
  27627. : function(t) {
  27628. return n - t + e
  27629. }
  27630. ,
  27631. t.toLocalCoord = o ? function(t) {
  27632. return t - e
  27633. }
  27634. : function(t) {
  27635. return n - t + e
  27636. }
  27637. },
  27638. getAxis: function() {
  27639. return this._axis
  27640. },
  27641. getBaseAxis: function() {
  27642. return this._axis
  27643. },
  27644. getAxes: function() {
  27645. return [this._axis]
  27646. },
  27647. getTooltipAxes: function() {
  27648. return {
  27649. baseAxes: [this.getAxis()]
  27650. }
  27651. },
  27652. containPoint: function(t) {
  27653. var e = this.getRect()
  27654. , i = this.getAxis();
  27655. return "horizontal" === i.orient ? i.contain(i.toLocalCoord(t[0])) && t[1] >= e.y && t[1] <= e.y + e.height : i.contain(i.toLocalCoord(t[1])) && t[0] >= e.y && t[0] <= e.y + e.height
  27656. },
  27657. pointToData: function(t) {
  27658. var e = this.getAxis();
  27659. return [e.coordToData(e.toLocalCoord(t["horizontal" === e.orient ? 0 : 1]))]
  27660. },
  27661. dataToPoint: function(t) {
  27662. var e = this.getAxis()
  27663. , i = this.getRect()
  27664. , n = []
  27665. , o = "horizontal" === e.orient ? 0 : 1;
  27666. return t instanceof Array && (t = t[0]),
  27667. n[o] = e.toGlobalCoord(e.dataToCoord(+t)),
  27668. n[1 - o] = 0 === o ? i.y + i.height / 2 : i.x + i.width / 2,
  27669. n
  27670. }
  27671. },
  27672. ha.register("single", {
  27673. create: function(t, e) {
  27674. var i = [];
  27675. return t.eachComponent("singleAxis", function(n, o) {
  27676. var a = new df(n,t,e);
  27677. a.name = "single_" + o,
  27678. a.resize(n, e),
  27679. n.coordinateSystem = a,
  27680. i.push(a)
  27681. }),
  27682. t.eachSeries(function(e) {
  27683. if ("singleAxis" === e.get("coordinateSystem")) {
  27684. var i = t.queryComponents({
  27685. mainType: "singleAxis",
  27686. index: e.get("singleAxisIndex"),
  27687. id: e.get("singleAxisId")
  27688. })[0];
  27689. e.coordinateSystem = i && i.coordinateSystem
  27690. }
  27691. }),
  27692. i
  27693. },
  27694. dimensions: df.prototype.dimensions
  27695. });
  27696. var XA = zM.getInterval
  27697. , qA = zM.ifIgnoreOnTick
  27698. , YA = ["axisLine", "axisTickLabel", "axisName"]
  27699. , $A = WM.extend({
  27700. type: "singleAxis",
  27701. axisPointerClass: "SingleAxisPointer",
  27702. render: function(t, e, i, n) {
  27703. var o = this.group;
  27704. o.removeAll();
  27705. var a = ff(t)
  27706. , r = new zM(t,a);
  27707. c(YA, r.add, r),
  27708. o.add(r.getGroup()),
  27709. t.get("splitLine.show") && this._splitLine(t, a.labelInterval),
  27710. $A.superCall(this, "render", t, e, i, n)
  27711. },
  27712. _splitLine: function(t, e) {
  27713. var i = t.axis;
  27714. if (!i.scale.isBlank()) {
  27715. var n = t.getModel("splitLine")
  27716. , o = n.getModel("lineStyle")
  27717. , a = o.get("width")
  27718. , r = o.get("color")
  27719. , s = XA(n, e);
  27720. r = r instanceof Array ? r : [r];
  27721. for (var l = t.coordinateSystem.getRect(), h = i.isHorizontal(), u = [], c = 0, d = i.getTicksCoords(), f = [], g = [], p = t.get("axisLabel.showMinLabel"), m = t.get("axisLabel.showMaxLabel"), v = 0; v < d.length; ++v)
  27722. if (!qA(i, v, s, d.length, p, m)) {
  27723. var y = i.toGlobalCoord(d[v]);
  27724. h ? (f[0] = y,
  27725. f[1] = l.y,
  27726. g[0] = y,
  27727. g[1] = l.y + l.height) : (f[0] = l.x,
  27728. f[1] = y,
  27729. g[0] = l.x + l.width,
  27730. g[1] = y);
  27731. var x = c++ % r.length;
  27732. u[x] = u[x] || [],
  27733. u[x].push(new mb(Xn({
  27734. shape: {
  27735. x1: f[0],
  27736. y1: f[1],
  27737. x2: g[0],
  27738. y2: g[1]
  27739. },
  27740. style: {
  27741. lineWidth: a
  27742. },
  27743. silent: !0
  27744. })))
  27745. }
  27746. for (v = 0; v < u.length; ++v)
  27747. this.group.add(Cb(u[v], {
  27748. style: {
  27749. stroke: r[v % r.length],
  27750. lineDash: o.getLineDash(a),
  27751. lineWidth: a
  27752. },
  27753. silent: !0
  27754. }))
  27755. }
  27756. }
  27757. })
  27758. , KA = qb.extend({
  27759. type: "singleAxis",
  27760. layoutMode: "box",
  27761. axis: null,
  27762. coordinateSystem: null,
  27763. getCoordSysModel: function() {
  27764. return this
  27765. }
  27766. })
  27767. , JA = {
  27768. left: "5%",
  27769. top: "5%",
  27770. right: "5%",
  27771. bottom: "5%",
  27772. type: "value",
  27773. position: "bottom",
  27774. orient: "horizontal",
  27775. axisLine: {
  27776. show: !0,
  27777. lineStyle: {
  27778. width: 2,
  27779. type: "solid"
  27780. }
  27781. },
  27782. tooltip: {
  27783. show: !0
  27784. },
  27785. axisTick: {
  27786. show: !0,
  27787. length: 6,
  27788. lineStyle: {
  27789. width: 2
  27790. }
  27791. },
  27792. axisLabel: {
  27793. show: !0,
  27794. interval: "auto"
  27795. },
  27796. splitLine: {
  27797. show: !0,
  27798. lineStyle: {
  27799. type: "dashed",
  27800. opacity: .2
  27801. }
  27802. }
  27803. };
  27804. i(KA.prototype, VS),
  27805. IM("single", KA, function(t, e) {
  27806. return e.type || (e.data ? "category" : "value")
  27807. }, JA);
  27808. var QA = function(t, e) {
  27809. var i, n = [], o = t.seriesIndex;
  27810. if (null == o || !(i = e.getSeriesByIndex(o)))
  27811. return {
  27812. point: []
  27813. };
  27814. var a = i.getData()
  27815. , r = Go(a, t);
  27816. if (null == r || v(r))
  27817. return {
  27818. point: []
  27819. };
  27820. var s = a.getItemGraphicEl(r)
  27821. , l = i.coordinateSystem;
  27822. if (i.getTooltipPosition)
  27823. n = i.getTooltipPosition(r) || [];
  27824. else if (l && l.dataToPoint)
  27825. n = l.dataToPoint(a.getValues(d(l.dimensions, function(t) {
  27826. return i.coordDimToDataDim(t)[0]
  27827. }), r, !0)) || [];
  27828. else if (s) {
  27829. var h = s.getBoundingRect().clone();
  27830. h.applyTransform(s.transform),
  27831. n = [h.x + h.width / 2, h.y + h.height / 2]
  27832. }
  27833. return {
  27834. point: n,
  27835. el: s
  27836. }
  27837. }
  27838. , tC = c
  27839. , eC = m
  27840. , iC = Bb()
  27841. , nC = (rr({
  27842. type: "axisPointer",
  27843. coordSysAxesInfo: null,
  27844. defaultOption: {
  27845. show: "auto",
  27846. triggerOn: null,
  27847. zlevel: 0,
  27848. z: 50,
  27849. type: "line",
  27850. snap: !1,
  27851. triggerTooltip: !0,
  27852. value: null,
  27853. status: null,
  27854. link: [],
  27855. animation: null,
  27856. animationDurationUpdate: 200,
  27857. lineStyle: {
  27858. color: "#aaa",
  27859. width: 1,
  27860. type: "solid"
  27861. },
  27862. shadowStyle: {
  27863. color: "rgba(150,150,150,0.3)"
  27864. },
  27865. label: {
  27866. show: !0,
  27867. formatter: null,
  27868. precision: "auto",
  27869. margin: 3,
  27870. color: "#fff",
  27871. padding: [5, 7, 5, 7],
  27872. backgroundColor: "auto",
  27873. borderColor: null,
  27874. borderWidth: 0,
  27875. shadowBlur: 3,
  27876. shadowColor: "#aaa"
  27877. },
  27878. handle: {
  27879. show: !1,
  27880. icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
  27881. size: 45,
  27882. margin: 50,
  27883. color: "#333",
  27884. shadowBlur: 3,
  27885. shadowColor: "#aaa",
  27886. shadowOffsetX: 0,
  27887. shadowOffsetY: 2,
  27888. throttle: 40
  27889. }
  27890. }
  27891. }),
  27892. Bb())
  27893. , oC = c
  27894. , aC = sr({
  27895. type: "axisPointer",
  27896. render: function(t, e, i) {
  27897. var n = e.getComponent("tooltip")
  27898. , o = t.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click";
  27899. Mf("axisPointer", i, function(t, e, i) {
  27900. "none" !== o && ("leave" === t || o.indexOf(t) >= 0) && i({
  27901. type: "updateAxisPointer",
  27902. currTrigger: t,
  27903. x: e && e.offsetX,
  27904. y: e && e.offsetY
  27905. })
  27906. })
  27907. },
  27908. remove: function(t, e) {
  27909. Lf(e.getZr(), "axisPointer"),
  27910. aC.superApply(this._model, "remove", arguments)
  27911. },
  27912. dispose: function(t, e) {
  27913. Lf("axisPointer", e),
  27914. aC.superApply(this._model, "dispose", arguments)
  27915. }
  27916. })
  27917. , rC = Bb()
  27918. , sC = e
  27919. , lC = p;
  27920. (kf.prototype = {
  27921. _group: null,
  27922. _lastGraphicKey: null,
  27923. _handle: null,
  27924. _dragging: !1,
  27925. _lastValue: null,
  27926. _lastStatus: null,
  27927. _payloadInfo: null,
  27928. animationThreshold: 15,
  27929. render: function(t, e, i, n) {
  27930. var o = e.get("value")
  27931. , a = e.get("status");
  27932. if (this._axisModel = t,
  27933. this._axisPointerModel = e,
  27934. this._api = i,
  27935. n || this._lastValue !== o || this._lastStatus !== a) {
  27936. this._lastValue = o,
  27937. this._lastStatus = a;
  27938. var r = this._group
  27939. , s = this._handle;
  27940. if (!a || "hide" === a)
  27941. return r && r.hide(),
  27942. void (s && s.hide());
  27943. r && r.show(),
  27944. s && s.show();
  27945. var l = {};
  27946. this.makeElOption(l, o, t, e, i);
  27947. var h = l.graphicKey;
  27948. h !== this._lastGraphicKey && this.clear(i),
  27949. this._lastGraphicKey = h;
  27950. var u = this._moveAnimation = this.determineAnimation(t, e);
  27951. if (r) {
  27952. var c = m(Pf, e, u);
  27953. this.updatePointerEl(r, l, c, e),
  27954. this.updateLabelEl(r, l, c, e)
  27955. } else
  27956. r = this._group = new $y,
  27957. this.createPointerEl(r, l, t, e),
  27958. this.createLabelEl(r, l, t, e),
  27959. i.getZr().add(r);
  27960. Ef(r, e, !0),
  27961. this._renderHandle(o)
  27962. }
  27963. },
  27964. remove: function(t) {
  27965. this.clear(t)
  27966. },
  27967. dispose: function(t) {
  27968. this.clear(t)
  27969. },
  27970. determineAnimation: function(t, e) {
  27971. var i = e.get("animation")
  27972. , n = t.axis
  27973. , o = "category" === n.type
  27974. , a = e.get("snap");
  27975. if (!a && !o)
  27976. return !1;
  27977. if ("auto" === i || null == i) {
  27978. var r = this.animationThreshold;
  27979. if (o && n.getBandWidth() > r)
  27980. return !0;
  27981. if (a) {
  27982. var s = Us(t).seriesDataCount
  27983. , l = n.getExtent();
  27984. return Math.abs(l[0] - l[1]) / s > r
  27985. }
  27986. return !1
  27987. }
  27988. return !0 === i
  27989. },
  27990. makeElOption: function(t, e, i, n, o) {},
  27991. createPointerEl: function(t, e, i, n) {
  27992. var o = e.pointer;
  27993. if (o) {
  27994. var a = rC(t).pointerEl = new Db[o.type](sC(e.pointer));
  27995. t.add(a)
  27996. }
  27997. },
  27998. createLabelEl: function(t, e, i, n) {
  27999. if (e.label) {
  28000. var o = rC(t).labelEl = new pb(sC(e.label));
  28001. t.add(o),
  28002. zf(o, n)
  28003. }
  28004. },
  28005. updatePointerEl: function(t, e, i) {
  28006. var n = rC(t).pointerEl;
  28007. n && (n.setStyle(e.pointer.style),
  28008. i(n, {
  28009. shape: e.pointer.shape
  28010. }))
  28011. },
  28012. updateLabelEl: function(t, e, i, n) {
  28013. var o = rC(t).labelEl;
  28014. o && (o.setStyle(e.label.style),
  28015. i(o, {
  28016. shape: e.label.shape,
  28017. position: e.label.position
  28018. }),
  28019. zf(o, n))
  28020. },
  28021. _renderHandle: function(t) {
  28022. if (!this._dragging && this.updateHandleTransform) {
  28023. var e = this._axisPointerModel
  28024. , i = this._api.getZr()
  28025. , n = this._handle
  28026. , o = e.getModel("handle")
  28027. , a = e.get("status");
  28028. if (!o.get("show") || !a || "hide" === a)
  28029. return n && i.remove(n),
  28030. void (this._handle = null);
  28031. var r;
  28032. this._handle || (r = !0,
  28033. n = this._handle = Ao(o.get("icon"), {
  28034. cursor: "move",
  28035. draggable: !0,
  28036. onmousemove: function(t) {
  28037. Ix(t.event)
  28038. },
  28039. onmousedown: lC(this._onHandleDragMove, this, 0, 0),
  28040. drift: lC(this._onHandleDragMove, this),
  28041. ondragend: lC(this._onHandleDragEnd, this)
  28042. }),
  28043. i.add(n)),
  28044. Ef(n, e, !1);
  28045. var s = ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
  28046. n.setStyle(o.getItemStyle(null, s));
  28047. var l = o.get("size");
  28048. v(l) || (l = [l, l]),
  28049. n.attr("scale", [l[0] / 2, l[1] / 2]),
  28050. Da(this, "_doDispatchAxisPointer", o.get("throttle") || 0, "fixRate"),
  28051. this._moveHandleToValue(t, r)
  28052. }
  28053. },
  28054. _moveHandleToValue: function(t, e) {
  28055. Pf(this._axisPointerModel, !e && this._moveAnimation, this._handle, Nf(this.getHandleTransform(t, this._axisModel, this._axisPointerModel)))
  28056. },
  28057. _onHandleDragMove: function(t, e) {
  28058. var i = this._handle;
  28059. if (i) {
  28060. this._dragging = !0;
  28061. var n = this.updateHandleTransform(Nf(i), [t, e], this._axisModel, this._axisPointerModel);
  28062. this._payloadInfo = n,
  28063. i.stopAnimation(),
  28064. i.attr(Nf(n)),
  28065. rC(i).lastProp = null,
  28066. this._doDispatchAxisPointer()
  28067. }
  28068. },
  28069. _doDispatchAxisPointer: function() {
  28070. if (this._handle) {
  28071. var t = this._payloadInfo
  28072. , e = this._axisModel;
  28073. this._api.dispatchAction({
  28074. type: "updateAxisPointer",
  28075. x: t.cursorPoint[0],
  28076. y: t.cursorPoint[1],
  28077. tooltipOption: t.tooltipOption,
  28078. axesInfo: [{
  28079. axisDim: e.axis.dim,
  28080. axisIndex: e.componentIndex
  28081. }]
  28082. })
  28083. }
  28084. },
  28085. _onHandleDragEnd: function(t) {
  28086. if (this._dragging = !1,
  28087. this._handle) {
  28088. var e = this._axisPointerModel.get("value");
  28089. this._moveHandleToValue(e),
  28090. this._api.dispatchAction({
  28091. type: "hideTip"
  28092. })
  28093. }
  28094. },
  28095. getHandleTransform: null,
  28096. updateHandleTransform: null,
  28097. clear: function(t) {
  28098. this._lastValue = null,
  28099. this._lastStatus = null;
  28100. var e = t.getZr()
  28101. , i = this._group
  28102. , n = this._handle;
  28103. e && i && (this._lastGraphicKey = null,
  28104. i && e.remove(i),
  28105. n && e.remove(n),
  28106. this._group = null,
  28107. this._handle = null,
  28108. this._payloadInfo = null)
  28109. },
  28110. doClear: function() {},
  28111. buildLabel: function(t, e, i) {
  28112. return i = i || 0,
  28113. {
  28114. x: t[i],
  28115. y: t[1 - i],
  28116. width: e[i],
  28117. height: e[1 - i]
  28118. }
  28119. }
  28120. }).constructor = kf,
  28121. Yi(kf);
  28122. var hC = kf.extend({
  28123. makeElOption: function(t, e, i, n, o) {
  28124. var a = i.axis
  28125. , r = a.grid
  28126. , s = n.get("type")
  28127. , l = jf(r, a).getOtherAxis(a).getGlobalExtent()
  28128. , h = a.toGlobalCoord(a.dataToCoord(e, !0));
  28129. if (s && "none" !== s) {
  28130. var u = Rf(n)
  28131. , c = uC[s](a, h, l, u);
  28132. c.style = u,
  28133. t.graphicKey = c.type,
  28134. t.pointer = c
  28135. }
  28136. Hf(e, t, Ks(r.model, i), i, n, o)
  28137. },
  28138. getHandleTransform: function(t, e, i) {
  28139. var n = Ks(e.axis.grid.model, e, {
  28140. labelInside: !1
  28141. });
  28142. return n.labelMargin = i.get("handle.margin"),
  28143. {
  28144. position: Wf(e.axis, t, n),
  28145. rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
  28146. }
  28147. },
  28148. updateHandleTransform: function(t, e, i, n) {
  28149. var o = i.axis
  28150. , a = o.grid
  28151. , r = o.getGlobalExtent(!0)
  28152. , s = jf(a, o).getOtherAxis(o).getGlobalExtent()
  28153. , l = "x" === o.dim ? 0 : 1
  28154. , h = t.position;
  28155. h[l] += e[l],
  28156. h[l] = Math.min(r[1], h[l]),
  28157. h[l] = Math.max(r[0], h[l]);
  28158. var u = (s[1] + s[0]) / 2
  28159. , c = [u, u];
  28160. c[l] = h[l];
  28161. var d = [{
  28162. verticalAlign: "middle"
  28163. }, {
  28164. align: "center"
  28165. }];
  28166. return {
  28167. position: h,
  28168. rotation: t.rotation,
  28169. cursorPoint: c,
  28170. tooltipOption: d[l]
  28171. }
  28172. }
  28173. })
  28174. , uC = {
  28175. line: function(t, e, i, n) {
  28176. var o = Ff([e, i[0]], [e, i[1]], Xf(t));
  28177. return Xn({
  28178. shape: o,
  28179. style: n
  28180. }),
  28181. {
  28182. type: "Line",
  28183. shape: o
  28184. }
  28185. },
  28186. shadow: function(t, e, i, n) {
  28187. var o = t.getBandWidth()
  28188. , a = i[1] - i[0];
  28189. return {
  28190. type: "Rect",
  28191. shape: Zf([e - o / 2, i[0]], [o, a], Xf(t))
  28192. }
  28193. }
  28194. };
  28195. WM.registerAxisPointerClass("CartesianAxisPointer", hC),
  28196. Qa(function(t) {
  28197. if (t) {
  28198. (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {});
  28199. var e = t.axisPointer.link;
  28200. e && !v(e) && (t.axisPointer.link = [e])
  28201. }
  28202. }),
  28203. tr(Ew.PROCESSOR.STATISTIC, function(t, e) {
  28204. t.getComponent("axisPointer").coordSysAxesInfo = Vs(t, e)
  28205. }),
  28206. er({
  28207. type: "updateAxisPointer",
  28208. event: "updateAxisPointer",
  28209. update: ":updateAxisPointer"
  28210. }, function(t, e, i) {
  28211. var n = t.currTrigger
  28212. , o = [t.x, t.y]
  28213. , a = t
  28214. , r = t.dispatchAction || p(i.dispatchAction, i)
  28215. , s = e.getComponent("axisPointer").coordSysAxesInfo;
  28216. if (s) {
  28217. Sf(o) && (o = QA({
  28218. seriesIndex: a.seriesIndex,
  28219. dataIndex: a.dataIndex
  28220. }, e).point);
  28221. var l = Sf(o)
  28222. , h = a.axesInfo
  28223. , u = s.axesInfo
  28224. , c = "leave" === n || Sf(o)
  28225. , d = {}
  28226. , f = {}
  28227. , g = {
  28228. list: [],
  28229. map: {}
  28230. }
  28231. , m = {
  28232. showPointer: eC(mf, f),
  28233. showTooltip: eC(vf, g)
  28234. };
  28235. tC(s.coordSysMap, function(t, e) {
  28236. var i = l || t.containPoint(o);
  28237. tC(s.coordSysAxesInfo[e], function(t, e) {
  28238. var n = t.axis
  28239. , a = bf(h, t);
  28240. if (!c && i && (!h || a)) {
  28241. var r = a && a.value;
  28242. null != r || l || (r = n.pointToData(o)),
  28243. null != r && gf(t, r, m, !1, d)
  28244. }
  28245. })
  28246. });
  28247. var v = {};
  28248. return tC(u, function(t, e) {
  28249. var i = t.linkGroup;
  28250. i && !f[e] && tC(i.axesInfo, function(e, n) {
  28251. var o = f[n];
  28252. if (e !== t && o) {
  28253. var a = o.value;
  28254. i.mapper && (a = t.axis.scale.parse(i.mapper(a, wf(e), wf(t)))),
  28255. v[t.key] = a
  28256. }
  28257. })
  28258. }),
  28259. tC(v, function(t, e) {
  28260. gf(u[e], t, m, !0, d)
  28261. }),
  28262. yf(f, u, d),
  28263. xf(g, o, t, r),
  28264. _f(u, 0, i),
  28265. d
  28266. }
  28267. });
  28268. var cC = ["x", "y"]
  28269. , dC = ["width", "height"]
  28270. , fC = kf.extend({
  28271. makeElOption: function(t, e, i, n, o) {
  28272. var a = i.axis
  28273. , r = a.coordinateSystem
  28274. , s = Yf(r, 1 - qf(a))
  28275. , l = r.dataToPoint(e)[0]
  28276. , h = n.get("type");
  28277. if (h && "none" !== h) {
  28278. var u = Rf(n)
  28279. , c = gC[h](a, l, s, u);
  28280. c.style = u,
  28281. t.graphicKey = c.type,
  28282. t.pointer = c
  28283. }
  28284. Hf(e, t, ff(i), i, n, o)
  28285. },
  28286. getHandleTransform: function(t, e, i) {
  28287. var n = ff(e, {
  28288. labelInside: !1
  28289. });
  28290. return n.labelMargin = i.get("handle.margin"),
  28291. {
  28292. position: Wf(e.axis, t, n),
  28293. rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
  28294. }
  28295. },
  28296. updateHandleTransform: function(t, e, i, n) {
  28297. var o = i.axis
  28298. , a = o.coordinateSystem
  28299. , r = qf(o)
  28300. , s = Yf(a, r)
  28301. , l = t.position;
  28302. l[r] += e[r],
  28303. l[r] = Math.min(s[1], l[r]),
  28304. l[r] = Math.max(s[0], l[r]);
  28305. var h = Yf(a, 1 - r)
  28306. , u = (h[1] + h[0]) / 2
  28307. , c = [u, u];
  28308. return c[r] = l[r],
  28309. {
  28310. position: l,
  28311. rotation: t.rotation,
  28312. cursorPoint: c,
  28313. tooltipOption: {
  28314. verticalAlign: "middle"
  28315. }
  28316. }
  28317. }
  28318. })
  28319. , gC = {
  28320. line: function(t, e, i, n) {
  28321. var o = Ff([e, i[0]], [e, i[1]], qf(t));
  28322. return Xn({
  28323. shape: o,
  28324. style: n
  28325. }),
  28326. {
  28327. type: "Line",
  28328. shape: o
  28329. }
  28330. },
  28331. shadow: function(t, e, i, n) {
  28332. var o = t.getBandWidth()
  28333. , a = i[1] - i[0];
  28334. return {
  28335. type: "Rect",
  28336. shape: Zf([e - o / 2, i[0]], [o, a], qf(t))
  28337. }
  28338. }
  28339. };
  28340. WM.registerAxisPointerClass("SingleAxisPointer", fC),
  28341. sr({
  28342. type: "single"
  28343. });
  28344. var pC = bw.extend({
  28345. type: "series.themeRiver",
  28346. dependencies: ["singleAxis"],
  28347. nameMap: null,
  28348. init: function(t) {
  28349. pC.superApply(this, "init", arguments),
  28350. this.legendDataProvider = function() {
  28351. return this.getRawData()
  28352. }
  28353. },
  28354. fixData: function(t) {
  28355. for (var e = t.length, i = d(Kc().key(function(t) {
  28356. return t[2]
  28357. }).entries(t), function(t) {
  28358. return {
  28359. name: t.key,
  28360. dataList: t.values
  28361. }
  28362. }), n = i.length, o = -1, a = -1, r = 0; r < n; ++r) {
  28363. var s = i[r].dataList.length;
  28364. s > o && (o = s,
  28365. a = r)
  28366. }
  28367. for (var l = 0; l < n; ++l)
  28368. if (l !== a)
  28369. for (var h = i[l].name, u = 0; u < o; ++u) {
  28370. for (var c = i[a].dataList[u][0], f = i[l].dataList.length, g = -1, p = 0; p < f; ++p)
  28371. if (i[l].dataList[p][0] === c) {
  28372. g = p;
  28373. break
  28374. }
  28375. -1 === g && (t[e] = [],
  28376. t[e][0] = c,
  28377. t[e][1] = 0,
  28378. t[e][2] = h,
  28379. e++)
  28380. }
  28381. return t
  28382. },
  28383. getInitialData: function(t, e) {
  28384. var i = []
  28385. , n = e.queryComponents({
  28386. mainType: "singleAxis",
  28387. index: this.get("singleAxisIndex"),
  28388. id: this.get("singleAxisId")
  28389. })[0].get("type");
  28390. i = [{
  28391. name: "time",
  28392. type: "category" === n ? "ordinal" : "time" === n ? "time" : "float"
  28393. }, {
  28394. name: "value",
  28395. type: "float"
  28396. }, {
  28397. name: "name",
  28398. type: "ordinal"
  28399. }];
  28400. for (var o = g(t.data, function(t) {
  28401. return void 0 !== t[2]
  28402. }), a = this.fixData(o || []), r = [], s = this.nameMap = O(), l = 0, h = 0; h < a.length; ++h)
  28403. r.push(a[h][2]),
  28404. s.get(a[h][2]) || (s.set(a[h][2], l),
  28405. l++);
  28406. i = vr(i, a);
  28407. var u = new lS(i,this);
  28408. return u.initData(a, r),
  28409. u
  28410. },
  28411. coordDimToDataDim: function(t) {
  28412. return ["time"]
  28413. },
  28414. getLayerSeries: function() {
  28415. for (var t = this.getData(), e = t.count(), i = [], n = 0; n < e; ++n)
  28416. i[n] = n;
  28417. for (var o = d(Kc().key(function(e) {
  28418. return t.get("name", e)
  28419. }).entries(i), function(t) {
  28420. return {
  28421. name: t.key,
  28422. indices: t.values
  28423. }
  28424. }), a = 0; a < o.length; ++a)
  28425. o[a].indices.sort(function(e, i) {
  28426. return t.get("time", e) - t.get("time", i)
  28427. });
  28428. return o
  28429. },
  28430. getAxisTooltipData: function(t, e, i) {
  28431. v(t) || (t = t ? [t] : []);
  28432. for (var n, o = this.getData(), a = this.getLayerSeries(), r = [], s = a.length, l = 0; l < s; ++l) {
  28433. for (var h = Number.MAX_VALUE, u = -1, c = a[l].indices.length, d = 0; d < c; ++d) {
  28434. var f = o.get(t[0], a[l].indices[d])
  28435. , g = Math.abs(f - e);
  28436. g <= h && (n = f,
  28437. h = g,
  28438. u = a[l].indices[d])
  28439. }
  28440. r.push(u)
  28441. }
  28442. return {
  28443. dataIndices: r,
  28444. nestestValue: n
  28445. }
  28446. },
  28447. formatTooltip: function(t) {
  28448. var e = this.getData()
  28449. , i = e.get("name", t)
  28450. , n = e.get("value", t);
  28451. return (isNaN(n) || null == n) && (n = "-"),
  28452. Vi(i + " : " + n)
  28453. },
  28454. defaultOption: {
  28455. zlevel: 0,
  28456. z: 2,
  28457. coordinateSystem: "singleAxis",
  28458. boundaryGap: ["10%", "10%"],
  28459. singleAxisIndex: 0,
  28460. animationEasing: "linear",
  28461. label: {
  28462. normal: {
  28463. margin: 4,
  28464. textAlign: "right",
  28465. show: !0,
  28466. position: "left",
  28467. color: "#000",
  28468. fontSize: 11
  28469. },
  28470. emphasis: {
  28471. show: !0
  28472. }
  28473. }
  28474. }
  28475. });
  28476. hr({
  28477. type: "themeRiver",
  28478. init: function() {
  28479. this._layers = []
  28480. },
  28481. render: function(t, e, i) {
  28482. function n(t) {
  28483. return t.name
  28484. }
  28485. function a(e, i, n) {
  28486. var a = this._layers;
  28487. if ("remove" !== e) {
  28488. for (var h, u = [], c = [], f = l[i].indices, g = 0; g < f.length; g++) {
  28489. var p = r.getItemLayout(f[g])
  28490. , m = p.x
  28491. , v = p.y0
  28492. , y = p.y;
  28493. u.push([m, v]),
  28494. c.push([m, v + y]),
  28495. h = r.getItemVisual(f[g], "color")
  28496. }
  28497. var x, _, b = r.getItemLayout(f[0]), w = r.getItemModel(f[g - 1]), S = w.getModel("label.normal"), M = S.get("margin");
  28498. if ("add" === e) {
  28499. I = d[i] = new $y;
  28500. x = new pM({
  28501. shape: {
  28502. points: u,
  28503. stackedOnPoints: c,
  28504. smooth: .4,
  28505. stackedOnSmooth: .4,
  28506. smoothConstraint: !1
  28507. },
  28508. z2: 0
  28509. }),
  28510. _ = new ab({
  28511. style: {
  28512. x: b.x - M,
  28513. y: b.y0 + b.y / 2
  28514. }
  28515. }),
  28516. I.add(x),
  28517. I.add(_),
  28518. s.add(I),
  28519. x.setClipPath($f(x.getBoundingRect(), t, function() {
  28520. x.removeClipPath()
  28521. }))
  28522. } else {
  28523. var I = a[n];
  28524. x = I.childAt(0),
  28525. _ = I.childAt(1),
  28526. s.add(I),
  28527. d[i] = I,
  28528. _o(x, {
  28529. shape: {
  28530. points: u,
  28531. stackedOnPoints: c
  28532. }
  28533. }, t),
  28534. _o(_, {
  28535. style: {
  28536. x: b.x - M,
  28537. y: b.y0 + b.y / 2
  28538. }
  28539. }, t)
  28540. }
  28541. var T = w.getModel("itemStyle.emphasis")
  28542. , A = w.getModel("itemStyle.normal");
  28543. uo(_.style, S, {
  28544. text: S.get("show") ? t.getFormattedLabel(f[g - 1], "normal") || r.getName(f[g - 1]) : null,
  28545. textVerticalAlign: "middle"
  28546. }),
  28547. x.setStyle(o({
  28548. fill: h
  28549. }, A.getItemStyle(["color"]))),
  28550. lo(x, T.getItemStyle())
  28551. } else
  28552. s.remove(a[i])
  28553. }
  28554. var r = t.getData()
  28555. , s = this.group
  28556. , l = t.getLayerSeries()
  28557. , h = r.getLayout("layoutInfo")
  28558. , u = h.rect
  28559. , c = h.boundaryGap;
  28560. s.attr("position", [0, u.y + c[0]]);
  28561. var d = {};
  28562. new cr(this._layersSeries || [],l,n,n).add(p(a, this, "add")).update(p(a, this, "update")).remove(p(a, this, "remove")).execute(),
  28563. this._layersSeries = l,
  28564. this._layers = d
  28565. },
  28566. dispose: function() {}
  28567. });
  28568. nr(function(t, e) {
  28569. t.eachSeriesByType("themeRiver", function(t) {
  28570. var e = t.getData()
  28571. , i = t.coordinateSystem
  28572. , n = {}
  28573. , o = i.getRect();
  28574. n.rect = o;
  28575. var a = t.get("boundaryGap")
  28576. , r = i.getAxis();
  28577. n.boundaryGap = a,
  28578. "horizontal" === r.orient ? (a[0] = bi(a[0], o.height),
  28579. a[1] = bi(a[1], o.height),
  28580. Kf(e, t, o.height - a[0] - a[1])) : (a[0] = bi(a[0], o.width),
  28581. a[1] = bi(a[1], o.width),
  28582. Kf(e, t, o.width - a[0] - a[1])),
  28583. e.setLayout("layoutInfo", n)
  28584. })
  28585. }),
  28586. or(function(t) {
  28587. t.eachSeriesByType("themeRiver", function(t) {
  28588. var e = t.getData()
  28589. , i = t.getRawData()
  28590. , n = t.get("color")
  28591. , o = O();
  28592. e.each(function(t) {
  28593. o.set(e.getRawIndex(t), t)
  28594. }),
  28595. i.each(function(a) {
  28596. var r = i.getName(a)
  28597. , s = n[(t.nameMap.get(r) - 1) % n.length];
  28598. i.setItemVisual(a, "color", s);
  28599. var l = o.get(a);
  28600. null != l && e.setItemVisual(l, "color", s)
  28601. })
  28602. })
  28603. }),
  28604. tr(m(hI, "themeRiver"));
  28605. var mC = ["itemStyle", "normal"]
  28606. , vC = ["itemStyle", "emphasis"]
  28607. , yC = ["label", "normal"]
  28608. , xC = ["label", "emphasis"]
  28609. , _C = "e\0\0"
  28610. , bC = {
  28611. cartesian2d: function(t) {
  28612. var e = t.grid.getRect();
  28613. return {
  28614. coordSys: {
  28615. type: "cartesian2d",
  28616. x: e.x,
  28617. y: e.y,
  28618. width: e.width,
  28619. height: e.height
  28620. },
  28621. api: {
  28622. coord: p(t.dataToPoint, t),
  28623. size: p(Qf, t)
  28624. }
  28625. }
  28626. },
  28627. geo: function(t) {
  28628. var e = t.getBoundingRect();
  28629. return {
  28630. coordSys: {
  28631. type: "geo",
  28632. x: e.x,
  28633. y: e.y,
  28634. width: e.width,
  28635. height: e.height
  28636. },
  28637. api: {
  28638. coord: p(t.dataToPoint, t),
  28639. size: p(tg, t)
  28640. }
  28641. }
  28642. },
  28643. singleAxis: function(t) {
  28644. var e = t.getRect();
  28645. return {
  28646. coordSys: {
  28647. type: "singleAxis",
  28648. x: e.x,
  28649. y: e.y,
  28650. width: e.width,
  28651. height: e.height
  28652. },
  28653. api: {
  28654. coord: p(t.dataToPoint, t),
  28655. size: p(eg, t)
  28656. }
  28657. }
  28658. },
  28659. polar: function(t) {
  28660. var e = t.getRadiusAxis()
  28661. , i = t.getAngleAxis()
  28662. , n = e.getExtent();
  28663. return n[0] > n[1] && n.reverse(),
  28664. {
  28665. coordSys: {
  28666. type: "polar",
  28667. cx: t.cx,
  28668. cy: t.cy,
  28669. r: n[1],
  28670. r0: n[0]
  28671. },
  28672. api: {
  28673. coord: p(function(n) {
  28674. var o = e.dataToRadius(n[0])
  28675. , a = i.dataToAngle(n[1])
  28676. , r = t.coordToPoint([o, a]);
  28677. return r.push(o, a * Math.PI / 180),
  28678. r
  28679. }),
  28680. size: p(ig, t)
  28681. }
  28682. }
  28683. },
  28684. calendar: function(t) {
  28685. var e = t.getRect()
  28686. , i = t.getRangeInfo();
  28687. return {
  28688. coordSys: {
  28689. type: "calendar",
  28690. x: e.x,
  28691. y: e.y,
  28692. width: e.width,
  28693. height: e.height,
  28694. cellWidth: t.getCellWidth(),
  28695. cellHeight: t.getCellHeight(),
  28696. rangeInfo: {
  28697. start: i.start,
  28698. end: i.end,
  28699. weeks: i.weeks,
  28700. dayCount: i.allDay
  28701. }
  28702. },
  28703. api: {
  28704. coord: p(t.dataToPoint, t)
  28705. }
  28706. }
  28707. }
  28708. };
  28709. lr({
  28710. type: "series.custom",
  28711. dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"],
  28712. defaultOption: {
  28713. coordinateSystem: "cartesian2d",
  28714. zlevel: 0,
  28715. z: 2,
  28716. legendHoverLink: !0
  28717. },
  28718. getInitialData: function(t, e) {
  28719. return br(t.data, this, e)
  28720. }
  28721. }),
  28722. hr({
  28723. type: "custom",
  28724. _data: null,
  28725. render: function(t, e, i) {
  28726. var n = this._data
  28727. , o = t.getData()
  28728. , a = this.group
  28729. , r = rg(t, o, e, i);
  28730. o.diff(n).add(function(e) {
  28731. o.hasValue(e) && lg(null, e, r(e), t, a, o)
  28732. }).update(function(e, i) {
  28733. var s = n.getItemGraphicEl(i);
  28734. o.hasValue(e) ? lg(s, e, r(e), t, a, o) : s && a.remove(s)
  28735. }).remove(function(t) {
  28736. var e = n.getItemGraphicEl(t);
  28737. e && a.remove(e)
  28738. }).execute(),
  28739. this._data = o
  28740. },
  28741. dispose: z
  28742. }),
  28743. Qa(function(t) {
  28744. var e = t.graphic;
  28745. v(e) ? e[0] && e[0].elements ? t.graphic = [t.graphic[0]] : t.graphic = [{
  28746. elements: e
  28747. }] : e && !e.elements && (t.graphic = [{
  28748. elements: [e]
  28749. }])
  28750. });
  28751. var wC = rr({
  28752. type: "graphic",
  28753. defaultOption: {
  28754. elements: [],
  28755. parentId: null
  28756. },
  28757. _elOptionsToUpdate: null,
  28758. mergeOption: function(t) {
  28759. var e = this.option.elements;
  28760. this.option.elements = null,
  28761. wC.superApply(this, "mergeOption", arguments),
  28762. this.option.elements = e
  28763. },
  28764. optionUpdated: function(t, e) {
  28765. var i = this.option
  28766. , n = (e ? i : t).elements
  28767. , o = i.elements = e ? [] : i.elements
  28768. , a = [];
  28769. this._flatten(n, a);
  28770. var r = Eo(o, a);
  28771. Ro(r);
  28772. var s = this._elOptionsToUpdate = [];
  28773. c(r, function(t, e) {
  28774. var i = t.option;
  28775. i && (s.push(i),
  28776. yg(t, i),
  28777. xg(o, e, i),
  28778. _g(o[e], i))
  28779. }, this);
  28780. for (var l = o.length - 1; l >= 0; l--)
  28781. null == o[l] ? o.splice(l, 1) : delete o[l].$action
  28782. },
  28783. _flatten: function(t, e, i) {
  28784. c(t, function(t) {
  28785. if (t) {
  28786. i && (t.parentOption = i),
  28787. e.push(t);
  28788. var n = t.children;
  28789. "group" === t.type && n && this._flatten(n, e, t),
  28790. delete t.children
  28791. }
  28792. }, this)
  28793. },
  28794. useElOptionsToUpdate: function() {
  28795. var t = this._elOptionsToUpdate;
  28796. return this._elOptionsToUpdate = null,
  28797. t
  28798. }
  28799. });
  28800. sr({
  28801. type: "graphic",
  28802. init: function(t, e) {
  28803. this._elMap = O(),
  28804. this._lastGraphicModel
  28805. },
  28806. render: function(t, e, i) {
  28807. t !== this._lastGraphicModel && this._clear(),
  28808. this._lastGraphicModel = t,
  28809. this._updateElements(t, i),
  28810. this._relocate(t, i)
  28811. },
  28812. _updateElements: function(t, e) {
  28813. var i = t.useElOptionsToUpdate();
  28814. if (i) {
  28815. var n = this._elMap
  28816. , o = this.group;
  28817. c(i, function(t) {
  28818. var e = t.$action
  28819. , i = t.id
  28820. , a = n.get(i)
  28821. , r = t.parentId
  28822. , s = null != r ? n.get(r) : o;
  28823. if ("text" === t.type) {
  28824. var l = t.style;
  28825. t.hv && t.hv[1] && (l.textVerticalAlign = l.textBaseline = null),
  28826. !l.hasOwnProperty("textFill") && l.fill && (l.textFill = l.fill),
  28827. !l.hasOwnProperty("textStroke") && l.stroke && (l.textStroke = l.stroke)
  28828. }
  28829. var h = mg(t);
  28830. e && "merge" !== e ? "replace" === e ? (pg(a, n),
  28831. gg(i, s, h, n)) : "remove" === e && pg(a, n) : a ? a.attr(h) : gg(i, s, h, n);
  28832. var u = n.get(i);
  28833. u && (u.__ecGraphicWidth = t.width,
  28834. u.__ecGraphicHeight = t.height)
  28835. })
  28836. }
  28837. },
  28838. _relocate: function(t, e) {
  28839. for (var i = t.option.elements, n = this.group, o = this._elMap, a = i.length - 1; a >= 0; a--) {
  28840. var r = i[a]
  28841. , s = o.get(r.id);
  28842. if (s) {
  28843. var l = s.parent;
  28844. $o(s, r, l === n ? {
  28845. width: e.getWidth(),
  28846. height: e.getHeight()
  28847. } : {
  28848. width: l.__ecGraphicWidth || 0,
  28849. height: l.__ecGraphicHeight || 0
  28850. }, null, {
  28851. hv: r.hv,
  28852. boundingMode: r.bounding
  28853. })
  28854. }
  28855. }
  28856. },
  28857. _clear: function() {
  28858. var t = this._elMap;
  28859. t.each(function(e) {
  28860. pg(e, t)
  28861. }),
  28862. this._elMap = O()
  28863. },
  28864. dispose: function() {
  28865. this._clear()
  28866. }
  28867. });
  28868. var SC = rr({
  28869. type: "legend.plain",
  28870. dependencies: ["series"],
  28871. layoutMode: {
  28872. type: "box",
  28873. ignoreSize: !0
  28874. },
  28875. init: function(t, e, i) {
  28876. this.mergeDefaultAndTheme(t, i),
  28877. t.selected = t.selected || {}
  28878. },
  28879. mergeOption: function(t) {
  28880. SC.superCall(this, "mergeOption", t)
  28881. },
  28882. optionUpdated: function() {
  28883. this._updateData(this.ecModel);
  28884. var t = this._data;
  28885. if (t[0] && "single" === this.get("selectedMode")) {
  28886. for (var e = !1, i = 0; i < t.length; i++) {
  28887. var n = t[i].get("name");
  28888. if (this.isSelected(n)) {
  28889. this.select(n),
  28890. e = !0;
  28891. break
  28892. }
  28893. }
  28894. !e && this.select(t[0].get("name"))
  28895. }
  28896. },
  28897. _updateData: function(t) {
  28898. var e = d(this.get("data") || [], function(t) {
  28899. return "string" != typeof t && "number" != typeof t || (t = {
  28900. name: t
  28901. }),
  28902. new Co(t,this,this.ecModel)
  28903. }, this);
  28904. this._data = e;
  28905. var i = d(t.getSeries(), function(t) {
  28906. return t.name
  28907. });
  28908. t.eachSeries(function(t) {
  28909. if (t.legendDataProvider) {
  28910. var e = t.legendDataProvider();
  28911. i = i.concat(e.mapArray(e.getName))
  28912. }
  28913. }),
  28914. this._availableNames = i
  28915. },
  28916. getData: function() {
  28917. return this._data
  28918. },
  28919. select: function(t) {
  28920. var e = this.option.selected;
  28921. "single" === this.get("selectedMode") && c(this._data, function(t) {
  28922. e[t.get("name")] = !1
  28923. }),
  28924. e[t] = !0
  28925. },
  28926. unSelect: function(t) {
  28927. "single" !== this.get("selectedMode") && (this.option.selected[t] = !1)
  28928. },
  28929. toggleSelected: function(t) {
  28930. var e = this.option.selected;
  28931. e.hasOwnProperty(t) || (e[t] = !0),
  28932. this[e[t] ? "unSelect" : "select"](t)
  28933. },
  28934. isSelected: function(t) {
  28935. var e = this.option.selected;
  28936. return !(e.hasOwnProperty(t) && !e[t]) && s(this._availableNames, t) >= 0
  28937. },
  28938. defaultOption: {
  28939. zlevel: 0,
  28940. z: 4,
  28941. show: !0,
  28942. orient: "horizontal",
  28943. left: "center",
  28944. top: 0,
  28945. align: "auto",
  28946. backgroundColor: "rgba(0,0,0,0)",
  28947. borderColor: "#ccc",
  28948. borderRadius: 0,
  28949. borderWidth: 0,
  28950. padding: 5,
  28951. itemGap: 10,
  28952. itemWidth: 25,
  28953. itemHeight: 14,
  28954. inactiveColor: "#ccc",
  28955. textStyle: {
  28956. color: "#333"
  28957. },
  28958. selectedMode: !0,
  28959. tooltip: {
  28960. show: !1
  28961. }
  28962. }
  28963. });
  28964. er("legendToggleSelect", "legendselectchanged", m(bg, "toggleSelected")),
  28965. er("legendSelect", "legendselected", m(bg, "select")),
  28966. er("legendUnSelect", "legendunselected", m(bg, "unSelect"));
  28967. var MC = m
  28968. , IC = c
  28969. , TC = $y
  28970. , AC = sr({
  28971. type: "legend.plain",
  28972. newlineDisabled: !1,
  28973. init: function() {
  28974. this.group.add(this._contentGroup = new TC),
  28975. this._backgroundEl
  28976. },
  28977. getContentGroup: function() {
  28978. return this._contentGroup
  28979. },
  28980. render: function(t, e, i) {
  28981. if (this.resetInner(),
  28982. t.get("show", !0)) {
  28983. var n = t.get("align");
  28984. n && "auto" !== n || (n = "right" === t.get("left") && "vertical" === t.get("orient") ? "right" : "left"),
  28985. this.renderInner(n, t, e, i);
  28986. var o = t.getBoxLayoutParams()
  28987. , r = {
  28988. width: i.getWidth(),
  28989. height: i.getHeight()
  28990. }
  28991. , s = t.get("padding")
  28992. , l = Yo(o, r, s)
  28993. , h = this.layoutInner(t, n, l)
  28994. , u = Yo(a({
  28995. width: h.width,
  28996. height: h.height
  28997. }, o), r, s);
  28998. this.group.attr("position", [u.x - h.x, u.y - h.y]),
  28999. this.group.add(this._backgroundEl = Sg(h, t))
  29000. }
  29001. },
  29002. resetInner: function() {
  29003. this.getContentGroup().removeAll(),
  29004. this._backgroundEl && this.group.remove(this._backgroundEl)
  29005. },
  29006. renderInner: function(t, e, i, n) {
  29007. var o = this.getContentGroup()
  29008. , a = O()
  29009. , r = e.get("selectedMode");
  29010. IC(e.getData(), function(s, l) {
  29011. var h = s.get("name");
  29012. if (this.newlineDisabled || "" !== h && "\n" !== h) {
  29013. var u = i.getSeriesByName(h)[0];
  29014. if (!a.get(h))
  29015. if (u) {
  29016. var c = u.getData()
  29017. , d = c.getVisual("color");
  29018. "function" == typeof d && (d = d(u.getDataParams(0)));
  29019. var f = c.getVisual("legendSymbol") || "roundRect"
  29020. , g = c.getVisual("symbol");
  29021. this._createItem(h, l, s, e, f, g, t, d, r).on("click", MC(Mg, h, n)).on("mouseover", MC(Ig, u, null, n)).on("mouseout", MC(Tg, u, null, n)),
  29022. a.set(h, !0)
  29023. } else
  29024. i.eachRawSeries(function(i) {
  29025. if (!a.get(h) && i.legendDataProvider) {
  29026. var o = i.legendDataProvider()
  29027. , u = o.indexOfName(h);
  29028. if (u < 0)
  29029. return;
  29030. var c = o.getItemVisual(u, "color");
  29031. this._createItem(h, l, s, e, "roundRect", null, t, c, r).on("click", MC(Mg, h, n)).on("mouseover", MC(Ig, i, h, n)).on("mouseout", MC(Tg, i, h, n)),
  29032. a.set(h, !0)
  29033. }
  29034. }, this)
  29035. } else
  29036. o.add(new TC({
  29037. newline: !0
  29038. }))
  29039. }, this)
  29040. },
  29041. _createItem: function(t, e, i, n, a, r, s, l, h) {
  29042. var u = n.get("itemWidth")
  29043. , c = n.get("itemHeight")
  29044. , d = n.get("inactiveColor")
  29045. , f = n.isSelected(t)
  29046. , g = new TC
  29047. , p = i.getModel("textStyle")
  29048. , m = i.get("icon")
  29049. , v = i.getModel("tooltip")
  29050. , y = v.parentModel;
  29051. if (a = m || a,
  29052. g.add(Gr(a, 0, 0, u, c, f ? l : d, !0)),
  29053. !m && r && (r !== a || "none" == r)) {
  29054. var x = .8 * c;
  29055. "none" === r && (r = "circle"),
  29056. g.add(Gr(r, (u - x) / 2, (c - x) / 2, x, x, f ? l : d))
  29057. }
  29058. var _ = "left" === s ? u + 5 : -5
  29059. , b = s
  29060. , w = n.get("formatter")
  29061. , S = t;
  29062. "string" == typeof w && w ? S = w.replace("{name}", null != t ? t : "") : "function" == typeof w && (S = w(t)),
  29063. g.add(new ab({
  29064. style: uo({}, p, {
  29065. text: S,
  29066. x: _,
  29067. y: c / 2,
  29068. textFill: f ? p.getTextColor() : d,
  29069. textAlign: b,
  29070. textVerticalAlign: "middle"
  29071. })
  29072. }));
  29073. var M = new pb({
  29074. shape: g.getBoundingRect(),
  29075. invisible: !0,
  29076. tooltip: v.get("show") ? o({
  29077. content: t,
  29078. formatter: y.get("formatter", !0) || function() {
  29079. return t
  29080. }
  29081. ,
  29082. formatterParams: {
  29083. componentType: "legend",
  29084. legendIndex: n.componentIndex,
  29085. name: t,
  29086. $vars: ["name"]
  29087. }
  29088. }, v.option) : null
  29089. });
  29090. return g.add(M),
  29091. g.eachChild(function(t) {
  29092. t.silent = !0
  29093. }),
  29094. M.silent = !h,
  29095. this.getContentGroup().add(g),
  29096. lo(g),
  29097. g.__legendDataIndex = e,
  29098. g
  29099. },
  29100. layoutInner: function(t, e, i) {
  29101. var n = this.getContentGroup();
  29102. Ub(t.get("orient"), n, t.get("itemGap"), i.width, i.height);
  29103. var o = n.getBoundingRect();
  29104. return n.attr("position", [-o.x, -o.y]),
  29105. this.group.getBoundingRect()
  29106. }
  29107. });
  29108. tr(function(t) {
  29109. var e = t.findComponents({
  29110. mainType: "legend"
  29111. });
  29112. e && e.length && t.filterSeries(function(t) {
  29113. for (var i = 0; i < e.length; i++)
  29114. if (!e[i].isSelected(t.name))
  29115. return !1;
  29116. return !0
  29117. })
  29118. }),
  29119. qb.registerSubTypeDefaulter("legend", function() {
  29120. return "plain"
  29121. });
  29122. var CC = SC.extend({
  29123. type: "legend.scroll",
  29124. setScrollDataIndex: function(t) {
  29125. this.option.scrollDataIndex = t
  29126. },
  29127. defaultOption: {
  29128. scrollDataIndex: 0,
  29129. pageButtonItemGap: 5,
  29130. pageButtonGap: null,
  29131. pageButtonPosition: "end",
  29132. pageFormatter: "{current}/{total}",
  29133. pageIcons: {
  29134. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  29135. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  29136. },
  29137. pageIconColor: "#2f4554",
  29138. pageIconInactiveColor: "#aaa",
  29139. pageIconSize: 15,
  29140. pageTextStyle: {
  29141. color: "#333"
  29142. },
  29143. animationDurationUpdate: 800
  29144. },
  29145. init: function(t, e, i, n) {
  29146. var o = Qo(t);
  29147. CC.superCall(this, "init", t, e, i, n),
  29148. Ag(this, t, o)
  29149. },
  29150. mergeOption: function(t, e) {
  29151. CC.superCall(this, "mergeOption", t, e),
  29152. Ag(this, this.option, t)
  29153. },
  29154. getOrient: function() {
  29155. return "vertical" === this.get("orient") ? {
  29156. index: 1,
  29157. name: "vertical"
  29158. } : {
  29159. index: 0,
  29160. name: "horizontal"
  29161. }
  29162. }
  29163. })
  29164. , DC = $y
  29165. , LC = ["width", "height"]
  29166. , kC = ["x", "y"]
  29167. , PC = AC.extend({
  29168. type: "legend.scroll",
  29169. newlineDisabled: !0,
  29170. init: function() {
  29171. PC.superCall(this, "init"),
  29172. this._currentIndex = 0,
  29173. this.group.add(this._containerGroup = new DC),
  29174. this._containerGroup.add(this.getContentGroup()),
  29175. this.group.add(this._controllerGroup = new DC),
  29176. this._showController
  29177. },
  29178. resetInner: function() {
  29179. PC.superCall(this, "resetInner"),
  29180. this._controllerGroup.removeAll(),
  29181. this._containerGroup.removeClipPath(),
  29182. this._containerGroup.__rectSize = null
  29183. },
  29184. renderInner: function(t, e, i, n) {
  29185. function o(t, i) {
  29186. var o = t + "DataIndex"
  29187. , l = Ao(e.get("pageIcons", !0)[e.getOrient().name][i], {
  29188. onclick: p(a._pageGo, a, o, e, n)
  29189. }, {
  29190. x: -s[0] / 2,
  29191. y: -s[1] / 2,
  29192. width: s[0],
  29193. height: s[1]
  29194. });
  29195. l.name = t,
  29196. r.add(l)
  29197. }
  29198. var a = this;
  29199. PC.superCall(this, "renderInner", t, e, i, n);
  29200. var r = this._controllerGroup
  29201. , s = e.get("pageIconSize", !0);
  29202. v(s) || (s = [s, s]),
  29203. o("pagePrev", 0);
  29204. var l = e.getModel("pageTextStyle");
  29205. r.add(new ab({
  29206. name: "pageText",
  29207. style: {
  29208. textFill: l.getTextColor(),
  29209. font: l.getFont(),
  29210. textVerticalAlign: "middle",
  29211. textAlign: "center"
  29212. },
  29213. silent: !0
  29214. })),
  29215. o("pageNext", 1)
  29216. },
  29217. layoutInner: function(t, e, i) {
  29218. var n = this.getContentGroup()
  29219. , o = this._containerGroup
  29220. , a = this._controllerGroup
  29221. , r = t.getOrient().index
  29222. , s = LC[r]
  29223. , l = LC[1 - r]
  29224. , h = kC[1 - r];
  29225. Ub(t.get("orient"), n, t.get("itemGap"), r ? i.width : null, r ? null : i.height),
  29226. Ub("horizontal", a, t.get("pageButtonItemGap", !0));
  29227. var u = n.getBoundingRect()
  29228. , c = a.getBoundingRect()
  29229. , d = this._showController = u[s] > i[s]
  29230. , f = [-u.x, -u.y];
  29231. f[r] = n.position[r];
  29232. var g = [0, 0]
  29233. , p = [-c.x, -c.y]
  29234. , m = I(t.get("pageButtonGap", !0), t.get("itemGap", !0));
  29235. d && ("end" === t.get("pageButtonPosition", !0) ? p[r] += i[s] - c[s] : g[r] += c[s] + m),
  29236. p[1 - r] += u[l] / 2 - c[l] / 2,
  29237. n.attr("position", f),
  29238. o.attr("position", g),
  29239. a.attr("position", p);
  29240. var v = this.group.getBoundingRect();
  29241. if ((v = {
  29242. x: 0,
  29243. y: 0
  29244. })[s] = d ? i[s] : u[s],
  29245. v[l] = Math.max(u[l], c[l]),
  29246. v[h] = Math.min(0, c[h] + p[1 - r]),
  29247. o.__rectSize = i[s],
  29248. d) {
  29249. var y = {
  29250. x: 0,
  29251. y: 0
  29252. };
  29253. y[s] = Math.max(i[s] - c[s] - m, 0),
  29254. y[l] = v[l],
  29255. o.setClipPath(new pb({
  29256. shape: y
  29257. })),
  29258. o.__rectSize = y[s]
  29259. } else
  29260. a.eachChild(function(t) {
  29261. t.attr({
  29262. invisible: !0,
  29263. silent: !0
  29264. })
  29265. });
  29266. var x = this._getPageInfo(t);
  29267. return null != x.pageIndex && _o(n, {
  29268. position: x.contentPosition
  29269. }, !!d && t),
  29270. this._updatePageInfoView(t, x),
  29271. v
  29272. },
  29273. _pageGo: function(t, e, i) {
  29274. var n = this._getPageInfo(e)[t];
  29275. null != n && i.dispatchAction({
  29276. type: "legendScroll",
  29277. scrollDataIndex: n,
  29278. legendId: e.id
  29279. })
  29280. },
  29281. _updatePageInfoView: function(t, e) {
  29282. var i = this._controllerGroup;
  29283. c(["pagePrev", "pageNext"], function(n) {
  29284. var o = null != e[n + "DataIndex"]
  29285. , a = i.childOfName(n);
  29286. a && (a.setStyle("fill", o ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)),
  29287. a.cursor = o ? "pointer" : "default")
  29288. });
  29289. var n = i.childOfName("pageText")
  29290. , o = t.get("pageFormatter")
  29291. , a = e.pageIndex
  29292. , r = null != a ? a + 1 : 0
  29293. , s = e.pageCount;
  29294. n && o && n.setStyle("text", x(o) ? o.replace("{current}", r).replace("{total}", s) : o({
  29295. current: r,
  29296. total: s
  29297. }))
  29298. },
  29299. _getPageInfo: function(t) {
  29300. function e(t) {
  29301. var e = t.getBoundingRect().clone();
  29302. return e[f] += t.position[u],
  29303. e
  29304. }
  29305. var i, n, o, a, r = t.get("scrollDataIndex", !0), s = this.getContentGroup(), l = s.getBoundingRect(), h = this._containerGroup.__rectSize, u = t.getOrient().index, c = LC[u], d = LC[1 - u], f = kC[u], g = s.position.slice();
  29306. this._showController ? s.eachChild(function(t) {
  29307. t.__legendDataIndex === r && (a = t)
  29308. }) : a = s.childAt(0);
  29309. var p = h ? Math.ceil(l[c] / h) : 0;
  29310. if (a) {
  29311. var m = a.getBoundingRect()
  29312. , v = a.position[u] + m[f];
  29313. g[u] = -v - l[f],
  29314. i = Math.floor(p * (v + m[f] + h / 2) / l[c]),
  29315. i = l[c] && p ? Math.max(0, Math.min(p - 1, i)) : -1;
  29316. var y = {
  29317. x: 0,
  29318. y: 0
  29319. };
  29320. y[c] = h,
  29321. y[d] = l[d],
  29322. y[f] = -g[u] - l[f];
  29323. var x, _ = s.children();
  29324. if (s.eachChild(function(t, i) {
  29325. var n = e(t);
  29326. n.intersect(y) && (null == x && (x = i),
  29327. o = t.__legendDataIndex),
  29328. i === _.length - 1 && n[f] + n[c] <= y[f] + y[c] && (o = null)
  29329. }),
  29330. null != x) {
  29331. var b = e(_[x]);
  29332. if (y[f] = b[f] + b[c] - y[c],
  29333. x <= 0 && b[f] >= y[f])
  29334. n = null;
  29335. else {
  29336. for (; x > 0 && e(_[x - 1]).intersect(y); )
  29337. x--;
  29338. n = _[x].__legendDataIndex
  29339. }
  29340. }
  29341. }
  29342. return {
  29343. contentPosition: g,
  29344. pageIndex: i,
  29345. pageCount: p,
  29346. pagePrevDataIndex: n,
  29347. pageNextDataIndex: o
  29348. }
  29349. }
  29350. });
  29351. er("legendScroll", "legendscroll", function(t, e) {
  29352. var i = t.scrollDataIndex;
  29353. null != i && e.eachComponent({
  29354. mainType: "legend",
  29355. subType: "scroll",
  29356. query: t
  29357. }, function(t) {
  29358. t.setScrollDataIndex(i)
  29359. })
  29360. }),
  29361. rr({
  29362. type: "tooltip",
  29363. dependencies: ["axisPointer"],
  29364. defaultOption: {
  29365. zlevel: 0,
  29366. z: 8,
  29367. show: !0,
  29368. showContent: !0,
  29369. trigger: "item",
  29370. triggerOn: "mousemove|click",
  29371. alwaysShowContent: !1,
  29372. displayMode: "single",
  29373. confine: !1,
  29374. showDelay: 0,
  29375. hideDelay: 100,
  29376. transitionDuration: .4,
  29377. enterable: !1,
  29378. backgroundColor: "rgba(50,50,50,0.7)",
  29379. borderColor: "#333",
  29380. borderRadius: 4,
  29381. borderWidth: 0,
  29382. padding: 5,
  29383. extraCssText: "",
  29384. axisPointer: {
  29385. type: "line",
  29386. axis: "auto",
  29387. animation: "auto",
  29388. animationDurationUpdate: 200,
  29389. animationEasingUpdate: "exponentialOut",
  29390. crossStyle: {
  29391. color: "#999",
  29392. width: 1,
  29393. type: "dashed",
  29394. textStyle: {}
  29395. }
  29396. },
  29397. textStyle: {
  29398. color: "#fff",
  29399. fontSize: 14
  29400. }
  29401. }
  29402. });
  29403. var OC = c
  29404. , zC = Ri
  29405. , NC = ["", "-webkit-", "-moz-", "-o-"];
  29406. kg.prototype = {
  29407. constructor: kg,
  29408. _enterable: !0,
  29409. update: function() {
  29410. var t = this._container
  29411. , e = t.currentStyle || document.defaultView.getComputedStyle(t)
  29412. , i = t.style;
  29413. "absolute" !== i.position && "absolute" !== e.position && (i.position = "relative")
  29414. },
  29415. show: function(t) {
  29416. clearTimeout(this._hideTimeout);
  29417. var e = this.el;
  29418. e.style.cssText = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + Lg(t) + ";left:" + this._x + "px;top:" + this._y + "px;" + (t.get("extraCssText") || ""),
  29419. e.style.display = e.innerHTML ? "block" : "none",
  29420. this._show = !0
  29421. },
  29422. setContent: function(t) {
  29423. this.el.innerHTML = null == t ? "" : t
  29424. },
  29425. setEnterable: function(t) {
  29426. this._enterable = t
  29427. },
  29428. getSize: function() {
  29429. var t = this.el;
  29430. return [t.clientWidth, t.clientHeight]
  29431. },
  29432. moveTo: function(t, e) {
  29433. var i, n = this._zr;
  29434. n && n.painter && (i = n.painter.getViewportRootOffset()) && (t += i.offsetLeft,
  29435. e += i.offsetTop);
  29436. var o = this.el.style;
  29437. o.left = t + "px",
  29438. o.top = e + "px",
  29439. this._x = t,
  29440. this._y = e
  29441. },
  29442. hide: function() {
  29443. this.el.style.display = "none",
  29444. this._show = !1
  29445. },
  29446. hideLater: function(t) {
  29447. !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t,
  29448. this._show = !1,
  29449. this._hideTimeout = setTimeout(p(this.hide, this), t)) : this.hide())
  29450. },
  29451. isShow: function() {
  29452. return this._show
  29453. }
  29454. };
  29455. var EC = p
  29456. , RC = c
  29457. , VC = bi
  29458. , BC = new pb({
  29459. shape: {
  29460. x: -1,
  29461. y: -1,
  29462. width: 2,
  29463. height: 2
  29464. }
  29465. });
  29466. sr({
  29467. type: "tooltip",
  29468. init: function(t, e) {
  29469. if (!Yv.node) {
  29470. var i = new kg(e.getDom(),e);
  29471. this._tooltipContent = i
  29472. }
  29473. },
  29474. render: function(t, e, i) {
  29475. if (!Yv.node) {
  29476. this.group.removeAll(),
  29477. this._tooltipModel = t,
  29478. this._ecModel = e,
  29479. this._api = i,
  29480. this._lastDataByCoordSys = null,
  29481. this._alwaysShowContent = t.get("alwaysShowContent");
  29482. var n = this._tooltipContent;
  29483. n.update(),
  29484. n.setEnterable(t.get("enterable")),
  29485. this._initGlobalListener(),
  29486. this._keepShow()
  29487. }
  29488. },
  29489. _initGlobalListener: function() {
  29490. var t = this._tooltipModel.get("triggerOn");
  29491. Mf("itemTooltip", this._api, EC(function(e, i, n) {
  29492. "none" !== t && (t.indexOf(e) >= 0 ? this._tryShow(i, n) : "leave" === e && this._hide(n))
  29493. }, this))
  29494. },
  29495. _keepShow: function() {
  29496. var t = this._tooltipModel
  29497. , e = this._ecModel
  29498. , i = this._api;
  29499. if (null != this._lastX && null != this._lastY && "none" !== t.get("triggerOn")) {
  29500. var n = this;
  29501. clearTimeout(this._refreshUpdateTimeout),
  29502. this._refreshUpdateTimeout = setTimeout(function() {
  29503. n.manuallyShowTip(t, e, i, {
  29504. x: n._lastX,
  29505. y: n._lastY
  29506. })
  29507. })
  29508. }
  29509. },
  29510. manuallyShowTip: function(t, e, i, n) {
  29511. if (n.from !== this.uid && !Yv.node) {
  29512. var o = Og(n, i);
  29513. this._ticket = "";
  29514. var a = n.dataByCoordSys;
  29515. if (n.tooltip && null != n.x && null != n.y) {
  29516. var r = BC;
  29517. r.position = [n.x, n.y],
  29518. r.update(),
  29519. r.tooltip = n.tooltip,
  29520. this._tryShow({
  29521. offsetX: n.x,
  29522. offsetY: n.y,
  29523. target: r
  29524. }, o)
  29525. } else if (a)
  29526. this._tryShow({
  29527. offsetX: n.x,
  29528. offsetY: n.y,
  29529. position: n.position,
  29530. event: {},
  29531. dataByCoordSys: n.dataByCoordSys,
  29532. tooltipOption: n.tooltipOption
  29533. }, o);
  29534. else if (null != n.seriesIndex) {
  29535. if (this._manuallyAxisShowTip(t, e, i, n))
  29536. return;
  29537. var s = QA(n, e)
  29538. , l = s.point[0]
  29539. , h = s.point[1];
  29540. null != l && null != h && this._tryShow({
  29541. offsetX: l,
  29542. offsetY: h,
  29543. position: n.position,
  29544. target: s.el,
  29545. event: {}
  29546. }, o)
  29547. } else
  29548. null != n.x && null != n.y && (i.dispatchAction({
  29549. type: "updateAxisPointer",
  29550. x: n.x,
  29551. y: n.y
  29552. }),
  29553. this._tryShow({
  29554. offsetX: n.x,
  29555. offsetY: n.y,
  29556. position: n.position,
  29557. target: i.getZr().findHover(n.x, n.y).target,
  29558. event: {}
  29559. }, o))
  29560. }
  29561. },
  29562. manuallyHideTip: function(t, e, i, n) {
  29563. var o = this._tooltipContent;
  29564. this._alwaysShowContent || o.hideLater(this._tooltipModel.get("hideDelay")),
  29565. this._lastX = this._lastY = null,
  29566. n.from !== this.uid && this._hide(Og(n, i))
  29567. },
  29568. _manuallyAxisShowTip: function(t, e, i, n) {
  29569. var o = n.seriesIndex
  29570. , a = n.dataIndex
  29571. , r = e.getComponent("axisPointer").coordSysAxesInfo;
  29572. if (null != o && null != a && null != r) {
  29573. var s = e.getSeriesByIndex(o);
  29574. if (s && "axis" === (t = Pg([s.getData().getItemModel(a), s, (s.coordinateSystem || {}).model, t])).get("trigger"))
  29575. return i.dispatchAction({
  29576. type: "updateAxisPointer",
  29577. seriesIndex: o,
  29578. dataIndex: a,
  29579. position: n.position
  29580. }),
  29581. !0
  29582. }
  29583. },
  29584. _tryShow: function(t, e) {
  29585. var i = t.target;
  29586. if (this._tooltipModel) {
  29587. this._lastX = t.offsetX,
  29588. this._lastY = t.offsetY;
  29589. var n = t.dataByCoordSys;
  29590. n && n.length ? this._showAxisTooltip(n, t) : i && null != i.dataIndex ? (this._lastDataByCoordSys = null,
  29591. this._showSeriesItemTooltip(t, i, e)) : i && i.tooltip ? (this._lastDataByCoordSys = null,
  29592. this._showComponentItemTooltip(t, i, e)) : (this._lastDataByCoordSys = null,
  29593. this._hide(e))
  29594. }
  29595. },
  29596. _showOrMove: function(t, e) {
  29597. var i = t.get("showDelay");
  29598. e = p(e, this),
  29599. clearTimeout(this._showTimout),
  29600. i > 0 ? this._showTimout = setTimeout(e, i) : e()
  29601. },
  29602. _showAxisTooltip: function(t, e) {
  29603. var i = this._ecModel
  29604. , n = this._tooltipModel
  29605. , o = [e.offsetX, e.offsetY]
  29606. , a = []
  29607. , r = []
  29608. , s = Pg([e.tooltipOption, n]);
  29609. RC(t, function(t) {
  29610. RC(t.dataByAxis, function(t) {
  29611. var e = i.getComponent(t.axisDim + "Axis", t.axisIndex)
  29612. , n = t.value
  29613. , o = [];
  29614. if (e && null != n) {
  29615. var s = Gf(n, e.axis, i, t.seriesDataIndices, t.valueLabelOpt);
  29616. c(t.seriesDataIndices, function(a) {
  29617. var l = i.getSeriesByIndex(a.seriesIndex)
  29618. , h = a.dataIndexInside
  29619. , u = l && l.getDataParams(h);
  29620. u.axisDim = t.axisDim,
  29621. u.axisIndex = t.axisIndex,
  29622. u.axisType = t.axisType,
  29623. u.axisId = t.axisId,
  29624. u.axisValue = Rr(e.axis, n),
  29625. u.axisValueLabel = s,
  29626. u && (r.push(u),
  29627. o.push(l.formatTooltip(h, !0)))
  29628. });
  29629. var l = s;
  29630. a.push((l ? Vi(l) + "<br />" : "") + o.join("<br />"))
  29631. }
  29632. })
  29633. }, this),
  29634. a.reverse(),
  29635. a = a.join("<br /><br />");
  29636. var l = e.position;
  29637. this._showOrMove(s, function() {
  29638. this._updateContentNotChangedOnAxis(t) ? this._updatePosition(s, l, o[0], o[1], this._tooltipContent, r) : this._showTooltipContent(s, a, r, Math.random(), o[0], o[1], l)
  29639. })
  29640. },
  29641. _showSeriesItemTooltip: function(t, e, i) {
  29642. var n = this._ecModel
  29643. , o = e.seriesIndex
  29644. , a = n.getSeriesByIndex(o)
  29645. , r = e.dataModel || a
  29646. , s = e.dataIndex
  29647. , l = e.dataType
  29648. , h = r.getData()
  29649. , u = Pg([h.getItemModel(s), r, a && (a.coordinateSystem || {}).model, this._tooltipModel])
  29650. , c = u.get("trigger");
  29651. if (null == c || "item" === c) {
  29652. var d = r.getDataParams(s, l)
  29653. , f = r.formatTooltip(s, !1, l)
  29654. , g = "item_" + r.name + "_" + s;
  29655. this._showOrMove(u, function() {
  29656. this._showTooltipContent(u, f, d, g, t.offsetX, t.offsetY, t.position, t.target)
  29657. }),
  29658. i({
  29659. type: "showTip",
  29660. dataIndexInside: s,
  29661. dataIndex: h.getRawIndex(s),
  29662. seriesIndex: o,
  29663. from: this.uid
  29664. })
  29665. }
  29666. },
  29667. _showComponentItemTooltip: function(t, e, i) {
  29668. var n = e.tooltip;
  29669. if ("string" == typeof n) {
  29670. var o = n;
  29671. n = {
  29672. content: o,
  29673. formatter: o
  29674. }
  29675. }
  29676. var a = new Co(n,this._tooltipModel,this._ecModel)
  29677. , r = a.get("content")
  29678. , s = Math.random();
  29679. this._showOrMove(a, function() {
  29680. this._showTooltipContent(a, r, a.get("formatterParams") || {}, s, t.offsetX, t.offsetY, t.position, e)
  29681. }),
  29682. i({
  29683. type: "showTip",
  29684. from: this.uid
  29685. })
  29686. },
  29687. _showTooltipContent: function(t, e, i, n, o, a, r, s) {
  29688. if (this._ticket = "",
  29689. t.get("showContent") && t.get("show")) {
  29690. var l = this._tooltipContent
  29691. , h = t.get("formatter");
  29692. r = r || t.get("position");
  29693. var u = e;
  29694. if (h && "string" == typeof h)
  29695. u = Bi(h, i, !0);
  29696. else if ("function" == typeof h) {
  29697. var c = EC(function(e, n) {
  29698. e === this._ticket && (l.setContent(n),
  29699. this._updatePosition(t, r, o, a, l, i, s))
  29700. }, this);
  29701. this._ticket = n,
  29702. u = h(i, n, c)
  29703. }
  29704. l.setContent(u),
  29705. l.show(t),
  29706. this._updatePosition(t, r, o, a, l, i, s)
  29707. }
  29708. },
  29709. _updatePosition: function(t, e, i, n, o, a, r) {
  29710. var s = this._api.getWidth()
  29711. , l = this._api.getHeight();
  29712. e = e || t.get("position");
  29713. var h = o.getSize()
  29714. , u = t.get("align")
  29715. , c = t.get("verticalAlign")
  29716. , d = r && r.getBoundingRect().clone();
  29717. if (r && d.applyTransform(r.transform),
  29718. "function" == typeof e && (e = e([i, n], a, o.el, d, {
  29719. viewSize: [s, l],
  29720. contentSize: h.slice()
  29721. })),
  29722. v(e))
  29723. i = VC(e[0], s),
  29724. n = VC(e[1], l);
  29725. else if (_(e)) {
  29726. e.width = h[0],
  29727. e.height = h[1];
  29728. var f = Yo(e, {
  29729. width: s,
  29730. height: l
  29731. });
  29732. i = f.x,
  29733. n = f.y,
  29734. u = null,
  29735. c = null
  29736. } else
  29737. "string" == typeof e && r ? (i = (g = Rg(e, d, h))[0],
  29738. n = g[1]) : (i = (g = zg(i, n, o.el, s, l, u ? null : 20, c ? null : 20))[0],
  29739. n = g[1]);
  29740. if (u && (i -= Vg(u) ? h[0] / 2 : "right" === u ? h[0] : 0),
  29741. c && (n -= Vg(c) ? h[1] / 2 : "bottom" === c ? h[1] : 0),
  29742. t.get("confine")) {
  29743. var g = Ng(i, n, o.el, s, l);
  29744. i = g[0],
  29745. n = g[1]
  29746. }
  29747. o.moveTo(i, n)
  29748. },
  29749. _updateContentNotChangedOnAxis: function(t) {
  29750. var e = this._lastDataByCoordSys
  29751. , i = !!e && e.length === t.length;
  29752. return i && RC(e, function(e, n) {
  29753. var o = e.dataByAxis || {}
  29754. , a = (t[n] || {}).dataByAxis || [];
  29755. (i &= o.length === a.length) && RC(o, function(t, e) {
  29756. var n = a[e] || {}
  29757. , o = t.seriesDataIndices || []
  29758. , r = n.seriesDataIndices || [];
  29759. (i &= t.value === n.value && t.axisType === n.axisType && t.axisId === n.axisId && o.length === r.length) && RC(o, function(t, e) {
  29760. var n = r[e];
  29761. i &= t.seriesIndex === n.seriesIndex && t.dataIndex === n.dataIndex
  29762. })
  29763. })
  29764. }),
  29765. this._lastDataByCoordSys = t,
  29766. !!i
  29767. },
  29768. _hide: function(t) {
  29769. this._lastDataByCoordSys = null,
  29770. t({
  29771. type: "hideTip",
  29772. from: this.uid
  29773. })
  29774. },
  29775. dispose: function(t, e) {
  29776. Yv.node || (this._tooltipContent.hide(),
  29777. Lf("itemTooltip", e))
  29778. }
  29779. }),
  29780. er({
  29781. type: "showTip",
  29782. event: "showTip",
  29783. update: "tooltip:manuallyShowTip"
  29784. }, function() {}),
  29785. er({
  29786. type: "hideTip",
  29787. event: "hideTip",
  29788. update: "tooltip:manuallyHideTip"
  29789. }, function() {}),
  29790. Hg.prototype = {
  29791. constructor: Hg,
  29792. pointToData: function(t, e) {
  29793. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  29794. },
  29795. dataToRadius: YS.prototype.dataToCoord,
  29796. radiusToData: YS.prototype.coordToData
  29797. },
  29798. l(Hg, YS),
  29799. Fg.prototype = {
  29800. constructor: Fg,
  29801. pointToData: function(t, e) {
  29802. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  29803. },
  29804. dataToAngle: YS.prototype.dataToCoord,
  29805. angleToData: YS.prototype.coordToData
  29806. },
  29807. l(Fg, YS);
  29808. var GC = function(t) {
  29809. this.name = t || "",
  29810. this.cx = 0,
  29811. this.cy = 0,
  29812. this._radiusAxis = new Hg,
  29813. this._angleAxis = new Fg,
  29814. this._radiusAxis.polar = this._angleAxis.polar = this
  29815. };
  29816. GC.prototype = {
  29817. type: "polar",
  29818. axisPointerEnabled: !0,
  29819. constructor: GC,
  29820. dimensions: ["radius", "angle"],
  29821. model: null,
  29822. containPoint: function(t) {
  29823. var e = this.pointToCoord(t);
  29824. return this._radiusAxis.contain(e[0]) && this._angleAxis.contain(e[1])
  29825. },
  29826. containData: function(t) {
  29827. return this._radiusAxis.containData(t[0]) && this._angleAxis.containData(t[1])
  29828. },
  29829. getAxis: function(t) {
  29830. return this["_" + t + "Axis"]
  29831. },
  29832. getAxes: function() {
  29833. return [this._radiusAxis, this._angleAxis]
  29834. },
  29835. getAxesByScale: function(t) {
  29836. var e = []
  29837. , i = this._angleAxis
  29838. , n = this._radiusAxis;
  29839. return i.scale.type === t && e.push(i),
  29840. n.scale.type === t && e.push(n),
  29841. e
  29842. },
  29843. getAngleAxis: function() {
  29844. return this._angleAxis
  29845. },
  29846. getRadiusAxis: function() {
  29847. return this._radiusAxis
  29848. },
  29849. getOtherAxis: function(t) {
  29850. var e = this._angleAxis;
  29851. return t === e ? this._radiusAxis : e
  29852. },
  29853. getBaseAxis: function() {
  29854. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis()
  29855. },
  29856. getTooltipAxes: function(t) {
  29857. var e = null != t && "auto" !== t ? this.getAxis(t) : this.getBaseAxis();
  29858. return {
  29859. baseAxes: [e],
  29860. otherAxes: [this.getOtherAxis(e)]
  29861. }
  29862. },
  29863. dataToPoint: function(t, e) {
  29864. return this.coordToPoint([this._radiusAxis.dataToRadius(t[0], e), this._angleAxis.dataToAngle(t[1], e)])
  29865. },
  29866. pointToData: function(t, e) {
  29867. var i = this.pointToCoord(t);
  29868. return [this._radiusAxis.radiusToData(i[0], e), this._angleAxis.angleToData(i[1], e)]
  29869. },
  29870. pointToCoord: function(t) {
  29871. var e = t[0] - this.cx
  29872. , i = t[1] - this.cy
  29873. , n = this.getAngleAxis()
  29874. , o = n.getExtent()
  29875. , a = Math.min(o[0], o[1])
  29876. , r = Math.max(o[0], o[1]);
  29877. n.inverse ? a = r - 360 : r = a + 360;
  29878. var s = Math.sqrt(e * e + i * i);
  29879. e /= s,
  29880. i /= s;
  29881. for (var l = Math.atan2(-i, e) / Math.PI * 180, h = l < a ? 1 : -1; l < a || l > r; )
  29882. l += 360 * h;
  29883. return [s, l]
  29884. },
  29885. coordToPoint: function(t) {
  29886. var e = t[0]
  29887. , i = t[1] / 180 * Math.PI;
  29888. return [Math.cos(i) * e + this.cx, -Math.sin(i) * e + this.cy]
  29889. }
  29890. };
  29891. var WC = qb.extend({
  29892. type: "polarAxis",
  29893. axis: null,
  29894. getCoordSysModel: function() {
  29895. return this.ecModel.queryComponents({
  29896. mainType: "polar",
  29897. index: this.option.polarIndex,
  29898. id: this.option.polarId
  29899. })[0]
  29900. }
  29901. });
  29902. i(WC.prototype, VS);
  29903. var HC = {
  29904. angle: {
  29905. startAngle: 90,
  29906. clockwise: !0,
  29907. splitNumber: 12,
  29908. axisLabel: {
  29909. rotate: !1
  29910. }
  29911. },
  29912. radius: {
  29913. splitNumber: 5
  29914. }
  29915. };
  29916. IM("angle", WC, Zg, HC.angle),
  29917. IM("radius", WC, Zg, HC.radius),
  29918. rr({
  29919. type: "polar",
  29920. dependencies: ["polarAxis", "angleAxis"],
  29921. coordinateSystem: null,
  29922. findAxisModel: function(t) {
  29923. var e;
  29924. return this.ecModel.eachComponent(t, function(t) {
  29925. t.getCoordSysModel() === this && (e = t)
  29926. }, this),
  29927. e
  29928. },
  29929. defaultOption: {
  29930. zlevel: 0,
  29931. z: 0,
  29932. center: ["50%", "50%"],
  29933. radius: "80%"
  29934. }
  29935. });
  29936. var FC = {
  29937. dimensions: GC.prototype.dimensions,
  29938. create: function(t, e) {
  29939. var i = [];
  29940. return t.eachComponent("polar", function(t, n) {
  29941. var o = new GC(n);
  29942. o.update = jg;
  29943. var a = o.getRadiusAxis()
  29944. , r = o.getAngleAxis()
  29945. , s = t.findAxisModel("radiusAxis")
  29946. , l = t.findAxisModel("angleAxis");
  29947. Xg(a, s),
  29948. Xg(r, l),
  29949. Ug(o, t, e),
  29950. i.push(o),
  29951. t.coordinateSystem = o,
  29952. o.model = t
  29953. }),
  29954. t.eachSeries(function(e) {
  29955. if ("polar" === e.get("coordinateSystem")) {
  29956. var i = t.queryComponents({
  29957. mainType: "polar",
  29958. index: e.get("polarIndex"),
  29959. id: e.get("polarId")
  29960. })[0];
  29961. e.coordinateSystem = i.coordinateSystem
  29962. }
  29963. }),
  29964. i
  29965. }
  29966. };
  29967. ha.register("polar", FC);
  29968. var ZC = ["axisLine", "axisLabel", "axisTick", "splitLine", "splitArea"];
  29969. WM.extend({
  29970. type: "angleAxis",
  29971. axisPointerClass: "PolarAxisPointer",
  29972. render: function(t, e) {
  29973. if (this.group.removeAll(),
  29974. t.get("show")) {
  29975. var i = t.axis
  29976. , n = i.polar
  29977. , o = n.getRadiusAxis().getExtent()
  29978. , a = i.getTicksCoords();
  29979. "category" !== i.type && a.pop(),
  29980. c(ZC, function(e) {
  29981. !t.get(e + ".show") || i.scale.isBlank() && "axisLine" !== e || this["_" + e](t, n, a, o)
  29982. }, this)
  29983. }
  29984. },
  29985. _axisLine: function(t, e, i, n) {
  29986. var o = t.getModel("axisLine.lineStyle")
  29987. , a = new rb({
  29988. shape: {
  29989. cx: e.cx,
  29990. cy: e.cy,
  29991. r: n[Yg(e)]
  29992. },
  29993. style: o.getLineStyle(),
  29994. z2: 1,
  29995. silent: !0
  29996. });
  29997. a.style.fill = null,
  29998. this.group.add(a)
  29999. },
  30000. _axisTick: function(t, e, i, n) {
  30001. var o = t.getModel("axisTick")
  30002. , r = (o.get("inside") ? -1 : 1) * o.get("length")
  30003. , s = n[Yg(e)]
  30004. , l = d(i, function(t) {
  30005. return new mb({
  30006. shape: qg(e, [s, s + r], t)
  30007. })
  30008. });
  30009. this.group.add(Cb(l, {
  30010. style: a(o.getModel("lineStyle").getLineStyle(), {
  30011. stroke: t.get("axisLine.lineStyle.color")
  30012. })
  30013. }))
  30014. },
  30015. _axisLabel: function(t, e, i, n) {
  30016. for (var o = t.axis, a = t.get("data"), r = t.getModel("axisLabel"), s = t.getFormattedLabels(), l = r.get("margin"), h = o.getLabelsCoords(), u = 0; u < i.length; u++) {
  30017. var c = n[Yg(e)]
  30018. , d = e.coordToPoint([c + l, h[u]])
  30019. , f = e.cx
  30020. , g = e.cy
  30021. , p = Math.abs(d[0] - f) / c < .3 ? "center" : d[0] > f ? "left" : "right"
  30022. , m = Math.abs(d[1] - g) / c < .3 ? "middle" : d[1] > g ? "top" : "bottom";
  30023. a && a[u] && a[u].textStyle && (r = new Co(a[u].textStyle,r,r.ecModel));
  30024. var v = new ab({
  30025. silent: !0
  30026. });
  30027. this.group.add(v),
  30028. uo(v.style, r, {
  30029. x: d[0],
  30030. y: d[1],
  30031. textFill: r.getTextColor() || t.get("axisLine.lineStyle.color"),
  30032. text: s[u],
  30033. textAlign: p,
  30034. textVerticalAlign: m
  30035. })
  30036. }
  30037. },
  30038. _splitLine: function(t, e, i, n) {
  30039. var o = t.getModel("splitLine").getModel("lineStyle")
  30040. , r = o.get("color")
  30041. , s = 0;
  30042. r = r instanceof Array ? r : [r];
  30043. for (var l = [], h = 0; h < i.length; h++) {
  30044. var u = s++ % r.length;
  30045. l[u] = l[u] || [],
  30046. l[u].push(new mb({
  30047. shape: qg(e, n, i[h])
  30048. }))
  30049. }
  30050. for (h = 0; h < l.length; h++)
  30051. this.group.add(Cb(l[h], {
  30052. style: a({
  30053. stroke: r[h % r.length]
  30054. }, o.getLineStyle()),
  30055. silent: !0,
  30056. z: t.get("z")
  30057. }))
  30058. },
  30059. _splitArea: function(t, e, i, n) {
  30060. var o = t.getModel("splitArea").getModel("areaStyle")
  30061. , r = o.get("color")
  30062. , s = 0;
  30063. r = r instanceof Array ? r : [r];
  30064. for (var l = [], h = Math.PI / 180, u = -i[0] * h, c = Math.min(n[0], n[1]), d = Math.max(n[0], n[1]), f = t.get("clockwise"), g = 1; g < i.length; g++) {
  30065. var p = s++ % r.length;
  30066. l[p] = l[p] || [],
  30067. l[p].push(new hb({
  30068. shape: {
  30069. cx: e.cx,
  30070. cy: e.cy,
  30071. r0: c,
  30072. r: d,
  30073. startAngle: u,
  30074. endAngle: -i[g] * h,
  30075. clockwise: f
  30076. },
  30077. silent: !0
  30078. })),
  30079. u = -i[g] * h
  30080. }
  30081. for (g = 0; g < l.length; g++)
  30082. this.group.add(Cb(l[g], {
  30083. style: a({
  30084. fill: r[g % r.length]
  30085. }, o.getAreaStyle()),
  30086. silent: !0
  30087. }))
  30088. }
  30089. });
  30090. var UC = ["axisLine", "axisTickLabel", "axisName"]
  30091. , jC = ["splitLine", "splitArea"];
  30092. WM.extend({
  30093. type: "radiusAxis",
  30094. axisPointerClass: "PolarAxisPointer",
  30095. render: function(t, e) {
  30096. if (this.group.removeAll(),
  30097. t.get("show")) {
  30098. var i = t.axis
  30099. , n = i.polar
  30100. , o = n.getAngleAxis()
  30101. , a = i.getTicksCoords()
  30102. , r = o.getExtent()[0]
  30103. , s = i.getExtent()
  30104. , l = $g(n, t, r)
  30105. , h = new zM(t,l);
  30106. c(UC, h.add, h),
  30107. this.group.add(h.getGroup()),
  30108. c(jC, function(e) {
  30109. t.get(e + ".show") && !i.scale.isBlank() && this["_" + e](t, n, r, s, a)
  30110. }, this)
  30111. }
  30112. },
  30113. _splitLine: function(t, e, i, n, o) {
  30114. var r = t.getModel("splitLine").getModel("lineStyle")
  30115. , s = r.get("color")
  30116. , l = 0;
  30117. s = s instanceof Array ? s : [s];
  30118. for (var h = [], u = 0; u < o.length; u++) {
  30119. var c = l++ % s.length;
  30120. h[c] = h[c] || [],
  30121. h[c].push(new rb({
  30122. shape: {
  30123. cx: e.cx,
  30124. cy: e.cy,
  30125. r: o[u]
  30126. },
  30127. silent: !0
  30128. }))
  30129. }
  30130. for (u = 0; u < h.length; u++)
  30131. this.group.add(Cb(h[u], {
  30132. style: a({
  30133. stroke: s[u % s.length],
  30134. fill: null
  30135. }, r.getLineStyle()),
  30136. silent: !0
  30137. }))
  30138. },
  30139. _splitArea: function(t, e, i, n, o) {
  30140. var r = t.getModel("splitArea").getModel("areaStyle")
  30141. , s = r.get("color")
  30142. , l = 0;
  30143. s = s instanceof Array ? s : [s];
  30144. for (var h = [], u = o[0], c = 1; c < o.length; c++) {
  30145. var d = l++ % s.length;
  30146. h[d] = h[d] || [],
  30147. h[d].push(new hb({
  30148. shape: {
  30149. cx: e.cx,
  30150. cy: e.cy,
  30151. r0: u,
  30152. r: o[c],
  30153. startAngle: 0,
  30154. endAngle: 2 * Math.PI
  30155. },
  30156. silent: !0
  30157. })),
  30158. u = o[c]
  30159. }
  30160. for (c = 0; c < h.length; c++)
  30161. this.group.add(Cb(h[c], {
  30162. style: a({
  30163. fill: s[c % s.length]
  30164. }, r.getAreaStyle()),
  30165. silent: !0
  30166. }))
  30167. }
  30168. });
  30169. var XC = kf.extend({
  30170. makeElOption: function(t, e, i, n, o) {
  30171. var a = i.axis;
  30172. "angle" === a.dim && (this.animationThreshold = Math.PI / 18);
  30173. var r, s = a.polar, l = s.getOtherAxis(a).getExtent();
  30174. r = a["dataTo" + Fi(a.dim)](e);
  30175. var h = n.get("type");
  30176. if (h && "none" !== h) {
  30177. var u = Rf(n)
  30178. , c = qC[h](a, s, r, l, u);
  30179. c.style = u,
  30180. t.graphicKey = c.type,
  30181. t.pointer = c
  30182. }
  30183. Vf(t, i, n, o, Kg(e, i, 0, s, n.get("label.margin")))
  30184. }
  30185. })
  30186. , qC = {
  30187. line: function(t, e, i, n, o) {
  30188. return "angle" === t.dim ? {
  30189. type: "Line",
  30190. shape: Ff(e.coordToPoint([n[0], i]), e.coordToPoint([n[1], i]))
  30191. } : {
  30192. type: "Circle",
  30193. shape: {
  30194. cx: e.cx,
  30195. cy: e.cy,
  30196. r: i
  30197. }
  30198. }
  30199. },
  30200. shadow: function(t, e, i, n, o) {
  30201. var a = t.getBandWidth()
  30202. , r = Math.PI / 180;
  30203. return "angle" === t.dim ? {
  30204. type: "Sector",
  30205. shape: Uf(e.cx, e.cy, n[0], n[1], (-i - a / 2) * r, (a / 2 - i) * r)
  30206. } : {
  30207. type: "Sector",
  30208. shape: Uf(e.cx, e.cy, i - a / 2, i + a / 2, 0, 2 * Math.PI)
  30209. }
  30210. }
  30211. };
  30212. WM.registerAxisPointerClass("PolarAxisPointer", XC),
  30213. nr(m(function(t, e, i) {
  30214. var n = i.getWidth()
  30215. , o = i.getHeight()
  30216. , a = {}
  30217. , r = {}
  30218. , s = Wg(g(e.getSeriesByType(t), function(t) {
  30219. return !e.isSeriesFiltered(t) && t.coordinateSystem && "polar" === t.coordinateSystem.type
  30220. }));
  30221. e.eachSeriesByType(t, function(t) {
  30222. if ("polar" === t.coordinateSystem.type) {
  30223. var e = t.getData()
  30224. , i = t.coordinateSystem
  30225. , l = i.getAngleAxis()
  30226. , h = i.getBaseAxis()
  30227. , u = Bg(t)
  30228. , c = s[Gg(h)][u]
  30229. , d = c.offset
  30230. , f = c.width
  30231. , g = i.getOtherAxis(h)
  30232. , p = t.get("center") || ["50%", "50%"]
  30233. , m = bi(p[0], n)
  30234. , v = bi(p[1], o)
  30235. , y = t.get("barMinHeight") || 0
  30236. , x = t.get("barMinAngle") || 0
  30237. , _ = g.getExtent()[0]
  30238. , b = g.model.get("max")
  30239. , w = g.model.get("min")
  30240. , S = [t.coordDimToDataDim("radius")[0], t.coordDimToDataDim("angle")[0]]
  30241. , M = e.mapArray(S, function(t, e) {
  30242. return i.dataToPoint([t, e])
  30243. }, !0);
  30244. a[u] = a[u] || [],
  30245. r[u] = r[u] || [],
  30246. e.each(t.coordDimToDataDim(g.dim)[0], function(t, n) {
  30247. if (!isNaN(t)) {
  30248. a[u][n] || (a[u][n] = {
  30249. p: _,
  30250. n: _
  30251. },
  30252. r[u][n] = {
  30253. p: _,
  30254. n: _
  30255. });
  30256. var o, s, h, c, p = t >= 0 ? "p" : "n", S = i.pointToCoord(M[n]), I = r[u][n][p];
  30257. if ("radius" === g.dim)
  30258. o = I,
  30259. s = S[0],
  30260. c = (h = (-S[1] + d) * Math.PI / 180) + f * Math.PI / 180,
  30261. Math.abs(s) < y && (s = o + (s < 0 ? -1 : 1) * y),
  30262. r[u][n][p] = s;
  30263. else {
  30264. s = (o = S[0] + d) + f,
  30265. null != b && (t = Math.min(t, b)),
  30266. null != w && (t = Math.max(t, w));
  30267. var T = l.dataToAngle(t);
  30268. Math.abs(T - I) < x && (T = I - (t < 0 ? -1 : 1) * x),
  30269. h = -I * Math.PI / 180,
  30270. c = -T * Math.PI / 180;
  30271. var A = l.getExtent()
  30272. , C = T;
  30273. C === A[0] && t > 0 ? C = A[1] : C === A[1] && t < 0 && (C = A[0]),
  30274. r[u][n][p] = C
  30275. }
  30276. e.setItemLayout(n, {
  30277. cx: m,
  30278. cy: v,
  30279. r0: o,
  30280. r: s,
  30281. startAngle: h,
  30282. endAngle: c
  30283. })
  30284. }
  30285. }, !0)
  30286. }
  30287. }, this)
  30288. }, "bar")),
  30289. sr({
  30290. type: "polar"
  30291. }),
  30292. h(qb.extend({
  30293. type: "geo",
  30294. coordinateSystem: null,
  30295. layoutMode: "box",
  30296. init: function(t) {
  30297. qb.prototype.init.apply(this, arguments),
  30298. Po(t.label, ["show"])
  30299. },
  30300. optionUpdated: function() {
  30301. var t = this.option
  30302. , e = this;
  30303. t.regions = AI.getFilledRegions(t.regions, t.map, t.nameMap),
  30304. this._optionModelMap = f(t.regions || [], function(t, i) {
  30305. return i.name && t.set(i.name, new Co(i,e)),
  30306. t
  30307. }, O()),
  30308. this.updateSelectedMap(t.regions)
  30309. },
  30310. defaultOption: {
  30311. zlevel: 0,
  30312. z: 0,
  30313. show: !0,
  30314. left: "center",
  30315. top: "center",
  30316. aspectScale: .75,
  30317. silent: !1,
  30318. map: "",
  30319. boundingCoords: null,
  30320. center: null,
  30321. zoom: 1,
  30322. scaleLimit: null,
  30323. label: {
  30324. normal: {
  30325. show: !1,
  30326. color: "#000"
  30327. },
  30328. emphasis: {
  30329. show: !0,
  30330. color: "rgb(100,0,0)"
  30331. }
  30332. },
  30333. itemStyle: {
  30334. normal: {
  30335. borderWidth: .5,
  30336. borderColor: "#444",
  30337. color: "#eee"
  30338. },
  30339. emphasis: {
  30340. color: "rgba(255,215,0,0.8)"
  30341. }
  30342. },
  30343. regions: []
  30344. },
  30345. getRegionModel: function(t) {
  30346. return this._optionModelMap.get(t) || new Co(null,this,this.ecModel)
  30347. },
  30348. getFormattedLabel: function(t, e) {
  30349. var i = this.getRegionModel(t).get("label." + e + ".formatter")
  30350. , n = {
  30351. name: t
  30352. };
  30353. return "function" == typeof i ? (n.status = e,
  30354. i(n)) : "string" == typeof i ? i.replace("{a}", null != t ? t : "") : void 0
  30355. },
  30356. setZoom: function(t) {
  30357. this.option.zoom = t
  30358. },
  30359. setCenter: function(t) {
  30360. this.option.center = t
  30361. }
  30362. }), eI),
  30363. sr({
  30364. type: "geo",
  30365. init: function(t, e) {
  30366. var i = new Yl(e,!0);
  30367. this._mapDraw = i,
  30368. this.group.add(i.group)
  30369. },
  30370. render: function(t, e, i, n) {
  30371. if (!n || "geoToggleSelect" !== n.type || n.from !== this.uid) {
  30372. var o = this._mapDraw;
  30373. t.get("show") ? o.draw(t, e, i, this, n) : this._mapDraw.group.removeAll(),
  30374. this.group.silent = t.get("silent")
  30375. }
  30376. },
  30377. dispose: function() {
  30378. this._mapDraw && this._mapDraw.remove()
  30379. }
  30380. }),
  30381. Jg("toggleSelected", {
  30382. type: "geoToggleSelect",
  30383. event: "geoselectchanged"
  30384. }),
  30385. Jg("select", {
  30386. type: "geoSelect",
  30387. event: "geoselected"
  30388. }),
  30389. Jg("unSelect", {
  30390. type: "geoUnSelect",
  30391. event: "geounselected"
  30392. });
  30393. var YC = ["rect", "polygon", "keep", "clear"]
  30394. , $C = c
  30395. , KC = {
  30396. lineX: op(0),
  30397. lineY: op(1),
  30398. rect: {
  30399. point: function(t, e, i) {
  30400. return t && i.boundingRect.contain(t[0], t[1])
  30401. },
  30402. rect: function(t, e, i) {
  30403. return t && i.boundingRect.intersect(t)
  30404. }
  30405. },
  30406. polygon: {
  30407. point: function(t, e, i) {
  30408. return t && i.boundingRect.contain(t[0], t[1]) && _l(i.range, t[0], t[1])
  30409. },
  30410. rect: function(t, e, i) {
  30411. var n = i.range;
  30412. if (!t || n.length <= 1)
  30413. return !1;
  30414. var o = t.x
  30415. , a = t.y
  30416. , r = t.width
  30417. , s = t.height
  30418. , l = n[0];
  30419. return !!(_l(n, o, a) || _l(n, o + r, a) || _l(n, o, a + s) || _l(n, o + r, a + s) || jt.create(t).contain(l[0], l[1]) || rp(o, a, o + r, a, n) || rp(o, a, o, a + s, n) || rp(o + r, a, o + r, a + s, n) || rp(o, a + s, o + r, a + s, n)) || void 0
  30420. }
  30421. }
  30422. }
  30423. , JC = c
  30424. , QC = s
  30425. , tD = m
  30426. , eD = ["dataToPoint", "pointToData"]
  30427. , iD = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"]
  30428. , nD = up.prototype;
  30429. nD.setOutputRanges = function(t, e) {
  30430. this.matchOutputRanges(t, e, function(t, e, i) {
  30431. if ((t.coordRanges || (t.coordRanges = [])).push(e),
  30432. !t.coordRange) {
  30433. t.coordRange = e;
  30434. var n = sD[t.brushType](0, i, e);
  30435. t.__rangeOffset = {
  30436. offset: lD[t.brushType](n.values, t.range, [1, 1]),
  30437. xyMinMax: n.xyMinMax
  30438. }
  30439. }
  30440. })
  30441. }
  30442. ,
  30443. nD.matchOutputRanges = function(t, e, i) {
  30444. JC(t, function(t) {
  30445. var n = this.findTargetInfo(t, e);
  30446. n && !0 !== n && c(n.coordSyses, function(n) {
  30447. var o = sD[t.brushType](1, n, t.range);
  30448. i(t, o.values, n, e)
  30449. })
  30450. }, this)
  30451. }
  30452. ,
  30453. nD.setInputRanges = function(t, e) {
  30454. JC(t, function(t) {
  30455. var i = this.findTargetInfo(t, e);
  30456. if (t.range = t.range || [],
  30457. i && !0 !== i) {
  30458. t.panelId = i.panelId;
  30459. var n = sD[t.brushType](0, i.coordSys, t.coordRange)
  30460. , o = t.__rangeOffset;
  30461. t.range = o ? lD[t.brushType](n.values, o.offset, pp(n.xyMinMax, o.xyMinMax)) : n.values
  30462. }
  30463. }, this)
  30464. }
  30465. ,
  30466. nD.makePanelOpts = function(t, e) {
  30467. return d(this._targetInfoList, function(i) {
  30468. var n = i.getPanelRect();
  30469. return {
  30470. panelId: i.panelId,
  30471. defaultBrushType: e && e(i),
  30472. clipPath: zc(n),
  30473. isTargetByCursor: Ec(n, t, i.coordSysModel),
  30474. getLinearBrushOtherExtent: Nc(n)
  30475. }
  30476. })
  30477. }
  30478. ,
  30479. nD.controlSeries = function(t, e, i) {
  30480. var n = this.findTargetInfo(t, i);
  30481. return !0 === n || n && QC(n.coordSyses, e.coordinateSystem) >= 0
  30482. }
  30483. ,
  30484. nD.findTargetInfo = function(t, e) {
  30485. for (var i = this._targetInfoList, n = dp(e, t), o = 0; o < i.length; o++) {
  30486. var a = i[o]
  30487. , r = t.panelId;
  30488. if (r) {
  30489. if (a.panelId === r)
  30490. return a
  30491. } else
  30492. for (o = 0; o < aD.length; o++)
  30493. if (aD[o](n, a))
  30494. return a
  30495. }
  30496. return !0
  30497. }
  30498. ;
  30499. var oD = {
  30500. grid: function(t, e) {
  30501. var i = t.xAxisModels
  30502. , n = t.yAxisModels
  30503. , o = t.gridModels
  30504. , a = O()
  30505. , r = {}
  30506. , s = {};
  30507. (i || n || o) && (JC(i, function(t) {
  30508. var e = t.axis.grid.model;
  30509. a.set(e.id, e),
  30510. r[e.id] = !0
  30511. }),
  30512. JC(n, function(t) {
  30513. var e = t.axis.grid.model;
  30514. a.set(e.id, e),
  30515. s[e.id] = !0
  30516. }),
  30517. JC(o, function(t) {
  30518. a.set(t.id, t),
  30519. r[t.id] = !0,
  30520. s[t.id] = !0
  30521. }),
  30522. a.each(function(t) {
  30523. var o = t.coordinateSystem
  30524. , a = [];
  30525. JC(o.getCartesians(), function(t, e) {
  30526. (QC(i, t.getAxis("x").model) >= 0 || QC(n, t.getAxis("y").model) >= 0) && a.push(t)
  30527. }),
  30528. e.push({
  30529. panelId: "grid--" + t.id,
  30530. gridModel: t,
  30531. coordSysModel: t,
  30532. coordSys: a[0],
  30533. coordSyses: a,
  30534. getPanelRect: rD.grid,
  30535. xAxisDeclared: r[t.id],
  30536. yAxisDeclared: s[t.id]
  30537. })
  30538. }))
  30539. },
  30540. geo: function(t, e) {
  30541. JC(t.geoModels, function(t) {
  30542. var i = t.coordinateSystem;
  30543. e.push({
  30544. panelId: "geo--" + t.id,
  30545. geoModel: t,
  30546. coordSysModel: t,
  30547. coordSys: i,
  30548. coordSyses: [i],
  30549. getPanelRect: rD.geo
  30550. })
  30551. })
  30552. }
  30553. }
  30554. , aD = [function(t, e) {
  30555. var i = t.xAxisModel
  30556. , n = t.yAxisModel
  30557. , o = t.gridModel;
  30558. return !o && i && (o = i.axis.grid.model),
  30559. !o && n && (o = n.axis.grid.model),
  30560. o && o === e.gridModel
  30561. }
  30562. , function(t, e) {
  30563. var i = t.geoModel;
  30564. return i && i === e.geoModel
  30565. }
  30566. ]
  30567. , rD = {
  30568. grid: function() {
  30569. return this.coordSys.grid.getRect().clone()
  30570. },
  30571. geo: function() {
  30572. var t = this.coordSys
  30573. , e = t.getBoundingRect().clone();
  30574. return e.applyTransform(wo(t)),
  30575. e
  30576. }
  30577. }
  30578. , sD = {
  30579. lineX: tD(fp, 0),
  30580. lineY: tD(fp, 1),
  30581. rect: function(t, e, i) {
  30582. var n = e[eD[t]]([i[0][0], i[1][0]])
  30583. , o = e[eD[t]]([i[0][1], i[1][1]])
  30584. , a = [cp([n[0], o[0]]), cp([n[1], o[1]])];
  30585. return {
  30586. values: a,
  30587. xyMinMax: a
  30588. }
  30589. },
  30590. polygon: function(t, e, i) {
  30591. var n = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
  30592. return {
  30593. values: d(i, function(i) {
  30594. var o = e[eD[t]](i);
  30595. return n[0][0] = Math.min(n[0][0], o[0]),
  30596. n[1][0] = Math.min(n[1][0], o[1]),
  30597. n[0][1] = Math.max(n[0][1], o[0]),
  30598. n[1][1] = Math.max(n[1][1], o[1]),
  30599. o
  30600. }),
  30601. xyMinMax: n
  30602. }
  30603. }
  30604. }
  30605. , lD = {
  30606. lineX: tD(gp, 0),
  30607. lineY: tD(gp, 1),
  30608. rect: function(t, e, i) {
  30609. return [[t[0][0] - i[0] * e[0][0], t[0][1] - i[0] * e[0][1]], [t[1][0] - i[1] * e[1][0], t[1][1] - i[1] * e[1][1]]]
  30610. },
  30611. polygon: function(t, e, i) {
  30612. return d(t, function(t, n) {
  30613. return [t[0] - i[0] * e[n][0], t[1] - i[1] * e[n][1]]
  30614. })
  30615. }
  30616. }
  30617. , hD = ["inBrush", "outOfBrush"]
  30618. , uD = "__ecBrushSelect"
  30619. , cD = "__ecInBrushSelectEvent"
  30620. , dD = Ew.VISUAL.BRUSH;
  30621. nr(dD, function(t, e, i) {
  30622. t.eachComponent({
  30623. mainType: "brush"
  30624. }, function(e) {
  30625. i && "takeGlobalCursor" === i.type && e.setBrushOption("brush" === i.key ? i.brushOption : {
  30626. brushType: !1
  30627. }),
  30628. (e.brushTargetManager = new up(e.option,t)).setInputRanges(e.areas, t)
  30629. })
  30630. }),
  30631. or(dD, function(t, i, n) {
  30632. var o, r, s = [];
  30633. t.eachComponent({
  30634. mainType: "brush"
  30635. }, function(i, n) {
  30636. function l(t) {
  30637. return "all" === m || y[t]
  30638. }
  30639. function h(t) {
  30640. return !!t.length
  30641. }
  30642. function u(t, e) {
  30643. var i = t.coordinateSystem;
  30644. b |= i.hasAxisBrushed(),
  30645. l(e) && i.eachActiveState(t.getData(), function(t, e) {
  30646. "active" === t && (x[e] = 1)
  30647. })
  30648. }
  30649. function f(e, n, o) {
  30650. var a = _p(e);
  30651. if (a && !bp(i, n) && (c(w, function(n) {
  30652. a[n.brushType] && i.brushTargetManager.controlSeries(n, e, t) && o.push(n),
  30653. b |= h(o)
  30654. }),
  30655. l(n) && h(o))) {
  30656. var r = e.getData();
  30657. r.each(function(t) {
  30658. xp(a, o, r, t) && (x[t] = 1)
  30659. })
  30660. }
  30661. }
  30662. var g = {
  30663. brushId: i.id,
  30664. brushIndex: n,
  30665. brushName: i.name,
  30666. areas: e(i.areas),
  30667. selected: []
  30668. };
  30669. s.push(g);
  30670. var p = i.option
  30671. , m = p.brushLink
  30672. , y = []
  30673. , x = []
  30674. , _ = []
  30675. , b = 0;
  30676. n || (o = p.throttleType,
  30677. r = p.throttleDelay);
  30678. var w = d(i.areas, function(t) {
  30679. return wp(a({
  30680. boundingRect: fD[t.brushType](t)
  30681. }, t))
  30682. })
  30683. , S = ep(i.option, hD, function(t) {
  30684. t.mappingMethod = "fixed"
  30685. });
  30686. v(m) && c(m, function(t) {
  30687. y[t] = 1
  30688. }),
  30689. t.eachSeries(function(t, e) {
  30690. var i = _[e] = [];
  30691. "parallel" === t.subType ? u(t, e) : f(t, e, i)
  30692. }),
  30693. t.eachSeries(function(t, e) {
  30694. var i = {
  30695. seriesId: t.id,
  30696. seriesIndex: e,
  30697. seriesName: t.name,
  30698. dataIndex: []
  30699. };
  30700. g.selected.push(i);
  30701. var n = _p(t)
  30702. , o = _[e]
  30703. , a = t.getData()
  30704. , r = l(e) ? function(t) {
  30705. return x[t] ? (i.dataIndex.push(a.getRawIndex(t)),
  30706. "inBrush") : "outOfBrush"
  30707. }
  30708. : function(t) {
  30709. return xp(n, o, a, t) ? (i.dataIndex.push(a.getRawIndex(t)),
  30710. "inBrush") : "outOfBrush"
  30711. }
  30712. ;
  30713. (l(e) ? b : h(o)) && np(hD, S, a, r)
  30714. })
  30715. }),
  30716. vp(i, o, r, s, n)
  30717. });
  30718. var fD = {
  30719. lineX: z,
  30720. lineY: z,
  30721. rect: function(t) {
  30722. return Sp(t.range)
  30723. },
  30724. polygon: function(t) {
  30725. for (var e, i = t.range, n = 0, o = i.length; n < o; n++) {
  30726. e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
  30727. var a = i[n];
  30728. a[0] < e[0][0] && (e[0][0] = a[0]),
  30729. a[0] > e[0][1] && (e[0][1] = a[0]),
  30730. a[1] < e[1][0] && (e[1][0] = a[1]),
  30731. a[1] > e[1][1] && (e[1][1] = a[1])
  30732. }
  30733. return e && Sp(e)
  30734. }
  30735. }
  30736. , gD = ["#ddd"];
  30737. rr({
  30738. type: "brush",
  30739. dependencies: ["geo", "grid", "xAxis", "yAxis", "parallel", "series"],
  30740. defaultOption: {
  30741. toolbox: null,
  30742. brushLink: null,
  30743. seriesIndex: "all",
  30744. geoIndex: null,
  30745. xAxisIndex: null,
  30746. yAxisIndex: null,
  30747. brushType: "rect",
  30748. brushMode: "single",
  30749. transformable: !0,
  30750. brushStyle: {
  30751. borderWidth: 1,
  30752. color: "rgba(120,140,180,0.3)",
  30753. borderColor: "rgba(120,140,180,0.8)"
  30754. },
  30755. throttleType: "fixRate",
  30756. throttleDelay: 0,
  30757. removeOnClick: !0,
  30758. z: 1e4
  30759. },
  30760. areas: [],
  30761. brushType: null,
  30762. brushOption: {},
  30763. coordInfoList: [],
  30764. optionUpdated: function(t, e) {
  30765. var i = this.option;
  30766. !e && ip(i, t, ["inBrush", "outOfBrush"]),
  30767. i.inBrush = i.inBrush || {},
  30768. i.outOfBrush = i.outOfBrush || {
  30769. color: gD
  30770. }
  30771. },
  30772. setAreas: function(t) {
  30773. t && (this.areas = d(t, function(t) {
  30774. return Mp(this.option, t)
  30775. }, this))
  30776. },
  30777. setBrushOption: function(t) {
  30778. this.brushOption = Mp(this.option, t),
  30779. this.brushType = this.brushOption.brushType
  30780. }
  30781. });
  30782. sr({
  30783. type: "brush",
  30784. init: function(t, e) {
  30785. this.ecModel = t,
  30786. this.api = e,
  30787. this.model,
  30788. (this._brushController = new Qu(e.getZr())).on("brush", p(this._onBrush, this)).mount()
  30789. },
  30790. render: function(t) {
  30791. return this.model = t,
  30792. Ip.apply(this, arguments)
  30793. },
  30794. updateView: Ip,
  30795. updateLayout: Ip,
  30796. updateVisual: Ip,
  30797. dispose: function() {
  30798. this._brushController.dispose()
  30799. },
  30800. _onBrush: function(t, i) {
  30801. var n = this.model.id;
  30802. this.model.brushTargetManager.setOutputRanges(t, this.ecModel),
  30803. (!i.isEnd || i.removeOnClick) && this.api.dispatchAction({
  30804. type: "brush",
  30805. brushId: n,
  30806. areas: e(t),
  30807. $from: n
  30808. })
  30809. }
  30810. }),
  30811. er({
  30812. type: "brush",
  30813. event: "brush",
  30814. update: "updateView"
  30815. }, function(t, e) {
  30816. e.eachComponent({
  30817. mainType: "brush",
  30818. query: t
  30819. }, function(e) {
  30820. e.setAreas(t.areas)
  30821. })
  30822. }),
  30823. er({
  30824. type: "brushSelect",
  30825. event: "brushSelected",
  30826. update: "none"
  30827. }, function() {});
  30828. var pD = {}
  30829. , mD = {
  30830. toolbox: {
  30831. brush: {
  30832. title: {
  30833. rect: "矩形选择",
  30834. polygon: "圈选",
  30835. lineX: "横向选择",
  30836. lineY: "纵向选择",
  30837. keep: "保持选择",
  30838. clear: "清除选择"
  30839. }
  30840. },
  30841. dataView: {
  30842. title: "数据视图",
  30843. lang: ["数据视图", "关闭", "刷新"]
  30844. },
  30845. dataZoom: {
  30846. title: {
  30847. zoom: "区域缩放",
  30848. back: "区域缩放还原"
  30849. }
  30850. },
  30851. magicType: {
  30852. title: {
  30853. line: "切换为折线图",
  30854. bar: "切换为柱状图",
  30855. stack: "切换为堆叠",
  30856. tiled: "切换为平铺"
  30857. }
  30858. },
  30859. restore: {
  30860. title: "还原"
  30861. },
  30862. saveAsImage: {
  30863. title: "保存为图片",
  30864. lang: ["右键另存为图片"]
  30865. }
  30866. }
  30867. }
  30868. , vD = mD.toolbox.brush;
  30869. Cp.defaultOption = {
  30870. show: !0,
  30871. type: ["rect", "polygon", "lineX", "lineY", "keep", "clear"],
  30872. icon: {
  30873. rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",
  30874. polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",
  30875. lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",
  30876. lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",
  30877. keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",
  30878. clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"
  30879. },
  30880. title: e(vD.title)
  30881. };
  30882. var yD = Cp.prototype;
  30883. yD.render = yD.updateView = yD.updateLayout = function(t, e, i) {
  30884. var n, o, a;
  30885. e.eachComponent({
  30886. mainType: "brush"
  30887. }, function(t) {
  30888. n = t.brushType,
  30889. o = t.brushOption.brushMode || "single",
  30890. a |= t.areas.length
  30891. }),
  30892. this._brushType = n,
  30893. this._brushMode = o,
  30894. c(t.get("type", !0), function(e) {
  30895. t.setIconStatus(e, ("keep" === e ? "multiple" === o : "clear" === e ? a : e === n) ? "emphasis" : "normal")
  30896. })
  30897. }
  30898. ,
  30899. yD.getIcons = function() {
  30900. var t = this.model
  30901. , e = t.get("icon", !0)
  30902. , i = {};
  30903. return c(t.get("type", !0), function(t) {
  30904. e[t] && (i[t] = e[t])
  30905. }),
  30906. i
  30907. }
  30908. ,
  30909. yD.onclick = function(t, e, i) {
  30910. var n = this._brushType
  30911. , o = this._brushMode;
  30912. "clear" === i ? (e.dispatchAction({
  30913. type: "axisAreaSelect",
  30914. intervals: []
  30915. }),
  30916. e.dispatchAction({
  30917. type: "brush",
  30918. command: "clear",
  30919. areas: []
  30920. })) : e.dispatchAction({
  30921. type: "takeGlobalCursor",
  30922. key: "brush",
  30923. brushOption: {
  30924. brushType: "keep" === i ? n : n !== i && i,
  30925. brushMode: "keep" === i ? "multiple" === o ? "single" : "multiple" : o
  30926. }
  30927. })
  30928. }
  30929. ,
  30930. Tp("brush", Cp),
  30931. Qa(function(t, e) {
  30932. var i = t && t.brush;
  30933. if (v(i) || (i = i ? [i] : []),
  30934. i.length) {
  30935. var n = [];
  30936. c(i, function(t) {
  30937. var e = t.hasOwnProperty("toolbox") ? t.toolbox : [];
  30938. e instanceof Array && (n = n.concat(e))
  30939. });
  30940. var o = t && t.toolbox;
  30941. v(o) && (o = o[0]),
  30942. o || (o = {
  30943. feature: {}
  30944. },
  30945. t.toolbox = [o]);
  30946. var a = o.feature || (o.feature = {})
  30947. , r = a.brush || (a.brush = {})
  30948. , s = r.type || (r.type = []);
  30949. s.push.apply(s, n),
  30950. Qg(s),
  30951. e && !s.length && s.push.apply(s, YC)
  30952. }
  30953. });
  30954. Dp.prototype = {
  30955. constructor: Dp,
  30956. type: "calendar",
  30957. dimensions: ["time", "value"],
  30958. getDimensionsInfo: function() {
  30959. return [{
  30960. name: "time",
  30961. type: "time"
  30962. }]
  30963. },
  30964. getRangeInfo: function() {
  30965. return this._rangeInfo
  30966. },
  30967. getModel: function() {
  30968. return this._model
  30969. },
  30970. getRect: function() {
  30971. return this._rect
  30972. },
  30973. getCellWidth: function() {
  30974. return this._sw
  30975. },
  30976. getCellHeight: function() {
  30977. return this._sh
  30978. },
  30979. getOrient: function() {
  30980. return this._orient
  30981. },
  30982. getFirstDayOfWeek: function() {
  30983. return this._firstDayOfWeek
  30984. },
  30985. getDateInfo: function(t) {
  30986. var e = (t = Li(t)).getFullYear()
  30987. , i = t.getMonth() + 1;
  30988. i = i < 10 ? "0" + i : i;
  30989. var n = t.getDate();
  30990. n = n < 10 ? "0" + n : n;
  30991. var o = t.getDay();
  30992. return o = Math.abs((o + 7 - this.getFirstDayOfWeek()) % 7),
  30993. {
  30994. y: e,
  30995. m: i,
  30996. d: n,
  30997. day: o,
  30998. time: t.getTime(),
  30999. formatedDate: e + "-" + i + "-" + n,
  31000. date: t
  31001. }
  31002. },
  31003. getNextNDay: function(t, e) {
  31004. return 0 === (e = e || 0) ? this.getDateInfo(t) : ((t = new Date(this.getDateInfo(t).time)).setDate(t.getDate() + e),
  31005. this.getDateInfo(t))
  31006. },
  31007. update: function(t, e) {
  31008. function i(t, e) {
  31009. return null != t[e] && "auto" !== t[e]
  31010. }
  31011. this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"),
  31012. this._orient = this._model.get("orient"),
  31013. this._lineWidth = this._model.getModel("itemStyle.normal").getItemStyle().lineWidth || 0,
  31014. this._rangeInfo = this._getRangeInfo(this._initRangeOption());
  31015. var n = this._rangeInfo.weeks || 1
  31016. , o = ["width", "height"]
  31017. , a = this._model.get("cellSize").slice()
  31018. , r = this._model.getBoxLayoutParams()
  31019. , s = "horizontal" === this._orient ? [n, 7] : [7, n];
  31020. c([0, 1], function(t) {
  31021. i(a, t) && (r[o[t]] = a[t] * s[t])
  31022. });
  31023. var l = {
  31024. width: e.getWidth(),
  31025. height: e.getHeight()
  31026. }
  31027. , h = this._rect = Yo(r, l);
  31028. c([0, 1], function(t) {
  31029. i(a, t) || (a[t] = h[o[t]] / s[t])
  31030. }),
  31031. this._sw = a[0],
  31032. this._sh = a[1]
  31033. },
  31034. dataToPoint: function(t, e) {
  31035. v(t) && (t = t[0]),
  31036. null == e && (e = !0);
  31037. var i = this.getDateInfo(t)
  31038. , n = this._rangeInfo
  31039. , o = i.formatedDate;
  31040. if (e && !(i.time >= n.start.time && i.time <= n.end.time))
  31041. return [NaN, NaN];
  31042. var a = i.day
  31043. , r = this._getRangeInfo([n.start.time, o]).nthWeek;
  31044. return "vertical" === this._orient ? [this._rect.x + a * this._sw + this._sw / 2, this._rect.y + r * this._sh + this._sh / 2] : [this._rect.x + r * this._sw + this._sw / 2, this._rect.y + a * this._sh + this._sh / 2]
  31045. },
  31046. pointToData: function(t) {
  31047. var e = this.pointToDate(t);
  31048. return e && e.time
  31049. },
  31050. dataToRect: function(t, e) {
  31051. var i = this.dataToPoint(t, e);
  31052. return {
  31053. contentShape: {
  31054. x: i[0] - (this._sw - this._lineWidth) / 2,
  31055. y: i[1] - (this._sh - this._lineWidth) / 2,
  31056. width: this._sw - this._lineWidth,
  31057. height: this._sh - this._lineWidth
  31058. },
  31059. center: i,
  31060. tl: [i[0] - this._sw / 2, i[1] - this._sh / 2],
  31061. tr: [i[0] + this._sw / 2, i[1] - this._sh / 2],
  31062. br: [i[0] + this._sw / 2, i[1] + this._sh / 2],
  31063. bl: [i[0] - this._sw / 2, i[1] + this._sh / 2]
  31064. }
  31065. },
  31066. pointToDate: function(t) {
  31067. var e = Math.floor((t[0] - this._rect.x) / this._sw) + 1
  31068. , i = Math.floor((t[1] - this._rect.y) / this._sh) + 1
  31069. , n = this._rangeInfo.range;
  31070. return "vertical" === this._orient ? this._getDateByWeeksAndDay(i, e - 1, n) : this._getDateByWeeksAndDay(e, i - 1, n)
  31071. },
  31072. convertToPixel: m(Lp, "dataToPoint"),
  31073. convertFromPixel: m(Lp, "pointToData"),
  31074. _initRangeOption: function() {
  31075. var t = this._model.get("range")
  31076. , e = t;
  31077. if (v(e) && 1 === e.length && (e = e[0]),
  31078. /^\d{4}$/.test(e) && (t = [e + "-01-01", e + "-12-31"]),
  31079. /^\d{4}[\/|-]\d{1,2}$/.test(e)) {
  31080. var i = this.getDateInfo(e)
  31081. , n = i.date;
  31082. n.setMonth(n.getMonth() + 1);
  31083. var o = this.getNextNDay(n, -1);
  31084. t = [i.formatedDate, o.formatedDate]
  31085. }
  31086. /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e) && (t = [e, e]);
  31087. var a = this._getRangeInfo(t);
  31088. return a.start.time > a.end.time && t.reverse(),
  31089. t
  31090. },
  31091. _getRangeInfo: function(t) {
  31092. var e;
  31093. (t = [this.getDateInfo(t[0]), this.getDateInfo(t[1])])[0].time > t[1].time && (e = !0,
  31094. t.reverse());
  31095. var i = Math.floor(t[1].time / 864e5) - Math.floor(t[0].time / 864e5) + 1
  31096. , n = new Date(t[0].time)
  31097. , o = n.getDate()
  31098. , a = t[1].date.getDate();
  31099. if (n.setDate(o + i - 1),
  31100. n.getDate() !== a)
  31101. for (var r = n.getTime() - t[1].time > 0 ? 1 : -1; n.getDate() !== a && (n.getTime() - t[1].time) * r > 0; )
  31102. i -= r,
  31103. n.setDate(o + i - 1);
  31104. var s = Math.floor((i + t[0].day + 6) / 7)
  31105. , l = e ? 1 - s : s - 1;
  31106. return e && t.reverse(),
  31107. {
  31108. range: [t[0].formatedDate, t[1].formatedDate],
  31109. start: t[0],
  31110. end: t[1],
  31111. allDay: i,
  31112. weeks: s,
  31113. nthWeek: l,
  31114. fweek: t[0].day,
  31115. lweek: t[1].day
  31116. }
  31117. },
  31118. _getDateByWeeksAndDay: function(t, e, i) {
  31119. var n = this._getRangeInfo(i);
  31120. if (t > n.weeks || 0 === t && e < n.fweek || t === n.weeks && e > n.lweek)
  31121. return !1;
  31122. var o = 7 * (t - 1) - n.fweek + e
  31123. , a = new Date(n.start.time);
  31124. return a.setDate(n.start.d + o),
  31125. this.getDateInfo(a)
  31126. }
  31127. },
  31128. Dp.dimensions = Dp.prototype.dimensions,
  31129. Dp.getDimensionsInfo = Dp.prototype.getDimensionsInfo,
  31130. Dp.create = function(t, e) {
  31131. var i = [];
  31132. return t.eachComponent("calendar", function(n) {
  31133. var o = new Dp(n,t,e);
  31134. i.push(o),
  31135. n.coordinateSystem = o
  31136. }),
  31137. t.eachSeries(function(t) {
  31138. "calendar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("calendarIndex") || 0])
  31139. }),
  31140. i
  31141. }
  31142. ,
  31143. ha.register("calendar", Dp);
  31144. var xD = qb.extend({
  31145. type: "calendar",
  31146. coordinateSystem: null,
  31147. defaultOption: {
  31148. zlevel: 0,
  31149. z: 2,
  31150. left: 80,
  31151. top: 60,
  31152. cellSize: 20,
  31153. orient: "horizontal",
  31154. splitLine: {
  31155. show: !0,
  31156. lineStyle: {
  31157. color: "#000",
  31158. width: 1,
  31159. type: "solid"
  31160. }
  31161. },
  31162. itemStyle: {
  31163. normal: {
  31164. color: "#fff",
  31165. borderWidth: 1,
  31166. borderColor: "#ccc"
  31167. }
  31168. },
  31169. dayLabel: {
  31170. show: !0,
  31171. firstDay: 0,
  31172. position: "start",
  31173. margin: "50%",
  31174. nameMap: "en",
  31175. color: "#000"
  31176. },
  31177. monthLabel: {
  31178. show: !0,
  31179. position: "start",
  31180. margin: 5,
  31181. align: "center",
  31182. nameMap: "en",
  31183. formatter: null,
  31184. color: "#000"
  31185. },
  31186. yearLabel: {
  31187. show: !0,
  31188. position: null,
  31189. margin: 30,
  31190. formatter: null,
  31191. color: "#ccc",
  31192. fontFamily: "sans-serif",
  31193. fontWeight: "bolder",
  31194. fontSize: 20
  31195. }
  31196. },
  31197. init: function(t, e, i, n) {
  31198. var o = Qo(t);
  31199. xD.superApply(this, "init", arguments),
  31200. kp(t, o)
  31201. },
  31202. mergeOption: function(t, e) {
  31203. xD.superApply(this, "mergeOption", arguments),
  31204. kp(this.option, t)
  31205. }
  31206. })
  31207. , _D = {
  31208. EN: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  31209. CN: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
  31210. }
  31211. , bD = {
  31212. EN: ["S", "M", "T", "W", "T", "F", "S"],
  31213. CN: ["日", "一", "二", "三", "四", "五", "六"]
  31214. };
  31215. sr({
  31216. type: "calendar",
  31217. _tlpoints: null,
  31218. _blpoints: null,
  31219. _firstDayOfMonth: null,
  31220. _firstDayPoints: null,
  31221. render: function(t, e, i) {
  31222. var n = this.group;
  31223. n.removeAll();
  31224. var o = t.coordinateSystem
  31225. , a = o.getRangeInfo()
  31226. , r = o.getOrient();
  31227. this._renderDayRect(t, a, n),
  31228. this._renderLines(t, a, r, n),
  31229. this._renderYearText(t, a, r, n),
  31230. this._renderMonthText(t, r, n),
  31231. this._renderWeekText(t, a, r, n)
  31232. },
  31233. _renderDayRect: function(t, e, i) {
  31234. for (var n = t.coordinateSystem, o = t.getModel("itemStyle.normal").getItemStyle(), a = n.getCellWidth(), r = n.getCellHeight(), s = e.start.time; s <= e.end.time; s = n.getNextNDay(s, 1).time) {
  31235. var l = n.dataToRect([s], !1).tl
  31236. , h = new pb({
  31237. shape: {
  31238. x: l[0],
  31239. y: l[1],
  31240. width: a,
  31241. height: r
  31242. },
  31243. cursor: "default",
  31244. style: o
  31245. });
  31246. i.add(h)
  31247. }
  31248. },
  31249. _renderLines: function(t, e, i, n) {
  31250. function o(e) {
  31251. a._firstDayOfMonth.push(r.getDateInfo(e)),
  31252. a._firstDayPoints.push(r.dataToRect([e], !1).tl);
  31253. var o = a._getLinePointsOfOneWeek(t, e, i);
  31254. a._tlpoints.push(o[0]),
  31255. a._blpoints.push(o[o.length - 1]),
  31256. l && a._drawSplitline(o, s, n)
  31257. }
  31258. var a = this
  31259. , r = t.coordinateSystem
  31260. , s = t.getModel("splitLine.lineStyle").getLineStyle()
  31261. , l = t.get("splitLine.show")
  31262. , h = s.lineWidth;
  31263. this._tlpoints = [],
  31264. this._blpoints = [],
  31265. this._firstDayOfMonth = [],
  31266. this._firstDayPoints = [];
  31267. for (var u = e.start, c = 0; u.time <= e.end.time; c++) {
  31268. o(u.formatedDate),
  31269. 0 === c && (u = r.getDateInfo(e.start.y + "-" + e.start.m));
  31270. var d = u.date;
  31271. d.setMonth(d.getMonth() + 1),
  31272. u = r.getDateInfo(d)
  31273. }
  31274. o(r.getNextNDay(e.end.time, 1).formatedDate),
  31275. l && this._drawSplitline(a._getEdgesPoints(a._tlpoints, h, i), s, n),
  31276. l && this._drawSplitline(a._getEdgesPoints(a._blpoints, h, i), s, n)
  31277. },
  31278. _getEdgesPoints: function(t, e, i) {
  31279. var n = [t[0].slice(), t[t.length - 1].slice()]
  31280. , o = "horizontal" === i ? 0 : 1;
  31281. return n[0][o] = n[0][o] - e / 2,
  31282. n[1][o] = n[1][o] + e / 2,
  31283. n
  31284. },
  31285. _drawSplitline: function(t, e, i) {
  31286. var n = new gb({
  31287. z2: 20,
  31288. shape: {
  31289. points: t
  31290. },
  31291. style: e
  31292. });
  31293. i.add(n)
  31294. },
  31295. _getLinePointsOfOneWeek: function(t, e, i) {
  31296. var n = t.coordinateSystem;
  31297. e = n.getDateInfo(e);
  31298. for (var o = [], a = 0; a < 7; a++) {
  31299. var r = n.getNextNDay(e.time, a)
  31300. , s = n.dataToRect([r.time], !1);
  31301. o[2 * r.day] = s.tl,
  31302. o[2 * r.day + 1] = s["horizontal" === i ? "bl" : "tr"]
  31303. }
  31304. return o
  31305. },
  31306. _formatterLabel: function(t, e) {
  31307. return "string" == typeof t && t ? Gi(t, e) : "function" == typeof t ? t(e) : e.nameMap
  31308. },
  31309. _yearTextPositionControl: function(t, e, i, n, o) {
  31310. e = e.slice();
  31311. var a = ["center", "bottom"];
  31312. "bottom" === n ? (e[1] += o,
  31313. a = ["center", "top"]) : "left" === n ? e[0] -= o : "right" === n ? (e[0] += o,
  31314. a = ["center", "top"]) : e[1] -= o;
  31315. var r = 0;
  31316. return "left" !== n && "right" !== n || (r = Math.PI / 2),
  31317. {
  31318. rotation: r,
  31319. position: e,
  31320. style: {
  31321. textAlign: a[0],
  31322. textVerticalAlign: a[1]
  31323. }
  31324. }
  31325. },
  31326. _renderYearText: function(t, e, i, n) {
  31327. var o = t.getModel("yearLabel");
  31328. if (o.get("show")) {
  31329. var a = o.get("margin")
  31330. , r = o.get("position");
  31331. r || (r = "horizontal" !== i ? "top" : "left");
  31332. var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]]
  31333. , l = (s[0][0] + s[1][0]) / 2
  31334. , h = (s[0][1] + s[1][1]) / 2
  31335. , u = "horizontal" === i ? 0 : 1
  31336. , c = {
  31337. top: [l, s[u][1]],
  31338. bottom: [l, s[1 - u][1]],
  31339. left: [s[1 - u][0], h],
  31340. right: [s[u][0], h]
  31341. }
  31342. , d = e.start.y;
  31343. +e.end.y > +e.start.y && (d = d + "-" + e.end.y);
  31344. var f = o.get("formatter")
  31345. , g = {
  31346. start: e.start.y,
  31347. end: e.end.y,
  31348. nameMap: d
  31349. }
  31350. , p = this._formatterLabel(f, g)
  31351. , m = new ab({
  31352. z2: 30
  31353. });
  31354. uo(m.style, o, {
  31355. text: p
  31356. }),
  31357. m.attr(this._yearTextPositionControl(m, c[r], i, r, a)),
  31358. n.add(m)
  31359. }
  31360. },
  31361. _monthTextPositionControl: function(t, e, i, n, o) {
  31362. var a = "left"
  31363. , r = "top"
  31364. , s = t[0]
  31365. , l = t[1];
  31366. return "horizontal" === i ? (l += o,
  31367. e && (a = "center"),
  31368. "start" === n && (r = "bottom")) : (s += o,
  31369. e && (r = "middle"),
  31370. "start" === n && (a = "right")),
  31371. {
  31372. x: s,
  31373. y: l,
  31374. textAlign: a,
  31375. textVerticalAlign: r
  31376. }
  31377. },
  31378. _renderMonthText: function(t, e, i) {
  31379. var n = t.getModel("monthLabel");
  31380. if (n.get("show")) {
  31381. var a = n.get("nameMap")
  31382. , r = n.get("margin")
  31383. , s = n.get("position")
  31384. , l = n.get("align")
  31385. , h = [this._tlpoints, this._blpoints];
  31386. x(a) && (a = _D[a.toUpperCase()] || []);
  31387. var u = "start" === s ? 0 : 1
  31388. , c = "horizontal" === e ? 0 : 1;
  31389. r = "start" === s ? -r : r;
  31390. for (var d = "center" === l, f = 0; f < h[u].length - 1; f++) {
  31391. var g = h[u][f].slice()
  31392. , p = this._firstDayOfMonth[f];
  31393. if (d) {
  31394. var m = this._firstDayPoints[f];
  31395. g[c] = (m[c] + h[0][f + 1][c]) / 2
  31396. }
  31397. var v = n.get("formatter")
  31398. , y = a[+p.m - 1]
  31399. , _ = {
  31400. yyyy: p.y,
  31401. yy: (p.y + "").slice(2),
  31402. MM: p.m,
  31403. M: +p.m,
  31404. nameMap: y
  31405. }
  31406. , b = this._formatterLabel(v, _)
  31407. , w = new ab({
  31408. z2: 30
  31409. });
  31410. o(uo(w.style, n, {
  31411. text: b
  31412. }), this._monthTextPositionControl(g, d, e, s, r)),
  31413. i.add(w)
  31414. }
  31415. }
  31416. },
  31417. _weekTextPositionControl: function(t, e, i, n, o) {
  31418. var a = "center"
  31419. , r = "middle"
  31420. , s = t[0]
  31421. , l = t[1]
  31422. , h = "start" === i;
  31423. return "horizontal" === e ? (s = s + n + (h ? 1 : -1) * o[0] / 2,
  31424. a = h ? "right" : "left") : (l = l + n + (h ? 1 : -1) * o[1] / 2,
  31425. r = h ? "bottom" : "top"),
  31426. {
  31427. x: s,
  31428. y: l,
  31429. textAlign: a,
  31430. textVerticalAlign: r
  31431. }
  31432. },
  31433. _renderWeekText: function(t, e, i, n) {
  31434. var a = t.getModel("dayLabel");
  31435. if (a.get("show")) {
  31436. var r = t.coordinateSystem
  31437. , s = a.get("position")
  31438. , l = a.get("nameMap")
  31439. , h = a.get("margin")
  31440. , u = r.getFirstDayOfWeek();
  31441. x(l) && (l = bD[l.toUpperCase()] || []);
  31442. var c = r.getNextNDay(e.end.time, 7 - e.lweek).time
  31443. , d = [r.getCellWidth(), r.getCellHeight()];
  31444. h = bi(h, d["horizontal" === i ? 0 : 1]),
  31445. "start" === s && (c = r.getNextNDay(e.start.time, -(7 + e.fweek)).time,
  31446. h = -h);
  31447. for (var f = 0; f < 7; f++) {
  31448. var g = r.getNextNDay(c, f)
  31449. , p = r.dataToRect([g.time], !1).center
  31450. , m = f;
  31451. m = Math.abs((f + u) % 7);
  31452. var v = new ab({
  31453. z2: 30
  31454. });
  31455. o(uo(v.style, a, {
  31456. text: l[m]
  31457. }), this._weekTextPositionControl(p, i, s, h, d)),
  31458. n.add(v)
  31459. }
  31460. }
  31461. }
  31462. }),
  31463. rr({
  31464. type: "title",
  31465. layoutMode: {
  31466. type: "box",
  31467. ignoreSize: !0
  31468. },
  31469. defaultOption: {
  31470. zlevel: 0,
  31471. z: 6,
  31472. show: !0,
  31473. text: "",
  31474. target: "blank",
  31475. subtext: "",
  31476. subtarget: "blank",
  31477. left: 0,
  31478. top: 0,
  31479. backgroundColor: "rgba(0,0,0,0)",
  31480. borderColor: "#ccc",
  31481. borderWidth: 0,
  31482. padding: 5,
  31483. itemGap: 10,
  31484. textStyle: {
  31485. fontSize: 18,
  31486. fontWeight: "bolder",
  31487. color: "#333"
  31488. },
  31489. subtextStyle: {
  31490. color: "#aaa"
  31491. }
  31492. }
  31493. }),
  31494. sr({
  31495. type: "title",
  31496. render: function(t, e, i) {
  31497. if (this.group.removeAll(),
  31498. t.get("show")) {
  31499. var n = this.group
  31500. , o = t.getModel("textStyle")
  31501. , a = t.getModel("subtextStyle")
  31502. , r = t.get("textAlign")
  31503. , s = t.get("textBaseline")
  31504. , l = new ab({
  31505. style: uo({}, o, {
  31506. text: t.get("text"),
  31507. textFill: o.getTextColor()
  31508. }, {
  31509. disableBox: !0
  31510. }),
  31511. z2: 10
  31512. })
  31513. , h = l.getBoundingRect()
  31514. , u = t.get("subtext")
  31515. , c = new ab({
  31516. style: uo({}, a, {
  31517. text: u,
  31518. textFill: a.getTextColor(),
  31519. y: h.height + t.get("itemGap"),
  31520. textVerticalAlign: "top"
  31521. }, {
  31522. disableBox: !0
  31523. }),
  31524. z2: 10
  31525. })
  31526. , d = t.get("link")
  31527. , f = t.get("sublink");
  31528. l.silent = !d,
  31529. c.silent = !f,
  31530. d && l.on("click", function() {
  31531. window.open(d, "_" + t.get("target"))
  31532. }),
  31533. f && c.on("click", function() {
  31534. window.open(f, "_" + t.get("subtarget"))
  31535. }),
  31536. n.add(l),
  31537. u && n.add(c);
  31538. var g = n.getBoundingRect()
  31539. , p = t.getBoxLayoutParams();
  31540. p.width = g.width,
  31541. p.height = g.height;
  31542. var m = Yo(p, {
  31543. width: i.getWidth(),
  31544. height: i.getHeight()
  31545. }, t.get("padding"));
  31546. r || ("middle" === (r = t.get("left") || t.get("right")) && (r = "center"),
  31547. "right" === r ? m.x += m.width : "center" === r && (m.x += m.width / 2)),
  31548. s || ("center" === (s = t.get("top") || t.get("bottom")) && (s = "middle"),
  31549. "bottom" === s ? m.y += m.height : "middle" === s && (m.y += m.height / 2),
  31550. s = s || "top"),
  31551. n.attr("position", [m.x, m.y]);
  31552. var v = {
  31553. textAlign: r,
  31554. textVerticalAlign: s
  31555. };
  31556. l.setStyle(v),
  31557. c.setStyle(v),
  31558. g = n.getBoundingRect();
  31559. var y = m.margin
  31560. , x = t.getItemStyle(["color", "opacity"]);
  31561. x.fill = t.get("backgroundColor");
  31562. var _ = new pb({
  31563. shape: {
  31564. x: g.x - y[3],
  31565. y: g.y - y[0],
  31566. width: g.width + y[1] + y[3],
  31567. height: g.height + y[0] + y[2],
  31568. r: t.get("borderRadius")
  31569. },
  31570. style: x,
  31571. silent: !0
  31572. });
  31573. qn(_),
  31574. n.add(_)
  31575. }
  31576. }
  31577. }),
  31578. qb.registerSubTypeDefaulter("dataZoom", function() {
  31579. return "slider"
  31580. });
  31581. var wD = ["cartesian2d", "polar", "singleAxis"]
  31582. , SD = function(t, e) {
  31583. var i = d(t = t.slice(), Fi)
  31584. , n = d(e = (e || []).slice(), Fi);
  31585. return function(o, a) {
  31586. c(t, function(t, r) {
  31587. for (var s = {
  31588. name: t,
  31589. capital: i[r]
  31590. }, l = 0; l < e.length; l++)
  31591. s[e[l]] = t + n[l];
  31592. o.call(a, s)
  31593. })
  31594. }
  31595. }(["x", "y", "z", "radius", "angle", "single"], ["axisIndex", "axis", "index", "id"])
  31596. , MD = c
  31597. , ID = Si
  31598. , TD = function(t, e, i, n) {
  31599. this._dimName = t,
  31600. this._axisIndex = e,
  31601. this._valueWindow,
  31602. this._percentWindow,
  31603. this._dataExtent,
  31604. this._minMaxSpan,
  31605. this.ecModel = n,
  31606. this._dataZoomModel = i
  31607. };
  31608. TD.prototype = {
  31609. constructor: TD,
  31610. hostedBy: function(t) {
  31611. return this._dataZoomModel === t
  31612. },
  31613. getDataValueWindow: function() {
  31614. return this._valueWindow.slice()
  31615. },
  31616. getDataPercentWindow: function() {
  31617. return this._percentWindow.slice()
  31618. },
  31619. getTargetSeriesModels: function() {
  31620. var t = []
  31621. , e = this.ecModel;
  31622. return e.eachSeries(function(i) {
  31623. if (Pp(i.get("coordinateSystem"))) {
  31624. var n = this._dimName
  31625. , o = e.queryComponents({
  31626. mainType: n + "Axis",
  31627. index: i.get(n + "AxisIndex"),
  31628. id: i.get(n + "AxisId")
  31629. })[0];
  31630. this._axisIndex === (o && o.componentIndex) && t.push(i)
  31631. }
  31632. }, this),
  31633. t
  31634. },
  31635. getAxisModel: function() {
  31636. return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex)
  31637. },
  31638. getOtherAxisModel: function() {
  31639. var t, e, i = this._dimName, n = this.ecModel, o = this.getAxisModel();
  31640. "x" === i || "y" === i ? (e = "gridIndex",
  31641. t = "x" === i ? "y" : "x") : (e = "polarIndex",
  31642. t = "angle" === i ? "radius" : "angle");
  31643. var a;
  31644. return n.eachComponent(t + "Axis", function(t) {
  31645. (t.get(e) || 0) === (o.get(e) || 0) && (a = t)
  31646. }),
  31647. a
  31648. },
  31649. getMinMaxSpan: function() {
  31650. return e(this._minMaxSpan)
  31651. },
  31652. calculateDataWindow: function(t) {
  31653. var e = this._dataExtent
  31654. , i = this.getAxisModel().axis.scale
  31655. , n = this._dataZoomModel.getRangePropMode()
  31656. , o = [0, 100]
  31657. , a = [t.start, t.end]
  31658. , r = [];
  31659. return MD(["startValue", "endValue"], function(e) {
  31660. r.push(null != t[e] ? i.parse(t[e]) : null)
  31661. }),
  31662. MD([0, 1], function(t) {
  31663. var s = r[t]
  31664. , l = a[t];
  31665. "percent" === n[t] ? (null == l && (l = o[t]),
  31666. s = i.parse(_i(l, o, e, !0))) : l = _i(s, e, o, !0),
  31667. r[t] = s,
  31668. a[t] = l
  31669. }),
  31670. {
  31671. valueWindow: ID(r),
  31672. percentWindow: ID(a)
  31673. }
  31674. },
  31675. reset: function(t) {
  31676. if (t === this._dataZoomModel) {
  31677. this._dataExtent = zp(this, this._dimName, this.getTargetSeriesModels());
  31678. var e = this.calculateDataWindow(t.option);
  31679. this._valueWindow = e.valueWindow,
  31680. this._percentWindow = e.percentWindow,
  31681. Rp(this),
  31682. Ep(this)
  31683. }
  31684. },
  31685. restore: function(t) {
  31686. t === this._dataZoomModel && (this._valueWindow = this._percentWindow = null,
  31687. Ep(this, !0))
  31688. },
  31689. filterData: function(t) {
  31690. function e(t) {
  31691. return t >= a[0] && t <= a[1]
  31692. }
  31693. if (t === this._dataZoomModel) {
  31694. var i = this._dimName
  31695. , n = this.getTargetSeriesModels()
  31696. , o = t.get("filterMode")
  31697. , a = this._valueWindow;
  31698. if ("none" !== o) {
  31699. var r = this.getOtherAxisModel();
  31700. t.get("$fromToolbox") && r && "category" === r.get("type") && (o = "empty"),
  31701. MD(n, function(t) {
  31702. var n = t.getData()
  31703. , r = t.coordDimToDataDim(i);
  31704. "weakFilter" === o ? n && n.filterSelf(function(t) {
  31705. for (var e, i, o, s = 0; s < r.length; s++) {
  31706. var l = n.get(r[s], t)
  31707. , h = !isNaN(l)
  31708. , u = l < a[0]
  31709. , c = l > a[1];
  31710. if (h && !u && !c)
  31711. return !0;
  31712. h && (o = !0),
  31713. u && (e = !0),
  31714. c && (i = !0)
  31715. }
  31716. return o && e && i
  31717. }) : n && MD(r, function(i) {
  31718. "empty" === o ? t.setData(n.map(i, function(t) {
  31719. return e(t) ? t : NaN
  31720. })) : n.filterSelf(i, e)
  31721. })
  31722. })
  31723. }
  31724. }
  31725. }
  31726. };
  31727. var AD = c
  31728. , CD = SD
  31729. , DD = rr({
  31730. type: "dataZoom",
  31731. dependencies: ["xAxis", "yAxis", "zAxis", "radiusAxis", "angleAxis", "singleAxis", "series"],
  31732. defaultOption: {
  31733. zlevel: 0,
  31734. z: 4,
  31735. orient: null,
  31736. xAxisIndex: null,
  31737. yAxisIndex: null,
  31738. filterMode: "filter",
  31739. throttle: null,
  31740. start: 0,
  31741. end: 100,
  31742. startValue: null,
  31743. endValue: null,
  31744. minSpan: null,
  31745. maxSpan: null,
  31746. minValueSpan: null,
  31747. maxValueSpan: null,
  31748. rangeMode: null
  31749. },
  31750. init: function(t, e, i) {
  31751. this._dataIntervalByAxis = {},
  31752. this._dataInfo = {},
  31753. this._axisProxies = {},
  31754. this.textStyleModel,
  31755. this._autoThrottle = !0,
  31756. this._rangePropMode = ["percent", "percent"];
  31757. var n = Vp(t);
  31758. this.mergeDefaultAndTheme(t, i),
  31759. this.doInit(n)
  31760. },
  31761. mergeOption: function(t) {
  31762. var e = Vp(t);
  31763. i(this.option, t, !0),
  31764. this.doInit(e)
  31765. },
  31766. doInit: function(t) {
  31767. var e = this.option;
  31768. Yv.canvasSupported || (e.realtime = !1),
  31769. this._setDefaultThrottle(t),
  31770. Bp(this, t),
  31771. AD([["start", "startValue"], ["end", "endValue"]], function(t, i) {
  31772. "value" === this._rangePropMode[i] && (e[t[0]] = null)
  31773. }, this),
  31774. this.textStyleModel = this.getModel("textStyle"),
  31775. this._resetTarget(),
  31776. this._giveAxisProxies()
  31777. },
  31778. _giveAxisProxies: function() {
  31779. var t = this._axisProxies;
  31780. this.eachTargetAxis(function(e, i, n, o) {
  31781. var a = this.dependentModels[e.axis][i]
  31782. , r = a.__dzAxisProxy || (a.__dzAxisProxy = new TD(e.name,i,this,o));
  31783. t[e.name + "_" + i] = r
  31784. }, this)
  31785. },
  31786. _resetTarget: function() {
  31787. var t = this.option
  31788. , e = this._judgeAutoMode();
  31789. CD(function(e) {
  31790. var i = e.axisIndex;
  31791. t[i] = ko(t[i])
  31792. }, this),
  31793. "axisIndex" === e ? this._autoSetAxisIndex() : "orient" === e && this._autoSetOrient()
  31794. },
  31795. _judgeAutoMode: function() {
  31796. var t = this.option
  31797. , e = !1;
  31798. CD(function(i) {
  31799. null != t[i.axisIndex] && (e = !0)
  31800. }, this);
  31801. var i = t.orient;
  31802. return null == i && e ? "orient" : e ? void 0 : (null == i && (t.orient = "horizontal"),
  31803. "axisIndex")
  31804. },
  31805. _autoSetAxisIndex: function() {
  31806. var t = !0
  31807. , e = this.get("orient", !0)
  31808. , i = this.option
  31809. , n = this.dependentModels;
  31810. if (t) {
  31811. var o = "vertical" === e ? "y" : "x";
  31812. n[o + "Axis"].length ? (i[o + "AxisIndex"] = [0],
  31813. t = !1) : AD(n.singleAxis, function(n) {
  31814. t && n.get("orient", !0) === e && (i.singleAxisIndex = [n.componentIndex],
  31815. t = !1)
  31816. })
  31817. }
  31818. t && CD(function(e) {
  31819. if (t) {
  31820. var n = []
  31821. , o = this.dependentModels[e.axis];
  31822. if (o.length && !n.length)
  31823. for (var a = 0, r = o.length; a < r; a++)
  31824. "category" === o[a].get("type") && n.push(a);
  31825. i[e.axisIndex] = n,
  31826. n.length && (t = !1)
  31827. }
  31828. }, this),
  31829. t && this.ecModel.eachSeries(function(t) {
  31830. this._isSeriesHasAllAxesTypeOf(t, "value") && CD(function(e) {
  31831. var n = i[e.axisIndex]
  31832. , o = t.get(e.axisIndex)
  31833. , a = t.get(e.axisId)
  31834. , r = t.ecModel.queryComponents({
  31835. mainType: e.axis,
  31836. index: o,
  31837. id: a
  31838. })[0];
  31839. s(n, o = r.componentIndex) < 0 && n.push(o)
  31840. })
  31841. }, this)
  31842. },
  31843. _autoSetOrient: function() {
  31844. var t;
  31845. this.eachTargetAxis(function(e) {
  31846. !t && (t = e.name)
  31847. }, this),
  31848. this.option.orient = "y" === t ? "vertical" : "horizontal"
  31849. },
  31850. _isSeriesHasAllAxesTypeOf: function(t, e) {
  31851. var i = !0;
  31852. return CD(function(n) {
  31853. var o = t.get(n.axisIndex)
  31854. , a = this.dependentModels[n.axis][o];
  31855. a && a.get("type") === e || (i = !1)
  31856. }, this),
  31857. i
  31858. },
  31859. _setDefaultThrottle: function(t) {
  31860. if (t.hasOwnProperty("throttle") && (this._autoThrottle = !1),
  31861. this._autoThrottle) {
  31862. var e = this.ecModel.option;
  31863. this.option.throttle = e.animation && e.animationDurationUpdate > 0 ? 100 : 20
  31864. }
  31865. },
  31866. getFirstTargetAxisModel: function() {
  31867. var t;
  31868. return CD(function(e) {
  31869. if (null == t) {
  31870. var i = this.get(e.axisIndex);
  31871. i.length && (t = this.dependentModels[e.axis][i[0]])
  31872. }
  31873. }, this),
  31874. t
  31875. },
  31876. eachTargetAxis: function(t, e) {
  31877. var i = this.ecModel;
  31878. CD(function(n) {
  31879. AD(this.get(n.axisIndex), function(o) {
  31880. t.call(e, n, o, this, i)
  31881. }, this)
  31882. }, this)
  31883. },
  31884. getAxisProxy: function(t, e) {
  31885. return this._axisProxies[t + "_" + e]
  31886. },
  31887. getAxisModel: function(t, e) {
  31888. var i = this.getAxisProxy(t, e);
  31889. return i && i.getAxisModel()
  31890. },
  31891. setRawRange: function(t, e) {
  31892. var i = this.option;
  31893. AD([["start", "startValue"], ["end", "endValue"]], function(e) {
  31894. null == t[e[0]] && null == t[e[1]] || (i[e[0]] = t[e[0]],
  31895. i[e[1]] = t[e[1]])
  31896. }, this),
  31897. !e && Bp(this, t)
  31898. },
  31899. getPercentRange: function() {
  31900. var t = this.findRepresentativeAxisProxy();
  31901. if (t)
  31902. return t.getDataPercentWindow()
  31903. },
  31904. getValueRange: function(t, e) {
  31905. if (null != t || null != e)
  31906. return this.getAxisProxy(t, e).getDataValueWindow();
  31907. var i = this.findRepresentativeAxisProxy();
  31908. return i ? i.getDataValueWindow() : void 0
  31909. },
  31910. findRepresentativeAxisProxy: function(t) {
  31911. if (t)
  31912. return t.__dzAxisProxy;
  31913. var e = this._axisProxies;
  31914. for (var i in e)
  31915. if (e.hasOwnProperty(i) && e[i].hostedBy(this))
  31916. return e[i];
  31917. for (var i in e)
  31918. if (e.hasOwnProperty(i) && !e[i].hostedBy(this))
  31919. return e[i]
  31920. },
  31921. getRangePropMode: function() {
  31922. return this._rangePropMode.slice()
  31923. }
  31924. })
  31925. , LD = ww.extend({
  31926. type: "dataZoom",
  31927. render: function(t, e, i, n) {
  31928. this.dataZoomModel = t,
  31929. this.ecModel = e,
  31930. this.api = i
  31931. },
  31932. getTargetCoordInfo: function() {
  31933. function t(t, e, i, n) {
  31934. for (var o, a = 0; a < i.length; a++)
  31935. if (i[a].model === t) {
  31936. o = i[a];
  31937. break
  31938. }
  31939. o || i.push(o = {
  31940. model: t,
  31941. axisModels: [],
  31942. coordIndex: n
  31943. }),
  31944. o.axisModels.push(e)
  31945. }
  31946. var e = this.dataZoomModel
  31947. , i = this.ecModel
  31948. , n = {};
  31949. return e.eachTargetAxis(function(e, o) {
  31950. var a = i.getComponent(e.axis, o);
  31951. if (a) {
  31952. var r = a.getCoordSysModel();
  31953. r && t(r, a, n[r.mainType] || (n[r.mainType] = []), r.componentIndex)
  31954. }
  31955. }, this),
  31956. n
  31957. }
  31958. })
  31959. , kD = (DD.extend({
  31960. type: "dataZoom.slider",
  31961. layoutMode: "box",
  31962. defaultOption: {
  31963. show: !0,
  31964. right: "ph",
  31965. top: "ph",
  31966. width: "ph",
  31967. height: "ph",
  31968. left: null,
  31969. bottom: null,
  31970. backgroundColor: "rgba(47,69,84,0)",
  31971. dataBackground: {
  31972. lineStyle: {
  31973. color: "#2f4554",
  31974. width: .5,
  31975. opacity: .3
  31976. },
  31977. areaStyle: {
  31978. color: "rgba(47,69,84,0.3)",
  31979. opacity: .3
  31980. }
  31981. },
  31982. borderColor: "#ddd",
  31983. fillerColor: "rgba(167,183,204,0.4)",
  31984. handleIcon: "M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",
  31985. handleSize: "100%",
  31986. handleStyle: {
  31987. color: "#a7b7cc"
  31988. },
  31989. labelPrecision: null,
  31990. labelFormatter: null,
  31991. showDetail: !0,
  31992. showDataShadow: "auto",
  31993. realtime: !0,
  31994. zoomLock: !1,
  31995. textStyle: {
  31996. color: "#333"
  31997. }
  31998. }
  31999. }),
  32000. pb)
  32001. , PD = _i
  32002. , OD = Si
  32003. , zD = p
  32004. , ND = c
  32005. , ED = "horizontal"
  32006. , RD = 5
  32007. , VD = ["line", "bar", "candlestick", "scatter"]
  32008. , BD = LD.extend({
  32009. type: "dataZoom.slider",
  32010. init: function(t, e) {
  32011. this._displayables = {},
  32012. this._orient,
  32013. this._range,
  32014. this._handleEnds,
  32015. this._size,
  32016. this._handleWidth,
  32017. this._handleHeight,
  32018. this._location,
  32019. this._dragging,
  32020. this._dataShadowInfo,
  32021. this.api = e
  32022. },
  32023. render: function(t, e, i, n) {
  32024. BD.superApply(this, "render", arguments),
  32025. Da(this, "_dispatchZoomAction", this.dataZoomModel.get("throttle"), "fixRate"),
  32026. this._orient = t.get("orient"),
  32027. !1 !== this.dataZoomModel.get("show") ? (n && "dataZoom" === n.type && n.from === this.uid || this._buildView(),
  32028. this._updateView()) : this.group.removeAll()
  32029. },
  32030. remove: function() {
  32031. BD.superApply(this, "remove", arguments),
  32032. La(this, "_dispatchZoomAction")
  32033. },
  32034. dispose: function() {
  32035. BD.superApply(this, "dispose", arguments),
  32036. La(this, "_dispatchZoomAction")
  32037. },
  32038. _buildView: function() {
  32039. var t = this.group;
  32040. t.removeAll(),
  32041. this._resetLocation(),
  32042. this._resetInterval();
  32043. var e = this._displayables.barGroup = new $y;
  32044. this._renderBackground(),
  32045. this._renderHandle(),
  32046. this._renderDataShadow(),
  32047. t.add(e),
  32048. this._positionGroup()
  32049. },
  32050. _resetLocation: function() {
  32051. var t = this.dataZoomModel
  32052. , e = this.api
  32053. , i = this._findCoordRect()
  32054. , n = {
  32055. width: e.getWidth(),
  32056. height: e.getHeight()
  32057. }
  32058. , o = this._orient === ED ? {
  32059. right: n.width - i.x - i.width,
  32060. top: n.height - 30 - 7,
  32061. width: i.width,
  32062. height: 30
  32063. } : {
  32064. right: 7,
  32065. top: i.y,
  32066. width: 30,
  32067. height: i.height
  32068. }
  32069. , a = Qo(t.option);
  32070. c(["right", "top", "width", "height"], function(t) {
  32071. "ph" === a[t] && (a[t] = o[t])
  32072. });
  32073. var r = Yo(a, n, t.padding);
  32074. this._location = {
  32075. x: r.x,
  32076. y: r.y
  32077. },
  32078. this._size = [r.width, r.height],
  32079. "vertical" === this._orient && this._size.reverse()
  32080. },
  32081. _positionGroup: function() {
  32082. var t = this.group
  32083. , e = this._location
  32084. , i = this._orient
  32085. , n = this.dataZoomModel.getFirstTargetAxisModel()
  32086. , o = n && n.get("inverse")
  32087. , a = this._displayables.barGroup
  32088. , r = (this._dataShadowInfo || {}).otherAxisInverse;
  32089. a.attr(i !== ED || o ? i === ED && o ? {
  32090. scale: r ? [-1, 1] : [-1, -1]
  32091. } : "vertical" !== i || o ? {
  32092. scale: r ? [-1, -1] : [-1, 1],
  32093. rotation: Math.PI / 2
  32094. } : {
  32095. scale: r ? [1, -1] : [1, 1],
  32096. rotation: Math.PI / 2
  32097. } : {
  32098. scale: r ? [1, 1] : [1, -1]
  32099. });
  32100. var s = t.getBoundingRect([a]);
  32101. t.attr("position", [e.x - s.x, e.y - s.y])
  32102. },
  32103. _getViewExtent: function() {
  32104. return [0, this._size[0]]
  32105. },
  32106. _renderBackground: function() {
  32107. var t = this.dataZoomModel
  32108. , e = this._size
  32109. , i = this._displayables.barGroup;
  32110. i.add(new kD({
  32111. silent: !0,
  32112. shape: {
  32113. x: 0,
  32114. y: 0,
  32115. width: e[0],
  32116. height: e[1]
  32117. },
  32118. style: {
  32119. fill: t.get("backgroundColor")
  32120. },
  32121. z2: -40
  32122. })),
  32123. i.add(new kD({
  32124. shape: {
  32125. x: 0,
  32126. y: 0,
  32127. width: e[0],
  32128. height: e[1]
  32129. },
  32130. style: {
  32131. fill: "transparent"
  32132. },
  32133. z2: 0,
  32134. onclick: p(this._onClickPanelClick, this)
  32135. }))
  32136. },
  32137. _renderDataShadow: function() {
  32138. var t = this._dataShadowInfo = this._prepareDataShadowInfo();
  32139. if (t) {
  32140. var e = this._size
  32141. , i = t.series
  32142. , n = i.getRawData()
  32143. , o = i.getShadowDim ? i.getShadowDim() : t.otherDim;
  32144. if (null != o) {
  32145. var r = n.getDataExtent(o)
  32146. , s = .3 * (r[1] - r[0]);
  32147. r = [r[0] - s, r[1] + s];
  32148. var l, h = [0, e[1]], u = [0, e[0]], c = [[e[0], 0], [0, 0]], d = [], f = u[1] / (n.count() - 1), g = 0, p = Math.round(n.count() / e[0]);
  32149. n.each([o], function(t, e) {
  32150. if (p > 0 && e % p)
  32151. g += f;
  32152. else {
  32153. var i = null == t || isNaN(t) || "" === t
  32154. , n = i ? 0 : PD(t, r, h, !0);
  32155. i && !l && e ? (c.push([c[c.length - 1][0], 0]),
  32156. d.push([d[d.length - 1][0], 0])) : !i && l && (c.push([g, 0]),
  32157. d.push([g, 0])),
  32158. c.push([g, n]),
  32159. d.push([g, n]),
  32160. g += f,
  32161. l = i
  32162. }
  32163. });
  32164. var m = this.dataZoomModel;
  32165. this._displayables.barGroup.add(new fb({
  32166. shape: {
  32167. points: c
  32168. },
  32169. style: a({
  32170. fill: m.get("dataBackgroundColor")
  32171. }, m.getModel("dataBackground.areaStyle").getAreaStyle()),
  32172. silent: !0,
  32173. z2: -20
  32174. })),
  32175. this._displayables.barGroup.add(new gb({
  32176. shape: {
  32177. points: d
  32178. },
  32179. style: m.getModel("dataBackground.lineStyle").getLineStyle(),
  32180. silent: !0,
  32181. z2: -19
  32182. }))
  32183. }
  32184. }
  32185. },
  32186. _prepareDataShadowInfo: function() {
  32187. var t = this.dataZoomModel
  32188. , e = t.get("showDataShadow");
  32189. if (!1 !== e) {
  32190. var i, n = this.ecModel;
  32191. return t.eachTargetAxis(function(o, a) {
  32192. c(t.getAxisProxy(o.name, a).getTargetSeriesModels(), function(t) {
  32193. if (!(i || !0 !== e && s(VD, t.get("type")) < 0)) {
  32194. var r, l = n.getComponent(o.axis, a).axis, h = Gp(o.name), u = t.coordinateSystem;
  32195. null != h && u.getOtherAxis && (r = u.getOtherAxis(l).inverse),
  32196. i = {
  32197. thisAxis: l,
  32198. series: t,
  32199. thisDim: o.name,
  32200. otherDim: h,
  32201. otherAxisInverse: r
  32202. }
  32203. }
  32204. }, this)
  32205. }, this),
  32206. i
  32207. }
  32208. },
  32209. _renderHandle: function() {
  32210. var t = this._displayables
  32211. , e = t.handles = []
  32212. , i = t.handleLabels = []
  32213. , n = this._displayables.barGroup
  32214. , o = this._size
  32215. , a = this.dataZoomModel;
  32216. n.add(t.filler = new kD({
  32217. draggable: !0,
  32218. cursor: Wp(this._orient),
  32219. drift: zD(this._onDragMove, this, "all"),
  32220. onmousemove: function(t) {
  32221. Ix(t.event)
  32222. },
  32223. ondragstart: zD(this._showDataInfo, this, !0),
  32224. ondragend: zD(this._onDragEnd, this),
  32225. onmouseover: zD(this._showDataInfo, this, !0),
  32226. onmouseout: zD(this._showDataInfo, this, !1),
  32227. style: {
  32228. fill: a.get("fillerColor"),
  32229. textPosition: "inside"
  32230. }
  32231. })),
  32232. n.add(new kD(qn({
  32233. silent: !0,
  32234. shape: {
  32235. x: 0,
  32236. y: 0,
  32237. width: o[0],
  32238. height: o[1]
  32239. },
  32240. style: {
  32241. stroke: a.get("dataBackgroundColor") || a.get("borderColor"),
  32242. lineWidth: 1,
  32243. fill: "rgba(0,0,0,0)"
  32244. }
  32245. }))),
  32246. ND([0, 1], function(t) {
  32247. var o = Ao(a.get("handleIcon"), {
  32248. cursor: Wp(this._orient),
  32249. draggable: !0,
  32250. drift: zD(this._onDragMove, this, t),
  32251. onmousemove: function(t) {
  32252. Ix(t.event)
  32253. },
  32254. ondragend: zD(this._onDragEnd, this),
  32255. onmouseover: zD(this._showDataInfo, this, !0),
  32256. onmouseout: zD(this._showDataInfo, this, !1)
  32257. }, {
  32258. x: -1,
  32259. y: 0,
  32260. width: 2,
  32261. height: 2
  32262. })
  32263. , r = o.getBoundingRect();
  32264. this._handleHeight = bi(a.get("handleSize"), this._size[1]),
  32265. this._handleWidth = r.width / r.height * this._handleHeight,
  32266. o.setStyle(a.getModel("handleStyle").getItemStyle());
  32267. var s = a.get("handleColor");
  32268. null != s && (o.style.fill = s),
  32269. n.add(e[t] = o);
  32270. var l = a.textStyleModel;
  32271. this.group.add(i[t] = new ab({
  32272. silent: !0,
  32273. invisible: !0,
  32274. style: {
  32275. x: 0,
  32276. y: 0,
  32277. text: "",
  32278. textVerticalAlign: "middle",
  32279. textAlign: "center",
  32280. textFill: l.getTextColor(),
  32281. textFont: l.getFont()
  32282. },
  32283. z2: 10
  32284. }))
  32285. }, this)
  32286. },
  32287. _resetInterval: function() {
  32288. var t = this._range = this.dataZoomModel.getPercentRange()
  32289. , e = this._getViewExtent();
  32290. this._handleEnds = [PD(t[0], [0, 100], e, !0), PD(t[1], [0, 100], e, !0)]
  32291. },
  32292. _updateInterval: function(t, e) {
  32293. var i = this.dataZoomModel
  32294. , n = this._handleEnds
  32295. , o = this._getViewExtent()
  32296. , a = i.findRepresentativeAxisProxy().getMinMaxSpan()
  32297. , r = [0, 100];
  32298. WT(e, n, o, i.get("zoomLock") ? "all" : t, null != a.minSpan ? PD(a.minSpan, r, o, !0) : null, null != a.maxSpan ? PD(a.maxSpan, r, o, !0) : null),
  32299. this._range = OD([PD(n[0], o, r, !0), PD(n[1], o, r, !0)])
  32300. },
  32301. _updateView: function(t) {
  32302. var e = this._displayables
  32303. , i = this._handleEnds
  32304. , n = OD(i.slice())
  32305. , o = this._size;
  32306. ND([0, 1], function(t) {
  32307. var n = e.handles[t]
  32308. , a = this._handleHeight;
  32309. n.attr({
  32310. scale: [a / 2, a / 2],
  32311. position: [i[t], o[1] / 2 - a / 2]
  32312. })
  32313. }, this),
  32314. e.filler.setShape({
  32315. x: n[0],
  32316. y: 0,
  32317. width: n[1] - n[0],
  32318. height: o[1]
  32319. }),
  32320. this._updateDataInfo(t)
  32321. },
  32322. _updateDataInfo: function(t) {
  32323. function e(t) {
  32324. var e = wo(n.handles[t].parent, this.group)
  32325. , i = Mo(0 === t ? "right" : "left", e)
  32326. , s = this._handleWidth / 2 + RD
  32327. , l = So([c[t] + (0 === t ? -s : s), this._size[1] / 2], e);
  32328. o[t].setStyle({
  32329. x: l[0],
  32330. y: l[1],
  32331. textVerticalAlign: a === ED ? "middle" : i,
  32332. textAlign: a === ED ? i : "center",
  32333. text: r[t]
  32334. })
  32335. }
  32336. var i = this.dataZoomModel
  32337. , n = this._displayables
  32338. , o = n.handleLabels
  32339. , a = this._orient
  32340. , r = ["", ""];
  32341. if (i.get("showDetail")) {
  32342. var s = i.findRepresentativeAxisProxy();
  32343. if (s) {
  32344. var l = s.getAxisModel().axis
  32345. , h = this._range
  32346. , u = t ? s.calculateDataWindow({
  32347. start: h[0],
  32348. end: h[1]
  32349. }).valueWindow : s.getDataValueWindow();
  32350. r = [this._formatLabel(u[0], l), this._formatLabel(u[1], l)]
  32351. }
  32352. }
  32353. var c = OD(this._handleEnds.slice());
  32354. e.call(this, 0),
  32355. e.call(this, 1)
  32356. },
  32357. _formatLabel: function(t, e) {
  32358. var i = this.dataZoomModel
  32359. , n = i.get("labelFormatter")
  32360. , o = i.get("labelPrecision");
  32361. null != o && "auto" !== o || (o = e.getPixelPrecision());
  32362. var a = null == t || isNaN(t) ? "" : "category" === e.type || "time" === e.type ? e.scale.getLabel(Math.round(t)) : t.toFixed(Math.min(o, 20));
  32363. return y(n) ? n(t, a) : x(n) ? n.replace("{value}", a) : a
  32364. },
  32365. _showDataInfo: function(t) {
  32366. t = this._dragging || t;
  32367. var e = this._displayables.handleLabels;
  32368. e[0].attr("invisible", !t),
  32369. e[1].attr("invisible", !t)
  32370. },
  32371. _onDragMove: function(t, e, i) {
  32372. this._dragging = !0;
  32373. var n = So([e, i], this._displayables.barGroup.getLocalTransform(), !0);
  32374. this._updateInterval(t, n[0]);
  32375. var o = this.dataZoomModel.get("realtime");
  32376. this._updateView(!o),
  32377. o && o && this._dispatchZoomAction()
  32378. },
  32379. _onDragEnd: function() {
  32380. this._dragging = !1,
  32381. this._showDataInfo(!1),
  32382. this._dispatchZoomAction()
  32383. },
  32384. _onClickPanelClick: function(t) {
  32385. var e = this._size
  32386. , i = this._displayables.barGroup.transformCoordToLocal(t.offsetX, t.offsetY);
  32387. if (!(i[0] < 0 || i[0] > e[0] || i[1] < 0 || i[1] > e[1])) {
  32388. var n = this._handleEnds
  32389. , o = (n[0] + n[1]) / 2;
  32390. this._updateInterval("all", i[0] - o),
  32391. this._updateView(),
  32392. this._dispatchZoomAction()
  32393. }
  32394. },
  32395. _dispatchZoomAction: function() {
  32396. var t = this._range;
  32397. this.api.dispatchAction({
  32398. type: "dataZoom",
  32399. from: this.uid,
  32400. dataZoomId: this.dataZoomModel.id,
  32401. start: t[0],
  32402. end: t[1]
  32403. })
  32404. },
  32405. _findCoordRect: function() {
  32406. var t;
  32407. if (ND(this.getTargetCoordInfo(), function(e) {
  32408. if (!t && e.length) {
  32409. var i = e[0].model.coordinateSystem;
  32410. t = i.getRect && i.getRect()
  32411. }
  32412. }),
  32413. !t) {
  32414. var e = this.api.getWidth()
  32415. , i = this.api.getHeight();
  32416. t = {
  32417. x: .2 * e,
  32418. y: .2 * i,
  32419. width: .6 * e,
  32420. height: .6 * i
  32421. }
  32422. }
  32423. return t
  32424. }
  32425. });
  32426. DD.extend({
  32427. type: "dataZoom.inside",
  32428. defaultOption: {
  32429. disabled: !1,
  32430. zoomLock: !1,
  32431. zoomOnMouseWheel: !0,
  32432. moveOnMouseMove: !0,
  32433. preventDefaultMouseMove: !0
  32434. }
  32435. });
  32436. var GD = m
  32437. , WD = "\0_ec_dataZoom_roams"
  32438. , HD = p
  32439. , FD = LD.extend({
  32440. type: "dataZoom.inside",
  32441. init: function(t, e) {
  32442. this._range
  32443. },
  32444. render: function(t, e, i, n) {
  32445. FD.superApply(this, "render", arguments),
  32446. Zp(n, t.id) && (this._range = t.getPercentRange()),
  32447. c(this.getTargetCoordInfo(), function(e, n) {
  32448. var o = d(e, function(t) {
  32449. return Up(t.model)
  32450. });
  32451. c(e, function(e) {
  32452. var a = e.model
  32453. , r = t.option;
  32454. Hp(i, {
  32455. coordId: Up(a),
  32456. allCoordIds: o,
  32457. containsPoint: function(t, e, i) {
  32458. return a.coordinateSystem.containPoint([e, i])
  32459. },
  32460. dataZoomId: t.id,
  32461. throttleRate: t.get("throttle", !0),
  32462. panGetRange: HD(this._onPan, this, e, n),
  32463. zoomGetRange: HD(this._onZoom, this, e, n),
  32464. zoomLock: r.zoomLock,
  32465. disabled: r.disabled,
  32466. roamControllerOpt: {
  32467. zoomOnMouseWheel: r.zoomOnMouseWheel,
  32468. moveOnMouseMove: r.moveOnMouseMove,
  32469. preventDefaultMouseMove: r.preventDefaultMouseMove
  32470. }
  32471. })
  32472. }, this)
  32473. }, this)
  32474. },
  32475. dispose: function() {
  32476. Fp(this.api, this.dataZoomModel.id),
  32477. FD.superApply(this, "dispose", arguments),
  32478. this._range = null
  32479. },
  32480. _onPan: function(t, e, i, n, o, a, r, s, l) {
  32481. var h = this._range.slice()
  32482. , u = t.axisModels[0];
  32483. if (u) {
  32484. var c = ZD[e]([a, r], [s, l], u, i, t)
  32485. , d = c.signal * (h[1] - h[0]) * c.pixel / c.pixelLength;
  32486. return WT(d, h, [0, 100], "all"),
  32487. this._range = h
  32488. }
  32489. },
  32490. _onZoom: function(t, e, i, n, o, a) {
  32491. var r = this._range.slice()
  32492. , s = t.axisModels[0];
  32493. if (s) {
  32494. var l = ZD[e](null, [o, a], s, i, t)
  32495. , h = (l.signal > 0 ? l.pixelStart + l.pixelLength - l.pixel : l.pixel - l.pixelStart) / l.pixelLength * (r[1] - r[0]) + r[0];
  32496. n = Math.max(1 / n, 0),
  32497. r[0] = (r[0] - h) * n + h,
  32498. r[1] = (r[1] - h) * n + h;
  32499. var u = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
  32500. return WT(0, r, [0, 100], 0, u.minSpan, u.maxSpan),
  32501. this._range = r
  32502. }
  32503. }
  32504. })
  32505. , ZD = {
  32506. grid: function(t, e, i, n, o) {
  32507. var a = i.axis
  32508. , r = {}
  32509. , s = o.model.coordinateSystem.getRect();
  32510. return t = t || [0, 0],
  32511. "x" === a.dim ? (r.pixel = e[0] - t[0],
  32512. r.pixelLength = s.width,
  32513. r.pixelStart = s.x,
  32514. r.signal = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1],
  32515. r.pixelLength = s.height,
  32516. r.pixelStart = s.y,
  32517. r.signal = a.inverse ? -1 : 1),
  32518. r
  32519. },
  32520. polar: function(t, e, i, n, o) {
  32521. var a = i.axis
  32522. , r = {}
  32523. , s = o.model.coordinateSystem
  32524. , l = s.getRadiusAxis().getExtent()
  32525. , h = s.getAngleAxis().getExtent();
  32526. return t = t ? s.pointToCoord(t) : [0, 0],
  32527. e = s.pointToCoord(e),
  32528. "radiusAxis" === i.mainType ? (r.pixel = e[0] - t[0],
  32529. r.pixelLength = l[1] - l[0],
  32530. r.pixelStart = l[0],
  32531. r.signal = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1],
  32532. r.pixelLength = h[1] - h[0],
  32533. r.pixelStart = h[0],
  32534. r.signal = a.inverse ? -1 : 1),
  32535. r
  32536. },
  32537. singleAxis: function(t, e, i, n, o) {
  32538. var a = i.axis
  32539. , r = o.model.coordinateSystem.getRect()
  32540. , s = {};
  32541. return t = t || [0, 0],
  32542. "horizontal" === a.orient ? (s.pixel = e[0] - t[0],
  32543. s.pixelLength = r.width,
  32544. s.pixelStart = r.x,
  32545. s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1],
  32546. s.pixelLength = r.height,
  32547. s.pixelStart = r.y,
  32548. s.signal = a.inverse ? -1 : 1),
  32549. s
  32550. }
  32551. };
  32552. tr(function(t, e) {
  32553. t.eachComponent("dataZoom", function(t) {
  32554. t.eachTargetAxis(tm),
  32555. t.eachTargetAxis(em)
  32556. }),
  32557. t.eachComponent("dataZoom", function(t) {
  32558. var e = t.findRepresentativeAxisProxy()
  32559. , i = e.getDataPercentWindow()
  32560. , n = e.getDataValueWindow();
  32561. t.setRawRange({
  32562. start: i[0],
  32563. end: i[1],
  32564. startValue: n[0],
  32565. endValue: n[1]
  32566. }, !0)
  32567. })
  32568. }),
  32569. er("dataZoom", function(t, e) {
  32570. var i = Op(p(e.eachComponent, e, "dataZoom"), SD, function(t, e) {
  32571. return t.get(e.axisIndex)
  32572. })
  32573. , n = [];
  32574. e.eachComponent({
  32575. mainType: "dataZoom",
  32576. query: t
  32577. }, function(t, e) {
  32578. n.push.apply(n, i(t).nodes)
  32579. }),
  32580. c(n, function(e, i) {
  32581. e.setRawRange({
  32582. start: t.start,
  32583. end: t.end,
  32584. startValue: t.startValue,
  32585. endValue: t.endValue
  32586. })
  32587. })
  32588. });
  32589. var UD = c
  32590. , jD = function(t) {
  32591. var e = t && t.visualMap;
  32592. v(e) || (e = e ? [e] : []),
  32593. UD(e, function(t) {
  32594. if (t) {
  32595. im(t, "splitList") && !im(t, "pieces") && (t.pieces = t.splitList,
  32596. delete t.splitList);
  32597. var e = t.pieces;
  32598. e && v(e) && UD(e, function(t) {
  32599. _(t) && (im(t, "start") && !im(t, "min") && (t.min = t.start),
  32600. im(t, "end") && !im(t, "max") && (t.max = t.end))
  32601. })
  32602. }
  32603. })
  32604. };
  32605. qb.registerSubTypeDefaulter("visualMap", function(t) {
  32606. return t.categories || (t.pieces ? t.pieces.length > 0 : t.splitNumber > 0) && !t.calculable ? "piecewise" : "continuous"
  32607. }),
  32608. or(Ew.VISUAL.COMPONENT, function(t) {
  32609. t.eachComponent("visualMap", function(t) {
  32610. nm(t)
  32611. }),
  32612. om(t)
  32613. });
  32614. var XD = {
  32615. get: function(t, i, n) {
  32616. var o = e((qD[t] || {})[i]);
  32617. return n && v(o) ? o[o.length - 1] : o
  32618. }
  32619. }
  32620. , qD = {
  32621. color: {
  32622. active: ["#006edd", "#e0ffff"],
  32623. inactive: ["rgba(0,0,0,0)"]
  32624. },
  32625. colorHue: {
  32626. active: [0, 360],
  32627. inactive: [0, 0]
  32628. },
  32629. colorSaturation: {
  32630. active: [.3, 1],
  32631. inactive: [0, 0]
  32632. },
  32633. colorLightness: {
  32634. active: [.9, .5],
  32635. inactive: [0, 0]
  32636. },
  32637. colorAlpha: {
  32638. active: [.3, 1],
  32639. inactive: [0, 0]
  32640. },
  32641. opacity: {
  32642. active: [.3, 1],
  32643. inactive: [0, 0]
  32644. },
  32645. symbol: {
  32646. active: ["circle", "roundRect", "diamond"],
  32647. inactive: ["none"]
  32648. },
  32649. symbolSize: {
  32650. active: [10, 50],
  32651. inactive: [0, 0]
  32652. }
  32653. }
  32654. , YD = eT.mapVisual
  32655. , $D = eT.eachVisual
  32656. , KD = v
  32657. , JD = c
  32658. , QD = Si
  32659. , tL = _i
  32660. , eL = z
  32661. , iL = ["#f6efa6", "#d88273", "#bf444c"]
  32662. , nL = rr({
  32663. type: "visualMap",
  32664. dependencies: ["series"],
  32665. stateList: ["inRange", "outOfRange"],
  32666. replacableOptionKeys: ["inRange", "outOfRange", "target", "controller", "color"],
  32667. dataBound: [-1 / 0, 1 / 0],
  32668. layoutMode: {
  32669. type: "box",
  32670. ignoreSize: !0
  32671. },
  32672. defaultOption: {
  32673. show: !0,
  32674. zlevel: 0,
  32675. z: 4,
  32676. seriesIndex: "all",
  32677. min: 0,
  32678. max: 200,
  32679. dimension: null,
  32680. inRange: null,
  32681. outOfRange: null,
  32682. left: 0,
  32683. right: null,
  32684. top: null,
  32685. bottom: 0,
  32686. itemWidth: null,
  32687. itemHeight: null,
  32688. inverse: !1,
  32689. orient: "vertical",
  32690. backgroundColor: "rgba(0,0,0,0)",
  32691. borderColor: "#ccc",
  32692. contentColor: "#5793f3",
  32693. inactiveColor: "#aaa",
  32694. borderWidth: 0,
  32695. padding: 5,
  32696. textGap: 10,
  32697. precision: 0,
  32698. color: null,
  32699. formatter: null,
  32700. text: null,
  32701. textStyle: {
  32702. color: "#333"
  32703. }
  32704. },
  32705. init: function(t, e, i) {
  32706. this._dataExtent,
  32707. this.targetVisuals = {},
  32708. this.controllerVisuals = {},
  32709. this.textStyleModel,
  32710. this.itemSize,
  32711. this.mergeDefaultAndTheme(t, i)
  32712. },
  32713. optionUpdated: function(t, e) {
  32714. var i = this.option;
  32715. Yv.canvasSupported || (i.realtime = !1),
  32716. !e && ip(i, t, this.replacableOptionKeys),
  32717. this.textStyleModel = this.getModel("textStyle"),
  32718. this.resetItemSize(),
  32719. this.completeVisualOption()
  32720. },
  32721. resetVisual: function(t) {
  32722. var e = this.stateList;
  32723. t = p(t, this),
  32724. this.controllerVisuals = ep(this.option.controller, e, t),
  32725. this.targetVisuals = ep(this.option.target, e, t)
  32726. },
  32727. getTargetSeriesIndices: function() {
  32728. var t = this.option.seriesIndex
  32729. , e = [];
  32730. return null == t || "all" === t ? this.ecModel.eachSeries(function(t, i) {
  32731. e.push(i)
  32732. }) : e = ko(t),
  32733. e
  32734. },
  32735. eachTargetSeries: function(t, e) {
  32736. c(this.getTargetSeriesIndices(), function(i) {
  32737. t.call(e, this.ecModel.getSeriesByIndex(i))
  32738. }, this)
  32739. },
  32740. isTargetSeries: function(t) {
  32741. var e = !1;
  32742. return this.eachTargetSeries(function(i) {
  32743. i === t && (e = !0)
  32744. }),
  32745. e
  32746. },
  32747. formatValueText: function(t, e, i) {
  32748. function n(t) {
  32749. return t === l[0] ? "min" : t === l[1] ? "max" : (+t).toFixed(Math.min(s, 20))
  32750. }
  32751. var o, a, r = this.option, s = r.precision, l = this.dataBound, h = r.formatter;
  32752. return i = i || ["<", ">"],
  32753. v(t) && (t = t.slice(),
  32754. o = !0),
  32755. a = e ? t : o ? [n(t[0]), n(t[1])] : n(t),
  32756. x(h) ? h.replace("{value}", o ? a[0] : a).replace("{value2}", o ? a[1] : a) : y(h) ? o ? h(t[0], t[1]) : h(t) : o ? t[0] === l[0] ? i[0] + " " + a[1] : t[1] === l[1] ? i[1] + " " + a[0] : a[0] + " - " + a[1] : a
  32757. },
  32758. resetExtent: function() {
  32759. var t = this.option
  32760. , e = QD([t.min, t.max]);
  32761. this._dataExtent = e
  32762. },
  32763. getDataDimension: function(t) {
  32764. var e = this.option.dimension;
  32765. return null != e ? e : t.dimensions.length - 1
  32766. },
  32767. getExtent: function() {
  32768. return this._dataExtent.slice()
  32769. },
  32770. completeVisualOption: function() {
  32771. function t(t) {
  32772. KD(n.color) && !t.inRange && (t.inRange = {
  32773. color: n.color.slice().reverse()
  32774. }),
  32775. t.inRange = t.inRange || {
  32776. color: iL
  32777. },
  32778. JD(this.stateList, function(e) {
  32779. var i = t[e];
  32780. if (x(i)) {
  32781. var n = XD.get(i, "active", s);
  32782. n ? (t[e] = {},
  32783. t[e][i] = n) : delete t[e]
  32784. }
  32785. }, this)
  32786. }
  32787. var n = this.option
  32788. , o = {
  32789. inRange: n.inRange,
  32790. outOfRange: n.outOfRange
  32791. }
  32792. , a = n.target || (n.target = {})
  32793. , r = n.controller || (n.controller = {});
  32794. i(a, o),
  32795. i(r, o);
  32796. var s = this.isCategory();
  32797. t.call(this, a),
  32798. t.call(this, r),
  32799. function(t, e, i) {
  32800. var n = t[e]
  32801. , o = t[i];
  32802. n && !o && (o = t[i] = {},
  32803. JD(n, function(t, e) {
  32804. if (eT.isValidType(e)) {
  32805. var i = XD.get(e, "inactive", s);
  32806. null != i && (o[e] = i,
  32807. "color" !== e || o.hasOwnProperty("opacity") || o.hasOwnProperty("colorAlpha") || (o.opacity = [0, 0]))
  32808. }
  32809. }))
  32810. }
  32811. .call(this, a, "inRange", "outOfRange"),
  32812. function(t) {
  32813. var i = (t.inRange || {}).symbol || (t.outOfRange || {}).symbol
  32814. , n = (t.inRange || {}).symbolSize || (t.outOfRange || {}).symbolSize
  32815. , o = this.get("inactiveColor");
  32816. JD(this.stateList, function(a) {
  32817. var r = this.itemSize
  32818. , l = t[a];
  32819. l || (l = t[a] = {
  32820. color: s ? o : [o]
  32821. }),
  32822. null == l.symbol && (l.symbol = i && e(i) || (s ? "roundRect" : ["roundRect"])),
  32823. null == l.symbolSize && (l.symbolSize = n && e(n) || (s ? r[0] : [r[0], r[0]])),
  32824. l.symbol = YD(l.symbol, function(t) {
  32825. return "none" === t || "square" === t ? "roundRect" : t
  32826. });
  32827. var h = l.symbolSize;
  32828. if (null != h) {
  32829. var u = -1 / 0;
  32830. $D(h, function(t) {
  32831. t > u && (u = t)
  32832. }),
  32833. l.symbolSize = YD(h, function(t) {
  32834. return tL(t, [0, u], [0, r[0]], !0)
  32835. })
  32836. }
  32837. }, this)
  32838. }
  32839. .call(this, r)
  32840. },
  32841. resetItemSize: function() {
  32842. this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))]
  32843. },
  32844. isCategory: function() {
  32845. return !!this.option.categories
  32846. },
  32847. setSelected: eL,
  32848. getValueState: eL,
  32849. getVisualMeta: eL
  32850. })
  32851. , oL = [20, 140]
  32852. , aL = nL.extend({
  32853. type: "visualMap.continuous",
  32854. defaultOption: {
  32855. align: "auto",
  32856. calculable: !1,
  32857. range: null,
  32858. realtime: !0,
  32859. itemHeight: null,
  32860. itemWidth: null,
  32861. hoverLink: !0,
  32862. hoverLinkDataSize: null,
  32863. hoverLinkOnHandle: null
  32864. },
  32865. optionUpdated: function(t, e) {
  32866. aL.superApply(this, "optionUpdated", arguments),
  32867. this.resetExtent(),
  32868. this.resetVisual(function(t) {
  32869. t.mappingMethod = "linear",
  32870. t.dataExtent = this.getExtent()
  32871. }),
  32872. this._resetRange()
  32873. },
  32874. resetItemSize: function() {
  32875. aL.superApply(this, "resetItemSize", arguments);
  32876. var t = this.itemSize;
  32877. "horizontal" === this._orient && t.reverse(),
  32878. (null == t[0] || isNaN(t[0])) && (t[0] = oL[0]),
  32879. (null == t[1] || isNaN(t[1])) && (t[1] = oL[1])
  32880. },
  32881. _resetRange: function() {
  32882. var t = this.getExtent()
  32883. , e = this.option.range;
  32884. !e || e.auto ? (t.auto = 1,
  32885. this.option.range = t) : v(e) && (e[0] > e[1] && e.reverse(),
  32886. e[0] = Math.max(e[0], t[0]),
  32887. e[1] = Math.min(e[1], t[1]))
  32888. },
  32889. completeVisualOption: function() {
  32890. nL.prototype.completeVisualOption.apply(this, arguments),
  32891. c(this.stateList, function(t) {
  32892. var e = this.option.controller[t].symbolSize;
  32893. e && e[0] !== e[1] && (e[0] = 0)
  32894. }, this)
  32895. },
  32896. setSelected: function(t) {
  32897. this.option.range = t.slice(),
  32898. this._resetRange()
  32899. },
  32900. getSelected: function() {
  32901. var t = this.getExtent()
  32902. , e = Si((this.get("range") || []).slice());
  32903. return e[0] > t[1] && (e[0] = t[1]),
  32904. e[1] > t[1] && (e[1] = t[1]),
  32905. e[0] < t[0] && (e[0] = t[0]),
  32906. e[1] < t[0] && (e[1] = t[0]),
  32907. e
  32908. },
  32909. getValueState: function(t) {
  32910. var e = this.option.range
  32911. , i = this.getExtent();
  32912. return (e[0] <= i[0] || e[0] <= t) && (e[1] >= i[1] || t <= e[1]) ? "inRange" : "outOfRange"
  32913. },
  32914. findTargetDataIndices: function(t) {
  32915. var e = [];
  32916. return this.eachTargetSeries(function(i) {
  32917. var n = []
  32918. , o = i.getData();
  32919. o.each(this.getDataDimension(o), function(e, i) {
  32920. t[0] <= e && e <= t[1] && n.push(i)
  32921. }, !0, this),
  32922. e.push({
  32923. seriesId: i.id,
  32924. dataIndex: n
  32925. })
  32926. }, this),
  32927. e
  32928. },
  32929. getVisualMeta: function(t) {
  32930. function e(e, i) {
  32931. o.push({
  32932. value: e,
  32933. color: t(e, i)
  32934. })
  32935. }
  32936. for (var i = rm(0, 0, this.getExtent()), n = rm(0, 0, this.option.range.slice()), o = [], a = 0, r = 0, s = n.length, l = i.length; r < l && (!n.length || i[r] <= n[0]); r++)
  32937. i[r] < n[a] && e(i[r], "outOfRange");
  32938. for (h = 1; a < s; a++,
  32939. h = 0)
  32940. h && o.length && e(n[a], "outOfRange"),
  32941. e(n[a], "inRange");
  32942. for (var h = 1; r < l; r++)
  32943. (!n.length || n[n.length - 1] < i[r]) && (h && (o.length && e(o[o.length - 1].value, "outOfRange"),
  32944. h = 0),
  32945. e(i[r], "outOfRange"));
  32946. var u = o.length;
  32947. return {
  32948. stops: o,
  32949. outerColors: [u ? o[0].color : "transparent", u ? o[u - 1].color : "transparent"]
  32950. }
  32951. }
  32952. })
  32953. , rL = sr({
  32954. type: "visualMap",
  32955. autoPositionValues: {
  32956. left: 1,
  32957. right: 1,
  32958. top: 1,
  32959. bottom: 1
  32960. },
  32961. init: function(t, e) {
  32962. this.ecModel = t,
  32963. this.api = e,
  32964. this.visualMapModel
  32965. },
  32966. render: function(t, e, i, n) {
  32967. this.visualMapModel = t,
  32968. !1 !== t.get("show") ? this.doRender.apply(this, arguments) : this.group.removeAll()
  32969. },
  32970. renderBackground: function(t) {
  32971. var e = this.visualMapModel
  32972. , i = Ux(e.get("padding") || 0)
  32973. , n = t.getBoundingRect();
  32974. t.add(new pb({
  32975. z2: -1,
  32976. silent: !0,
  32977. shape: {
  32978. x: n.x - i[3],
  32979. y: n.y - i[0],
  32980. width: n.width + i[3] + i[1],
  32981. height: n.height + i[0] + i[2]
  32982. },
  32983. style: {
  32984. fill: e.get("backgroundColor"),
  32985. stroke: e.get("borderColor"),
  32986. lineWidth: e.get("borderWidth")
  32987. }
  32988. }))
  32989. },
  32990. getControllerVisual: function(t, e, i) {
  32991. function n(t) {
  32992. return s[t]
  32993. }
  32994. function o(t, e) {
  32995. s[t] = e
  32996. }
  32997. var a = (i = i || {}).forceState
  32998. , r = this.visualMapModel
  32999. , s = {};
  33000. if ("symbol" === e && (s.symbol = r.get("itemSymbol")),
  33001. "color" === e) {
  33002. var l = r.get("contentColor");
  33003. s.color = l
  33004. }
  33005. var h = r.controllerVisuals[a || r.getValueState(t)];
  33006. return c(eT.prepareVisualTypes(h), function(a) {
  33007. var r = h[a];
  33008. i.convertOpacityToAlpha && "opacity" === a && (a = "colorAlpha",
  33009. r = h.__alphaForOpacity),
  33010. eT.dependsOn(a, e) && r && r.applyVisual(t, n, o)
  33011. }),
  33012. s[e]
  33013. },
  33014. positionGroup: function(t) {
  33015. var e = this.visualMapModel
  33016. , i = this.api;
  33017. $o(t, e.getBoxLayoutParams(), {
  33018. width: i.getWidth(),
  33019. height: i.getHeight()
  33020. })
  33021. },
  33022. doRender: z
  33023. })
  33024. , sL = _i
  33025. , lL = c
  33026. , hL = Math.min
  33027. , uL = Math.max
  33028. , cL = 12
  33029. , dL = 6
  33030. , fL = rL.extend({
  33031. type: "visualMap.continuous",
  33032. init: function() {
  33033. fL.superApply(this, "init", arguments),
  33034. this._shapes = {},
  33035. this._dataInterval = [],
  33036. this._handleEnds = [],
  33037. this._orient,
  33038. this._useHandle,
  33039. this._hoverLinkDataIndices = [],
  33040. this._dragging,
  33041. this._hovering
  33042. },
  33043. doRender: function(t, e, i, n) {
  33044. n && "selectDataRange" === n.type && n.from === this.uid || this._buildView()
  33045. },
  33046. _buildView: function() {
  33047. this.group.removeAll();
  33048. var t = this.visualMapModel
  33049. , e = this.group;
  33050. this._orient = t.get("orient"),
  33051. this._useHandle = t.get("calculable"),
  33052. this._resetInterval(),
  33053. this._renderBar(e);
  33054. var i = t.get("text");
  33055. this._renderEndsText(e, i, 0),
  33056. this._renderEndsText(e, i, 1),
  33057. this._updateView(!0),
  33058. this.renderBackground(e),
  33059. this._updateView(),
  33060. this._enableHoverLinkToSeries(),
  33061. this._enableHoverLinkFromSeries(),
  33062. this.positionGroup(e)
  33063. },
  33064. _renderEndsText: function(t, e, i) {
  33065. if (e) {
  33066. var n = e[1 - i];
  33067. n = null != n ? n + "" : "";
  33068. var o = this.visualMapModel
  33069. , a = o.get("textGap")
  33070. , r = o.itemSize
  33071. , s = this._shapes.barGroup
  33072. , l = this._applyTransform([r[0] / 2, 0 === i ? -a : r[1] + a], s)
  33073. , h = this._applyTransform(0 === i ? "bottom" : "top", s)
  33074. , u = this._orient
  33075. , c = this.visualMapModel.textStyleModel;
  33076. this.group.add(new ab({
  33077. style: {
  33078. x: l[0],
  33079. y: l[1],
  33080. textVerticalAlign: "horizontal" === u ? "middle" : h,
  33081. textAlign: "horizontal" === u ? h : "center",
  33082. text: n,
  33083. textFont: c.getFont(),
  33084. textFill: c.getTextColor()
  33085. }
  33086. }))
  33087. }
  33088. },
  33089. _renderBar: function(t) {
  33090. var e = this.visualMapModel
  33091. , i = this._shapes
  33092. , n = e.itemSize
  33093. , o = this._orient
  33094. , a = this._useHandle
  33095. , r = sm(e, this.api, n)
  33096. , s = i.barGroup = this._createBarGroup(r);
  33097. s.add(i.outOfRange = hm()),
  33098. s.add(i.inRange = hm(null, a ? gm(this._orient) : null, p(this._dragHandle, this, "all", !1), p(this._dragHandle, this, "all", !0)));
  33099. var l = e.textStyleModel.getTextRect("国")
  33100. , h = uL(l.width, l.height);
  33101. a && (i.handleThumbs = [],
  33102. i.handleLabels = [],
  33103. i.handleLabelPoints = [],
  33104. this._createHandle(s, 0, n, h, o, r),
  33105. this._createHandle(s, 1, n, h, o, r)),
  33106. this._createIndicator(s, n, h, o),
  33107. t.add(s)
  33108. },
  33109. _createHandle: function(t, e, i, n, o) {
  33110. var a = p(this._dragHandle, this, e, !1)
  33111. , r = p(this._dragHandle, this, e, !0)
  33112. , s = hm(um(e, n), gm(this._orient), a, r);
  33113. s.position[0] = i[0],
  33114. t.add(s);
  33115. var l = this.visualMapModel.textStyleModel
  33116. , h = new ab({
  33117. draggable: !0,
  33118. drift: a,
  33119. onmousemove: function(t) {
  33120. Ix(t.event)
  33121. },
  33122. ondragend: r,
  33123. style: {
  33124. x: 0,
  33125. y: 0,
  33126. text: "",
  33127. textFont: l.getFont(),
  33128. textFill: l.getTextColor()
  33129. }
  33130. });
  33131. this.group.add(h);
  33132. var u = ["horizontal" === o ? n / 2 : 1.5 * n, "horizontal" === o ? 0 === e ? -1.5 * n : 1.5 * n : 0 === e ? -n / 2 : n / 2]
  33133. , c = this._shapes;
  33134. c.handleThumbs[e] = s,
  33135. c.handleLabelPoints[e] = u,
  33136. c.handleLabels[e] = h
  33137. },
  33138. _createIndicator: function(t, e, i, n) {
  33139. var o = hm([[0, 0]], "move");
  33140. o.position[0] = e[0],
  33141. o.attr({
  33142. invisible: !0,
  33143. silent: !0
  33144. }),
  33145. t.add(o);
  33146. var a = this.visualMapModel.textStyleModel
  33147. , r = new ab({
  33148. silent: !0,
  33149. invisible: !0,
  33150. style: {
  33151. x: 0,
  33152. y: 0,
  33153. text: "",
  33154. textFont: a.getFont(),
  33155. textFill: a.getTextColor()
  33156. }
  33157. });
  33158. this.group.add(r);
  33159. var s = ["horizontal" === n ? i / 2 : dL + 3, 0]
  33160. , l = this._shapes;
  33161. l.indicator = o,
  33162. l.indicatorLabel = r,
  33163. l.indicatorLabelPoint = s
  33164. },
  33165. _dragHandle: function(t, e, i, n) {
  33166. if (this._useHandle) {
  33167. if (this._dragging = !e,
  33168. !e) {
  33169. var o = this._applyTransform([i, n], this._shapes.barGroup, !0);
  33170. this._updateInterval(t, o[1]),
  33171. this._updateView()
  33172. }
  33173. e === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
  33174. type: "selectDataRange",
  33175. from: this.uid,
  33176. visualMapId: this.visualMapModel.id,
  33177. selected: this._dataInterval.slice()
  33178. }),
  33179. e ? !this._hovering && this._clearHoverLinkToSeries() : fm(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[t], !1)
  33180. }
  33181. },
  33182. _resetInterval: function() {
  33183. var t = this.visualMapModel
  33184. , e = this._dataInterval = t.getSelected()
  33185. , i = t.getExtent()
  33186. , n = [0, t.itemSize[1]];
  33187. this._handleEnds = [sL(e[0], i, n, !0), sL(e[1], i, n, !0)]
  33188. },
  33189. _updateInterval: function(t, e) {
  33190. e = e || 0;
  33191. var i = this.visualMapModel
  33192. , n = this._handleEnds
  33193. , o = [0, i.itemSize[1]];
  33194. WT(e, n, o, t, 0);
  33195. var a = i.getExtent();
  33196. this._dataInterval = [sL(n[0], o, a, !0), sL(n[1], o, a, !0)]
  33197. },
  33198. _updateView: function(t) {
  33199. var e = this.visualMapModel
  33200. , i = e.getExtent()
  33201. , n = this._shapes
  33202. , o = [0, e.itemSize[1]]
  33203. , a = t ? o : this._handleEnds
  33204. , r = this._createBarVisual(this._dataInterval, i, a, "inRange")
  33205. , s = this._createBarVisual(i, i, o, "outOfRange");
  33206. n.inRange.setStyle({
  33207. fill: r.barColor,
  33208. opacity: r.opacity
  33209. }).setShape("points", r.barPoints),
  33210. n.outOfRange.setStyle({
  33211. fill: s.barColor,
  33212. opacity: s.opacity
  33213. }).setShape("points", s.barPoints),
  33214. this._updateHandle(a, r)
  33215. },
  33216. _createBarVisual: function(t, e, i, n) {
  33217. var o = {
  33218. forceState: n,
  33219. convertOpacityToAlpha: !0
  33220. }
  33221. , a = this._makeColorGradient(t, o)
  33222. , r = [this.getControllerVisual(t[0], "symbolSize", o), this.getControllerVisual(t[1], "symbolSize", o)]
  33223. , s = this._createBarPoints(i, r);
  33224. return {
  33225. barColor: new wb(0,0,0,1,a),
  33226. barPoints: s,
  33227. handlesColor: [a[0].color, a[a.length - 1].color]
  33228. }
  33229. },
  33230. _makeColorGradient: function(t, e) {
  33231. var i = []
  33232. , n = (t[1] - t[0]) / 100;
  33233. i.push({
  33234. color: this.getControllerVisual(t[0], "color", e),
  33235. offset: 0
  33236. });
  33237. for (var o = 1; o < 100; o++) {
  33238. var a = t[0] + n * o;
  33239. if (a > t[1])
  33240. break;
  33241. i.push({
  33242. color: this.getControllerVisual(a, "color", e),
  33243. offset: o / 100
  33244. })
  33245. }
  33246. return i.push({
  33247. color: this.getControllerVisual(t[1], "color", e),
  33248. offset: 1
  33249. }),
  33250. i
  33251. },
  33252. _createBarPoints: function(t, e) {
  33253. var i = this.visualMapModel.itemSize;
  33254. return [[i[0] - e[0], t[0]], [i[0], t[0]], [i[0], t[1]], [i[0] - e[1], t[1]]]
  33255. },
  33256. _createBarGroup: function(t) {
  33257. var e = this._orient
  33258. , i = this.visualMapModel.get("inverse");
  33259. return new $y("horizontal" !== e || i ? "horizontal" === e && i ? {
  33260. scale: "bottom" === t ? [-1, 1] : [1, 1],
  33261. rotation: -Math.PI / 2
  33262. } : "vertical" !== e || i ? {
  33263. scale: "left" === t ? [1, 1] : [-1, 1]
  33264. } : {
  33265. scale: "left" === t ? [1, -1] : [-1, -1]
  33266. } : {
  33267. scale: "bottom" === t ? [1, 1] : [-1, 1],
  33268. rotation: Math.PI / 2
  33269. })
  33270. },
  33271. _updateHandle: function(t, e) {
  33272. if (this._useHandle) {
  33273. var i = this._shapes
  33274. , n = this.visualMapModel
  33275. , o = i.handleThumbs
  33276. , a = i.handleLabels;
  33277. lL([0, 1], function(r) {
  33278. var s = o[r];
  33279. s.setStyle("fill", e.handlesColor[r]),
  33280. s.position[1] = t[r];
  33281. var l = So(i.handleLabelPoints[r], wo(s, this.group));
  33282. a[r].setStyle({
  33283. x: l[0],
  33284. y: l[1],
  33285. text: n.formatValueText(this._dataInterval[r]),
  33286. textVerticalAlign: "middle",
  33287. textAlign: this._applyTransform("horizontal" === this._orient ? 0 === r ? "bottom" : "top" : "left", i.barGroup)
  33288. })
  33289. }, this)
  33290. }
  33291. },
  33292. _showIndicator: function(t, e, i, n) {
  33293. var o = this.visualMapModel
  33294. , a = o.getExtent()
  33295. , r = o.itemSize
  33296. , s = [0, r[1]]
  33297. , l = sL(t, a, s, !0)
  33298. , h = this._shapes
  33299. , u = h.indicator;
  33300. if (u) {
  33301. u.position[1] = l,
  33302. u.attr("invisible", !1),
  33303. u.setShape("points", cm(!!i, n, l, r[1]));
  33304. var c = {
  33305. convertOpacityToAlpha: !0
  33306. }
  33307. , d = this.getControllerVisual(t, "color", c);
  33308. u.setStyle("fill", d);
  33309. var f = So(h.indicatorLabelPoint, wo(u, this.group))
  33310. , g = h.indicatorLabel;
  33311. g.attr("invisible", !1);
  33312. var p = this._applyTransform("left", h.barGroup)
  33313. , m = this._orient;
  33314. g.setStyle({
  33315. text: (i || "") + o.formatValueText(e),
  33316. textVerticalAlign: "horizontal" === m ? p : "middle",
  33317. textAlign: "horizontal" === m ? "center" : p,
  33318. x: f[0],
  33319. y: f[1]
  33320. })
  33321. }
  33322. },
  33323. _enableHoverLinkToSeries: function() {
  33324. var t = this;
  33325. this._shapes.barGroup.on("mousemove", function(e) {
  33326. if (t._hovering = !0,
  33327. !t._dragging) {
  33328. var i = t.visualMapModel.itemSize
  33329. , n = t._applyTransform([e.offsetX, e.offsetY], t._shapes.barGroup, !0, !0);
  33330. n[1] = hL(uL(0, n[1]), i[1]),
  33331. t._doHoverLinkToSeries(n[1], 0 <= n[0] && n[0] <= i[0])
  33332. }
  33333. }).on("mouseout", function() {
  33334. t._hovering = !1,
  33335. !t._dragging && t._clearHoverLinkToSeries()
  33336. })
  33337. },
  33338. _enableHoverLinkFromSeries: function() {
  33339. var t = this.api.getZr();
  33340. this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this),
  33341. t.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries()
  33342. },
  33343. _doHoverLinkToSeries: function(t, e) {
  33344. var i = this.visualMapModel
  33345. , n = i.itemSize;
  33346. if (i.option.hoverLink) {
  33347. var o = [0, n[1]]
  33348. , a = i.getExtent();
  33349. t = hL(uL(o[0], t), o[1]);
  33350. var r = dm(i, a, o)
  33351. , s = [t - r, t + r]
  33352. , l = sL(t, o, a, !0)
  33353. , h = [sL(s[0], o, a, !0), sL(s[1], o, a, !0)];
  33354. s[0] < o[0] && (h[0] = -1 / 0),
  33355. s[1] > o[1] && (h[1] = 1 / 0),
  33356. e && (h[0] === -1 / 0 ? this._showIndicator(l, h[1], "< ", r) : h[1] === 1 / 0 ? this._showIndicator(l, h[0], "> ", r) : this._showIndicator(l, l, "≈ ", r));
  33357. var u = this._hoverLinkDataIndices
  33358. , c = [];
  33359. (e || fm(i)) && (c = this._hoverLinkDataIndices = i.findTargetDataIndices(h));
  33360. var d = Bo(u, c);
  33361. this._dispatchHighDown("downplay", lm(d[0])),
  33362. this._dispatchHighDown("highlight", lm(d[1]))
  33363. }
  33364. },
  33365. _hoverLinkFromSeriesMouseOver: function(t) {
  33366. var e = t.target
  33367. , i = this.visualMapModel;
  33368. if (e && null != e.dataIndex) {
  33369. var n = this.ecModel.getSeriesByIndex(e.seriesIndex);
  33370. if (i.isTargetSeries(n)) {
  33371. var o = n.getData(e.dataType)
  33372. , a = o.getDimension(i.getDataDimension(o))
  33373. , r = o.get(a, e.dataIndex, !0);
  33374. isNaN(r) || this._showIndicator(r, r)
  33375. }
  33376. }
  33377. },
  33378. _hideIndicator: function() {
  33379. var t = this._shapes;
  33380. t.indicator && t.indicator.attr("invisible", !0),
  33381. t.indicatorLabel && t.indicatorLabel.attr("invisible", !0)
  33382. },
  33383. _clearHoverLinkToSeries: function() {
  33384. this._hideIndicator();
  33385. var t = this._hoverLinkDataIndices;
  33386. this._dispatchHighDown("downplay", lm(t)),
  33387. t.length = 0
  33388. },
  33389. _clearHoverLinkFromSeries: function() {
  33390. this._hideIndicator();
  33391. var t = this.api.getZr();
  33392. t.off("mouseover", this._hoverLinkFromSeriesMouseOver),
  33393. t.off("mouseout", this._hideIndicator)
  33394. },
  33395. _applyTransform: function(t, e, i, n) {
  33396. var o = wo(e, n ? null : this.group);
  33397. return Db[v(t) ? "applyTransform" : "transformDirection"](t, o, i)
  33398. },
  33399. _dispatchHighDown: function(t, e) {
  33400. e && e.length && this.api.dispatchAction({
  33401. type: t,
  33402. batch: e
  33403. })
  33404. },
  33405. dispose: function() {
  33406. this._clearHoverLinkFromSeries(),
  33407. this._clearHoverLinkToSeries()
  33408. },
  33409. remove: function() {
  33410. this._clearHoverLinkFromSeries(),
  33411. this._clearHoverLinkToSeries()
  33412. }
  33413. });
  33414. er({
  33415. type: "selectDataRange",
  33416. event: "dataRangeSelected",
  33417. update: "update"
  33418. }, function(t, e) {
  33419. e.eachComponent({
  33420. mainType: "visualMap",
  33421. query: t
  33422. }, function(e) {
  33423. e.setSelected(t.selected)
  33424. })
  33425. }),
  33426. Qa(jD);
  33427. var gL = nL.extend({
  33428. type: "visualMap.piecewise",
  33429. defaultOption: {
  33430. selected: null,
  33431. minOpen: !1,
  33432. maxOpen: !1,
  33433. align: "auto",
  33434. itemWidth: 20,
  33435. itemHeight: 14,
  33436. itemSymbol: "roundRect",
  33437. pieceList: null,
  33438. categories: null,
  33439. splitNumber: 5,
  33440. selectedMode: "multiple",
  33441. itemGap: 10,
  33442. hoverLink: !0,
  33443. showLabel: null
  33444. },
  33445. optionUpdated: function(t, i) {
  33446. gL.superApply(this, "optionUpdated", arguments),
  33447. this._pieceList = [],
  33448. this.resetExtent();
  33449. var n = this._mode = this._determineMode();
  33450. pL[this._mode].call(this),
  33451. this._resetSelected(t, i);
  33452. var o = this.option.categories;
  33453. this.resetVisual(function(t, i) {
  33454. "categories" === n ? (t.mappingMethod = "category",
  33455. t.categories = e(o)) : (t.dataExtent = this.getExtent(),
  33456. t.mappingMethod = "piecewise",
  33457. t.pieceList = d(this._pieceList, function(t) {
  33458. var t = e(t);
  33459. return "inRange" !== i && (t.visual = null),
  33460. t
  33461. }))
  33462. })
  33463. },
  33464. completeVisualOption: function() {
  33465. function t(t, e, i) {
  33466. return t && t[e] && (_(t[e]) ? t[e].hasOwnProperty(i) : t[e] === i)
  33467. }
  33468. var e = this.option
  33469. , i = {}
  33470. , n = eT.listVisualTypes()
  33471. , o = this.isCategory();
  33472. c(e.pieces, function(t) {
  33473. c(n, function(e) {
  33474. t.hasOwnProperty(e) && (i[e] = 1)
  33475. })
  33476. }),
  33477. c(i, function(i, n) {
  33478. var a = 0;
  33479. c(this.stateList, function(i) {
  33480. a |= t(e, i, n) || t(e.target, i, n)
  33481. }, this),
  33482. !a && c(this.stateList, function(t) {
  33483. (e[t] || (e[t] = {}))[n] = XD.get(n, "inRange" === t ? "active" : "inactive", o)
  33484. })
  33485. }, this),
  33486. nL.prototype.completeVisualOption.apply(this, arguments)
  33487. },
  33488. _resetSelected: function(t, e) {
  33489. var i = this.option
  33490. , n = this._pieceList
  33491. , o = (e ? i : t).selected || {};
  33492. if (i.selected = o,
  33493. c(n, function(t, e) {
  33494. var i = this.getSelectedMapKey(t);
  33495. o.hasOwnProperty(i) || (o[i] = !0)
  33496. }, this),
  33497. "single" === i.selectedMode) {
  33498. var a = !1;
  33499. c(n, function(t, e) {
  33500. var i = this.getSelectedMapKey(t);
  33501. o[i] && (a ? o[i] = !1 : a = !0)
  33502. }, this)
  33503. }
  33504. },
  33505. getSelectedMapKey: function(t) {
  33506. return "categories" === this._mode ? t.value + "" : t.index + ""
  33507. },
  33508. getPieceList: function() {
  33509. return this._pieceList
  33510. },
  33511. _determineMode: function() {
  33512. var t = this.option;
  33513. return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber"
  33514. },
  33515. setSelected: function(t) {
  33516. this.option.selected = e(t)
  33517. },
  33518. getValueState: function(t) {
  33519. var e = eT.findPieceIndex(t, this._pieceList);
  33520. return null != e && this.option.selected[this.getSelectedMapKey(this._pieceList[e])] ? "inRange" : "outOfRange"
  33521. },
  33522. findTargetDataIndices: function(t) {
  33523. var e = [];
  33524. return this.eachTargetSeries(function(i) {
  33525. var n = []
  33526. , o = i.getData();
  33527. o.each(this.getDataDimension(o), function(e, i) {
  33528. eT.findPieceIndex(e, this._pieceList) === t && n.push(i)
  33529. }, !0, this),
  33530. e.push({
  33531. seriesId: i.id,
  33532. dataIndex: n
  33533. })
  33534. }, this),
  33535. e
  33536. },
  33537. getRepresentValue: function(t) {
  33538. var e;
  33539. if (this.isCategory())
  33540. e = t.value;
  33541. else if (null != t.value)
  33542. e = t.value;
  33543. else {
  33544. var i = t.interval || [];
  33545. e = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2
  33546. }
  33547. return e
  33548. },
  33549. getVisualMeta: function(t) {
  33550. function e(e, a) {
  33551. var r = o.getRepresentValue({
  33552. interval: e
  33553. });
  33554. a || (a = o.getValueState(r));
  33555. var s = t(r, a);
  33556. e[0] === -1 / 0 ? n[0] = s : e[1] === 1 / 0 ? n[1] = s : i.push({
  33557. value: e[0],
  33558. color: s
  33559. }, {
  33560. value: e[1],
  33561. color: s
  33562. })
  33563. }
  33564. if (!this.isCategory()) {
  33565. var i = []
  33566. , n = []
  33567. , o = this
  33568. , a = this._pieceList.slice();
  33569. if (a.length) {
  33570. var r = a[0].interval[0];
  33571. r !== -1 / 0 && a.unshift({
  33572. interval: [-1 / 0, r]
  33573. }),
  33574. (r = a[a.length - 1].interval[1]) !== 1 / 0 && a.push({
  33575. interval: [r, 1 / 0]
  33576. })
  33577. } else
  33578. a.push({
  33579. interval: [-1 / 0, 1 / 0]
  33580. });
  33581. var s = -1 / 0;
  33582. return c(a, function(t) {
  33583. var i = t.interval;
  33584. i && (i[0] > s && e([s, i[0]], "outOfRange"),
  33585. e(i.slice()),
  33586. s = i[1])
  33587. }, this),
  33588. {
  33589. stops: i,
  33590. outerColors: n
  33591. }
  33592. }
  33593. }
  33594. })
  33595. , pL = {
  33596. splitNumber: function() {
  33597. var t = this.option
  33598. , e = this._pieceList
  33599. , i = Math.min(t.precision, 20)
  33600. , n = this.getExtent()
  33601. , o = t.splitNumber;
  33602. o = Math.max(parseInt(o, 10), 1),
  33603. t.splitNumber = o;
  33604. for (var a = (n[1] - n[0]) / o; +a.toFixed(i) !== a && i < 5; )
  33605. i++;
  33606. t.precision = i,
  33607. a = +a.toFixed(i);
  33608. var r = 0;
  33609. t.minOpen && e.push({
  33610. index: r++,
  33611. interval: [-1 / 0, n[0]],
  33612. close: [0, 0]
  33613. });
  33614. for (var s = n[0], l = r + o; r < l; s += a) {
  33615. var h = r === o - 1 ? n[1] : s + a;
  33616. e.push({
  33617. index: r++,
  33618. interval: [s, h],
  33619. close: [1, 1]
  33620. })
  33621. }
  33622. t.maxOpen && e.push({
  33623. index: r++,
  33624. interval: [n[1], 1 / 0],
  33625. close: [0, 0]
  33626. }),
  33627. zi(e),
  33628. c(e, function(t) {
  33629. t.text = this.formatValueText(t.interval)
  33630. }, this)
  33631. },
  33632. categories: function() {
  33633. var t = this.option;
  33634. c(t.categories, function(t) {
  33635. this._pieceList.push({
  33636. text: this.formatValueText(t, !0),
  33637. value: t
  33638. })
  33639. }, this),
  33640. pm(t, this._pieceList)
  33641. },
  33642. pieces: function() {
  33643. var t = this.option
  33644. , e = this._pieceList;
  33645. c(t.pieces, function(t, i) {
  33646. _(t) || (t = {
  33647. value: t
  33648. });
  33649. var n = {
  33650. text: "",
  33651. index: i
  33652. };
  33653. if (null != t.label && (n.text = t.label),
  33654. t.hasOwnProperty("value")) {
  33655. var o = n.value = t.value;
  33656. n.interval = [o, o],
  33657. n.close = [1, 1]
  33658. } else {
  33659. for (var a = n.interval = [], r = n.close = [0, 0], s = [1, 0, 1], l = [-1 / 0, 1 / 0], h = [], u = 0; u < 2; u++) {
  33660. for (var c = [["gte", "gt", "min"], ["lte", "lt", "max"]][u], d = 0; d < 3 && null == a[u]; d++)
  33661. a[u] = t[c[d]],
  33662. r[u] = s[d],
  33663. h[u] = 2 === d;
  33664. null == a[u] && (a[u] = l[u])
  33665. }
  33666. h[0] && a[1] === 1 / 0 && (r[0] = 0),
  33667. h[1] && a[0] === -1 / 0 && (r[1] = 0),
  33668. a[0] === a[1] && r[0] && r[1] && (n.value = a[0])
  33669. }
  33670. n.visual = eT.retrieveVisuals(t),
  33671. e.push(n)
  33672. }, this),
  33673. pm(t, e),
  33674. zi(e),
  33675. c(e, function(t) {
  33676. var e = t.close
  33677. , i = [["<", "≤"][e[1]], [">", "≥"][e[0]]];
  33678. t.text = t.text || this.formatValueText(null != t.value ? t.value : t.interval, !1, i)
  33679. }, this)
  33680. }
  33681. };
  33682. rL.extend({
  33683. type: "visualMap.piecewise",
  33684. doRender: function() {
  33685. var t = this.group;
  33686. t.removeAll();
  33687. var e = this.visualMapModel
  33688. , i = e.get("textGap")
  33689. , n = e.textStyleModel
  33690. , o = n.getFont()
  33691. , a = n.getTextColor()
  33692. , r = this._getItemAlign()
  33693. , s = e.itemSize
  33694. , l = this._getViewData()
  33695. , h = l.endsText
  33696. , u = M(e.get("showLabel", !0), !h);
  33697. h && this._renderEndsText(t, h[0], s, u, r),
  33698. c(l.viewPieceList, function(n) {
  33699. var l = n.piece
  33700. , h = new $y;
  33701. h.onclick = p(this._onItemClick, this, l),
  33702. this._enableHoverLink(h, n.indexInModelPieceList);
  33703. var c = e.getRepresentValue(l);
  33704. if (this._createItemSymbol(h, c, [0, 0, s[0], s[1]]),
  33705. u) {
  33706. var d = this.visualMapModel.getValueState(c);
  33707. h.add(new ab({
  33708. style: {
  33709. x: "right" === r ? -i : s[0] + i,
  33710. y: s[1] / 2,
  33711. text: l.text,
  33712. textVerticalAlign: "middle",
  33713. textAlign: r,
  33714. textFont: o,
  33715. textFill: a,
  33716. opacity: "outOfRange" === d ? .5 : 1
  33717. }
  33718. }))
  33719. }
  33720. t.add(h)
  33721. }, this),
  33722. h && this._renderEndsText(t, h[1], s, u, r),
  33723. Ub(e.get("orient"), t, e.get("itemGap")),
  33724. this.renderBackground(t),
  33725. this.positionGroup(t)
  33726. },
  33727. _enableHoverLink: function(t, e) {
  33728. function i(t) {
  33729. var i = this.visualMapModel;
  33730. i.option.hoverLink && this.api.dispatchAction({
  33731. type: t,
  33732. batch: lm(i.findTargetDataIndices(e))
  33733. })
  33734. }
  33735. t.on("mouseover", p(i, this, "highlight")).on("mouseout", p(i, this, "downplay"))
  33736. },
  33737. _getItemAlign: function() {
  33738. var t = this.visualMapModel
  33739. , e = t.option;
  33740. if ("vertical" === e.orient)
  33741. return sm(t, this.api, t.itemSize);
  33742. var i = e.align;
  33743. return i && "auto" !== i || (i = "left"),
  33744. i
  33745. },
  33746. _renderEndsText: function(t, e, i, n, o) {
  33747. if (e) {
  33748. var a = new $y
  33749. , r = this.visualMapModel.textStyleModel;
  33750. a.add(new ab({
  33751. style: {
  33752. x: n ? "right" === o ? i[0] : 0 : i[0] / 2,
  33753. y: i[1] / 2,
  33754. textVerticalAlign: "middle",
  33755. textAlign: n ? o : "center",
  33756. text: e,
  33757. textFont: r.getFont(),
  33758. textFill: r.getTextColor()
  33759. }
  33760. })),
  33761. t.add(a)
  33762. }
  33763. },
  33764. _getViewData: function() {
  33765. var t = this.visualMapModel
  33766. , e = d(t.getPieceList(), function(t, e) {
  33767. return {
  33768. piece: t,
  33769. indexInModelPieceList: e
  33770. }
  33771. })
  33772. , i = t.get("text")
  33773. , n = t.get("orient")
  33774. , o = t.get("inverse");
  33775. return ("horizontal" === n ? o : !o) ? e.reverse() : i && (i = i.slice().reverse()),
  33776. {
  33777. viewPieceList: e,
  33778. endsText: i
  33779. }
  33780. },
  33781. _createItemSymbol: function(t, e, i) {
  33782. t.add(Gr(this.getControllerVisual(e, "symbol"), i[0], i[1], i[2], i[3], this.getControllerVisual(e, "color")))
  33783. },
  33784. _onItemClick: function(t) {
  33785. var i = this.visualMapModel
  33786. , n = i.option
  33787. , o = e(n.selected)
  33788. , a = i.getSelectedMapKey(t);
  33789. "single" === n.selectedMode ? (o[a] = !0,
  33790. c(o, function(t, e) {
  33791. o[e] = e === a
  33792. })) : o[a] = !o[a],
  33793. this.api.dispatchAction({
  33794. type: "selectDataRange",
  33795. from: this.uid,
  33796. visualMapId: this.visualMapModel.id,
  33797. selected: o
  33798. })
  33799. }
  33800. });
  33801. Qa(jD);
  33802. var mL = Ei
  33803. , vL = Vi
  33804. , yL = rr({
  33805. type: "marker",
  33806. dependencies: ["series", "grid", "polar", "geo"],
  33807. init: function(t, e, i, n) {
  33808. this.mergeDefaultAndTheme(t, i),
  33809. this.mergeOption(t, i, n.createdBySelf, !0)
  33810. },
  33811. isAnimationEnabled: function() {
  33812. if (Yv.node)
  33813. return !1;
  33814. var t = this.__hostSeries;
  33815. return this.getShallow("animation") && t && t.isAnimationEnabled()
  33816. },
  33817. mergeOption: function(t, e, i, n) {
  33818. var a = this.constructor
  33819. , r = this.mainType + "Model";
  33820. i || e.eachSeries(function(t) {
  33821. var i = t.get(this.mainType)
  33822. , s = t[r];
  33823. i && i.data ? (s ? s.mergeOption(i, e, !0) : (n && mm(i),
  33824. c(i.data, function(t) {
  33825. t instanceof Array ? (mm(t[0]),
  33826. mm(t[1])) : mm(t)
  33827. }),
  33828. o(s = new a(i,this,e), {
  33829. mainType: this.mainType,
  33830. seriesIndex: t.seriesIndex,
  33831. name: t.name,
  33832. createdBySelf: !0
  33833. }),
  33834. s.__hostSeries = t),
  33835. t[r] = s) : t[r] = null
  33836. }, this)
  33837. },
  33838. formatTooltip: function(t) {
  33839. var e = this.getData()
  33840. , i = this.getRawValue(t)
  33841. , n = v(i) ? d(i, mL).join(", ") : mL(i)
  33842. , o = e.getName(t)
  33843. , a = vL(this.name);
  33844. return (null != i || o) && (a += "<br />"),
  33845. o && (a += vL(o),
  33846. null != i && (a += " : ")),
  33847. null != i && (a += vL(n)),
  33848. a
  33849. },
  33850. getData: function() {
  33851. return this._data
  33852. },
  33853. setData: function(t) {
  33854. this._data = t
  33855. }
  33856. });
  33857. h(yL, Vb),
  33858. yL.extend({
  33859. type: "markPoint",
  33860. defaultOption: {
  33861. zlevel: 0,
  33862. z: 5,
  33863. symbol: "pin",
  33864. symbolSize: 50,
  33865. tooltip: {
  33866. trigger: "item"
  33867. },
  33868. label: {
  33869. normal: {
  33870. show: !0,
  33871. position: "inside"
  33872. },
  33873. emphasis: {
  33874. show: !0
  33875. }
  33876. },
  33877. itemStyle: {
  33878. normal: {
  33879. borderWidth: 2
  33880. }
  33881. }
  33882. }
  33883. });
  33884. var xL = s
  33885. , _L = m
  33886. , bL = {
  33887. min: _L(_m, "min"),
  33888. max: _L(_m, "max"),
  33889. average: _L(_m, "average")
  33890. }
  33891. , wL = sr({
  33892. type: "marker",
  33893. init: function() {
  33894. this.markerGroupMap = O()
  33895. },
  33896. render: function(t, e, i) {
  33897. var n = this.markerGroupMap;
  33898. n.each(function(t) {
  33899. t.__keep = !1
  33900. });
  33901. var o = this.type + "Model";
  33902. e.eachSeries(function(t) {
  33903. var n = t[o];
  33904. n && this.renderSeries(t, n, e, i)
  33905. }, this),
  33906. n.each(function(t) {
  33907. !t.__keep && this.group.remove(t.group)
  33908. }, this)
  33909. },
  33910. renderSeries: function() {}
  33911. });
  33912. wL.extend({
  33913. type: "markPoint",
  33914. updateLayout: function(t, e, i) {
  33915. e.eachSeries(function(t) {
  33916. var e = t.markPointModel;
  33917. e && (Tm(e.getData(), t, i),
  33918. this.markerGroupMap.get(t.id).updateLayout(e))
  33919. }, this)
  33920. },
  33921. renderSeries: function(t, e, i, n) {
  33922. var o = t.coordinateSystem
  33923. , a = t.id
  33924. , r = t.getData()
  33925. , s = this.markerGroupMap
  33926. , l = s.get(a) || s.set(a, new Qr)
  33927. , h = Am(o, t, e);
  33928. e.setData(h),
  33929. Tm(e.getData(), t, n),
  33930. h.each(function(t) {
  33931. var i = h.getItemModel(t)
  33932. , n = i.getShallow("symbolSize");
  33933. "function" == typeof n && (n = n(e.getRawValue(t), e.getDataParams(t))),
  33934. h.setItemVisual(t, {
  33935. symbolSize: n,
  33936. color: i.get("itemStyle.normal.color") || r.getVisual("color"),
  33937. symbol: i.getShallow("symbol")
  33938. })
  33939. }),
  33940. l.updateData(h),
  33941. this.group.add(l.group),
  33942. h.eachItemGraphicEl(function(t) {
  33943. t.traverse(function(t) {
  33944. t.dataModel = e
  33945. })
  33946. }),
  33947. l.__keep = !0,
  33948. l.group.silent = e.get("silent") || t.get("silent")
  33949. }
  33950. }),
  33951. Qa(function(t) {
  33952. t.markPoint = t.markPoint || {}
  33953. }),
  33954. yL.extend({
  33955. type: "markLine",
  33956. defaultOption: {
  33957. zlevel: 0,
  33958. z: 5,
  33959. symbol: ["circle", "arrow"],
  33960. symbolSize: [8, 16],
  33961. precision: 2,
  33962. tooltip: {
  33963. trigger: "item"
  33964. },
  33965. label: {
  33966. normal: {
  33967. show: !0,
  33968. position: "end"
  33969. },
  33970. emphasis: {
  33971. show: !0
  33972. }
  33973. },
  33974. lineStyle: {
  33975. normal: {
  33976. type: "dashed"
  33977. },
  33978. emphasis: {
  33979. width: 3
  33980. }
  33981. },
  33982. animationEasing: "linear"
  33983. }
  33984. });
  33985. var SL = function(t, n, a, r) {
  33986. var s = t.getData()
  33987. , l = r.type;
  33988. if (!v(r) && ("min" === l || "max" === l || "average" === l || null != r.xAxis || null != r.yAxis)) {
  33989. var h, u;
  33990. if (null != r.yAxis || null != r.xAxis)
  33991. h = null != r.yAxis ? "y" : "x",
  33992. n.getAxis(h),
  33993. u = M(r.yAxis, r.xAxis);
  33994. else {
  33995. var c = wm(r, s, n, t);
  33996. h = c.valueDataDim,
  33997. c.valueAxis,
  33998. u = Im(s, h, l)
  33999. }
  34000. var d = "x" === h ? 0 : 1
  34001. , f = 1 - d
  34002. , g = e(r)
  34003. , p = {};
  34004. g.type = null,
  34005. g.coord = [],
  34006. p.coord = [],
  34007. g.coord[f] = -1 / 0,
  34008. p.coord[f] = 1 / 0;
  34009. var m = a.get("precision");
  34010. m >= 0 && "number" == typeof u && (u = +u.toFixed(Math.min(m, 20))),
  34011. g.coord[d] = p.coord[d] = u,
  34012. r = [g, p, {
  34013. type: l,
  34014. valueIndex: r.valueIndex,
  34015. value: u
  34016. }]
  34017. }
  34018. return r = [bm(t, r[0]), bm(t, r[1]), o({}, r[2])],
  34019. r[2].type = r[2].type || "",
  34020. i(r[2], r[0]),
  34021. i(r[2], r[1]),
  34022. r
  34023. };
  34024. wL.extend({
  34025. type: "markLine",
  34026. updateLayout: function(t, e, i) {
  34027. e.eachSeries(function(t) {
  34028. var e = t.markLineModel;
  34029. if (e) {
  34030. var n = e.getData()
  34031. , o = e.__from
  34032. , a = e.__to;
  34033. o.each(function(e) {
  34034. km(o, e, !0, t, i),
  34035. km(a, e, !1, t, i)
  34036. }),
  34037. n.each(function(t) {
  34038. n.setItemLayout(t, [o.getItemLayout(t), a.getItemLayout(t)])
  34039. }),
  34040. this.markerGroupMap.get(t.id).updateLayout()
  34041. }
  34042. }, this)
  34043. },
  34044. renderSeries: function(t, e, i, n) {
  34045. function o(e, i, o) {
  34046. var a = e.getItemModel(i);
  34047. km(e, i, o, t, n),
  34048. e.setItemVisual(i, {
  34049. symbolSize: a.get("symbolSize") || p[o ? 0 : 1],
  34050. symbol: a.get("symbol", !0) || g[o ? 0 : 1],
  34051. color: a.get("itemStyle.normal.color") || s.getVisual("color")
  34052. })
  34053. }
  34054. var a = t.coordinateSystem
  34055. , r = t.id
  34056. , s = t.getData()
  34057. , l = this.markerGroupMap
  34058. , h = l.get(r) || l.set(r, new Cu);
  34059. this.group.add(h.group);
  34060. var u = Pm(a, t, e)
  34061. , c = u.from
  34062. , d = u.to
  34063. , f = u.line;
  34064. e.__from = c,
  34065. e.__to = d,
  34066. e.setData(f);
  34067. var g = e.get("symbol")
  34068. , p = e.get("symbolSize");
  34069. v(g) || (g = [g, g]),
  34070. "number" == typeof p && (p = [p, p]),
  34071. u.from.each(function(t) {
  34072. o(c, t, !0),
  34073. o(d, t, !1)
  34074. }),
  34075. f.each(function(t) {
  34076. var e = f.getItemModel(t).get("lineStyle.normal.color");
  34077. f.setItemVisual(t, {
  34078. color: e || c.getItemVisual(t, "color")
  34079. }),
  34080. f.setItemLayout(t, [c.getItemLayout(t), d.getItemLayout(t)]),
  34081. f.setItemVisual(t, {
  34082. fromSymbolSize: c.getItemVisual(t, "symbolSize"),
  34083. fromSymbol: c.getItemVisual(t, "symbol"),
  34084. toSymbolSize: d.getItemVisual(t, "symbolSize"),
  34085. toSymbol: d.getItemVisual(t, "symbol")
  34086. })
  34087. }),
  34088. h.updateData(f),
  34089. u.line.eachItemGraphicEl(function(t, i) {
  34090. t.traverse(function(t) {
  34091. t.dataModel = e
  34092. })
  34093. }),
  34094. h.__keep = !0,
  34095. h.group.silent = e.get("silent") || t.get("silent")
  34096. }
  34097. }),
  34098. Qa(function(t) {
  34099. t.markLine = t.markLine || {}
  34100. }),
  34101. yL.extend({
  34102. type: "markArea",
  34103. defaultOption: {
  34104. zlevel: 0,
  34105. z: 1,
  34106. tooltip: {
  34107. trigger: "item"
  34108. },
  34109. animation: !1,
  34110. label: {
  34111. normal: {
  34112. show: !0,
  34113. position: "top"
  34114. },
  34115. emphasis: {
  34116. show: !0,
  34117. position: "top"
  34118. }
  34119. },
  34120. itemStyle: {
  34121. normal: {
  34122. borderWidth: 0
  34123. }
  34124. }
  34125. }
  34126. });
  34127. var ML = function(t, e, i, o) {
  34128. var a = bm(t, o[0])
  34129. , r = bm(t, o[1])
  34130. , s = M
  34131. , l = a.coord
  34132. , h = r.coord;
  34133. l[0] = s(l[0], -1 / 0),
  34134. l[1] = s(l[1], -1 / 0),
  34135. h[0] = s(h[0], 1 / 0),
  34136. h[1] = s(h[1], 1 / 0);
  34137. var u = n([{}, a, r]);
  34138. return u.coord = [a.coord, r.coord],
  34139. u.x0 = a.x,
  34140. u.y0 = a.y,
  34141. u.x1 = r.x,
  34142. u.y1 = r.y,
  34143. u
  34144. }
  34145. , IL = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]];
  34146. wL.extend({
  34147. type: "markArea",
  34148. updateLayout: function(t, e, i) {
  34149. e.eachSeries(function(t) {
  34150. var e = t.markAreaModel;
  34151. if (e) {
  34152. var n = e.getData();
  34153. n.each(function(e) {
  34154. var o = d(IL, function(o) {
  34155. return Em(n, e, o, t, i)
  34156. });
  34157. n.setItemLayout(e, o),
  34158. n.getItemGraphicEl(e).setShape("points", o)
  34159. })
  34160. }
  34161. }, this)
  34162. },
  34163. renderSeries: function(t, e, i, n) {
  34164. var o = t.coordinateSystem
  34165. , r = t.name
  34166. , s = t.getData()
  34167. , l = this.markerGroupMap
  34168. , h = l.get(r) || l.set(r, {
  34169. group: new $y
  34170. });
  34171. this.group.add(h.group),
  34172. h.__keep = !0;
  34173. var u = Rm(o, t, e);
  34174. e.setData(u),
  34175. u.each(function(e) {
  34176. u.setItemLayout(e, d(IL, function(i) {
  34177. return Em(u, e, i, t, n)
  34178. })),
  34179. u.setItemVisual(e, {
  34180. color: s.getVisual("color")
  34181. })
  34182. }),
  34183. u.diff(h.__data).add(function(t) {
  34184. var e = new fb({
  34185. shape: {
  34186. points: u.getItemLayout(t)
  34187. }
  34188. });
  34189. u.setItemGraphicEl(t, e),
  34190. h.group.add(e)
  34191. }).update(function(t, i) {
  34192. var n = h.__data.getItemGraphicEl(i);
  34193. _o(n, {
  34194. shape: {
  34195. points: u.getItemLayout(t)
  34196. }
  34197. }, e, t),
  34198. h.group.add(n),
  34199. u.setItemGraphicEl(t, n)
  34200. }).remove(function(t) {
  34201. var e = h.__data.getItemGraphicEl(t);
  34202. h.group.remove(e)
  34203. }).execute(),
  34204. u.eachItemGraphicEl(function(t, i) {
  34205. var n = u.getItemModel(i)
  34206. , o = n.getModel("label.normal")
  34207. , r = n.getModel("label.emphasis")
  34208. , s = u.getItemVisual(i, "color");
  34209. t.useStyle(a(n.getModel("itemStyle.normal").getItemStyle(), {
  34210. fill: kt(s, .4),
  34211. stroke: s
  34212. })),
  34213. t.hoverStyle = n.getModel("itemStyle.emphasis").getItemStyle(),
  34214. ho(t.style, t.hoverStyle, o, r, {
  34215. labelFetcher: e,
  34216. labelDataIndex: i,
  34217. defaultText: u.getName(i) || "",
  34218. isRectText: !0,
  34219. autoColor: s
  34220. }),
  34221. lo(t, {}),
  34222. t.dataModel = e
  34223. }),
  34224. h.__data = u,
  34225. h.group.silent = e.get("silent") || t.get("silent")
  34226. }
  34227. }),
  34228. Qa(function(t) {
  34229. t.markArea = t.markArea || {}
  34230. });
  34231. qb.registerSubTypeDefaulter("timeline", function() {
  34232. return "slider"
  34233. }),
  34234. er({
  34235. type: "timelineChange",
  34236. event: "timelineChanged",
  34237. update: "prepareAndUpdate"
  34238. }, function(t, e) {
  34239. var i = e.getComponent("timeline");
  34240. return i && null != t.currentIndex && (i.setCurrentIndex(t.currentIndex),
  34241. !i.get("loop", !0) && i.isIndexMax() && i.setPlayState(!1)),
  34242. e.resetOption("timeline"),
  34243. a({
  34244. currentIndex: i.option.currentIndex
  34245. }, t)
  34246. }),
  34247. er({
  34248. type: "timelinePlayChange",
  34249. event: "timelinePlayChanged",
  34250. update: "update"
  34251. }, function(t, e) {
  34252. var i = e.getComponent("timeline");
  34253. i && null != t.playState && i.setPlayState(t.playState)
  34254. });
  34255. var TL = qb.extend({
  34256. type: "timeline",
  34257. layoutMode: "box",
  34258. defaultOption: {
  34259. zlevel: 0,
  34260. z: 4,
  34261. show: !0,
  34262. axisType: "time",
  34263. realtime: !0,
  34264. left: "20%",
  34265. top: null,
  34266. right: "20%",
  34267. bottom: 0,
  34268. width: null,
  34269. height: 40,
  34270. padding: 5,
  34271. controlPosition: "left",
  34272. autoPlay: !1,
  34273. rewind: !1,
  34274. loop: !0,
  34275. playInterval: 2e3,
  34276. currentIndex: 0,
  34277. itemStyle: {
  34278. normal: {},
  34279. emphasis: {}
  34280. },
  34281. label: {
  34282. normal: {
  34283. color: "#000"
  34284. },
  34285. emphasis: {}
  34286. },
  34287. data: []
  34288. },
  34289. init: function(t, e, i) {
  34290. this._data,
  34291. this._names,
  34292. this.mergeDefaultAndTheme(t, i),
  34293. this._initData()
  34294. },
  34295. mergeOption: function(t) {
  34296. TL.superApply(this, "mergeOption", arguments),
  34297. this._initData()
  34298. },
  34299. setCurrentIndex: function(t) {
  34300. null == t && (t = this.option.currentIndex);
  34301. var e = this._data.count();
  34302. this.option.loop ? t = (t % e + e) % e : (t >= e && (t = e - 1),
  34303. t < 0 && (t = 0)),
  34304. this.option.currentIndex = t
  34305. },
  34306. getCurrentIndex: function() {
  34307. return this.option.currentIndex
  34308. },
  34309. isIndexMax: function() {
  34310. return this.getCurrentIndex() >= this._data.count() - 1
  34311. },
  34312. setPlayState: function(t) {
  34313. this.option.autoPlay = !!t
  34314. },
  34315. getPlayState: function() {
  34316. return !!this.option.autoPlay
  34317. },
  34318. _initData: function() {
  34319. var t = this.option
  34320. , i = t.data || []
  34321. , n = t.axisType
  34322. , o = this._names = [];
  34323. if ("category" === n) {
  34324. var a = [];
  34325. c(i, function(t, i) {
  34326. var n, r = Oo(t);
  34327. _(t) ? (n = e(t)).value = i : n = i,
  34328. a.push(n),
  34329. x(r) || null != r && !isNaN(r) || (r = ""),
  34330. o.push(r + "")
  34331. }),
  34332. i = a
  34333. }
  34334. var r = {
  34335. category: "ordinal",
  34336. time: "time"
  34337. }[n] || "number";
  34338. (this._data = new lS([{
  34339. name: "value",
  34340. type: r
  34341. }],this)).initData(i, o)
  34342. },
  34343. getData: function() {
  34344. return this._data
  34345. },
  34346. getCategories: function() {
  34347. if ("category" === this.get("axisType"))
  34348. return this._names.slice()
  34349. }
  34350. });
  34351. h(TL.extend({
  34352. type: "timeline.slider",
  34353. defaultOption: {
  34354. backgroundColor: "rgba(0,0,0,0)",
  34355. borderColor: "#ccc",
  34356. borderWidth: 0,
  34357. orient: "horizontal",
  34358. inverse: !1,
  34359. tooltip: {
  34360. trigger: "item"
  34361. },
  34362. symbol: "emptyCircle",
  34363. symbolSize: 10,
  34364. lineStyle: {
  34365. show: !0,
  34366. width: 2,
  34367. color: "#304654"
  34368. },
  34369. label: {
  34370. position: "auto",
  34371. normal: {
  34372. show: !0,
  34373. interval: "auto",
  34374. rotate: 0,
  34375. color: "#304654"
  34376. },
  34377. emphasis: {
  34378. show: !0,
  34379. color: "#c23531"
  34380. }
  34381. },
  34382. itemStyle: {
  34383. normal: {
  34384. color: "#304654",
  34385. borderWidth: 1
  34386. },
  34387. emphasis: {
  34388. color: "#c23531"
  34389. }
  34390. },
  34391. checkpointStyle: {
  34392. symbol: "circle",
  34393. symbolSize: 13,
  34394. color: "#c23531",
  34395. borderWidth: 5,
  34396. borderColor: "rgba(194,53,49, 0.5)",
  34397. animation: !0,
  34398. animationDuration: 300,
  34399. animationEasing: "quinticInOut"
  34400. },
  34401. controlStyle: {
  34402. show: !0,
  34403. showPlayBtn: !0,
  34404. showPrevBtn: !0,
  34405. showNextBtn: !0,
  34406. itemSize: 22,
  34407. itemGap: 12,
  34408. position: "left",
  34409. playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",
  34410. stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
  34411. nextIcon: "path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",
  34412. prevIcon: "path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",
  34413. normal: {
  34414. color: "#304654",
  34415. borderColor: "#304654",
  34416. borderWidth: 1
  34417. },
  34418. emphasis: {
  34419. color: "#c23531",
  34420. borderColor: "#c23531",
  34421. borderWidth: 2
  34422. }
  34423. },
  34424. data: []
  34425. }
  34426. }), Vb);
  34427. var AL = ww.extend({
  34428. type: "timeline"
  34429. })
  34430. , CL = function(t, e, i, n) {
  34431. YS.call(this, t, e, i),
  34432. this.type = n || "value",
  34433. this._autoLabelInterval,
  34434. this.model = null
  34435. };
  34436. CL.prototype = {
  34437. constructor: CL,
  34438. getLabelInterval: function() {
  34439. var t = this.model
  34440. , e = t.getModel("label.normal")
  34441. , i = e.get("interval");
  34442. return null != i && "auto" != i ? i : ((i = this._autoLabelInterval) || (i = this._autoLabelInterval = Nr(d(this.scale.getTicks(), this.dataToCoord, this), Er(this, e.get("formatter")), e.getFont(), "horizontal" === t.get("orient") ? 0 : 90, e.get("rotate"))),
  34443. i)
  34444. },
  34445. isLabelIgnored: function(t) {
  34446. if ("category" === this.type) {
  34447. var e = this.getLabelInterval();
  34448. return "function" == typeof e && !e(t, this.scale.getLabel(t)) || t % (e + 1)
  34449. }
  34450. }
  34451. },
  34452. l(CL, YS);
  34453. var DL = p
  34454. , LL = c
  34455. , kL = Math.PI;
  34456. AL.extend({
  34457. type: "timeline.slider",
  34458. init: function(t, e) {
  34459. this.api = e,
  34460. this._axis,
  34461. this._viewRect,
  34462. this._timer,
  34463. this._currentPointer,
  34464. this._mainGroup,
  34465. this._labelGroup
  34466. },
  34467. render: function(t, e, i, n) {
  34468. if (this.model = t,
  34469. this.api = i,
  34470. this.ecModel = e,
  34471. this.group.removeAll(),
  34472. t.get("show", !0)) {
  34473. var o = this._layout(t, i)
  34474. , a = this._createGroup("mainGroup")
  34475. , r = this._createGroup("labelGroup")
  34476. , s = this._axis = this._createAxis(o, t);
  34477. t.formatTooltip = function(t) {
  34478. return Vi(s.scale.getLabel(t))
  34479. }
  34480. ,
  34481. LL(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(e) {
  34482. this["_render" + e](o, a, s, t)
  34483. }, this),
  34484. this._renderAxisLabel(o, r, s, t),
  34485. this._position(o, t)
  34486. }
  34487. this._doPlayStop()
  34488. },
  34489. remove: function() {
  34490. this._clearTimer(),
  34491. this.group.removeAll()
  34492. },
  34493. dispose: function() {
  34494. this._clearTimer()
  34495. },
  34496. _layout: function(t, e) {
  34497. var i = t.get("label.normal.position")
  34498. , n = t.get("orient")
  34499. , o = Wm(t, e);
  34500. null == i || "auto" === i ? i = "horizontal" === n ? o.y + o.height / 2 < e.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < e.getWidth() / 2 ? "+" : "-" : isNaN(i) && (i = {
  34501. horizontal: {
  34502. top: "-",
  34503. bottom: "+"
  34504. },
  34505. vertical: {
  34506. left: "-",
  34507. right: "+"
  34508. }
  34509. }[n][i]);
  34510. var a = {
  34511. horizontal: "center",
  34512. vertical: i >= 0 || "+" === i ? "left" : "right"
  34513. }
  34514. , r = {
  34515. horizontal: i >= 0 || "+" === i ? "top" : "bottom",
  34516. vertical: "middle"
  34517. }
  34518. , s = {
  34519. horizontal: 0,
  34520. vertical: kL / 2
  34521. }
  34522. , l = "vertical" === n ? o.height : o.width
  34523. , h = t.getModel("controlStyle")
  34524. , u = h.get("show")
  34525. , c = u ? h.get("itemSize") : 0
  34526. , d = u ? h.get("itemGap") : 0
  34527. , f = c + d
  34528. , g = t.get("label.normal.rotate") || 0;
  34529. g = g * kL / 180;
  34530. var p, m, v, y, x = h.get("position", !0), _ = (u = h.get("show", !0)) && h.get("showPlayBtn", !0), b = u && h.get("showPrevBtn", !0), w = u && h.get("showNextBtn", !0), S = 0, M = l;
  34531. return "left" === x || "bottom" === x ? (_ && (p = [0, 0],
  34532. S += f),
  34533. b && (m = [S, 0],
  34534. S += f),
  34535. w && (v = [M - c, 0],
  34536. M -= f)) : (_ && (p = [M - c, 0],
  34537. M -= f),
  34538. b && (m = [0, 0],
  34539. S += f),
  34540. w && (v = [M - c, 0],
  34541. M -= f)),
  34542. y = [S, M],
  34543. t.get("inverse") && y.reverse(),
  34544. {
  34545. viewRect: o,
  34546. mainLength: l,
  34547. orient: n,
  34548. rotation: s[n],
  34549. labelRotation: g,
  34550. labelPosOpt: i,
  34551. labelAlign: t.get("label.normal.align") || a[n],
  34552. labelBaseline: t.get("label.normal.verticalAlign") || t.get("label.normal.baseline") || r[n],
  34553. playPosition: p,
  34554. prevBtnPosition: m,
  34555. nextBtnPosition: v,
  34556. axisExtent: y,
  34557. controlSize: c,
  34558. controlGap: d
  34559. }
  34560. },
  34561. _position: function(t, e) {
  34562. function i(t) {
  34563. var e = t.position;
  34564. t.origin = [c[0][0] - e[0], c[1][0] - e[1]]
  34565. }
  34566. function n(t) {
  34567. return [[t.x, t.x + t.width], [t.y, t.y + t.height]]
  34568. }
  34569. function o(t, e, i, n, o) {
  34570. t[n] += i[n][o] - e[n][o]
  34571. }
  34572. var a = this._mainGroup
  34573. , r = this._labelGroup
  34574. , s = t.viewRect;
  34575. if ("vertical" === t.orient) {
  34576. var l = nt()
  34577. , h = s.x
  34578. , u = s.y + s.height;
  34579. st(l, l, [-h, -u]),
  34580. lt(l, l, -kL / 2),
  34581. st(l, l, [h, u]),
  34582. (s = s.clone()).applyTransform(l)
  34583. }
  34584. var c = n(s)
  34585. , d = n(a.getBoundingRect())
  34586. , f = n(r.getBoundingRect())
  34587. , g = a.position
  34588. , p = r.position;
  34589. p[0] = g[0] = c[0][0];
  34590. var m = t.labelPosOpt;
  34591. if (isNaN(m))
  34592. o(g, d, c, 1, v = "+" === m ? 0 : 1),
  34593. o(p, f, c, 1, 1 - v);
  34594. else {
  34595. var v = m >= 0 ? 0 : 1;
  34596. o(g, d, c, 1, v),
  34597. p[1] = g[1] + m
  34598. }
  34599. a.attr("position", g),
  34600. r.attr("position", p),
  34601. a.rotation = r.rotation = t.rotation,
  34602. i(a),
  34603. i(r)
  34604. },
  34605. _createAxis: function(t, e) {
  34606. var i = e.getData()
  34607. , n = e.get("axisType")
  34608. , o = zr(e, n)
  34609. , a = i.getDataExtent("value");
  34610. o.setExtent(a[0], a[1]),
  34611. this._customizeScale(o, i),
  34612. o.niceTicks();
  34613. var r = new CL("value",o,t.axisExtent,n);
  34614. return r.model = e,
  34615. r
  34616. },
  34617. _customizeScale: function(t, e) {
  34618. t.getTicks = function() {
  34619. return e.mapArray(["value"], function(t) {
  34620. return t
  34621. })
  34622. }
  34623. ,
  34624. t.getTicksLabels = function() {
  34625. return d(this.getTicks(), t.getLabel, t)
  34626. }
  34627. },
  34628. _createGroup: function(t) {
  34629. var e = this["_" + t] = new $y;
  34630. return this.group.add(e),
  34631. e
  34632. },
  34633. _renderAxisLine: function(t, e, i, n) {
  34634. var a = i.getExtent();
  34635. n.get("lineStyle.show") && e.add(new mb({
  34636. shape: {
  34637. x1: a[0],
  34638. y1: 0,
  34639. x2: a[1],
  34640. y2: 0
  34641. },
  34642. style: o({
  34643. lineCap: "round"
  34644. }, n.getModel("lineStyle").getLineStyle()),
  34645. silent: !0,
  34646. z2: 1
  34647. }))
  34648. },
  34649. _renderAxisTick: function(t, e, i, n) {
  34650. var o = n.getData()
  34651. , a = i.scale.getTicks();
  34652. LL(a, function(t, a) {
  34653. var r = i.dataToCoord(t)
  34654. , s = o.getItemModel(a)
  34655. , l = s.getModel("itemStyle.normal")
  34656. , h = s.getModel("itemStyle.emphasis")
  34657. , u = {
  34658. position: [r, 0],
  34659. onclick: DL(this._changeTimeline, this, a)
  34660. }
  34661. , c = Fm(s, l, e, u);
  34662. lo(c, h.getItemStyle()),
  34663. s.get("tooltip") ? (c.dataIndex = a,
  34664. c.dataModel = n) : c.dataIndex = c.dataModel = null
  34665. }, this)
  34666. },
  34667. _renderAxisLabel: function(t, e, i, n) {
  34668. var o = n.getModel("label.normal");
  34669. if (o.get("show")) {
  34670. var a = n.getData()
  34671. , r = i.scale.getTicks()
  34672. , s = Er(i, o.get("formatter"))
  34673. , l = i.getLabelInterval();
  34674. LL(r, function(n, o) {
  34675. if (!i.isLabelIgnored(o, l)) {
  34676. var r = a.getItemModel(o)
  34677. , h = r.getModel("label.normal")
  34678. , u = r.getModel("label.emphasis")
  34679. , c = i.dataToCoord(n)
  34680. , d = new ab({
  34681. position: [c, 0],
  34682. rotation: t.labelRotation - t.rotation,
  34683. onclick: DL(this._changeTimeline, this, o),
  34684. silent: !1
  34685. });
  34686. uo(d.style, h, {
  34687. text: s[o],
  34688. textAlign: t.labelAlign,
  34689. textVerticalAlign: t.labelBaseline
  34690. }),
  34691. e.add(d),
  34692. lo(d, uo({}, u))
  34693. }
  34694. }, this)
  34695. }
  34696. },
  34697. _renderControl: function(t, e, i, n) {
  34698. function o(t, i, o, u) {
  34699. if (t) {
  34700. var c = Hm(n, i, h, {
  34701. position: t,
  34702. origin: [a / 2, 0],
  34703. rotation: u ? -r : 0,
  34704. rectHover: !0,
  34705. style: s,
  34706. onclick: o
  34707. });
  34708. e.add(c),
  34709. lo(c, l)
  34710. }
  34711. }
  34712. var a = t.controlSize
  34713. , r = t.rotation
  34714. , s = n.getModel("controlStyle.normal").getItemStyle()
  34715. , l = n.getModel("controlStyle.emphasis").getItemStyle()
  34716. , h = [0, -a / 2, a, a]
  34717. , u = n.getPlayState()
  34718. , c = n.get("inverse", !0);
  34719. o(t.nextBtnPosition, "controlStyle.nextIcon", DL(this._changeTimeline, this, c ? "-" : "+")),
  34720. o(t.prevBtnPosition, "controlStyle.prevIcon", DL(this._changeTimeline, this, c ? "+" : "-")),
  34721. o(t.playPosition, "controlStyle." + (u ? "stopIcon" : "playIcon"), DL(this._handlePlayClick, this, !u), !0)
  34722. },
  34723. _renderCurrentPointer: function(t, e, i, n) {
  34724. var o = n.getData()
  34725. , a = n.getCurrentIndex()
  34726. , r = o.getItemModel(a).getModel("checkpointStyle")
  34727. , s = this
  34728. , l = {
  34729. onCreate: function(t) {
  34730. t.draggable = !0,
  34731. t.drift = DL(s._handlePointerDrag, s),
  34732. t.ondragend = DL(s._handlePointerDragend, s),
  34733. Zm(t, a, i, n, !0)
  34734. },
  34735. onUpdate: function(t) {
  34736. Zm(t, a, i, n)
  34737. }
  34738. };
  34739. this._currentPointer = Fm(r, r, this._mainGroup, {}, this._currentPointer, l)
  34740. },
  34741. _handlePlayClick: function(t) {
  34742. this._clearTimer(),
  34743. this.api.dispatchAction({
  34744. type: "timelinePlayChange",
  34745. playState: t,
  34746. from: this.uid
  34747. })
  34748. },
  34749. _handlePointerDrag: function(t, e, i) {
  34750. this._clearTimer(),
  34751. this._pointerChangeTimeline([i.offsetX, i.offsetY])
  34752. },
  34753. _handlePointerDragend: function(t) {
  34754. this._pointerChangeTimeline([t.offsetX, t.offsetY], !0)
  34755. },
  34756. _pointerChangeTimeline: function(t, e) {
  34757. var i = this._toAxisCoord(t)[0]
  34758. , n = Si(this._axis.getExtent().slice());
  34759. i > n[1] && (i = n[1]),
  34760. i < n[0] && (i = n[0]),
  34761. this._currentPointer.position[0] = i,
  34762. this._currentPointer.dirty();
  34763. var o = this._findNearestTick(i)
  34764. , a = this.model;
  34765. (e || o !== a.getCurrentIndex() && a.get("realtime")) && this._changeTimeline(o)
  34766. },
  34767. _doPlayStop: function() {
  34768. this._clearTimer(),
  34769. this.model.getPlayState() && (this._timer = setTimeout(DL(function() {
  34770. var t = this.model;
  34771. this._changeTimeline(t.getCurrentIndex() + (t.get("rewind", !0) ? -1 : 1))
  34772. }, this), this.model.get("playInterval")))
  34773. },
  34774. _toAxisCoord: function(t) {
  34775. return So(t, this._mainGroup.getLocalTransform(), !0)
  34776. },
  34777. _findNearestTick: function(t) {
  34778. var e, i = this.model.getData(), n = 1 / 0, o = this._axis;
  34779. return i.each(["value"], function(i, a) {
  34780. var r = o.dataToCoord(i)
  34781. , s = Math.abs(r - t);
  34782. s < n && (n = s,
  34783. e = a)
  34784. }),
  34785. e
  34786. },
  34787. _clearTimer: function() {
  34788. this._timer && (clearTimeout(this._timer),
  34789. this._timer = null)
  34790. },
  34791. _changeTimeline: function(t) {
  34792. var e = this.model.getCurrentIndex();
  34793. "+" === t ? t = e + 1 : "-" === t && (t = e - 1),
  34794. this.api.dispatchAction({
  34795. type: "timelineChange",
  34796. currentIndex: t,
  34797. from: this.uid
  34798. })
  34799. }
  34800. }),
  34801. Qa(function(t) {
  34802. var e = t && t.timeline;
  34803. v(e) || (e = e ? [e] : []),
  34804. c(e, function(t) {
  34805. t && Vm(t)
  34806. })
  34807. });
  34808. var PL = rr({
  34809. type: "toolbox",
  34810. layoutMode: {
  34811. type: "box",
  34812. ignoreSize: !0
  34813. },
  34814. mergeDefaultAndTheme: function(t) {
  34815. PL.superApply(this, "mergeDefaultAndTheme", arguments),
  34816. c(this.option.feature, function(t, e) {
  34817. var n = Ap(e);
  34818. n && i(t, n.defaultOption)
  34819. })
  34820. },
  34821. defaultOption: {
  34822. show: !0,
  34823. z: 6,
  34824. zlevel: 0,
  34825. orient: "horizontal",
  34826. left: "right",
  34827. top: "top",
  34828. backgroundColor: "transparent",
  34829. borderColor: "#ccc",
  34830. borderRadius: 0,
  34831. borderWidth: 0,
  34832. padding: 5,
  34833. itemSize: 15,
  34834. itemGap: 8,
  34835. showTitle: !0,
  34836. iconStyle: {
  34837. normal: {
  34838. borderColor: "#666",
  34839. color: "none"
  34840. },
  34841. emphasis: {
  34842. borderColor: "#3E98C5"
  34843. }
  34844. }
  34845. }
  34846. });
  34847. sr({
  34848. type: "toolbox",
  34849. render: function(t, e, i, n) {
  34850. function o(o, r) {
  34851. var s, c = u[o], d = u[r], f = new Co(l[c],t,t.ecModel);
  34852. if (c && !d) {
  34853. if (Um(c))
  34854. s = {
  34855. model: f,
  34856. onclick: f.option.onclick,
  34857. featureName: c
  34858. };
  34859. else {
  34860. var g = Ap(c);
  34861. if (!g)
  34862. return;
  34863. s = new g(f,e,i)
  34864. }
  34865. h[c] = s
  34866. } else {
  34867. if (!(s = h[d]))
  34868. return;
  34869. s.model = f,
  34870. s.ecModel = e,
  34871. s.api = i
  34872. }
  34873. c || !d ? f.get("show") && !s.unusable ? (a(f, s, c),
  34874. f.setIconStatus = function(t, e) {
  34875. var i = this.option
  34876. , n = this.iconPaths;
  34877. i.iconStatus = i.iconStatus || {},
  34878. i.iconStatus[t] = e,
  34879. n[t] && n[t].trigger(e)
  34880. }
  34881. ,
  34882. s.render && s.render(f, e, i, n)) : s.remove && s.remove(e, i) : s.dispose && s.dispose(e, i)
  34883. }
  34884. function a(n, o, a) {
  34885. var l = n.getModel("iconStyle")
  34886. , h = o.getIcons ? o.getIcons() : n.get("icon")
  34887. , u = n.get("title") || {};
  34888. if ("string" == typeof h) {
  34889. var d = h
  34890. , f = u;
  34891. u = {},
  34892. (h = {})[a] = d,
  34893. u[a] = f
  34894. }
  34895. var g = n.iconPaths = {};
  34896. c(h, function(a, h) {
  34897. var c = Ao(a, {}, {
  34898. x: -s / 2,
  34899. y: -s / 2,
  34900. width: s,
  34901. height: s
  34902. });
  34903. c.setStyle(l.getModel("normal").getItemStyle()),
  34904. c.hoverStyle = l.getModel("emphasis").getItemStyle(),
  34905. lo(c),
  34906. t.get("showTitle") && (c.__title = u[h],
  34907. c.on("mouseover", function() {
  34908. var t = l.getModel("emphasis").getItemStyle();
  34909. c.setStyle({
  34910. text: u[h],
  34911. textPosition: t.textPosition || "bottom",
  34912. textFill: t.fill || t.stroke || "#000",
  34913. textAlign: t.textAlign || "center"
  34914. })
  34915. }).on("mouseout", function() {
  34916. c.setStyle({
  34917. textFill: null
  34918. })
  34919. })),
  34920. c.trigger(n.get("iconStatus." + h) || "normal"),
  34921. r.add(c),
  34922. c.on("click", p(o.onclick, o, e, i, h)),
  34923. g[h] = c
  34924. })
  34925. }
  34926. var r = this.group;
  34927. if (r.removeAll(),
  34928. t.get("show")) {
  34929. var s = +t.get("itemSize")
  34930. , l = t.get("feature") || {}
  34931. , h = this._features || (this._features = {})
  34932. , u = [];
  34933. c(l, function(t, e) {
  34934. u.push(e)
  34935. }),
  34936. new cr(this._featureNames || [],u).add(o).update(o).remove(m(o, null)).execute(),
  34937. this._featureNames = u,
  34938. wg(r, t, i),
  34939. r.add(Sg(r.getBoundingRect(), t)),
  34940. r.eachChild(function(t) {
  34941. var e = t.__title
  34942. , n = t.hoverStyle;
  34943. if (n && e) {
  34944. var o = ce(e, Ie(n))
  34945. , a = t.position[0] + r.position[0]
  34946. , l = !1;
  34947. t.position[1] + r.position[1] + s + o.height > i.getHeight() && (n.textPosition = "top",
  34948. l = !0);
  34949. var h = l ? -5 - o.height : s + 8;
  34950. a + o.width / 2 > i.getWidth() ? (n.textPosition = ["100%", h],
  34951. n.textAlign = "right") : a - o.width / 2 < 0 && (n.textPosition = [0, h],
  34952. n.textAlign = "left")
  34953. }
  34954. })
  34955. }
  34956. },
  34957. updateView: function(t, e, i, n) {
  34958. c(this._features, function(t) {
  34959. t.updateView && t.updateView(t.model, e, i, n)
  34960. })
  34961. },
  34962. updateLayout: function(t, e, i, n) {
  34963. c(this._features, function(t) {
  34964. t.updateLayout && t.updateLayout(t.model, e, i, n)
  34965. })
  34966. },
  34967. remove: function(t, e) {
  34968. c(this._features, function(i) {
  34969. i.remove && i.remove(t, e)
  34970. }),
  34971. this.group.removeAll()
  34972. },
  34973. dispose: function(t, e) {
  34974. c(this._features, function(i) {
  34975. i.dispose && i.dispose(t, e)
  34976. })
  34977. }
  34978. });
  34979. var OL = mD.toolbox.saveAsImage;
  34980. jm.defaultOption = {
  34981. show: !0,
  34982. icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
  34983. title: OL.title,
  34984. type: "png",
  34985. name: "",
  34986. excludeComponents: ["toolbox"],
  34987. pixelRatio: 1,
  34988. lang: OL.lang.slice()
  34989. },
  34990. jm.prototype.unusable = !Yv.canvasSupported,
  34991. jm.prototype.onclick = function(t, e) {
  34992. var i = this.model
  34993. , n = i.get("name") || t.get("title.0.text") || "echarts"
  34994. , o = document.createElement("a")
  34995. , a = i.get("type", !0) || "png";
  34996. o.download = n + "." + a,
  34997. o.target = "_blank";
  34998. var r = e.getConnectedDataURL({
  34999. type: a,
  35000. backgroundColor: i.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff",
  35001. excludeComponents: i.get("excludeComponents"),
  35002. pixelRatio: i.get("pixelRatio")
  35003. });
  35004. if (o.href = r,
  35005. "function" != typeof MouseEvent || Yv.browser.ie || Yv.browser.edge)
  35006. if (window.navigator.msSaveOrOpenBlob) {
  35007. for (var s = atob(r.split(",")[1]), l = s.length, h = new Uint8Array(l); l--; )
  35008. h[l] = s.charCodeAt(l);
  35009. var u = new Blob([h]);
  35010. window.navigator.msSaveOrOpenBlob(u, n + "." + a)
  35011. } else {
  35012. var c = i.get("lang")
  35013. , d = '<body style="margin:0;"><img src="' + r + '" style="max-width:100%;" title="' + (c && c[0] || "") + '" /></body>';
  35014. window.open().document.write(d)
  35015. }
  35016. else {
  35017. var f = new MouseEvent("click",{
  35018. view: window,
  35019. bubbles: !0,
  35020. cancelable: !1
  35021. });
  35022. o.dispatchEvent(f)
  35023. }
  35024. }
  35025. ,
  35026. Tp("saveAsImage", jm);
  35027. var zL = mD.toolbox.magicType;
  35028. Xm.defaultOption = {
  35029. show: !0,
  35030. type: [],
  35031. icon: {
  35032. line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
  35033. bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
  35034. stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",
  35035. tiled: "M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"
  35036. },
  35037. title: e(zL.title),
  35038. option: {},
  35039. seriesIndex: {}
  35040. };
  35041. var NL = Xm.prototype;
  35042. NL.getIcons = function() {
  35043. var t = this.model
  35044. , e = t.get("icon")
  35045. , i = {};
  35046. return c(t.get("type"), function(t) {
  35047. e[t] && (i[t] = e[t])
  35048. }),
  35049. i
  35050. }
  35051. ;
  35052. var EL = {
  35053. line: function(t, e, n, o) {
  35054. if ("bar" === t)
  35055. return i({
  35056. id: e,
  35057. type: "line",
  35058. data: n.get("data"),
  35059. stack: n.get("stack"),
  35060. markPoint: n.get("markPoint"),
  35061. markLine: n.get("markLine")
  35062. }, o.get("option.line") || {}, !0)
  35063. },
  35064. bar: function(t, e, n, o) {
  35065. if ("line" === t)
  35066. return i({
  35067. id: e,
  35068. type: "bar",
  35069. data: n.get("data"),
  35070. stack: n.get("stack"),
  35071. markPoint: n.get("markPoint"),
  35072. markLine: n.get("markLine")
  35073. }, o.get("option.bar") || {}, !0)
  35074. },
  35075. stack: function(t, e, n, o) {
  35076. if ("line" === t || "bar" === t)
  35077. return i({
  35078. id: e,
  35079. stack: "__ec_magicType_stack__"
  35080. }, o.get("option.stack") || {}, !0)
  35081. },
  35082. tiled: function(t, e, n, o) {
  35083. if ("line" === t || "bar" === t)
  35084. return i({
  35085. id: e,
  35086. stack: ""
  35087. }, o.get("option.tiled") || {}, !0)
  35088. }
  35089. }
  35090. , RL = [["line", "bar"], ["stack", "tiled"]];
  35091. NL.onclick = function(t, e, i) {
  35092. var n = this.model
  35093. , o = n.get("seriesIndex." + i);
  35094. if (EL[i]) {
  35095. var r = {
  35096. series: []
  35097. };
  35098. c(RL, function(t) {
  35099. s(t, i) >= 0 && c(t, function(t) {
  35100. n.setIconStatus(t, "normal")
  35101. })
  35102. }),
  35103. n.setIconStatus(i, "emphasis"),
  35104. t.eachComponent({
  35105. mainType: "series",
  35106. query: null == o ? null : {
  35107. seriesIndex: o
  35108. }
  35109. }, function(e) {
  35110. var o = e.subType
  35111. , s = e.id
  35112. , l = EL[i](o, s, e, n);
  35113. l && (a(l, e.option),
  35114. r.series.push(l));
  35115. var h = e.coordinateSystem;
  35116. if (h && "cartesian2d" === h.type && ("line" === i || "bar" === i)) {
  35117. var u = h.getAxesByScale("ordinal")[0];
  35118. if (u) {
  35119. var c = u.dim + "Axis"
  35120. , d = t.queryComponents({
  35121. mainType: c,
  35122. index: e.get(name + "Index"),
  35123. id: e.get(name + "Id")
  35124. })[0].componentIndex;
  35125. r[c] = r[c] || [];
  35126. for (var f = 0; f <= d; f++)
  35127. r[c][d] = r[c][d] || {};
  35128. r[c][d].boundaryGap = "bar" === i
  35129. }
  35130. }
  35131. }),
  35132. e.dispatchAction({
  35133. type: "changeMagicType",
  35134. currentType: i,
  35135. newOption: r
  35136. })
  35137. }
  35138. }
  35139. ,
  35140. er({
  35141. type: "changeMagicType",
  35142. event: "magicTypeChanged",
  35143. update: "prepareAndUpdate"
  35144. }, function(t, e) {
  35145. e.mergeOption(t.newOption)
  35146. }),
  35147. Tp("magicType", Xm);
  35148. var VL = mD.toolbox.dataView
  35149. , BL = new Array(60).join("-")
  35150. , GL = "\t"
  35151. , WL = new RegExp("[" + GL + "]+","g");
  35152. nv.defaultOption = {
  35153. show: !0,
  35154. readOnly: !1,
  35155. optionToContent: null,
  35156. contentToOption: null,
  35157. icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",
  35158. title: e(VL.title),
  35159. lang: e(VL.lang),
  35160. backgroundColor: "#fff",
  35161. textColor: "#000",
  35162. textareaColor: "#fff",
  35163. textareaBorderColor: "#333",
  35164. buttonColor: "#c23531",
  35165. buttonTextColor: "#fff"
  35166. },
  35167. nv.prototype.onclick = function(t, e) {
  35168. function i() {
  35169. n.removeChild(a),
  35170. x._dom = null
  35171. }
  35172. var n = e.getDom()
  35173. , o = this.model;
  35174. this._dom && n.removeChild(this._dom);
  35175. var a = document.createElement("div");
  35176. a.style.cssText = "position:absolute;left:5px;top:5px;bottom:5px;right:5px;",
  35177. a.style.backgroundColor = o.get("backgroundColor") || "#fff";
  35178. var r = document.createElement("h4")
  35179. , s = o.get("lang") || [];
  35180. r.innerHTML = s[0] || o.get("title"),
  35181. r.style.cssText = "margin: 10px 20px;",
  35182. r.style.color = o.get("textColor");
  35183. var l = document.createElement("div")
  35184. , h = document.createElement("textarea");
  35185. l.style.cssText = "display:block;width:100%;overflow:auto;";
  35186. var u = o.get("optionToContent")
  35187. , c = o.get("contentToOption")
  35188. , d = Km(t);
  35189. if ("function" == typeof u) {
  35190. var f = u(e.getOption());
  35191. "string" == typeof f ? l.innerHTML = f : w(f) && l.appendChild(f)
  35192. } else
  35193. l.appendChild(h),
  35194. h.readOnly = o.get("readOnly"),
  35195. h.style.cssText = "width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",
  35196. h.style.color = o.get("textColor"),
  35197. h.style.borderColor = o.get("textareaBorderColor"),
  35198. h.style.backgroundColor = o.get("textareaColor"),
  35199. h.value = d.value;
  35200. var g = d.meta
  35201. , p = document.createElement("div");
  35202. p.style.cssText = "position:absolute;bottom:0;left:0;right:0;";
  35203. var m = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px"
  35204. , v = document.createElement("div")
  35205. , y = document.createElement("div");
  35206. m += ";background-color:" + o.get("buttonColor"),
  35207. m += ";color:" + o.get("buttonTextColor");
  35208. var x = this;
  35209. ai(v, "click", i),
  35210. ai(y, "click", function() {
  35211. var t;
  35212. try {
  35213. t = "function" == typeof c ? c(l, e.getOption()) : iv(h.value, g)
  35214. } catch (t) {
  35215. throw i(),
  35216. new Error("Data view format error " + t)
  35217. }
  35218. t && e.dispatchAction({
  35219. type: "changeDataView",
  35220. newOption: t
  35221. }),
  35222. i()
  35223. }),
  35224. v.innerHTML = s[1],
  35225. y.innerHTML = s[2],
  35226. y.style.cssText = m,
  35227. v.style.cssText = m,
  35228. !o.get("readOnly") && p.appendChild(y),
  35229. p.appendChild(v),
  35230. ai(h, "keydown", function(t) {
  35231. if (9 === (t.keyCode || t.which)) {
  35232. var e = this.value
  35233. , i = this.selectionStart
  35234. , n = this.selectionEnd;
  35235. this.value = e.substring(0, i) + GL + e.substring(n),
  35236. this.selectionStart = this.selectionEnd = i + 1,
  35237. Ix(t)
  35238. }
  35239. }),
  35240. a.appendChild(r),
  35241. a.appendChild(l),
  35242. a.appendChild(p),
  35243. l.style.height = n.clientHeight - 80 + "px",
  35244. n.appendChild(a),
  35245. this._dom = a
  35246. }
  35247. ,
  35248. nv.prototype.remove = function(t, e) {
  35249. this._dom && e.getDom().removeChild(this._dom)
  35250. }
  35251. ,
  35252. nv.prototype.dispose = function(t, e) {
  35253. this.remove(t, e)
  35254. }
  35255. ,
  35256. Tp("dataView", nv),
  35257. er({
  35258. type: "changeDataView",
  35259. event: "dataViewChanged",
  35260. update: "prepareAndUpdate"
  35261. }, function(t, e) {
  35262. var i = [];
  35263. c(t.newOption.series, function(t) {
  35264. var n = e.getSeriesByName(t.name)[0];
  35265. if (n) {
  35266. var a = n.get("data");
  35267. i.push({
  35268. name: t.name,
  35269. data: ov(t.data, a)
  35270. })
  35271. } else
  35272. i.push(o({
  35273. type: "scatter"
  35274. }, t))
  35275. }),
  35276. e.mergeOption(a({
  35277. series: i
  35278. }, t.newOption))
  35279. });
  35280. var HL = c
  35281. , FL = "\0_ec_hist_store";
  35282. DD.extend({
  35283. type: "dataZoom.select"
  35284. }),
  35285. LD.extend({
  35286. type: "dataZoom.select"
  35287. });
  35288. var ZL = mD.toolbox.dataZoom
  35289. , UL = c
  35290. , jL = "\0_ec_\0toolbox-dataZoom_";
  35291. uv.defaultOption = {
  35292. show: !0,
  35293. icon: {
  35294. zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
  35295. back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
  35296. },
  35297. title: e(ZL.title)
  35298. };
  35299. var XL = uv.prototype;
  35300. XL.render = function(t, e, i, n) {
  35301. this.model = t,
  35302. this.ecModel = e,
  35303. this.api = i,
  35304. fv(t, e, this, n, i),
  35305. dv(t, e)
  35306. }
  35307. ,
  35308. XL.onclick = function(t, e, i) {
  35309. qL[i].call(this)
  35310. }
  35311. ,
  35312. XL.remove = function(t, e) {
  35313. this._brushController.unmount()
  35314. }
  35315. ,
  35316. XL.dispose = function(t, e) {
  35317. this._brushController.dispose()
  35318. }
  35319. ;
  35320. var qL = {
  35321. zoom: function() {
  35322. var t = !this._isZoomActive;
  35323. this.api.dispatchAction({
  35324. type: "takeGlobalCursor",
  35325. key: "dataZoomSelect",
  35326. dataZoomSelectActive: t
  35327. })
  35328. },
  35329. back: function() {
  35330. this._dispatchZoomAction(rv(this.ecModel))
  35331. }
  35332. };
  35333. XL._onBrush = function(t, e) {
  35334. function i(t, e, i) {
  35335. var r = e.getAxis(t)
  35336. , s = r.model
  35337. , l = n(t, s, a)
  35338. , h = l.findRepresentativeAxisProxy(s).getMinMaxSpan();
  35339. null == h.minValueSpan && null == h.maxValueSpan || (i = WT(0, i.slice(), r.scale.getExtent(), 0, h.minValueSpan, h.maxValueSpan)),
  35340. l && (o[l.id] = {
  35341. dataZoomId: l.id,
  35342. startValue: i[0],
  35343. endValue: i[1]
  35344. })
  35345. }
  35346. function n(t, e, i) {
  35347. var n;
  35348. return i.eachComponent({
  35349. mainType: "dataZoom",
  35350. subType: "select"
  35351. }, function(i) {
  35352. i.getAxisModel(t, e.componentIndex) && (n = i)
  35353. }),
  35354. n
  35355. }
  35356. if (e.isEnd && t.length) {
  35357. var o = {}
  35358. , a = this.ecModel;
  35359. this._brushController.updateCovers([]),
  35360. new up(cv(this.model.option),a,{
  35361. include: ["grid"]
  35362. }).matchOutputRanges(t, a, function(t, e, n) {
  35363. if ("cartesian2d" === n.type) {
  35364. var o = t.brushType;
  35365. "rect" === o ? (i("x", n, e[0]),
  35366. i("y", n, e[1])) : i({
  35367. lineX: "x",
  35368. lineY: "y"
  35369. }[o], n, e)
  35370. }
  35371. }),
  35372. av(a, o),
  35373. this._dispatchZoomAction(o)
  35374. }
  35375. }
  35376. ,
  35377. XL._dispatchZoomAction = function(t) {
  35378. var i = [];
  35379. UL(t, function(t, n) {
  35380. i.push(e(t))
  35381. }),
  35382. i.length && this.api.dispatchAction({
  35383. type: "dataZoom",
  35384. from: this.uid,
  35385. batch: i
  35386. })
  35387. }
  35388. ,
  35389. Tp("dataZoom", uv),
  35390. Qa(function(t) {
  35391. function e(t, e) {
  35392. if (e) {
  35393. var o = t + "Index"
  35394. , a = e[o];
  35395. null == a || "all" == a || v(a) || (a = !1 === a || "none" === a ? [] : [a]),
  35396. i(t, function(e, i) {
  35397. if (null == a || "all" == a || -1 !== s(a, i)) {
  35398. var r = {
  35399. type: "select",
  35400. $fromToolbox: !0,
  35401. id: jL + t + i
  35402. };
  35403. r[o] = i,
  35404. n.push(r)
  35405. }
  35406. })
  35407. }
  35408. }
  35409. function i(e, i) {
  35410. var n = t[e];
  35411. v(n) || (n = n ? [n] : []),
  35412. UL(n, i)
  35413. }
  35414. if (t) {
  35415. var n = t.dataZoom || (t.dataZoom = []);
  35416. v(n) || (t.dataZoom = n = [n]);
  35417. var o = t.toolbox;
  35418. if (o && (v(o) && (o = o[0]),
  35419. o && o.feature)) {
  35420. var a = o.feature.dataZoom;
  35421. e("xAxis", a),
  35422. e("yAxis", a)
  35423. }
  35424. }
  35425. });
  35426. var YL = mD.toolbox.restore;
  35427. gv.defaultOption = {
  35428. show: !0,
  35429. icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",
  35430. title: YL.title
  35431. },
  35432. gv.prototype.onclick = function(t, e, i) {
  35433. sv(t),
  35434. e.dispatchAction({
  35435. type: "restore",
  35436. from: this.uid
  35437. })
  35438. }
  35439. ,
  35440. Tp("restore", gv),
  35441. er({
  35442. type: "restore",
  35443. event: "restore",
  35444. update: "prepareAndUpdate"
  35445. }, function(t, e) {
  35446. e.resetOption("recreate")
  35447. });
  35448. var $L, KL = "urn:schemas-microsoft-com:vml", JL = window, QL = !1, tk = JL && JL.document;
  35449. if (tk && !Yv.canvasSupported)
  35450. try {
  35451. !tk.namespaces.zrvml && tk.namespaces.add("zrvml", KL),
  35452. $L = function(t) {
  35453. return tk.createElement("<zrvml:" + t + ' class="zrvml">')
  35454. }
  35455. } catch (t) {
  35456. $L = function(t) {
  35457. return tk.createElement("<" + t + ' xmlns="' + KL + '" class="zrvml">')
  35458. }
  35459. }
  35460. var ek = Math.round
  35461. , ik = Math.sqrt
  35462. , nk = Math.abs
  35463. , ok = Math.cos
  35464. , ak = Math.sin
  35465. , rk = Math.max;
  35466. if (!Yv.canvasSupported) {
  35467. var sk = 21600
  35468. , lk = sk / 2
  35469. , hk = function(t) {
  35470. t.style.cssText = "position:absolute;left:0;top:0;width:1px;height:1px;",
  35471. t.coordsize = sk + "," + sk,
  35472. t.coordorigin = "0,0"
  35473. }
  35474. , uk = function(t) {
  35475. return String(t).replace(/&/g, "&amp;").replace(/"/g, "&quot;")
  35476. }
  35477. , ck = function(t, e, i) {
  35478. return "rgb(" + [t, e, i].join(",") + ")"
  35479. }
  35480. , dk = function(t, e) {
  35481. e && t && e.parentNode !== t && t.appendChild(e)
  35482. }
  35483. , fk = function(t, e) {
  35484. e && t && e.parentNode === t && t.removeChild(e)
  35485. }
  35486. , gk = function(t, e, i) {
  35487. return 1e5 * (parseFloat(t) || 0) + 1e3 * (parseFloat(e) || 0) + i
  35488. }
  35489. , pk = function(t, e) {
  35490. return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t
  35491. }
  35492. , mk = function(t, e, i) {
  35493. var n = St(e);
  35494. i = +i,
  35495. isNaN(i) && (i = 1),
  35496. n && (t.color = ck(n[0], n[1], n[2]),
  35497. t.opacity = i * n[3])
  35498. }
  35499. , vk = function(t) {
  35500. var e = St(t);
  35501. return [ck(e[0], e[1], e[2]), e[3]]
  35502. }
  35503. , yk = function(t, e, i) {
  35504. var n = e.fill;
  35505. if (null != n)
  35506. if (n instanceof bb) {
  35507. var o, a = 0, r = [0, 0], s = 0, l = 1, h = i.getBoundingRect(), u = h.width, c = h.height;
  35508. if ("linear" === n.type) {
  35509. o = "gradient";
  35510. var d = i.transform
  35511. , f = [n.x * u, n.y * c]
  35512. , g = [n.x2 * u, n.y2 * c];
  35513. d && (Y(f, f, d),
  35514. Y(g, g, d));
  35515. var p = g[0] - f[0]
  35516. , m = g[1] - f[1];
  35517. (a = 180 * Math.atan2(p, m) / Math.PI) < 0 && (a += 360),
  35518. a < 1e-6 && (a = 0)
  35519. } else {
  35520. o = "gradientradial";
  35521. var f = [n.x * u, n.y * c]
  35522. , d = i.transform
  35523. , v = i.scale
  35524. , y = u
  35525. , x = c;
  35526. r = [(f[0] - h.x) / y, (f[1] - h.y) / x],
  35527. d && Y(f, f, d),
  35528. y /= v[0] * sk,
  35529. x /= v[1] * sk;
  35530. var _ = rk(y, x);
  35531. s = 0 / _,
  35532. l = 2 * n.r / _ - s
  35533. }
  35534. var b = n.colorStops.slice();
  35535. b.sort(function(t, e) {
  35536. return t.offset - e.offset
  35537. });
  35538. for (var w = b.length, S = [], M = [], I = 0; I < w; I++) {
  35539. var T = b[I]
  35540. , A = vk(T.color);
  35541. M.push(T.offset * l + s + " " + A[0]),
  35542. 0 !== I && I !== w - 1 || S.push(A)
  35543. }
  35544. if (w >= 2) {
  35545. var C = S[0][0]
  35546. , D = S[1][0]
  35547. , L = S[0][1] * e.opacity
  35548. , k = S[1][1] * e.opacity;
  35549. t.type = o,
  35550. t.method = "none",
  35551. t.focus = "100%",
  35552. t.angle = a,
  35553. t.color = C,
  35554. t.color2 = D,
  35555. t.colors = M.join(","),
  35556. t.opacity = k,
  35557. t.opacity2 = L
  35558. }
  35559. "radial" === o && (t.focusposition = r.join(","))
  35560. } else
  35561. mk(t, n, e.opacity)
  35562. }
  35563. , xk = function(t, e) {
  35564. null != e.lineDash && (t.dashstyle = e.lineDash.join(" ")),
  35565. null == e.stroke || e.stroke instanceof bb || mk(t, e.stroke, e.opacity)
  35566. }
  35567. , _k = function(t, e, i, n) {
  35568. var o = "fill" == e
  35569. , a = t.getElementsByTagName(e)[0];
  35570. null != i[e] && "none" !== i[e] && (o || !o && i.lineWidth) ? (t[o ? "filled" : "stroked"] = "true",
  35571. i[e]instanceof bb && fk(t, a),
  35572. a || (a = $L(e)),
  35573. o ? yk(a, i, n) : xk(a, i),
  35574. dk(t, a)) : (t[o ? "filled" : "stroked"] = "false",
  35575. fk(t, a))
  35576. }
  35577. , bk = [[], [], []]
  35578. , wk = function(t, e) {
  35579. var i, n, o, a, r, s, l = I_.M, h = I_.C, u = I_.L, c = I_.A, d = I_.Q, f = [], g = t.data, p = t.len();
  35580. for (a = 0; a < p; ) {
  35581. switch (o = g[a++],
  35582. n = "",
  35583. i = 0,
  35584. o) {
  35585. case l:
  35586. n = " m ",
  35587. i = 1,
  35588. r = g[a++],
  35589. s = g[a++],
  35590. bk[0][0] = r,
  35591. bk[0][1] = s;
  35592. break;
  35593. case u:
  35594. n = " l ",
  35595. i = 1,
  35596. r = g[a++],
  35597. s = g[a++],
  35598. bk[0][0] = r,
  35599. bk[0][1] = s;
  35600. break;
  35601. case d:
  35602. case h:
  35603. n = " c ",
  35604. i = 3;
  35605. var m, v, y = g[a++], x = g[a++], _ = g[a++], b = g[a++];
  35606. o === d ? (m = _,
  35607. v = b,
  35608. _ = (_ + 2 * y) / 3,
  35609. b = (b + 2 * x) / 3,
  35610. y = (r + 2 * y) / 3,
  35611. x = (s + 2 * x) / 3) : (m = g[a++],
  35612. v = g[a++]),
  35613. bk[0][0] = y,
  35614. bk[0][1] = x,
  35615. bk[1][0] = _,
  35616. bk[1][1] = b,
  35617. bk[2][0] = m,
  35618. bk[2][1] = v,
  35619. r = m,
  35620. s = v;
  35621. break;
  35622. case c:
  35623. var w = 0
  35624. , S = 0
  35625. , M = 1
  35626. , I = 1
  35627. , T = 0;
  35628. e && (w = e[4],
  35629. S = e[5],
  35630. M = ik(e[0] * e[0] + e[1] * e[1]),
  35631. I = ik(e[2] * e[2] + e[3] * e[3]),
  35632. T = Math.atan2(-e[1] / I, e[0] / M));
  35633. var A = g[a++]
  35634. , C = g[a++]
  35635. , D = g[a++]
  35636. , L = g[a++]
  35637. , k = g[a++] + T
  35638. , P = g[a++] + k + T;
  35639. a++;
  35640. var O = g[a++]
  35641. , z = A + ok(k) * D
  35642. , N = C + ak(k) * L
  35643. , y = A + ok(P) * D
  35644. , x = C + ak(P) * L
  35645. , E = O ? " wa " : " at ";
  35646. Math.abs(z - y) < 1e-4 && (Math.abs(P - k) > .01 ? O && (z += .0125) : Math.abs(N - C) < 1e-4 ? O && z < A || !O && z > A ? x -= .0125 : x += .0125 : O && N < C || !O && N > C ? y += .0125 : y -= .0125),
  35647. f.push(E, ek(((A - D) * M + w) * sk - lk), ",", ek(((C - L) * I + S) * sk - lk), ",", ek(((A + D) * M + w) * sk - lk), ",", ek(((C + L) * I + S) * sk - lk), ",", ek((z * M + w) * sk - lk), ",", ek((N * I + S) * sk - lk), ",", ek((y * M + w) * sk - lk), ",", ek((x * I + S) * sk - lk)),
  35648. r = y,
  35649. s = x;
  35650. break;
  35651. case I_.R:
  35652. var R = bk[0]
  35653. , V = bk[1];
  35654. R[0] = g[a++],
  35655. R[1] = g[a++],
  35656. V[0] = R[0] + g[a++],
  35657. V[1] = R[1] + g[a++],
  35658. e && (Y(R, R, e),
  35659. Y(V, V, e)),
  35660. R[0] = ek(R[0] * sk - lk),
  35661. V[0] = ek(V[0] * sk - lk),
  35662. R[1] = ek(R[1] * sk - lk),
  35663. V[1] = ek(V[1] * sk - lk),
  35664. f.push(" m ", R[0], ",", R[1], " l ", V[0], ",", R[1], " l ", V[0], ",", V[1], " l ", R[0], ",", V[1]);
  35665. break;
  35666. case I_.Z:
  35667. f.push(" x ")
  35668. }
  35669. if (i > 0) {
  35670. f.push(n);
  35671. for (var B = 0; B < i; B++) {
  35672. var G = bk[B];
  35673. e && Y(G, G, e),
  35674. f.push(ek(G[0] * sk - lk), ",", ek(G[1] * sk - lk), B < i - 1 ? "," : "")
  35675. }
  35676. }
  35677. }
  35678. return f.join("")
  35679. };
  35680. On.prototype.brushVML = function(t) {
  35681. var e = this.style
  35682. , i = this._vmlEl;
  35683. i || (i = $L("shape"),
  35684. hk(i),
  35685. this._vmlEl = i),
  35686. _k(i, "fill", e, this),
  35687. _k(i, "stroke", e, this);
  35688. var n = this.transform
  35689. , o = null != n
  35690. , a = i.getElementsByTagName("stroke")[0];
  35691. if (a) {
  35692. var r = e.lineWidth;
  35693. if (o && !e.strokeNoScale) {
  35694. var s = n[0] * n[3] - n[1] * n[2];
  35695. r *= ik(nk(s))
  35696. }
  35697. a.weight = r + "px"
  35698. }
  35699. var l = this.path || (this.path = new R_);
  35700. this.__dirtyPath && (l.beginPath(),
  35701. this.buildPath(l, this.shape),
  35702. l.toStatic(),
  35703. this.__dirtyPath = !1),
  35704. i.path = wk(l, this.transform),
  35705. i.style.zIndex = gk(this.zlevel, this.z, this.z2),
  35706. dk(t, i),
  35707. null != e.text ? this.drawRectText(t, this.getBoundingRect()) : this.removeRectText(t)
  35708. }
  35709. ,
  35710. On.prototype.onRemove = function(t) {
  35711. fk(t, this._vmlEl),
  35712. this.removeRectText(t)
  35713. }
  35714. ,
  35715. On.prototype.onAdd = function(t) {
  35716. dk(t, this._vmlEl),
  35717. this.appendRectText(t)
  35718. }
  35719. ;
  35720. var Sk = function(t) {
  35721. return "object" == typeof t && t.tagName && "IMG" === t.tagName.toUpperCase()
  35722. };
  35723. je.prototype.brushVML = function(t) {
  35724. var e, i, n = this.style, o = n.image;
  35725. if (Sk(o)) {
  35726. var a = o.src;
  35727. if (a === this._imageSrc)
  35728. e = this._imageWidth,
  35729. i = this._imageHeight;
  35730. else {
  35731. var r = o.runtimeStyle
  35732. , s = r.width
  35733. , l = r.height;
  35734. r.width = "auto",
  35735. r.height = "auto",
  35736. e = o.width,
  35737. i = o.height,
  35738. r.width = s,
  35739. r.height = l,
  35740. this._imageSrc = a,
  35741. this._imageWidth = e,
  35742. this._imageHeight = i
  35743. }
  35744. o = a
  35745. } else
  35746. o === this._imageSrc && (e = this._imageWidth,
  35747. i = this._imageHeight);
  35748. if (o) {
  35749. var h = n.x || 0
  35750. , u = n.y || 0
  35751. , c = n.width
  35752. , d = n.height
  35753. , f = n.sWidth
  35754. , g = n.sHeight
  35755. , p = n.sx || 0
  35756. , m = n.sy || 0
  35757. , v = f && g
  35758. , y = this._vmlEl;
  35759. y || (y = tk.createElement("div"),
  35760. hk(y),
  35761. this._vmlEl = y);
  35762. var x, _ = y.style, b = !1, w = 1, S = 1;
  35763. if (this.transform && (x = this.transform,
  35764. w = ik(x[0] * x[0] + x[1] * x[1]),
  35765. S = ik(x[2] * x[2] + x[3] * x[3]),
  35766. b = x[1] || x[2]),
  35767. b) {
  35768. var M = [h, u]
  35769. , I = [h + c, u]
  35770. , T = [h, u + d]
  35771. , A = [h + c, u + d];
  35772. Y(M, M, x),
  35773. Y(I, I, x),
  35774. Y(T, T, x),
  35775. Y(A, A, x);
  35776. var C = rk(M[0], I[0], T[0], A[0])
  35777. , D = rk(M[1], I[1], T[1], A[1])
  35778. , L = [];
  35779. L.push("M11=", x[0] / w, ",", "M12=", x[2] / S, ",", "M21=", x[1] / w, ",", "M22=", x[3] / S, ",", "Dx=", ek(h * w + x[4]), ",", "Dy=", ek(u * S + x[5])),
  35780. _.padding = "0 " + ek(C) + "px " + ek(D) + "px 0",
  35781. _.filter = "progid:DXImageTransform.Microsoft.Matrix(" + L.join("") + ", SizingMethod=clip)"
  35782. } else
  35783. x && (h = h * w + x[4],
  35784. u = u * S + x[5]),
  35785. _.filter = "",
  35786. _.left = ek(h) + "px",
  35787. _.top = ek(u) + "px";
  35788. var k = this._imageEl
  35789. , P = this._cropEl;
  35790. k || (k = tk.createElement("div"),
  35791. this._imageEl = k);
  35792. var O = k.style;
  35793. if (v) {
  35794. if (e && i)
  35795. O.width = ek(w * e * c / f) + "px",
  35796. O.height = ek(S * i * d / g) + "px";
  35797. else {
  35798. var z = new Image
  35799. , N = this;
  35800. z.onload = function() {
  35801. z.onload = null,
  35802. e = z.width,
  35803. i = z.height,
  35804. O.width = ek(w * e * c / f) + "px",
  35805. O.height = ek(S * i * d / g) + "px",
  35806. N._imageWidth = e,
  35807. N._imageHeight = i,
  35808. N._imageSrc = o
  35809. }
  35810. ,
  35811. z.src = o
  35812. }
  35813. P || ((P = tk.createElement("div")).style.overflow = "hidden",
  35814. this._cropEl = P);
  35815. var E = P.style;
  35816. E.width = ek((c + p * c / f) * w),
  35817. E.height = ek((d + m * d / g) * S),
  35818. E.filter = "progid:DXImageTransform.Microsoft.Matrix(Dx=" + -p * c / f * w + ",Dy=" + -m * d / g * S + ")",
  35819. P.parentNode || y.appendChild(P),
  35820. k.parentNode != P && P.appendChild(k)
  35821. } else
  35822. O.width = ek(w * c) + "px",
  35823. O.height = ek(S * d) + "px",
  35824. y.appendChild(k),
  35825. P && P.parentNode && (y.removeChild(P),
  35826. this._cropEl = null);
  35827. var R = ""
  35828. , V = n.opacity;
  35829. V < 1 && (R += ".Alpha(opacity=" + ek(100 * V) + ") "),
  35830. R += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + o + ", SizingMethod=scale)",
  35831. O.filter = R,
  35832. y.style.zIndex = gk(this.zlevel, this.z, this.z2),
  35833. dk(t, y),
  35834. null != n.text && this.drawRectText(t, this.getBoundingRect())
  35835. }
  35836. }
  35837. ,
  35838. je.prototype.onRemove = function(t) {
  35839. fk(t, this._vmlEl),
  35840. this._vmlEl = null,
  35841. this._cropEl = null,
  35842. this._imageEl = null,
  35843. this.removeRectText(t)
  35844. }
  35845. ,
  35846. je.prototype.onAdd = function(t) {
  35847. dk(t, this._vmlEl),
  35848. this.appendRectText(t)
  35849. }
  35850. ;
  35851. var Mk, Ik = {}, Tk = 0, Ak = document.createElement("div"), Ck = function(t) {
  35852. var e = Ik[t];
  35853. if (!e) {
  35854. Tk > 100 && (Tk = 0,
  35855. Ik = {});
  35856. var i, n = Ak.style;
  35857. try {
  35858. n.font = t,
  35859. i = n.fontFamily.split(",")[0]
  35860. } catch (t) {}
  35861. e = {
  35862. style: n.fontStyle || "normal",
  35863. variant: n.fontVariant || "normal",
  35864. weight: n.fontWeight || "normal",
  35865. size: 0 | parseFloat(n.fontSize || 12),
  35866. family: i || "Microsoft YaHei"
  35867. },
  35868. Ik[t] = e,
  35869. Tk++
  35870. }
  35871. return e
  35872. };
  35873. px.measureText(function(t, e) {
  35874. var i = tk;
  35875. Mk || ((Mk = i.createElement("div")).style.cssText = "position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",
  35876. tk.body.appendChild(Mk));
  35877. try {
  35878. Mk.style.font = e
  35879. } catch (t) {}
  35880. return Mk.innerHTML = "",
  35881. Mk.appendChild(i.createTextNode(t)),
  35882. {
  35883. width: Mk.offsetWidth
  35884. }
  35885. });
  35886. for (var Dk = new jt, Lk = [xx, Ue, je, On, ab], kk = 0; kk < Lk.length; kk++) {
  35887. var Pk = Lk[kk].prototype;
  35888. Pk.drawRectText = function(t, e, i, n) {
  35889. var o = this.style;
  35890. this.__dirty && Ae(o);
  35891. var a = o.text;
  35892. if (null != a && (a += ""),
  35893. a) {
  35894. if (o.rich) {
  35895. var r = Se(a, o);
  35896. a = [];
  35897. for (var s = 0; s < r.lines.length; s++) {
  35898. for (var l = r.lines[s].tokens, h = [], u = 0; u < l.length; u++)
  35899. h.push(l[u].text);
  35900. a.push(h.join(""))
  35901. }
  35902. a = a.join("\n")
  35903. }
  35904. var c, d, f = o.textAlign, g = o.textVerticalAlign, p = Ck(o.font), m = p.style + " " + p.variant + " " + p.weight + " " + p.size + 'px "' + p.family + '"';
  35905. i = i || ce(a, m, f, g);
  35906. var v = this.transform;
  35907. if (v && !n && (Dk.copy(e),
  35908. Dk.applyTransform(v),
  35909. e = Dk),
  35910. n)
  35911. c = e.x,
  35912. d = e.y;
  35913. else {
  35914. var y = o.textPosition
  35915. , x = o.textDistance;
  35916. if (y instanceof Array)
  35917. c = e.x + pk(y[0], e.width),
  35918. d = e.y + pk(y[1], e.height),
  35919. f = f || "left";
  35920. else {
  35921. var _ = me(y, e, x);
  35922. c = _.x,
  35923. d = _.y,
  35924. f = f || _.textAlign,
  35925. g = g || _.textVerticalAlign
  35926. }
  35927. }
  35928. c = ge(c, i.width, f),
  35929. d = pe(d, i.height, g),
  35930. d += i.height / 2;
  35931. var b, w, S, M = $L, I = this._textVmlEl;
  35932. I ? w = (b = (S = I.firstChild).nextSibling).nextSibling : (I = M("line"),
  35933. b = M("path"),
  35934. w = M("textpath"),
  35935. S = M("skew"),
  35936. w.style["v-text-align"] = "left",
  35937. hk(I),
  35938. b.textpathok = !0,
  35939. w.on = !0,
  35940. I.from = "0 0",
  35941. I.to = "1000 0.05",
  35942. dk(I, S),
  35943. dk(I, b),
  35944. dk(I, w),
  35945. this._textVmlEl = I);
  35946. var T = [c, d]
  35947. , A = I.style;
  35948. v && n ? (Y(T, T, v),
  35949. S.on = !0,
  35950. S.matrix = v[0].toFixed(3) + "," + v[2].toFixed(3) + "," + v[1].toFixed(3) + "," + v[3].toFixed(3) + ",0,0",
  35951. S.offset = (ek(T[0]) || 0) + "," + (ek(T[1]) || 0),
  35952. S.origin = "0 0",
  35953. A.left = "0px",
  35954. A.top = "0px") : (S.on = !1,
  35955. A.left = ek(c) + "px",
  35956. A.top = ek(d) + "px"),
  35957. w.string = uk(a);
  35958. try {
  35959. w.style.font = m
  35960. } catch (t) {}
  35961. _k(I, "fill", {
  35962. fill: o.textFill,
  35963. opacity: o.opacity
  35964. }, this),
  35965. _k(I, "stroke", {
  35966. stroke: o.textStroke,
  35967. opacity: o.opacity,
  35968. lineDash: o.lineDash
  35969. }, this),
  35970. I.style.zIndex = gk(this.zlevel, this.z, this.z2),
  35971. dk(t, I)
  35972. }
  35973. }
  35974. ,
  35975. Pk.removeRectText = function(t) {
  35976. fk(t, this._textVmlEl),
  35977. this._textVmlEl = null
  35978. }
  35979. ,
  35980. Pk.appendRectText = function(t) {
  35981. dk(t, this._textVmlEl)
  35982. }
  35983. }
  35984. ab.prototype.brushVML = function(t) {
  35985. var e = this.style;
  35986. null != e.text ? this.drawRectText(t, {
  35987. x: e.x || 0,
  35988. y: e.y || 0,
  35989. width: 0,
  35990. height: 0
  35991. }, this.getBoundingRect(), !0) : this.removeRectText(t)
  35992. }
  35993. ,
  35994. ab.prototype.onRemove = function(t) {
  35995. this.removeRectText(t)
  35996. }
  35997. ,
  35998. ab.prototype.onAdd = function(t) {
  35999. this.appendRectText(t)
  36000. }
  36001. }
  36002. vv.prototype = {
  36003. constructor: vv,
  36004. getType: function() {
  36005. return "vml"
  36006. },
  36007. getViewportRoot: function() {
  36008. return this._vmlViewport
  36009. },
  36010. getViewportRootOffset: function() {
  36011. var t = this.getViewportRoot();
  36012. if (t)
  36013. return {
  36014. offsetLeft: t.offsetLeft || 0,
  36015. offsetTop: t.offsetTop || 0
  36016. }
  36017. },
  36018. refresh: function() {
  36019. var t = this.storage.getDisplayList(!0, !0);
  36020. this._paintList(t)
  36021. },
  36022. _paintList: function(t) {
  36023. for (var e = this._vmlRoot, i = 0; i < t.length; i++) {
  36024. var n = t[i];
  36025. n.invisible || n.ignore ? (n.__alreadyNotVisible || n.onRemove(e),
  36026. n.__alreadyNotVisible = !0) : (n.__alreadyNotVisible && n.onAdd(e),
  36027. n.__alreadyNotVisible = !1,
  36028. n.__dirty && (n.beforeBrush && n.beforeBrush(),
  36029. (n.brushVML || n.brush).call(n, e),
  36030. n.afterBrush && n.afterBrush())),
  36031. n.__dirty = !1
  36032. }
  36033. this._firstPaint && (this._vmlViewport.appendChild(e),
  36034. this._firstPaint = !1)
  36035. },
  36036. resize: function(t, e) {
  36037. var t = null == t ? this._getWidth() : t
  36038. , e = null == e ? this._getHeight() : e;
  36039. if (this._width != t || this._height != e) {
  36040. this._width = t,
  36041. this._height = e;
  36042. var i = this._vmlViewport.style;
  36043. i.width = t + "px",
  36044. i.height = e + "px"
  36045. }
  36046. },
  36047. dispose: function() {
  36048. this.root.innerHTML = "",
  36049. this._vmlRoot = this._vmlViewport = this.storage = null
  36050. },
  36051. getWidth: function() {
  36052. return this._width
  36053. },
  36054. getHeight: function() {
  36055. return this._height
  36056. },
  36057. clear: function() {
  36058. this._vmlViewport && this.root.removeChild(this._vmlViewport)
  36059. },
  36060. _getWidth: function() {
  36061. var t = this.root
  36062. , e = t.currentStyle;
  36063. return (t.clientWidth || mv(e.width)) - mv(e.paddingLeft) - mv(e.paddingRight) | 0
  36064. },
  36065. _getHeight: function() {
  36066. var t = this.root
  36067. , e = t.currentStyle;
  36068. return (t.clientHeight || mv(e.height)) - mv(e.paddingTop) - mv(e.paddingBottom) | 0
  36069. }
  36070. },
  36071. c(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function(t) {
  36072. vv.prototype[t] = yv(t)
  36073. }),
  36074. vi("vml", vv);
  36075. var Ok = "http://www.w3.org/2000/svg"
  36076. , zk = Array.prototype.join
  36077. , Nk = "none"
  36078. , Ek = Math.round
  36079. , Rk = Math.sin
  36080. , Vk = Math.cos
  36081. , Bk = Math.PI
  36082. , Gk = 2 * Math.PI
  36083. , Wk = 180 / Bk
  36084. , Hk = 1e-4
  36085. , Fk = {};
  36086. Fk.brush = function(t) {
  36087. var e = t.style
  36088. , i = t.__svgEl;
  36089. i || (i = xv("path"),
  36090. t.__svgEl = i),
  36091. t.path || t.createPathProxy();
  36092. var n = t.path;
  36093. t.__dirtyPath && (n.beginPath(),
  36094. t.buildPath(n, t.shape),
  36095. t.__dirtyPath = !1,
  36096. Iv(i, "d", Cv(n))),
  36097. Av(i, e),
  36098. Mv(i, t.transform),
  36099. null != e.text && Xk(t, t.getBoundingRect())
  36100. }
  36101. ;
  36102. var Zk = {};
  36103. Zk.brush = function(t) {
  36104. var e = t.style
  36105. , i = e.image;
  36106. if (i instanceof HTMLImageElement && (i = i.src),
  36107. i) {
  36108. var n = e.x || 0
  36109. , o = e.y || 0
  36110. , a = e.width
  36111. , r = e.height
  36112. , s = t.__svgEl;
  36113. s || (s = xv("image"),
  36114. t.__svgEl = s),
  36115. i !== t.__imageSrc && (Tv(s, "href", i),
  36116. t.__imageSrc = i),
  36117. Iv(s, "width", a),
  36118. Iv(s, "height", r),
  36119. Iv(s, "x", n),
  36120. Iv(s, "y", o),
  36121. Mv(s, t.transform),
  36122. null != e.text && Xk(t, t.getBoundingRect())
  36123. }
  36124. }
  36125. ;
  36126. var Uk = {}
  36127. , jk = new jt
  36128. , Xk = function(t, e, i) {
  36129. var n = t.style;
  36130. t.__dirty && Ae(n);
  36131. var o = n.text;
  36132. if (null != o && (o += ""),
  36133. o) {
  36134. var a = t.__textSvgEl;
  36135. if (a || (a = xv("text"),
  36136. t.__textSvgEl = a),
  36137. Av(a, n, !0),
  36138. t instanceof ab || t.style.transformText)
  36139. Mv(a, t.transform);
  36140. else if (t.transform)
  36141. jk.copy(e),
  36142. jk.applyTransform(t.transform),
  36143. e = jk;
  36144. else {
  36145. var r = t.transformCoordToGlobal(e.x, e.y);
  36146. e.x = r[0],
  36147. e.y = r[1]
  36148. }
  36149. var s, l, h = n.textPosition, u = n.textDistance, c = n.textAlign || "left";
  36150. "number" == typeof n.fontSize && (n.fontSize += "px");
  36151. var d = n.font || [n.fontStyle || "", n.fontWeight || "", n.fontSize || "", n.fontFamily || ""].join(" ") || fx
  36152. , f = Dv(n.textVerticalAlign)
  36153. , g = (i = ce(o, d, c, f)).lineHeight;
  36154. if (h instanceof Array)
  36155. s = e.x + h[0],
  36156. l = e.y + h[1];
  36157. else {
  36158. var p = me(h, e, u);
  36159. s = p.x,
  36160. l = p.y,
  36161. f = Dv(p.textVerticalAlign),
  36162. c = p.textAlign
  36163. }
  36164. Iv(a, "alignment-baseline", f),
  36165. d && (a.style.font = d);
  36166. var m = n.textPadding;
  36167. Iv(a, "x", s),
  36168. Iv(a, "y", l);
  36169. var v = o.split("\n")
  36170. , y = v.length
  36171. , x = c;
  36172. "left" === x ? (x = "start",
  36173. m && (s += m[3])) : "right" === x ? (x = "end",
  36174. m && (s -= m[1])) : "center" === x && (x = "middle",
  36175. m && (s += (m[3] - m[1]) / 2));
  36176. var _ = 0;
  36177. if ("baseline" === f ? (_ = -i.height + g,
  36178. m && (_ -= m[2])) : "middle" === f ? (_ = (-i.height + g) / 2,
  36179. m && (l += (m[0] - m[2]) / 2)) : m && (_ += m[0]),
  36180. t.__text !== o || t.__textFont !== d) {
  36181. var b = t.__tspanList || [];
  36182. t.__tspanList = b;
  36183. for (S = 0; S < y; S++)
  36184. (M = b[S]) ? M.innerHTML = "" : (M = b[S] = xv("tspan"),
  36185. a.appendChild(M),
  36186. Iv(M, "alignment-baseline", f),
  36187. Iv(M, "text-anchor", x)),
  36188. Iv(M, "x", s),
  36189. Iv(M, "y", l + S * g + _),
  36190. M.appendChild(document.createTextNode(v[S]));
  36191. for (; S < b.length; S++)
  36192. a.removeChild(b[S]);
  36193. b.length = y,
  36194. t.__text = o,
  36195. t.__textFont = d
  36196. } else if (t.__tspanList.length)
  36197. for (var w = t.__tspanList.length, S = 0; S < w; ++S) {
  36198. var M = t.__tspanList[S];
  36199. M && (Iv(M, "x", s),
  36200. Iv(M, "y", l + S * g + _))
  36201. }
  36202. }
  36203. };
  36204. Uk.drawRectText = Xk,
  36205. Uk.brush = function(t) {
  36206. var e = t.style;
  36207. null != e.text && (e.textPosition = [0, 0],
  36208. Xk(t, {
  36209. x: e.x || 0,
  36210. y: e.y || 0,
  36211. width: 0,
  36212. height: 0
  36213. }, t.getBoundingRect()))
  36214. }
  36215. ,
  36216. Lv.prototype = {
  36217. diff: function(t, e, i) {
  36218. i || (i = function(t, e) {
  36219. return t === e
  36220. }
  36221. ),
  36222. this.equals = i;
  36223. var n = this;
  36224. t = t.slice();
  36225. var o = (e = e.slice()).length
  36226. , a = t.length
  36227. , r = 1
  36228. , s = o + a
  36229. , l = [{
  36230. newPos: -1,
  36231. components: []
  36232. }]
  36233. , h = this.extractCommon(l[0], e, t, 0);
  36234. if (l[0].newPos + 1 >= o && h + 1 >= a) {
  36235. for (var u = [], c = 0; c < e.length; c++)
  36236. u.push(c);
  36237. return [{
  36238. indices: u,
  36239. count: e.length
  36240. }]
  36241. }
  36242. for (; r <= s; ) {
  36243. var d = function() {
  36244. for (var i = -1 * r; i <= r; i += 2) {
  36245. var s, h = l[i - 1], u = l[i + 1], c = (u ? u.newPos : 0) - i;
  36246. h && (l[i - 1] = void 0);
  36247. var d = h && h.newPos + 1 < o
  36248. , f = u && 0 <= c && c < a;
  36249. if (d || f) {
  36250. if (!d || f && h.newPos < u.newPos ? (s = Pv(u),
  36251. n.pushComponent(s.components, void 0, !0)) : ((s = h).newPos++,
  36252. n.pushComponent(s.components, !0, void 0)),
  36253. c = n.extractCommon(s, e, t, i),
  36254. s.newPos + 1 >= o && c + 1 >= a)
  36255. return kv(0, s.components);
  36256. l[i] = s
  36257. } else
  36258. l[i] = void 0
  36259. }
  36260. r++
  36261. }();
  36262. if (d)
  36263. return d
  36264. }
  36265. },
  36266. pushComponent: function(t, e, i) {
  36267. var n = t[t.length - 1];
  36268. n && n.added === e && n.removed === i ? t[t.length - 1] = {
  36269. count: n.count + 1,
  36270. added: e,
  36271. removed: i
  36272. } : t.push({
  36273. count: 1,
  36274. added: e,
  36275. removed: i
  36276. })
  36277. },
  36278. extractCommon: function(t, e, i, n) {
  36279. for (var o = e.length, a = i.length, r = t.newPos, s = r - n, l = 0; r + 1 < o && s + 1 < a && this.equals(e[r + 1], i[s + 1]); )
  36280. r++,
  36281. s++,
  36282. l++;
  36283. return l && t.components.push({
  36284. count: l
  36285. }),
  36286. t.newPos = r,
  36287. s
  36288. },
  36289. tokenize: function(t) {
  36290. return t.slice()
  36291. },
  36292. join: function(t) {
  36293. return t.slice()
  36294. }
  36295. };
  36296. var qk = new Lv
  36297. , Yk = function(t, e, i) {
  36298. return qk.diff(t, e, i)
  36299. };
  36300. Ov.prototype.createElement = xv,
  36301. Ov.prototype.getDefs = function(t) {
  36302. var e = this._svgRoot
  36303. , i = this._svgRoot.getElementsByTagName("defs");
  36304. return 0 === i.length ? t ? ((i = e.insertBefore(this.createElement("defs"), e.firstChild)).contains || (i.contains = function(t) {
  36305. var e = i.children;
  36306. if (!e)
  36307. return !1;
  36308. for (var n = e.length - 1; n >= 0; --n)
  36309. if (e[n] === t)
  36310. return !0;
  36311. return !1
  36312. }
  36313. ),
  36314. i) : null : i[0]
  36315. }
  36316. ,
  36317. Ov.prototype.update = function(t, e) {
  36318. if (t) {
  36319. var i = this.getDefs(!1);
  36320. if (t._dom && i.contains(t._dom))
  36321. "function" == typeof e && e();
  36322. else {
  36323. var n = this.add(t);
  36324. n && (t._dom = n)
  36325. }
  36326. }
  36327. }
  36328. ,
  36329. Ov.prototype.addDom = function(t) {
  36330. this.getDefs(!0).appendChild(t)
  36331. }
  36332. ,
  36333. Ov.prototype.removeDom = function(t) {
  36334. this.getDefs(!1).removeChild(t._dom)
  36335. }
  36336. ,
  36337. Ov.prototype.getDoms = function() {
  36338. var t = this.getDefs(!1);
  36339. if (!t)
  36340. return [];
  36341. var e = [];
  36342. return c(this._tagNames, function(i) {
  36343. var n = t.getElementsByTagName(i);
  36344. e = e.concat([].slice.call(n))
  36345. }),
  36346. e
  36347. }
  36348. ,
  36349. Ov.prototype.markAllUnused = function() {
  36350. var t = this;
  36351. c(this.getDoms(), function(e) {
  36352. e[t._markLabel] = "0"
  36353. })
  36354. }
  36355. ,
  36356. Ov.prototype.markUsed = function(t) {
  36357. t && (t[this._markLabel] = "1")
  36358. }
  36359. ,
  36360. Ov.prototype.removeUnused = function() {
  36361. var t = this.getDefs(!1);
  36362. if (t) {
  36363. var e = this;
  36364. c(this.getDoms(), function(i) {
  36365. "1" !== i[e._markLabel] && t.removeChild(i)
  36366. })
  36367. }
  36368. }
  36369. ,
  36370. Ov.prototype.getSvgProxy = function(t) {
  36371. return t instanceof On ? Fk : t instanceof je ? Zk : t instanceof ab ? Uk : Fk
  36372. }
  36373. ,
  36374. Ov.prototype.getTextSvgElement = function(t) {
  36375. return t.__textSvgEl
  36376. }
  36377. ,
  36378. Ov.prototype.getSvgElement = function(t) {
  36379. return t.__svgEl
  36380. }
  36381. ,
  36382. l(zv, Ov),
  36383. zv.prototype.addWithoutUpdate = function(t, e) {
  36384. if (e && e.style) {
  36385. var i = this;
  36386. c(["fill", "stroke"], function(n) {
  36387. if (e.style[n] && ("linear" === e.style[n].type || "radial" === e.style[n].type)) {
  36388. var o, a = e.style[n], r = i.getDefs(!0);
  36389. a._dom ? (o = a._dom,
  36390. r.contains(a._dom) || i.addDom(o)) : o = i.add(a),
  36391. i.markUsed(e);
  36392. var s = o.getAttribute("id");
  36393. t.setAttribute(n, "url(#" + s + ")")
  36394. }
  36395. })
  36396. }
  36397. }
  36398. ,
  36399. zv.prototype.add = function(t) {
  36400. var e;
  36401. if ("linear" === t.type)
  36402. e = this.createElement("linearGradient");
  36403. else {
  36404. if ("radial" !== t.type)
  36405. return Zy("Illegal gradient type."),
  36406. null;
  36407. e = this.createElement("radialGradient")
  36408. }
  36409. return t.id = t.id || this.nextId++,
  36410. e.setAttribute("id", "zr-gradient-" + t.id),
  36411. this.updateDom(t, e),
  36412. this.addDom(e),
  36413. e
  36414. }
  36415. ,
  36416. zv.prototype.update = function(t) {
  36417. var e = this;
  36418. Ov.prototype.update.call(this, t, function() {
  36419. var i = t.type
  36420. , n = t._dom.tagName;
  36421. "linear" === i && "linearGradient" === n || "radial" === i && "radialGradient" === n ? e.updateDom(t, t._dom) : (e.removeDom(t),
  36422. e.add(t))
  36423. })
  36424. }
  36425. ,
  36426. zv.prototype.updateDom = function(t, e) {
  36427. if ("linear" === t.type)
  36428. e.setAttribute("x1", t.x),
  36429. e.setAttribute("y1", t.y),
  36430. e.setAttribute("x2", t.x2),
  36431. e.setAttribute("y2", t.y2);
  36432. else {
  36433. if ("radial" !== t.type)
  36434. return void Zy("Illegal gradient type.");
  36435. e.setAttribute("cx", t.x),
  36436. e.setAttribute("cy", t.y),
  36437. e.setAttribute("r", t.r)
  36438. }
  36439. t.global ? e.setAttribute("gradientUnits", "userSpaceOnUse") : e.setAttribute("gradientUnits", "objectBoundingBox"),
  36440. e.innerHTML = "";
  36441. for (var i = t.colorStops, n = 0, o = i.length; n < o; ++n) {
  36442. var a = this.createElement("stop");
  36443. a.setAttribute("offset", 100 * i[n].offset + "%"),
  36444. a.setAttribute("stop-color", i[n].color),
  36445. e.appendChild(a)
  36446. }
  36447. t._dom = e
  36448. }
  36449. ,
  36450. zv.prototype.markUsed = function(t) {
  36451. if (t.style) {
  36452. var e = t.style.fill;
  36453. e && e._dom && Ov.prototype.markUsed.call(this, e._dom),
  36454. (e = t.style.stroke) && e._dom && Ov.prototype.markUsed.call(this, e._dom)
  36455. }
  36456. }
  36457. ,
  36458. l(Nv, Ov),
  36459. Nv.prototype.update = function(t, e) {
  36460. this.updateDom(e, t.__clipPaths, !1);
  36461. var i = this.getTextSvgElement(t);
  36462. i && this.updateDom(i, t.__clipPaths, !0),
  36463. this.markUsed(t)
  36464. }
  36465. ,
  36466. Nv.prototype.updateDom = function(t, e, i) {
  36467. if (e && e.length > 0) {
  36468. var n, o, a = this.getDefs(!0), r = e[0], s = i ? "_textDom" : "_dom";
  36469. r[s] ? (o = r[s].getAttribute("id"),
  36470. n = r[s],
  36471. a.contains(n) || a.appendChild(n)) : (o = "zr-clip-" + this.nextId,
  36472. ++this.nextId,
  36473. (n = this.createElement("clipPath")).setAttribute("id", o),
  36474. a.appendChild(n),
  36475. r[s] = n);
  36476. var l = this.getSvgProxy(r);
  36477. if (r.transform && r.parent.invTransform && !i) {
  36478. var h = Array.prototype.slice.call(r.transform);
  36479. rt(r.transform, r.parent.invTransform, r.transform),
  36480. l.brush(r),
  36481. r.transform = h
  36482. } else
  36483. l.brush(r);
  36484. var u = this.getSvgElement(r);
  36485. n.appendChild(u),
  36486. t.setAttribute("clip-path", "url(#" + o + ")"),
  36487. e.length > 1 && this.updateDom(n, e.slice(1), i)
  36488. } else
  36489. t && t.setAttribute("clip-path", "none")
  36490. }
  36491. ,
  36492. Nv.prototype.markUsed = function(t) {
  36493. var e = this;
  36494. t.__clipPaths && t.__clipPaths.length > 0 && c(t.__clipPaths, function(t) {
  36495. t._dom && Ov.prototype.markUsed.call(e, t._dom),
  36496. t._textDom && Ov.prototype.markUsed.call(e, t._textDom)
  36497. })
  36498. }
  36499. ;
  36500. var $k = function(t, e) {
  36501. this.root = t,
  36502. this.storage = e;
  36503. var i = xv("svg");
  36504. i.setAttribute("xmlns", "http://www.w3.org/2000/svg"),
  36505. i.setAttribute("version", "1.1"),
  36506. i.setAttribute("baseProfile", "full"),
  36507. i.style["user-select"] = "none",
  36508. this.gradientManager = new zv(i),
  36509. this.clipPathManager = new Nv(i);
  36510. var n = document.createElement("div");
  36511. n.style.cssText = "overflow: hidden;",
  36512. this._svgRoot = i,
  36513. this._viewport = n,
  36514. t.appendChild(n),
  36515. n.appendChild(i),
  36516. this.resize(),
  36517. this._visibleList = []
  36518. };
  36519. $k.prototype = {
  36520. constructor: $k,
  36521. getType: function() {
  36522. return "svg"
  36523. },
  36524. getViewportRoot: function() {
  36525. return this._viewport
  36526. },
  36527. getViewportRootOffset: function() {
  36528. var t = this.getViewportRoot();
  36529. if (t)
  36530. return {
  36531. offsetLeft: t.offsetLeft || 0,
  36532. offsetTop: t.offsetTop || 0
  36533. }
  36534. },
  36535. refresh: function() {
  36536. var t = this.storage.getDisplayList(!0);
  36537. this._paintList(t)
  36538. },
  36539. _paintList: function(t) {
  36540. this.gradientManager.markAllUnused(),
  36541. this.clipPathManager.markAllUnused();
  36542. var e, i = this._svgRoot, n = this._visibleList, o = t.length, a = [];
  36543. for (e = 0; e < o; e++) {
  36544. var r = Rv(g = t[e]);
  36545. if (!g.invisible) {
  36546. if (g.__dirty) {
  36547. r && r.brush(g);
  36548. var s = Fv(g) || Hv(g);
  36549. this.clipPathManager.update(g, s),
  36550. g.style && (this.gradientManager.update(g.style.fill),
  36551. this.gradientManager.update(g.style.stroke)),
  36552. g.__dirty = !1
  36553. }
  36554. a.push(g)
  36555. }
  36556. }
  36557. var l, h = Yk(n, a);
  36558. for (e = 0; e < h.length; e++)
  36559. if ((d = h[e]).removed)
  36560. for (f = 0; f < d.count; f++) {
  36561. var u = Fv(g = n[d.indices[f]])
  36562. , c = Hv(g);
  36563. Wv(i, u),
  36564. Wv(i, c)
  36565. }
  36566. for (e = 0; e < h.length; e++) {
  36567. var d = h[e];
  36568. if (d.added)
  36569. for (f = 0; f < d.count; f++) {
  36570. var u = Fv(g = a[d.indices[f]])
  36571. , c = Hv(g);
  36572. l ? Bv(i, u, l) : Gv(i, u),
  36573. u ? Bv(i, c, u) : l ? Bv(i, c, l) : Gv(i, c),
  36574. Bv(i, c, u),
  36575. l = c || u || l,
  36576. this.gradientManager.addWithoutUpdate(u, g),
  36577. this.clipPathManager.markUsed(g)
  36578. }
  36579. else if (!d.removed)
  36580. for (var f = 0; f < d.count; f++) {
  36581. var g = a[d.indices[f]];
  36582. l = u = Hv(g) || Fv(g) || l,
  36583. this.gradientManager.markUsed(g),
  36584. this.gradientManager.addWithoutUpdate(u, g),
  36585. this.clipPathManager.markUsed(g)
  36586. }
  36587. }
  36588. this.gradientManager.removeUnused(),
  36589. this.clipPathManager.removeUnused(),
  36590. this._visibleList = a
  36591. },
  36592. _getDefs: function(t) {
  36593. var e = this._svgRoot
  36594. , i = this._svgRoot.getElementsByTagName("defs");
  36595. return 0 === i.length ? t ? ((i = e.insertBefore(xv("defs"), e.firstChild)).contains || (i.contains = function(t) {
  36596. var e = i.children;
  36597. if (!e)
  36598. return !1;
  36599. for (var n = e.length - 1; n >= 0; --n)
  36600. if (e[n] === t)
  36601. return !0;
  36602. return !1
  36603. }
  36604. ),
  36605. i) : null : i[0]
  36606. },
  36607. resize: function() {
  36608. var t = this._getWidth()
  36609. , e = this._getHeight();
  36610. if (this._width !== t && this._height !== e) {
  36611. this._width = t,
  36612. this._height = e;
  36613. var i = this._viewport.style;
  36614. i.width = t + "px",
  36615. i.height = e + "px";
  36616. var n = this._svgRoot;
  36617. n.setAttribute("width", t),
  36618. n.setAttribute("height", e)
  36619. }
  36620. },
  36621. getWidth: function() {
  36622. return this._getWidth()
  36623. },
  36624. getHeight: function() {
  36625. return this._getHeight()
  36626. },
  36627. _getWidth: function() {
  36628. var t = this.root
  36629. , e = document.defaultView.getComputedStyle(t);
  36630. return (t.clientWidth || Ev(e.width)) - Ev(e.paddingLeft) - Ev(e.paddingRight) | 0
  36631. },
  36632. _getHeight: function() {
  36633. var t = this.root
  36634. , e = document.defaultView.getComputedStyle(t);
  36635. return (t.clientHeight || Ev(e.height)) - Ev(e.paddingTop) - Ev(e.paddingBottom) | 0
  36636. },
  36637. dispose: function() {
  36638. this.root.innerHTML = "",
  36639. this._svgRoot = this._viewport = this.storage = null
  36640. },
  36641. clear: function() {
  36642. this._viewport && this.root.removeChild(this._viewport)
  36643. },
  36644. pathToSvg: function() {
  36645. this.refresh();
  36646. var t = this._svgRoot.outerHTML;
  36647. return "data:img/svg+xml;utf-8," + unescape(t)
  36648. }
  36649. },
  36650. c(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function(t) {
  36651. $k.prototype[t] = Zv(t)
  36652. }),
  36653. vi("svg", $k),
  36654. t.dataTool = QS,
  36655. t.version = kw,
  36656. t.dependencies = Pw,
  36657. t.PRIORITY = Ew,
  36658. t.init = function(t, e, i) {
  36659. var n = Ja(t);
  36660. if (n)
  36661. return n;
  36662. var o = new Oa(t,e,i);
  36663. return o.id = "ec_" + Qw++,
  36664. Kw[o.id] = o,
  36665. t.setAttribute ? t.setAttribute(eS, o.id) : t[eS] = o.id,
  36666. $a(o),
  36667. o
  36668. }
  36669. ,
  36670. t.connect = function(t) {
  36671. if (v(t)) {
  36672. var e = t;
  36673. t = null,
  36674. c(e, function(e) {
  36675. null != e.group && (t = e.group)
  36676. }),
  36677. t = t || "g_" + tS++,
  36678. c(e, function(e) {
  36679. e.group = t
  36680. })
  36681. }
  36682. return Jw[t] = !0,
  36683. t
  36684. }
  36685. ,
  36686. t.disConnect = Ka,
  36687. t.disconnect = iS,
  36688. t.dispose = function(t) {
  36689. "string" == typeof t ? t = Kw[t] : t instanceof Oa || (t = Ja(t)),
  36690. t instanceof Oa && !t.isDisposed() && t.dispose()
  36691. }
  36692. ,
  36693. t.getInstanceByDom = Ja,
  36694. t.getInstanceById = function(t) {
  36695. return Kw[t]
  36696. }
  36697. ,
  36698. t.registerTheme = function(t, e) {
  36699. Yw[t] = e
  36700. }
  36701. ,
  36702. t.registerPreprocessor = Qa,
  36703. t.registerProcessor = tr,
  36704. t.registerPostUpdate = function(t) {
  36705. Xw.push(t)
  36706. }
  36707. ,
  36708. t.registerAction = er,
  36709. t.registerCoordinateSystem = ir,
  36710. t.getCoordinateSystemDimensions = function(t) {
  36711. var e = ha.get(t);
  36712. if (e)
  36713. return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice()
  36714. }
  36715. ,
  36716. t.registerLayout = nr,
  36717. t.registerVisual = or,
  36718. t.registerLoading = ar,
  36719. t.extendComponentModel = rr,
  36720. t.extendComponentView = sr,
  36721. t.extendSeriesModel = lr,
  36722. t.extendChartView = hr,
  36723. t.setCanvasCreator = function(t) {
  36724. sy.createCanvas(t)
  36725. }
  36726. ,
  36727. t.$inject = nS,
  36728. t.zrender = Gx,
  36729. t.graphic = Db,
  36730. t.number = Zx,
  36731. t.format = Kx,
  36732. t.throttle = Ca,
  36733. t.helper = jS,
  36734. t.matrix = by,
  36735. t.vector = gy,
  36736. t.color = Vy,
  36737. t.util = $S,
  36738. t.List = lS,
  36739. t.Model = Co,
  36740. t.Axis = YS,
  36741. t.env = Yv
  36742. });