echarts.min.js 988 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. ! function(t, e) {
  20. "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ?
  21. define(["exports"], e) : e(t.echarts = {})
  22. }(this, function(t) {
  23. "use strict";
  24. function e(t, e) {
  25. "createCanvas" === t && (q_ = null), j_[t] = e
  26. }
  27. function i(t) {
  28. if (null == t || "object" != typeof t) return t;
  29. var e = t,
  30. n = G_.call(t);
  31. if ("[object Array]" === n) {
  32. if (!O(t)) {
  33. e = [];
  34. for (var o = 0, a = t.length; o < a; o++) e[o] = i(t[o])
  35. }
  36. } else if (V_[n]) {
  37. if (!O(t)) {
  38. var r = t.constructor;
  39. if (t.constructor.from) e = r.from(t);
  40. else {
  41. e = new r(t.length);
  42. for (var o = 0, a = t.length; o < a; o++) e[o] = i(t[o])
  43. }
  44. }
  45. } else if (!B_[n] && !O(t) && !M(t)) {
  46. e = {};
  47. for (var s in t) t.hasOwnProperty(s) && (e[s] = i(t[s]))
  48. }
  49. return e
  50. }
  51. function n(t, e, o) {
  52. if (!w(e) || !w(t)) return o ? i(e) : t;
  53. for (var a in e)
  54. if (e.hasOwnProperty(a)) {
  55. var r = t[a],
  56. s = e[a];
  57. !w(s) || !w(r) || y(s) || y(r) || M(s) || M(r) || b(s) || b(r) || O(s) || O(r) ? !o && a in t || (t[a] = i(e[a], !
  58. 0)) : n(r, s, o)
  59. } return t
  60. }
  61. function o(t, e) {
  62. for (var i = t[0], o = 1, a = t.length; o < a; o++) i = n(i, t[o], e);
  63. return i
  64. }
  65. function a(t, e) {
  66. for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
  67. return t
  68. }
  69. function r(t, e, i) {
  70. for (var n in e) e.hasOwnProperty(n) && (i ? null != e[n] : null == t[n]) && (t[n] = e[n]);
  71. return t
  72. }
  73. function s() {
  74. return q_ || (q_ = Y_().getContext("2d")), q_
  75. }
  76. function l(t, e) {
  77. if (t) {
  78. if (t.indexOf) return t.indexOf(e);
  79. for (var i = 0, n = t.length; i < n; i++)
  80. if (t[i] === e) return i
  81. }
  82. return -1
  83. }
  84. function u(t, e) {
  85. function i() {}
  86. var n = t.prototype;
  87. i.prototype = e.prototype, t.prototype = new i;
  88. for (var o in n) t.prototype[o] = n[o];
  89. t.prototype.constructor = t, t.superClass = e
  90. }
  91. function h(t, e, i) {
  92. r(t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, i)
  93. }
  94. function c(t) {
  95. if (t) return "string" != typeof t && "number" == typeof t.length
  96. }
  97. function d(t, e, i) {
  98. if (t && e)
  99. if (t.forEach && t.forEach === W_) t.forEach(e, i);
  100. else if (t.length === +t.length)
  101. for (var n = 0, o = t.length; n < o; n++) e.call(i, t[n], n, t);
  102. else
  103. for (var a in t) t.hasOwnProperty(a) && e.call(i, t[a], a, t)
  104. }
  105. function f(t, e, i) {
  106. if (t && e) {
  107. if (t.map && t.map === U_) return t.map(e, i);
  108. for (var n = [], o = 0, a = t.length; o < a; o++) n.push(e.call(i, t[o], o, t));
  109. return n
  110. }
  111. }
  112. function p(t, e, i, n) {
  113. if (t && e) {
  114. if (t.reduce && t.reduce === X_) return t.reduce(e, i, n);
  115. for (var o = 0, a = t.length; o < a; o++) i = e.call(n, i, t[o], o, t);
  116. return i
  117. }
  118. }
  119. function g(t, e, i) {
  120. if (t && e) {
  121. if (t.filter && t.filter === H_) return t.filter(e, i);
  122. for (var n = [], o = 0, a = t.length; o < a; o++) e.call(i, t[o], o, t) && n.push(t[o]);
  123. return n
  124. }
  125. }
  126. function m(t, e) {
  127. var i = Z_.call(arguments, 2);
  128. return function() {
  129. return t.apply(e, i.concat(Z_.call(arguments)))
  130. }
  131. }
  132. function v(t) {
  133. var e = Z_.call(arguments, 1);
  134. return function() {
  135. return t.apply(this, e.concat(Z_.call(arguments)))
  136. }
  137. }
  138. function y(t) {
  139. return "[object Array]" === G_.call(t)
  140. }
  141. function x(t) {
  142. return "function" == typeof t
  143. }
  144. function _(t) {
  145. return "[object String]" === G_.call(t)
  146. }
  147. function w(t) {
  148. var e = typeof t;
  149. return "function" === e || !!t && "object" == e
  150. }
  151. function b(t) {
  152. return !!B_[G_.call(t)]
  153. }
  154. function S(t) {
  155. return !!V_[G_.call(t)]
  156. }
  157. function M(t) {
  158. return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument
  159. }
  160. function I(t) {
  161. return t !== t
  162. }
  163. function T(t) {
  164. for (var e = 0, i = arguments.length; e < i; e++)
  165. if (null != arguments[e]) return arguments[e]
  166. }
  167. function A(t, e) {
  168. return null != t ? t : e
  169. }
  170. function D(t, e, i) {
  171. return null != t ? t : null != e ? e : i
  172. }
  173. function C() {
  174. return Function.call.apply(Z_, arguments)
  175. }
  176. function L(t) {
  177. if ("number" == typeof t) return [t, t, t, t];
  178. var e = t.length;
  179. return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t
  180. }
  181. function k(t, e) {
  182. if (!t) throw new Error(e)
  183. }
  184. function P(t) {
  185. return null == t ? null : "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
  186. "")
  187. }
  188. function N(t) {
  189. t[K_] = !0
  190. }
  191. function O(t) {
  192. return t[K_]
  193. }
  194. function E(t) {
  195. function e(t, e) {
  196. i ? n.set(t, e) : n.set(e, t)
  197. }
  198. var i = y(t);
  199. this.data = {};
  200. var n = this;
  201. t instanceof E ? t.each(e) : t && d(t, e)
  202. }
  203. function R(t) {
  204. return new E(t)
  205. }
  206. function z(t, e) {
  207. for (var i = new t.constructor(t.length + e.length), n = 0; n < t.length; n++) i[n] = t[n];
  208. var o = t.length;
  209. for (n = 0; n < e.length; n++) i[n + o] = e[n];
  210. return i
  211. }
  212. function B() {}
  213. function V(t, e) {
  214. var i = new J_(2);
  215. return null == t && (t = 0), null == e && (e = 0), i[0] = t, i[1] = e, i
  216. }
  217. function G(t, e) {
  218. return t[0] = e[0], t[1] = e[1], t
  219. }
  220. function F(t) {
  221. var e = new J_(2);
  222. return e[0] = t[0], e[1] = t[1], e
  223. }
  224. function W(t, e, i) {
  225. return t[0] = e, t[1] = i, t
  226. }
  227. function H(t, e, i) {
  228. return t[0] = e[0] + i[0], t[1] = e[1] + i[1], t
  229. }
  230. function Z(t, e, i, n) {
  231. return t[0] = e[0] + i[0] * n, t[1] = e[1] + i[1] * n, t
  232. }
  233. function U(t, e, i) {
  234. return t[0] = e[0] - i[0], t[1] = e[1] - i[1], t
  235. }
  236. function X(t) {
  237. return Math.sqrt(j(t))
  238. }
  239. function j(t) {
  240. return t[0] * t[0] + t[1] * t[1]
  241. }
  242. function Y(t, e, i) {
  243. return t[0] = e[0] * i, t[1] = e[1] * i, t
  244. }
  245. function q(t, e) {
  246. var i = X(e);
  247. return 0 === i ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / i, t[1] = e[1] / i), t
  248. }
  249. function K(t, e) {
  250. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]))
  251. }
  252. function $(t, e) {
  253. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1])
  254. }
  255. function J(t, e, i, n) {
  256. return t[0] = e[0] + n * (i[0] - e[0]), t[1] = e[1] + n * (i[1] - e[1]), t
  257. }
  258. function Q(t, e, i) {
  259. var n = e[0],
  260. o = e[1];
  261. return t[0] = i[0] * n + i[2] * o + i[4], t[1] = i[1] * n + i[3] * o + i[5], t
  262. }
  263. function tt(t, e, i) {
  264. return t[0] = Math.min(e[0], i[0]), t[1] = Math.min(e[1], i[1]), t
  265. }
  266. function et(t, e, i) {
  267. return t[0] = Math.max(e[0], i[0]), t[1] = Math.max(e[1], i[1]), t
  268. }
  269. function it() {
  270. this.on("mousedown", this._dragStart, this), this.on("mousemove", this._drag, this), this.on("mouseup", this._dragEnd,
  271. this), this.on("globalout", this._dragEnd, this)
  272. }
  273. function nt(t, e) {
  274. return {
  275. target: t,
  276. topTarget: e && e.topTarget
  277. }
  278. }
  279. function ot(t, e) {
  280. var i = t._$eventProcessor;
  281. return null != e && i && i.normalizeQuery && (e = i.normalizeQuery(e)), e
  282. }
  283. function at(t) {
  284. return t.getBoundingClientRect ? t.getBoundingClientRect() : {
  285. left: 0,
  286. top: 0
  287. }
  288. }
  289. function rt(t, e, i, n) {
  290. return i = i || {}, n || !z_.canvasSupported ? st(t, e, i) : z_.browser.firefox && null != e.layerX && e.layerX !==
  291. e.offsetX ? (i.zrX = e.layerX, i.zrY = e.layerY) : null != e.offsetX ? (i.zrX = e.offsetX, i.zrY = e.offsetY) : st(
  292. t, e, i), i
  293. }
  294. function st(t, e, i) {
  295. var n = at(t);
  296. i.zrX = e.clientX - n.left, i.zrY = e.clientY - n.top
  297. }
  298. function lt(t, e, i) {
  299. if (null != (e = e || window.event).zrX) return e;
  300. var n = e.type;
  301. if (n && n.indexOf("touch") >= 0) {
  302. var o = "touchend" != n ? e.targetTouches[0] : e.changedTouches[0];
  303. o && rt(t, o, e, i)
  304. } else rt(t, e, e, i), e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3;
  305. var a = e.button;
  306. return null == e.which && void 0 !== a && sw.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), e
  307. }
  308. function ut(t, e, i) {
  309. rw ? t.addEventListener(e, i) : t.attachEvent("on" + e, i)
  310. }
  311. function ht(t, e, i) {
  312. rw ? t.removeEventListener(e, i) : t.detachEvent("on" + e, i)
  313. }
  314. function ct(t) {
  315. return t.which > 1
  316. }
  317. function dt(t, e, i) {
  318. return {
  319. type: t,
  320. event: i,
  321. target: e.target,
  322. topTarget: e.topTarget,
  323. cancelBubble: !1,
  324. offsetX: i.zrX,
  325. offsetY: i.zrY,
  326. gestureEvent: i.gestureEvent,
  327. pinchX: i.pinchX,
  328. pinchY: i.pinchY,
  329. pinchScale: i.pinchScale,
  330. wheelDelta: i.zrDelta,
  331. zrByTouch: i.zrByTouch,
  332. which: i.which,
  333. stop: ft
  334. }
  335. }
  336. function ft(t) {
  337. lw(this.event)
  338. }
  339. function pt() {}
  340. function gt(t, e, i) {
  341. if (t[t.rectHover ? "rectContain" : "contain"](e, i)) {
  342. for (var n, o = t; o;) {
  343. if (o.clipPath && !o.clipPath.contain(e, i)) return !1;
  344. o.silent && (n = !0), o = o.parent
  345. }
  346. return !n || uw
  347. }
  348. return !1
  349. }
  350. function mt() {
  351. var t = new dw(6);
  352. return vt(t), t
  353. }
  354. function vt(t) {
  355. return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t
  356. }
  357. function yt(t, e) {
  358. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t
  359. }
  360. function xt(t, e, i) {
  361. var n = e[0] * i[0] + e[2] * i[1],
  362. o = e[1] * i[0] + e[3] * i[1],
  363. a = e[0] * i[2] + e[2] * i[3],
  364. r = e[1] * i[2] + e[3] * i[3],
  365. s = e[0] * i[4] + e[2] * i[5] + e[4],
  366. l = e[1] * i[4] + e[3] * i[5] + e[5];
  367. return t[0] = n, t[1] = o, t[2] = a, t[3] = r, t[4] = s, t[5] = l, t
  368. }
  369. function _t(t, e, i) {
  370. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + i[0], t[5] = e[5] + i[1], t
  371. }
  372. function wt(t, e, i) {
  373. var n = e[0],
  374. o = e[2],
  375. a = e[4],
  376. r = e[1],
  377. s = e[3],
  378. l = e[5],
  379. u = Math.sin(i),
  380. h = Math.cos(i);
  381. return t[0] = n * h + r * u, t[1] = -n * u + r * h, t[2] = o * h + s * u, t[3] = -o * u + h * s, t[4] = h * a + u *
  382. l, t[5] = h * l - u * a, t
  383. }
  384. function bt(t, e, i) {
  385. var n = i[0],
  386. o = i[1];
  387. return t[0] = e[0] * n, t[1] = e[1] * o, t[2] = e[2] * n, t[3] = e[3] * o, t[4] = e[4] * n, t[5] = e[5] * o, t
  388. }
  389. function St(t, e) {
  390. var i = e[0],
  391. n = e[2],
  392. o = e[4],
  393. a = e[1],
  394. r = e[3],
  395. s = e[5],
  396. l = i * r - a * n;
  397. return l ? (l = 1 / l, t[0] = r * l, t[1] = -a * l, t[2] = -n * l, t[3] = i * l, t[4] = (n * s - r * o) * l, t[5] =
  398. (a * o - i * s) * l, t) : null
  399. }
  400. function Mt(t) {
  401. var e = mt();
  402. return yt(e, t), e
  403. }
  404. function It(t) {
  405. return t > gw || t < -gw
  406. }
  407. function Tt(t) {
  408. this._target = t.target, this._life = t.life || 1e3, this._delay = t.delay || 0, this._initialized = !1, this.loop =
  409. null != t.loop && t.loop, this.gap = t.gap || 0, this.easing = t.easing || "Linear", this.onframe = t.onframe, this
  410. .ondestroy = t.ondestroy, this.onrestart = t.onrestart, this._pausedTime = 0, this._paused = !1
  411. }
  412. function At(t) {
  413. return (t = Math.round(t)) < 0 ? 0 : t > 255 ? 255 : t
  414. }
  415. function Dt(t) {
  416. return (t = Math.round(t)) < 0 ? 0 : t > 360 ? 360 : t
  417. }
  418. function Ct(t) {
  419. return t < 0 ? 0 : t > 1 ? 1 : t
  420. }
  421. function Lt(t) {
  422. return At(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 * 255 : parseInt(t, 10))
  423. }
  424. function kt(t) {
  425. return Ct(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t))
  426. }
  427. function Pt(t, e, i) {
  428. return i < 0 ? i += 1 : i > 1 && (i -= 1), 6 * i < 1 ? t + (e - t) * i * 6 : 2 * i < 1 ? e : 3 * i < 2 ? t + (e - t) *
  429. (2 / 3 - i) * 6 : t
  430. }
  431. function Nt(t, e, i) {
  432. return t + (e - t) * i
  433. }
  434. function Ot(t, e, i, n, o) {
  435. return t[0] = e, t[1] = i, t[2] = n, t[3] = o, t
  436. }
  437. function Et(t, e) {
  438. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t
  439. }
  440. function Rt(t, e) {
  441. Cw && Et(Cw, e), Cw = Dw.put(t, Cw || e.slice())
  442. }
  443. function zt(t, e) {
  444. if (t) {
  445. e = e || [];
  446. var i = Dw.get(t);
  447. if (i) return Et(e, i);
  448. var n = (t += "").replace(/ /g, "").toLowerCase();
  449. if (n in Aw) return Et(e, Aw[n]), Rt(t, e), e;
  450. if ("#" !== n.charAt(0)) {
  451. var o = n.indexOf("("),
  452. a = n.indexOf(")");
  453. if (-1 !== o && a + 1 === n.length) {
  454. var r = n.substr(0, o),
  455. s = n.substr(o + 1, a - (o + 1)).split(","),
  456. l = 1;
  457. switch (r) {
  458. case "rgba":
  459. if (4 !== s.length) return void Ot(e, 0, 0, 0, 1);
  460. l = kt(s.pop());
  461. case "rgb":
  462. return 3 !== s.length ? void Ot(e, 0, 0, 0, 1) : (Ot(e, Lt(s[0]), Lt(s[1]), Lt(s[2]), l), Rt(t, e), e);
  463. case "hsla":
  464. return 4 !== s.length ? void Ot(e, 0, 0, 0, 1) : (s[3] = kt(s[3]), Bt(s, e), Rt(t, e), e);
  465. case "hsl":
  466. return 3 !== s.length ? void Ot(e, 0, 0, 0, 1) : (Bt(s, e), Rt(t, e), e);
  467. default:
  468. return
  469. }
  470. }
  471. Ot(e, 0, 0, 0, 1)
  472. } else {
  473. if (4 === n.length) return (u = parseInt(n.substr(1), 16)) >= 0 && u <= 4095 ? (Ot(e, (3840 & u) >> 4 | (3840 & u) >>
  474. 8, 240 & u | (240 & u) >> 4, 15 & u | (15 & u) << 4, 1), Rt(t, e), e) : void Ot(e, 0, 0, 0, 1);
  475. if (7 === n.length) {
  476. var u = parseInt(n.substr(1), 16);
  477. return u >= 0 && u <= 16777215 ? (Ot(e, (16711680 & u) >> 16, (65280 & u) >> 8, 255 & u, 1), Rt(t, e), e) : void Ot(
  478. e, 0, 0, 0, 1)
  479. }
  480. }
  481. }
  482. }
  483. function Bt(t, e) {
  484. var i = (parseFloat(t[0]) % 360 + 360) % 360 / 360,
  485. n = kt(t[1]),
  486. o = kt(t[2]),
  487. a = o <= .5 ? o * (n + 1) : o + n - o * n,
  488. r = 2 * o - a;
  489. return e = e || [], Ot(e, At(255 * Pt(r, a, i + 1 / 3)), At(255 * Pt(r, a, i)), At(255 * Pt(r, a, i - 1 / 3)), 1), 4 ===
  490. t.length && (e[3] = t[3]), e
  491. }
  492. function Vt(t) {
  493. if (t) {
  494. var e, i, n = t[0] / 255,
  495. o = t[1] / 255,
  496. a = t[2] / 255,
  497. r = Math.min(n, o, a),
  498. s = Math.max(n, o, a),
  499. l = s - r,
  500. u = (s + r) / 2;
  501. if (0 === l) e = 0, i = 0;
  502. else {
  503. i = u < .5 ? l / (s + r) : l / (2 - s - r);
  504. var h = ((s - n) / 6 + l / 2) / l,
  505. c = ((s - o) / 6 + l / 2) / l,
  506. d = ((s - a) / 6 + l / 2) / l;
  507. n === s ? e = d - c : o === s ? e = 1 / 3 + h - d : a === s && (e = 2 / 3 + c - h), e < 0 && (e += 1), e > 1 && (e -=
  508. 1)
  509. }
  510. var f = [360 * e, i, u];
  511. return null != t[3] && f.push(t[3]), f
  512. }
  513. }
  514. function Gt(t, e) {
  515. var i = zt(t);
  516. if (i) {
  517. for (var n = 0; n < 3; n++) i[n] = e < 0 ? i[n] * (1 - e) | 0 : (255 - i[n]) * e + i[n] | 0, i[n] > 255 ? i[n] =
  518. 255 : t[n] < 0 && (i[n] = 0);
  519. return Xt(i, 4 === i.length ? "rgba" : "rgb")
  520. }
  521. }
  522. function Ft(t) {
  523. var e = zt(t);
  524. if (e) return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1)
  525. }
  526. function Wt(t, e, i) {
  527. if (e && e.length && t >= 0 && t <= 1) {
  528. i = i || [];
  529. var n = t * (e.length - 1),
  530. o = Math.floor(n),
  531. a = Math.ceil(n),
  532. r = e[o],
  533. s = e[a],
  534. l = n - o;
  535. return i[0] = At(Nt(r[0], s[0], l)), i[1] = At(Nt(r[1], s[1], l)), i[2] = At(Nt(r[2], s[2], l)), i[3] = Ct(Nt(r[3],
  536. s[3], l)), i
  537. }
  538. }
  539. function Ht(t, e, i) {
  540. if (e && e.length && t >= 0 && t <= 1) {
  541. var n = t * (e.length - 1),
  542. o = Math.floor(n),
  543. a = Math.ceil(n),
  544. r = zt(e[o]),
  545. s = zt(e[a]),
  546. l = n - o,
  547. u = Xt([At(Nt(r[0], s[0], l)), At(Nt(r[1], s[1], l)), At(Nt(r[2], s[2], l)), Ct(Nt(r[3], s[3], l))], "rgba");
  548. return i ? {
  549. color: u,
  550. leftIndex: o,
  551. rightIndex: a,
  552. value: n
  553. } : u
  554. }
  555. }
  556. function Zt(t, e, i, n) {
  557. if (t = zt(t)) return t = Vt(t), null != e && (t[0] = Dt(e)), null != i && (t[1] = kt(i)), null != n && (t[2] = kt(n)),
  558. Xt(Bt(t), "rgba")
  559. }
  560. function Ut(t, e) {
  561. if ((t = zt(t)) && null != e) return t[3] = Ct(e), Xt(t, "rgba")
  562. }
  563. function Xt(t, e) {
  564. if (t && t.length) {
  565. var i = t[0] + "," + t[1] + "," + t[2];
  566. return "rgba" !== e && "hsva" !== e && "hsla" !== e || (i += "," + t[3]), e + "(" + i + ")"
  567. }
  568. }
  569. function jt(t, e) {
  570. return t[e]
  571. }
  572. function Yt(t, e, i) {
  573. t[e] = i
  574. }
  575. function qt(t, e, i) {
  576. return (e - t) * i + t
  577. }
  578. function Kt(t, e, i) {
  579. return i > .5 ? e : t
  580. }
  581. function $t(t, e, i, n, o) {
  582. var a = t.length;
  583. if (1 == o)
  584. for (s = 0; s < a; s++) n[s] = qt(t[s], e[s], i);
  585. else
  586. for (var r = a && t[0].length, s = 0; s < a; s++)
  587. for (var l = 0; l < r; l++) n[s][l] = qt(t[s][l], e[s][l], i)
  588. }
  589. function Jt(t, e, i) {
  590. var n = t.length,
  591. o = e.length;
  592. if (n !== o)
  593. if (n > o) t.length = o;
  594. else
  595. for (r = n; r < o; r++) t.push(1 === i ? e[r] : Nw.call(e[r]));
  596. for (var a = t[0] && t[0].length, r = 0; r < t.length; r++)
  597. if (1 === i) isNaN(t[r]) && (t[r] = e[r]);
  598. else
  599. for (var s = 0; s < a; s++) isNaN(t[r][s]) && (t[r][s] = e[r][s])
  600. }
  601. function Qt(t, e, i) {
  602. if (t === e) return !0;
  603. var n = t.length;
  604. if (n !== e.length) return !1;
  605. if (1 === i) {
  606. for (a = 0; a < n; a++)
  607. if (t[a] !== e[a]) return !1
  608. } else
  609. for (var o = t[0].length, a = 0; a < n; a++)
  610. for (var r = 0; r < o; r++)
  611. if (t[a][r] !== e[a][r]) return !1;
  612. return !0
  613. }
  614. function te(t, e, i, n, o, a, r, s, l) {
  615. var u = t.length;
  616. if (1 == l)
  617. for (c = 0; c < u; c++) s[c] = ee(t[c], e[c], i[c], n[c], o, a, r);
  618. else
  619. for (var h = t[0].length, c = 0; c < u; c++)
  620. for (var d = 0; d < h; d++) s[c][d] = ee(t[c][d], e[c][d], i[c][d], n[c][d], o, a, r)
  621. }
  622. function ee(t, e, i, n, o, a, r) {
  623. var s = .5 * (i - t),
  624. l = .5 * (n - e);
  625. return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e
  626. }
  627. function ie(t) {
  628. if (c(t)) {
  629. var e = t.length;
  630. if (c(t[0])) {
  631. for (var i = [], n = 0; n < e; n++) i.push(Nw.call(t[n]));
  632. return i
  633. }
  634. return Nw.call(t)
  635. }
  636. return t
  637. }
  638. function ne(t) {
  639. return t[0] = Math.floor(t[0]), t[1] = Math.floor(t[1]), t[2] = Math.floor(t[2]), "rgba(" + t.join(",") + ")"
  640. }
  641. function oe(t) {
  642. var e = t[t.length - 1].value;
  643. return c(e && e[0]) ? 2 : 1
  644. }
  645. function ae(t, e, i, n, o, a) {
  646. var r = t._getter,
  647. s = t._setter,
  648. l = "spline" === e,
  649. u = n.length;
  650. if (u) {
  651. var h, d = c(n[0].value),
  652. f = !1,
  653. p = !1,
  654. g = d ? oe(n) : 0;
  655. n.sort(function(t, e) {
  656. return t.time - e.time
  657. }), h = n[u - 1].time;
  658. for (var m = [], v = [], y = n[0].value, x = !0, _ = 0; _ < u; _++) {
  659. m.push(n[_].time / h);
  660. var w = n[_].value;
  661. if (d && Qt(w, y, g) || !d && w === y || (x = !1), y = w, "string" == typeof w) {
  662. var b = zt(w);
  663. b ? (w = b, f = !0) : p = !0
  664. }
  665. v.push(w)
  666. }
  667. if (a || !x) {
  668. for (var S = v[u - 1], _ = 0; _ < u - 1; _++) d ? Jt(v[_], S, g) : !isNaN(v[_]) || isNaN(S) || p || f || (v[_] = S);
  669. d && Jt(r(t._target, o), S, g);
  670. var M, I, T, A, D, C, L = 0,
  671. k = 0;
  672. if (f) var P = [0, 0, 0, 0];
  673. var N = new Tt({
  674. target: t._target,
  675. life: h,
  676. loop: t._loop,
  677. delay: t._delay,
  678. onframe: function(t, e) {
  679. var i;
  680. if (e < 0) i = 0;
  681. else if (e < k) {
  682. for (i = M = Math.min(L + 1, u - 1); i >= 0 && !(m[i] <= e); i--);
  683. i = Math.min(i, u - 2)
  684. } else {
  685. for (i = L; i < u && !(m[i] > e); i++);
  686. i = Math.min(i - 1, u - 2)
  687. }
  688. L = i, k = e;
  689. var n = m[i + 1] - m[i];
  690. if (0 !== n)
  691. if (I = (e - m[i]) / n, l)
  692. if (A = v[i], T = v[0 === i ? i : i - 1], D = v[i > u - 2 ? u - 1 : i + 1], C = v[i > u - 3 ? u - 1 : i + 2],
  693. d) te(T, A, D, C, I, I * I, I * I * I, r(t, o), g);
  694. else {
  695. if (f) a = te(T, A, D, C, I, I * I, I * I * I, P, 1), a = ne(P);
  696. else {
  697. if (p) return Kt(A, D, I);
  698. a = ee(T, A, D, C, I, I * I, I * I * I)
  699. }
  700. s(t, o, a)
  701. }
  702. else if (d) $t(v[i], v[i + 1], I, r(t, o), g);
  703. else {
  704. var a;
  705. if (f) $t(v[i], v[i + 1], I, P, 1), a = ne(P);
  706. else {
  707. if (p) return Kt(v[i], v[i + 1], I);
  708. a = qt(v[i], v[i + 1], I)
  709. }
  710. s(t, o, a)
  711. }
  712. },
  713. ondestroy: i
  714. });
  715. return e && "spline" !== e && (N.easing = e), N
  716. }
  717. }
  718. }
  719. function re(t, e, i, n, o, a, r, s) {
  720. _(n) ? (a = o, o = n, n = 0) : x(o) ? (a = o, o = "linear", n = 0) : x(n) ? (a = n, n = 0) : x(i) ? (a = i, i = 500) :
  721. i || (i = 500), t.stopAnimation(), se(t, "", t, e, i, n, s);
  722. var l = t.animators.slice(),
  723. u = l.length;
  724. u || a && a();
  725. for (var h = 0; h < l.length; h++) l[h].done(function() {
  726. --u || a && a()
  727. }).start(o, r)
  728. }
  729. function se(t, e, i, n, o, a, r) {
  730. var s = {},
  731. l = 0;
  732. for (var u in n) n.hasOwnProperty(u) && (null != i[u] ? w(n[u]) && !c(n[u]) ? se(t, e ? e + "." + u : u, i[u], n[u],
  733. o, a, r) : (r ? (s[u] = i[u], le(t, e, u, n[u])) : s[u] = n[u], l++) : null == n[u] || r || le(t, e, u, n[u]));
  734. l > 0 && t.animate(e, !1).when(null == o ? 500 : o, s).delay(a || 0)
  735. }
  736. function le(t, e, i, n) {
  737. if (e) {
  738. var o = {};
  739. o[e] = {}, o[e][i] = n, t.attr(o)
  740. } else t.attr(i, n)
  741. }
  742. function ue(t, e, i, n) {
  743. i < 0 && (t += i, i = -i), n < 0 && (e += n, n = -n), this.x = t, this.y = e, this.width = i, this.height = n
  744. }
  745. function he(t) {
  746. for (var e = 0; t >= Uw;) e |= 1 & t, t >>= 1;
  747. return t + e
  748. }
  749. function ce(t, e, i, n) {
  750. var o = e + 1;
  751. if (o === i) return 1;
  752. if (n(t[o++], t[e]) < 0) {
  753. for (; o < i && n(t[o], t[o - 1]) < 0;) o++;
  754. de(t, e, o)
  755. } else
  756. for (; o < i && n(t[o], t[o - 1]) >= 0;) o++;
  757. return o - e
  758. }
  759. function de(t, e, i) {
  760. for (i--; e < i;) {
  761. var n = t[e];
  762. t[e++] = t[i], t[i--] = n
  763. }
  764. }
  765. function fe(t, e, i, n, o) {
  766. for (n === e && n++; n < i; n++) {
  767. for (var a, r = t[n], s = e, l = n; s < l;) o(r, t[a = s + l >>> 1]) < 0 ? l = a : s = a + 1;
  768. var u = n - s;
  769. switch (u) {
  770. case 3:
  771. t[s + 3] = t[s + 2];
  772. case 2:
  773. t[s + 2] = t[s + 1];
  774. case 1:
  775. t[s + 1] = t[s];
  776. break;
  777. default:
  778. for (; u > 0;) t[s + u] = t[s + u - 1], u--
  779. }
  780. t[s] = r
  781. }
  782. }
  783. function pe(t, e, i, n, o, a) {
  784. var r = 0,
  785. s = 0,
  786. l = 1;
  787. if (a(t, e[i + o]) > 0) {
  788. for (s = n - o; l < s && a(t, e[i + o + l]) > 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  789. l > s && (l = s), r += o, l += o
  790. } else {
  791. for (s = o + 1; l < s && a(t, e[i + o - l]) <= 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  792. l > s && (l = s);
  793. var u = r;
  794. r = o - l, l = o - u
  795. }
  796. for (r++; r < l;) {
  797. var h = r + (l - r >>> 1);
  798. a(t, e[i + h]) > 0 ? r = h + 1 : l = h
  799. }
  800. return l
  801. }
  802. function ge(t, e, i, n, o, a) {
  803. var r = 0,
  804. s = 0,
  805. l = 1;
  806. if (a(t, e[i + o]) < 0) {
  807. for (s = o + 1; l < s && a(t, e[i + o - l]) < 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  808. l > s && (l = s);
  809. var u = r;
  810. r = o - l, l = o - u
  811. } else {
  812. for (s = n - o; l < s && a(t, e[i + o + l]) >= 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s);
  813. l > s && (l = s), r += o, l += o
  814. }
  815. for (r++; r < l;) {
  816. var h = r + (l - r >>> 1);
  817. a(t, e[i + h]) < 0 ? l = h : r = h + 1
  818. }
  819. return l
  820. }
  821. function me(t, e) {
  822. function i(i) {
  823. var s = a[i],
  824. u = r[i],
  825. h = a[i + 1],
  826. c = r[i + 1];
  827. r[i] = u + c, i === l - 3 && (a[i + 1] = a[i + 2], r[i + 1] = r[i + 2]), l--;
  828. var d = ge(t[h], t, s, u, 0, e);
  829. s += d, 0 !== (u -= d) && 0 !== (c = pe(t[s + u - 1], t, h, c, c - 1, e)) && (u <= c ? n(s, u, h, c) : o(s, u, h, c))
  830. }
  831. function n(i, n, o, a) {
  832. var r = 0;
  833. for (r = 0; r < n; r++) u[r] = t[i + r];
  834. var l = 0,
  835. h = o,
  836. c = i;
  837. if (t[c++] = t[h++], 0 != --a)
  838. if (1 !== n) {
  839. for (var d, f, p, g = s;;) {
  840. d = 0, f = 0, p = !1;
  841. do {
  842. if (e(t[h], u[l]) < 0) {
  843. if (t[c++] = t[h++], f++, d = 0, 0 == --a) {
  844. p = !0;
  845. break
  846. }
  847. } else if (t[c++] = u[l++], d++, f = 0, 1 == --n) {
  848. p = !0;
  849. break
  850. }
  851. } while ((d | f) < g);
  852. if (p) break;
  853. do {
  854. if (0 !== (d = ge(t[h], u, l, n, 0, e))) {
  855. for (r = 0; r < d; r++) t[c + r] = u[l + r];
  856. if (c += d, l += d, (n -= d) <= 1) {
  857. p = !0;
  858. break
  859. }
  860. }
  861. if (t[c++] = t[h++], 0 == --a) {
  862. p = !0;
  863. break
  864. }
  865. if (0 !== (f = pe(u[l], t, h, a, 0, e))) {
  866. for (r = 0; r < f; r++) t[c + r] = t[h + r];
  867. if (c += f, h += f, 0 === (a -= f)) {
  868. p = !0;
  869. break
  870. }
  871. }
  872. if (t[c++] = u[l++], 1 == --n) {
  873. p = !0;
  874. break
  875. }
  876. g--
  877. } while (d >= Xw || f >= Xw);
  878. if (p) break;
  879. g < 0 && (g = 0), g += 2
  880. }
  881. if ((s = g) < 1 && (s = 1), 1 === n) {
  882. for (r = 0; r < a; r++) t[c + r] = t[h + r];
  883. t[c + a] = u[l]
  884. } else {
  885. if (0 === n) throw new Error;
  886. for (r = 0; r < n; r++) t[c + r] = u[l + r]
  887. }
  888. } else {
  889. for (r = 0; r < a; r++) t[c + r] = t[h + r];
  890. t[c + a] = u[l]
  891. }
  892. else
  893. for (r = 0; r < n; r++) t[c + r] = u[l + r]
  894. }
  895. function o(i, n, o, a) {
  896. var r = 0;
  897. for (r = 0; r < a; r++) u[r] = t[o + r];
  898. var l = i + n - 1,
  899. h = a - 1,
  900. c = o + a - 1,
  901. d = 0,
  902. f = 0;
  903. if (t[c--] = t[l--], 0 != --n)
  904. if (1 !== a) {
  905. for (var p = s;;) {
  906. var g = 0,
  907. m = 0,
  908. v = !1;
  909. do {
  910. if (e(u[h], t[l]) < 0) {
  911. if (t[c--] = t[l--], g++, m = 0, 0 == --n) {
  912. v = !0;
  913. break
  914. }
  915. } else if (t[c--] = u[h--], m++, g = 0, 1 == --a) {
  916. v = !0;
  917. break
  918. }
  919. } while ((g | m) < p);
  920. if (v) break;
  921. do {
  922. if (0 != (g = n - ge(u[h], t, i, n, n - 1, e))) {
  923. for (n -= g, f = (c -= g) + 1, d = (l -= g) + 1, r = g - 1; r >= 0; r--) t[f + r] = t[d + r];
  924. if (0 === n) {
  925. v = !0;
  926. break
  927. }
  928. }
  929. if (t[c--] = u[h--], 1 == --a) {
  930. v = !0;
  931. break
  932. }
  933. if (0 != (m = a - pe(t[l], u, 0, a, a - 1, e))) {
  934. for (a -= m, f = (c -= m) + 1, d = (h -= m) + 1, r = 0; r < m; r++) t[f + r] = u[d + r];
  935. if (a <= 1) {
  936. v = !0;
  937. break
  938. }
  939. }
  940. if (t[c--] = t[l--], 0 == --n) {
  941. v = !0;
  942. break
  943. }
  944. p--
  945. } while (g >= Xw || m >= Xw);
  946. if (v) break;
  947. p < 0 && (p = 0), p += 2
  948. }
  949. if ((s = p) < 1 && (s = 1), 1 === a) {
  950. for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--) t[f + r] = t[d + r];
  951. t[c] = u[h]
  952. } else {
  953. if (0 === a) throw new Error;
  954. for (d = c - (a - 1), r = 0; r < a; r++) t[d + r] = u[r]
  955. }
  956. } else {
  957. for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--) t[f + r] = t[d + r];
  958. t[c] = u[h]
  959. }
  960. else
  961. for (d = c - (a - 1), r = 0; r < a; r++) t[d + r] = u[r]
  962. }
  963. var a, r, s = Xw,
  964. l = 0,
  965. u = [];
  966. a = [], r = [], this.mergeRuns = function() {
  967. for (; l > 1;) {
  968. var t = l - 2;
  969. if (t >= 1 && r[t - 1] <= r[t] + r[t + 1] || t >= 2 && r[t - 2] <= r[t] + r[t - 1]) r[t - 1] < r[t + 1] && t--;
  970. else if (r[t] > r[t + 1]) break;
  971. i(t)
  972. }
  973. }, this.forceMergeRuns = function() {
  974. for (; l > 1;) {
  975. var t = l - 2;
  976. t > 0 && r[t - 1] < r[t + 1] && t--, i(t)
  977. }
  978. }, this.pushRun = function(t, e) {
  979. a[l] = t, r[l] = e, l += 1
  980. }
  981. }
  982. function ve(t, e, i, n) {
  983. i || (i = 0), n || (n = t.length);
  984. var o = n - i;
  985. if (!(o < 2)) {
  986. var a = 0;
  987. if (o < Uw) return a = ce(t, i, n, e), void fe(t, i, n, i + a, e);
  988. var r = new me(t, e),
  989. s = he(o);
  990. do {
  991. if ((a = ce(t, i, n, e)) < s) {
  992. var l = o;
  993. l > s && (l = s), fe(t, i, i + l, i + a, e), a = l
  994. }
  995. r.pushRun(i, a), r.mergeRuns(), o -= a, i += a
  996. } while (0 !== o);
  997. r.forceMergeRuns()
  998. }
  999. }
  1000. function ye(t, e) {
  1001. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel
  1002. }
  1003. function xe(t, e, i) {
  1004. var n = null == e.x ? 0 : e.x,
  1005. o = null == e.x2 ? 1 : e.x2,
  1006. a = null == e.y ? 0 : e.y,
  1007. r = null == e.y2 ? 0 : e.y2;
  1008. return e.global || (n = n * i.width + i.x, o = o * i.width + i.x, a = a * i.height + i.y, r = r * i.height + i.y), n =
  1009. isNaN(n) ? 0 : n, o = isNaN(o) ? 1 : o, a = isNaN(a) ? 0 : a, r = isNaN(r) ? 0 : r, t.createLinearGradient(n, a, o,
  1010. r)
  1011. }
  1012. function _e(t, e, i) {
  1013. var n = i.width,
  1014. o = i.height,
  1015. a = Math.min(n, o),
  1016. r = null == e.x ? .5 : e.x,
  1017. s = null == e.y ? .5 : e.y,
  1018. l = null == e.r ? .5 : e.r;
  1019. return e.global || (r = r * n + i.x, s = s * o + i.y, l *= a), t.createRadialGradient(r, s, 0, r, s, l)
  1020. }
  1021. function we() {
  1022. return !1
  1023. }
  1024. function be(t, e, i) {
  1025. var n = Y_(),
  1026. o = e.getWidth(),
  1027. a = e.getHeight(),
  1028. r = n.style;
  1029. return r && (r.position = "absolute", r.left = 0, r.top = 0, r.width = o + "px", r.height = a + "px", n.setAttribute(
  1030. "data-zr-dom-id", t)), n.width = o * i, n.height = a * i, n
  1031. }
  1032. function Se(t) {
  1033. if ("string" == typeof t) {
  1034. var e = ob.get(t);
  1035. return e && e.image
  1036. }
  1037. return t
  1038. }
  1039. function Me(t, e, i, n, o) {
  1040. if (t) {
  1041. if ("string" == typeof t) {
  1042. if (e && e.__zrImageSrc === t || !i) return e;
  1043. var a = ob.get(t),
  1044. r = {
  1045. hostEl: i,
  1046. cb: n,
  1047. cbPayload: o
  1048. };
  1049. return a ? !Te(e = a.image) && a.pending.push(r) : (!e && (e = new Image), e.onload = e.onerror = Ie, ob.put(t, e.__cachedImgObj = {
  1050. image: e,
  1051. pending: [r]
  1052. }), e.src = e.__zrImageSrc = t), e
  1053. }
  1054. return t
  1055. }
  1056. return e
  1057. }
  1058. function Ie() {
  1059. var t = this.__cachedImgObj;
  1060. this.onload = this.onerror = this.__cachedImgObj = null;
  1061. for (var e = 0; e < t.pending.length; e++) {
  1062. var i = t.pending[e],
  1063. n = i.cb;
  1064. n && n(this, i.cbPayload), i.hostEl.dirty()
  1065. }
  1066. t.pending.length = 0
  1067. }
  1068. function Te(t) {
  1069. return t && t.width && t.height
  1070. }
  1071. function Ae(t, e) {
  1072. var i = t + ":" + (e = e || ub);
  1073. if (ab[i]) return ab[i];
  1074. for (var n = (t + "").split("\n"), o = 0, a = 0, r = n.length; a < r; a++) o = Math.max(Ve(n[a], e).width, o);
  1075. return rb > sb && (rb = 0, ab = {}), rb++, ab[i] = o, o
  1076. }
  1077. function De(t, e, i, n, o, a, r) {
  1078. return a ? Le(t, e, i, n, o, a, r) : Ce(t, e, i, n, o, r)
  1079. }
  1080. function Ce(t, e, i, n, o, a) {
  1081. var r = Ge(t, e, o, a),
  1082. s = Ae(t, e);
  1083. o && (s += o[1] + o[3]);
  1084. var l = r.outerHeight,
  1085. u = new ue(ke(0, s, i), Pe(0, l, n), s, l);
  1086. return u.lineHeight = r.lineHeight, u
  1087. }
  1088. function Le(t, e, i, n, o, a, r) {
  1089. var s = Fe(t, {
  1090. rich: a,
  1091. truncate: r,
  1092. font: e,
  1093. textAlign: i,
  1094. textPadding: o
  1095. }),
  1096. l = s.outerWidth,
  1097. u = s.outerHeight;
  1098. return new ue(ke(0, l, i), Pe(0, u, n), l, u)
  1099. }
  1100. function ke(t, e, i) {
  1101. return "right" === i ? t -= e : "center" === i && (t -= e / 2), t
  1102. }
  1103. function Pe(t, e, i) {
  1104. return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e), t
  1105. }
  1106. function Ne(t, e, i) {
  1107. var n = e.x,
  1108. o = e.y,
  1109. a = e.height,
  1110. r = e.width,
  1111. s = a / 2,
  1112. l = "left",
  1113. u = "top";
  1114. switch (t) {
  1115. case "left":
  1116. n -= i, o += s, l = "right", u = "middle";
  1117. break;
  1118. case "right":
  1119. n += i + r, o += s, u = "middle";
  1120. break;
  1121. case "top":
  1122. n += r / 2, o -= i, l = "center", u = "bottom";
  1123. break;
  1124. case "bottom":
  1125. n += r / 2, o += a + i, l = "center";
  1126. break;
  1127. case "inside":
  1128. n += r / 2, o += s, l = "center", u = "middle";
  1129. break;
  1130. case "insideLeft":
  1131. n += i, o += s, u = "middle";
  1132. break;
  1133. case "insideRight":
  1134. n += r - i, o += s, l = "right", u = "middle";
  1135. break;
  1136. case "insideTop":
  1137. n += r / 2, o += i, l = "center";
  1138. break;
  1139. case "insideBottom":
  1140. n += r / 2, o += a - i, l = "center", u = "bottom";
  1141. break;
  1142. case "insideTopLeft":
  1143. n += i, o += i;
  1144. break;
  1145. case "insideTopRight":
  1146. n += r - i, o += i, l = "right";
  1147. break;
  1148. case "insideBottomLeft":
  1149. n += i, o += a - i, u = "bottom";
  1150. break;
  1151. case "insideBottomRight":
  1152. n += r - i, o += a - i, l = "right", u = "bottom"
  1153. }
  1154. return {
  1155. x: n,
  1156. y: o,
  1157. textAlign: l,
  1158. textVerticalAlign: u
  1159. }
  1160. }
  1161. function Oe(t, e, i, n, o) {
  1162. if (!e) return "";
  1163. var a = (t + "").split("\n");
  1164. o = Ee(e, i, n, o);
  1165. for (var r = 0, s = a.length; r < s; r++) a[r] = Re(a[r], o);
  1166. return a.join("\n")
  1167. }
  1168. function Ee(t, e, i, n) {
  1169. (n = a({}, n)).font = e;
  1170. var i = A(i, "...");
  1171. n.maxIterations = A(n.maxIterations, 2);
  1172. var o = n.minChar = A(n.minChar, 0);
  1173. n.cnCharWidth = Ae("国", e);
  1174. var r = n.ascCharWidth = Ae("a", e);
  1175. n.placeholder = A(n.placeholder, "");
  1176. for (var s = t = Math.max(0, t - 1), l = 0; l < o && s >= r; l++) s -= r;
  1177. var u = Ae(i);
  1178. return u > s && (i = "", u = 0), s = t - u, n.ellipsis = i, n.ellipsisWidth = u, n.contentWidth = s, n.containerWidth =
  1179. t, n
  1180. }
  1181. function Re(t, e) {
  1182. var i = e.containerWidth,
  1183. n = e.font,
  1184. o = e.contentWidth;
  1185. if (!i) return "";
  1186. var a = Ae(t, n);
  1187. if (a <= i) return t;
  1188. for (var r = 0;; r++) {
  1189. if (a <= o || r >= e.maxIterations) {
  1190. t += e.ellipsis;
  1191. break
  1192. }
  1193. var s = 0 === r ? ze(t, o, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * o / a) : 0;
  1194. a = Ae(t = t.substr(0, s), n)
  1195. }
  1196. return "" === t && (t = e.placeholder), t
  1197. }
  1198. function ze(t, e, i, n) {
  1199. for (var o = 0, a = 0, r = t.length; a < r && o < e; a++) {
  1200. var s = t.charCodeAt(a);
  1201. o += 0 <= s && s <= 127 ? i : n
  1202. }
  1203. return a
  1204. }
  1205. function Be(t) {
  1206. return Ae("国", t)
  1207. }
  1208. function Ve(t, e) {
  1209. return hb.measureText(t, e)
  1210. }
  1211. function Ge(t, e, i, n) {
  1212. null != t && (t += "");
  1213. var o = Be(e),
  1214. a = t ? t.split("\n") : [],
  1215. r = a.length * o,
  1216. s = r;
  1217. if (i && (s += i[0] + i[2]), t && n) {
  1218. var l = n.outerHeight,
  1219. u = n.outerWidth;
  1220. if (null != l && s > l) t = "", a = [];
  1221. else if (null != u)
  1222. for (var h = Ee(u - (i ? i[1] + i[3] : 0), e, n.ellipsis, {
  1223. minChar: n.minChar,
  1224. placeholder: n.placeholder
  1225. }), c = 0, d = a.length; c < d; c++) a[c] = Re(a[c], h)
  1226. }
  1227. return {
  1228. lines: a,
  1229. height: r,
  1230. outerHeight: s,
  1231. lineHeight: o
  1232. }
  1233. }
  1234. function Fe(t, e) {
  1235. var i = {
  1236. lines: [],
  1237. width: 0,
  1238. height: 0
  1239. };
  1240. if (null != t && (t += ""), !t) return i;
  1241. for (var n, o = lb.lastIndex = 0; null != (n = lb.exec(t));) {
  1242. var a = n.index;
  1243. a > o && We(i, t.substring(o, a)), We(i, n[2], n[1]), o = lb.lastIndex
  1244. }
  1245. o < t.length && We(i, t.substring(o, t.length));
  1246. var r = i.lines,
  1247. s = 0,
  1248. l = 0,
  1249. u = [],
  1250. h = e.textPadding,
  1251. c = e.truncate,
  1252. d = c && c.outerWidth,
  1253. f = c && c.outerHeight;
  1254. h && (null != d && (d -= h[1] + h[3]), null != f && (f -= h[0] + h[2]));
  1255. for (L = 0; L < r.length; L++) {
  1256. for (var p = r[L], g = 0, m = 0, v = 0; v < p.tokens.length; v++) {
  1257. var y = (k = p.tokens[v]).styleName && e.rich[k.styleName] || {},
  1258. x = k.textPadding = y.textPadding,
  1259. _ = k.font = y.font || e.font,
  1260. w = k.textHeight = A(y.textHeight, Be(_));
  1261. if (x && (w += x[0] + x[2]), k.height = w, k.lineHeight = D(y.textLineHeight, e.textLineHeight, w), k.textAlign =
  1262. y && y.textAlign || e.textAlign, k.textVerticalAlign = y && y.textVerticalAlign || "middle", null != f && s + k.lineHeight >
  1263. f) return {
  1264. lines: [],
  1265. width: 0,
  1266. height: 0
  1267. };
  1268. k.textWidth = Ae(k.text, _);
  1269. var b = y.textWidth,
  1270. S = null == b || "auto" === b;
  1271. if ("string" == typeof b && "%" === b.charAt(b.length - 1)) k.percentWidth = b, u.push(k), b = 0;
  1272. else {
  1273. if (S) {
  1274. b = k.textWidth;
  1275. var M = y.textBackgroundColor,
  1276. I = M && M.image;
  1277. I && Te(I = Se(I)) && (b = Math.max(b, I.width * w / I.height))
  1278. }
  1279. var T = x ? x[1] + x[3] : 0;
  1280. b += T;
  1281. var C = null != d ? d - m : null;
  1282. null != C && C < b && (!S || C < T ? (k.text = "", k.textWidth = b = 0) : (k.text = Oe(k.text, C - T, _, c.ellipsis, {
  1283. minChar: c.minChar
  1284. }), k.textWidth = Ae(k.text, _), b = k.textWidth + T))
  1285. }
  1286. m += k.width = b, y && (g = Math.max(g, k.lineHeight))
  1287. }
  1288. p.width = m, p.lineHeight = g, s += g, l = Math.max(l, m)
  1289. }
  1290. i.outerWidth = i.width = A(e.textWidth, l), i.outerHeight = i.height = A(e.textHeight, s), h && (i.outerWidth += h[1] +
  1291. h[3], i.outerHeight += h[0] + h[2]);
  1292. for (var L = 0; L < u.length; L++) {
  1293. var k = u[L],
  1294. P = k.percentWidth;
  1295. k.width = parseInt(P, 10) / 100 * l
  1296. }
  1297. return i
  1298. }
  1299. function We(t, e, i) {
  1300. for (var n = "" === e, o = e.split("\n"), a = t.lines, r = 0; r < o.length; r++) {
  1301. var s = o[r],
  1302. l = {
  1303. styleName: i,
  1304. text: s,
  1305. isLineHolder: !s && !n
  1306. };
  1307. if (r) a.push({
  1308. tokens: [l]
  1309. });
  1310. else {
  1311. var u = (a[a.length - 1] || (a[0] = {
  1312. tokens: []
  1313. })).tokens,
  1314. h = u.length;
  1315. 1 === h && u[0].isLineHolder ? u[0] = l : (s || !h || n) && u.push(l)
  1316. }
  1317. }
  1318. }
  1319. function He(t) {
  1320. var e = (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + "px", t.fontFamily ||
  1321. "sans-serif"
  1322. ].join(" ");
  1323. return e && P(e) || t.textFont || t.font
  1324. }
  1325. function Ze(t, e) {
  1326. var i, n, o, a, r = e.x,
  1327. s = e.y,
  1328. l = e.width,
  1329. u = e.height,
  1330. h = e.r;
  1331. l < 0 && (r += l, l = -l), u < 0 && (s += u, u = -u), "number" == typeof h ? i = n = o = a = h : h instanceof Array ?
  1332. 1 === h.length ? i = n = o = a = h[0] : 2 === h.length ? (i = o = h[0], n = a = h[1]) : 3 === h.length ? (i = h[0],
  1333. n = a = h[1], o = h[2]) : (i = h[0], n = h[1], o = h[2], a = h[3]) : i = n = o = a = 0;
  1334. var c;
  1335. i + n > l && (i *= l / (c = i + n), n *= l / c), o + a > l && (o *= l / (c = o + a), a *= l / c), n + o > u && (n *=
  1336. u / (c = n + o), o *= u / c), i + a > u && (i *= u / (c = i + a), a *= u / c), t.moveTo(r + i, s), t.lineTo(r + l -
  1337. n, s), 0 !== n && t.arc(r + l - n, s + n, n, -Math.PI / 2, 0), t.lineTo(r + l, s + u - o), 0 !== o && t.arc(r + l -
  1338. o, s + u - o, o, 0, Math.PI / 2), t.lineTo(r + a, s + u), 0 !== a && t.arc(r + a, s + u - a, a, Math.PI / 2, Math.PI),
  1339. t.lineTo(r, s + i), 0 !== i && t.arc(r + i, s + i, i, Math.PI, 1.5 * Math.PI)
  1340. }
  1341. function Ue(t) {
  1342. return Xe(t), d(t.rich, Xe), t
  1343. }
  1344. function Xe(t) {
  1345. if (t) {
  1346. t.font = He(t);
  1347. var e = t.textAlign;
  1348. "middle" === e && (e = "center"), t.textAlign = null == e || cb[e] ? e : "left";
  1349. var i = t.textVerticalAlign || t.textBaseline;
  1350. "center" === i && (i = "middle"), t.textVerticalAlign = null == i || db[i] ? i : "top", t.textPadding && (t.textPadding =
  1351. L(t.textPadding))
  1352. }
  1353. }
  1354. function je(t, e, i, n, o, a) {
  1355. n.rich ? qe(t, e, i, n, o) : Ye(t, e, i, n, o, a)
  1356. }
  1357. function Ye(t, e, i, n, o, a) {
  1358. var r = a && a.style,
  1359. s = r && "text" === a.type,
  1360. l = n.font || ub;
  1361. s && l === (r.font || ub) || (e.font = l);
  1362. var u = t.__computedFont;
  1363. t.__styleFont !== l && (t.__styleFont = l, u = t.__computedFont = e.font);
  1364. var h = n.textPadding,
  1365. c = t.__textCotentBlock;
  1366. c && !t.__dirtyText || (c = t.__textCotentBlock = Ge(i, u, h, n.truncate));
  1367. var d = c.outerHeight,
  1368. f = c.lines,
  1369. p = c.lineHeight,
  1370. g = ii(d, n, o),
  1371. m = g.baseX,
  1372. v = g.baseY,
  1373. y = g.textAlign || "left",
  1374. x = g.textVerticalAlign;
  1375. $e(e, n, o, m, v);
  1376. var _ = Pe(v, d, x),
  1377. w = m,
  1378. b = _,
  1379. S = Qe(n);
  1380. if (S || h) {
  1381. var M = Ae(i, u);
  1382. h && (M += h[1] + h[3]);
  1383. var I = ke(m, M, y);
  1384. S && ti(t, e, n, I, _, M, d), h && (w = si(m, y, h), b += h[0])
  1385. }
  1386. e.textAlign = y, e.textBaseline = "middle";
  1387. for (R = 0; R < fb.length; R++) {
  1388. var T = fb[R],
  1389. A = T[0],
  1390. D = T[1],
  1391. C = n[A];
  1392. s && C === r[A] || (e[D] = qw(e, D, C || T[2]))
  1393. }
  1394. b += p / 2;
  1395. var L = n.textStrokeWidth,
  1396. k = s ? r.textStrokeWidth : null,
  1397. P = !s || L !== k,
  1398. N = !s || P || n.textStroke !== r.textStroke,
  1399. O = oi(n.textStroke, L),
  1400. E = ai(n.textFill);
  1401. if (O && (P && (e.lineWidth = L), N && (e.strokeStyle = O)), E && (s && n.textFill === r.textFill && !r.textBackgroundColor ||
  1402. (e.fillStyle = E)), 1 === f.length) O && e.strokeText(f[0], w, b), E && e.fillText(f[0], w, b);
  1403. else
  1404. for (var R = 0; R < f.length; R++) O && e.strokeText(f[R], w, b), E && e.fillText(f[R], w, b), b += p
  1405. }
  1406. function qe(t, e, i, n, o) {
  1407. var a = t.__textCotentBlock;
  1408. a && !t.__dirtyText || (a = t.__textCotentBlock = Fe(i, n)), Ke(t, e, a, n, o)
  1409. }
  1410. function Ke(t, e, i, n, o) {
  1411. var a = i.width,
  1412. r = i.outerWidth,
  1413. s = i.outerHeight,
  1414. l = n.textPadding,
  1415. u = ii(s, n, o),
  1416. h = u.baseX,
  1417. c = u.baseY,
  1418. d = u.textAlign,
  1419. f = u.textVerticalAlign;
  1420. $e(e, n, o, h, c);
  1421. var p = ke(h, r, d),
  1422. g = Pe(c, s, f),
  1423. m = p,
  1424. v = g;
  1425. l && (m += l[3], v += l[0]);
  1426. var y = m + a;
  1427. Qe(n) && ti(t, e, n, p, g, r, s);
  1428. for (var x = 0; x < i.lines.length; x++) {
  1429. for (var _, w = i.lines[x], b = w.tokens, S = b.length, M = w.lineHeight, I = w.width, T = 0, A = m, D = y, C = S -
  1430. 1; T < S && (!(_ = b[T]).textAlign || "left" === _.textAlign);) Je(t, e, _, n, M, v, A, "left"), I -= _.width, A +=
  1431. _.width, T++;
  1432. for (; C >= 0 && "right" === (_ = b[C]).textAlign;) Je(t, e, _, n, M, v, D, "right"), I -= _.width, D -= _.width, C--;
  1433. for (A += (a - (A - m) - (y - D) - I) / 2; T <= C;) Je(t, e, _ = b[T], n, M, v, A + _.width / 2, "center"), A += _.width,
  1434. T++;
  1435. v += M
  1436. }
  1437. }
  1438. function $e(t, e, i, n, o) {
  1439. if (i && e.textRotation) {
  1440. var a = e.textOrigin;
  1441. "center" === a ? (n = i.width / 2 + i.x, o = i.height / 2 + i.y) : a && (n = a[0] + i.x, o = a[1] + i.y), t.translate(
  1442. n, o), t.rotate(-e.textRotation), t.translate(-n, -o)
  1443. }
  1444. }
  1445. function Je(t, e, i, n, o, a, r, s) {
  1446. var l = n.rich[i.styleName] || {};
  1447. l.text = i.text;
  1448. var u = i.textVerticalAlign,
  1449. h = a + o / 2;
  1450. "top" === u ? h = a + i.height / 2 : "bottom" === u && (h = a + o - i.height / 2), !i.isLineHolder && Qe(l) && ti(t,
  1451. e, l, "right" === s ? r - i.width : "center" === s ? r - i.width / 2 : r, h - i.height / 2, i.width, i.height);
  1452. var c = i.textPadding;
  1453. c && (r = si(r, s, c), h -= i.height / 2 - c[2] - i.textHeight / 2), ni(e, "shadowBlur", D(l.textShadowBlur, n.textShadowBlur,
  1454. 0)), ni(e, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), ni(e, "shadowOffsetX", D(l.textShadowOffsetX,
  1455. n.textShadowOffsetX, 0)), ni(e, "shadowOffsetY", D(l.textShadowOffsetY, n.textShadowOffsetY, 0)), ni(e,
  1456. "textAlign", s), ni(e, "textBaseline", "middle"), ni(e, "font", i.font || ub);
  1457. var d = oi(l.textStroke || n.textStroke, p),
  1458. f = ai(l.textFill || n.textFill),
  1459. p = A(l.textStrokeWidth, n.textStrokeWidth);
  1460. d && (ni(e, "lineWidth", p), ni(e, "strokeStyle", d), e.strokeText(i.text, r, h)), f && (ni(e, "fillStyle", f), e.fillText(
  1461. i.text, r, h))
  1462. }
  1463. function Qe(t) {
  1464. return t.textBackgroundColor || t.textBorderWidth && t.textBorderColor
  1465. }
  1466. function ti(t, e, i, n, o, a, r) {
  1467. var s = i.textBackgroundColor,
  1468. l = i.textBorderWidth,
  1469. u = i.textBorderColor,
  1470. h = _(s);
  1471. if (ni(e, "shadowBlur", i.textBoxShadowBlur || 0), ni(e, "shadowColor", i.textBoxShadowColor || "transparent"), ni(e,
  1472. "shadowOffsetX", i.textBoxShadowOffsetX || 0), ni(e, "shadowOffsetY", i.textBoxShadowOffsetY || 0), h || l && u) {
  1473. e.beginPath();
  1474. var c = i.textBorderRadius;
  1475. c ? Ze(e, {
  1476. x: n,
  1477. y: o,
  1478. width: a,
  1479. height: r,
  1480. r: c
  1481. }) : e.rect(n, o, a, r), e.closePath()
  1482. }
  1483. if (h)
  1484. if (ni(e, "fillStyle", s), null != i.fillOpacity) {
  1485. f = e.globalAlpha;
  1486. e.globalAlpha = i.fillOpacity * i.opacity, e.fill(), e.globalAlpha = f
  1487. } else e.fill();
  1488. else if (x(s)) ni(e, "fillStyle", s(i)), e.fill();
  1489. else if (w(s)) {
  1490. var d = s.image;
  1491. (d = Me(d, null, t, ei, s)) && Te(d) && e.drawImage(d, n, o, a, r)
  1492. }
  1493. if (l && u)
  1494. if (ni(e, "lineWidth", l), ni(e, "strokeStyle", u), null != i.strokeOpacity) {
  1495. var f = e.globalAlpha;
  1496. e.globalAlpha = i.strokeOpacity * i.opacity, e.stroke(), e.globalAlpha = f
  1497. } else e.stroke()
  1498. }
  1499. function ei(t, e) {
  1500. e.image = t
  1501. }
  1502. function ii(t, e, i) {
  1503. var n = e.x || 0,
  1504. o = e.y || 0,
  1505. a = e.textAlign,
  1506. r = e.textVerticalAlign;
  1507. if (i) {
  1508. var s = e.textPosition;
  1509. if (s instanceof Array) n = i.x + ri(s[0], i.width), o = i.y + ri(s[1], i.height);
  1510. else {
  1511. var l = Ne(s, i, e.textDistance);
  1512. n = l.x, o = l.y, a = a || l.textAlign, r = r || l.textVerticalAlign
  1513. }
  1514. var u = e.textOffset;
  1515. u && (n += u[0], o += u[1])
  1516. }
  1517. return {
  1518. baseX: n,
  1519. baseY: o,
  1520. textAlign: a,
  1521. textVerticalAlign: r
  1522. }
  1523. }
  1524. function ni(t, e, i) {
  1525. return t[e] = qw(t, e, i), t[e]
  1526. }
  1527. function oi(t, e) {
  1528. return null == t || e <= 0 || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  1529. }
  1530. function ai(t) {
  1531. return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
  1532. }
  1533. function ri(t, e) {
  1534. return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t
  1535. }
  1536. function si(t, e, i) {
  1537. return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3]
  1538. }
  1539. function li(t, e) {
  1540. return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding)
  1541. }
  1542. function ui(t) {
  1543. t = t || {}, Gw.call(this, t);
  1544. for (var e in t) t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]);
  1545. this.style = new $w(t.style, this), this._rect = null, this.__clipPaths = []
  1546. }
  1547. function hi(t) {
  1548. ui.call(this, t)
  1549. }
  1550. function ci(t) {
  1551. return parseInt(t, 10)
  1552. }
  1553. function di(t) {
  1554. return !!t && (!!t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh)
  1555. }
  1556. function fi(t, e, i) {
  1557. return mb.copy(t.getBoundingRect()), t.transform && mb.applyTransform(t.transform), vb.width = e, vb.height = i, !mb
  1558. .intersect(vb)
  1559. }
  1560. function pi(t, e) {
  1561. if (t == e) return !1;
  1562. if (!t || !e || t.length !== e.length) return !0;
  1563. for (var i = 0; i < t.length; i++)
  1564. if (t[i] !== e[i]) return !0
  1565. }
  1566. function gi(t, e) {
  1567. for (var i = 0; i < t.length; i++) {
  1568. var n = t[i];
  1569. n.setTransform(e), e.beginPath(), n.buildPath(e, n.shape), e.clip(), n.restoreTransform(e)
  1570. }
  1571. }
  1572. function mi(t, e) {
  1573. var i = document.createElement("div");
  1574. return i.style.cssText = ["position:relative", "overflow:hidden", "width:" + t + "px", "height:" + e + "px",
  1575. "padding:0", "margin:0", "border-width:0"
  1576. ].join(";") + ";", i
  1577. }
  1578. function vi(t) {
  1579. var e = t[1][0] - t[0][0],
  1580. i = t[1][1] - t[0][1];
  1581. return Math.sqrt(e * e + i * i)
  1582. }
  1583. function yi(t) {
  1584. return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2]
  1585. }
  1586. function xi(t) {
  1587. return "mousewheel" === t && z_.browser.firefox ? "DOMMouseScroll" : t
  1588. }
  1589. function _i(t, e, i) {
  1590. var n = t._gestureMgr;
  1591. "start" === i && n.clear();
  1592. var o = n.recognize(e, t.handler.findHover(e.zrX, e.zrY, null).target, t.dom);
  1593. if ("end" === i && n.clear(), o) {
  1594. var a = o.type;
  1595. e.gestureEvent = a, t.handler.dispatchToElement({
  1596. target: o.target
  1597. }, a, o.event)
  1598. }
  1599. }
  1600. function wi(t) {
  1601. t._touching = !0, clearTimeout(t._touchTimer), t._touchTimer = setTimeout(function() {
  1602. t._touching = !1
  1603. }, 700)
  1604. }
  1605. function bi(t) {
  1606. var e = t.pointerType;
  1607. return "pen" === e || "touch" === e
  1608. }
  1609. function Si(t) {
  1610. function e(t, e) {
  1611. return function() {
  1612. if (!e._touching) return t.apply(e, arguments)
  1613. }
  1614. }
  1615. d(Sb, function(e) {
  1616. t._handlers[e] = m(Tb[e], t)
  1617. }), d(Ib, function(e) {
  1618. t._handlers[e] = m(Tb[e], t)
  1619. }), d(bb, function(i) {
  1620. t._handlers[i] = e(Tb[i], t)
  1621. })
  1622. }
  1623. function Mi(t) {
  1624. function e(e, i) {
  1625. d(e, function(e) {
  1626. ut(t, xi(e), i._handlers[e])
  1627. }, i)
  1628. }
  1629. aw.call(this), this.dom = t, this._touching = !1, this._touchTimer, this._gestureMgr = new _b, this._handlers = {},
  1630. Si(this), z_.pointerEventsSupported ? e(Ib, this) : (z_.touchEventsSupported && e(Sb, this), e(bb, this))
  1631. }
  1632. function Ii(t, e) {
  1633. var i = new kb(E_(), t, e);
  1634. return Lb[i.id] = i, i
  1635. }
  1636. function Ti(t, e) {
  1637. Cb[t] = e
  1638. }
  1639. function Ai(t) {
  1640. delete Lb[t]
  1641. }
  1642. function Di(t) {
  1643. return t instanceof Array ? t : null == t ? [] : [t]
  1644. }
  1645. function Ci(t, e, i) {
  1646. if (t) {
  1647. t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
  1648. for (var n = 0, o = i.length; n < o; n++) {
  1649. var a = i[n];
  1650. !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a])
  1651. }
  1652. }
  1653. }
  1654. function Li(t) {
  1655. return !Ob(t) || Eb(t) || t instanceof Date ? t : t.value
  1656. }
  1657. function ki(t) {
  1658. return Ob(t) && !(t instanceof Array)
  1659. }
  1660. function Pi(t, e) {
  1661. e = (e || []).slice();
  1662. var i = f(t || [], function(t, e) {
  1663. return {
  1664. exist: t
  1665. }
  1666. });
  1667. return Nb(e, function(t, n) {
  1668. if (Ob(t)) {
  1669. for (o = 0; o < i.length; o++)
  1670. if (!i[o].option && null != t.id && i[o].exist.id === t.id + "") return i[o].option = t, void(e[n] = null);
  1671. for (var o = 0; o < i.length; o++) {
  1672. var a = i[o].exist;
  1673. if (!(i[o].option || null != a.id && null != t.id || null == t.name || Ei(t) || Ei(a) || a.name !== t.name + ""))
  1674. return i[o].option = t, void(e[n] = null)
  1675. }
  1676. }
  1677. }), Nb(e, function(t, e) {
  1678. if (Ob(t)) {
  1679. for (var n = 0; n < i.length; n++) {
  1680. var o = i[n].exist;
  1681. if (!i[n].option && !Ei(o) && null == t.id) {
  1682. i[n].option = t;
  1683. break
  1684. }
  1685. }
  1686. n >= i.length && i.push({
  1687. option: t
  1688. })
  1689. }
  1690. }), i
  1691. }
  1692. function Ni(t) {
  1693. var e = R();
  1694. Nb(t, function(t, i) {
  1695. var n = t.exist;
  1696. n && e.set(n.id, t)
  1697. }), Nb(t, function(t, i) {
  1698. var n = t.option;
  1699. k(!n || null == n.id || !e.get(n.id) || e.get(n.id) === t, "id duplicates: " + (n && n.id)), n && null != n.id &&
  1700. e.set(n.id, t), !t.keyInfo && (t.keyInfo = {})
  1701. }), Nb(t, function(t, i) {
  1702. var n = t.exist,
  1703. o = t.option,
  1704. a = t.keyInfo;
  1705. if (Ob(o)) {
  1706. if (a.name = null != o.name ? o.name + "" : n ? n.name : Rb + i, n) a.id = n.id;
  1707. else if (null != o.id) a.id = o.id + "";
  1708. else {
  1709. var r = 0;
  1710. do {
  1711. a.id = "\0" + a.name + "\0" + r++
  1712. } while (e.get(a.id))
  1713. }
  1714. e.set(a.id, t)
  1715. }
  1716. })
  1717. }
  1718. function Oi(t) {
  1719. var e = t.name;
  1720. return !(!e || !e.indexOf(Rb))
  1721. }
  1722. function Ei(t) {
  1723. return Ob(t) && t.id && 0 === (t.id + "").indexOf("\0_ec_\0")
  1724. }
  1725. function Ri(t, e) {
  1726. function i(t, e, i) {
  1727. for (var n = 0, o = t.length; n < o; n++)
  1728. for (var a = t[n].seriesId, r = Di(t[n].dataIndex), s = i && i[a], l = 0, u = r.length; l < u; l++) {
  1729. var h = r[l];
  1730. s && s[h] ? s[h] = null : (e[a] || (e[a] = {}))[h] = 1
  1731. }
  1732. }
  1733. function n(t, e) {
  1734. var i = [];
  1735. for (var o in t)
  1736. if (t.hasOwnProperty(o) && null != t[o])
  1737. if (e) i.push(+o);
  1738. else {
  1739. var a = n(t[o], !0);
  1740. a.length && i.push({
  1741. seriesId: o,
  1742. dataIndex: a
  1743. })
  1744. } return i
  1745. }
  1746. var o = {},
  1747. a = {};
  1748. return i(t || [], o), i(e || [], a, o), [n(o), n(a)]
  1749. }
  1750. function zi(t, e) {
  1751. return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? y(e.dataIndex) ? f(e.dataIndex,
  1752. function(e) {
  1753. return t.indexOfRawIndex(e)
  1754. }) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? y(e.name) ? f(e.name, function(e) {
  1755. return t.indexOfName(e)
  1756. }) : t.indexOfName(e.name) : void 0
  1757. }
  1758. function Bi() {
  1759. var t = "__\0ec_inner_" + Bb++ + "_" + Math.random().toFixed(5);
  1760. return function(e) {
  1761. return e[t] || (e[t] = {})
  1762. }
  1763. }
  1764. function Vi(t, e, i) {
  1765. if (_(e)) {
  1766. var n = {};
  1767. n[e + "Index"] = 0, e = n
  1768. }
  1769. var o = i && i.defaultMainType;
  1770. !o || Gi(e, o + "Index") || Gi(e, o + "Id") || Gi(e, o + "Name") || (e[o + "Index"] = 0);
  1771. var a = {};
  1772. return Nb(e, function(n, o) {
  1773. var n = e[o];
  1774. if ("dataIndex" !== o && "dataIndexInside" !== o) {
  1775. var r = o.match(/^(\w+)(Index|Id|Name)$/) || [],
  1776. s = r[1],
  1777. u = (r[2] || "").toLowerCase();
  1778. if (!(!s || !u || null == n || "index" === u && "none" === n || i && i.includeMainTypes && l(i.includeMainTypes,
  1779. s) < 0)) {
  1780. var h = {
  1781. mainType: s
  1782. };
  1783. "index" === u && "all" === n || (h[u] = n);
  1784. var c = t.queryComponents(h);
  1785. a[s + "Models"] = c, a[s + "Model"] = c[0]
  1786. }
  1787. } else a[o] = n
  1788. }), a
  1789. }
  1790. function Gi(t, e) {
  1791. return t && t.hasOwnProperty(e)
  1792. }
  1793. function Fi(t, e, i) {
  1794. t.setAttribute ? t.setAttribute(e, i) : t[e] = i
  1795. }
  1796. function Wi(t, e) {
  1797. return t.getAttribute ? t.getAttribute(e) : t[e]
  1798. }
  1799. function Hi(t) {
  1800. return "auto" === t ? z_.domSupported ? "html" : "richText" : t || "html"
  1801. }
  1802. function Zi(t) {
  1803. var e = {
  1804. main: "",
  1805. sub: ""
  1806. };
  1807. return t && (t = t.split(Vb), e.main = t[0] || "", e.sub = t[1] || ""), e
  1808. }
  1809. function Ui(t) {
  1810. k(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal')
  1811. }
  1812. function Xi(t, e) {
  1813. t.$constructor = t, t.extend = function(t) {
  1814. var e = this,
  1815. i = function() {
  1816. t.$constructor ? t.$constructor.apply(this, arguments) : e.apply(this, arguments)
  1817. };
  1818. return a(i.prototype, t), i.extend = this.extend, i.superCall = Yi, i.superApply = qi, u(i, this), i.superClass =
  1819. e, i
  1820. }
  1821. }
  1822. function ji(t) {
  1823. var e = ["__\0is_clz", Fb++, Math.random().toFixed(3)].join("_");
  1824. t.prototype[e] = !0, t.isInstance = function(t) {
  1825. return !(!t || !t[e])
  1826. }
  1827. }
  1828. function Yi(t, e) {
  1829. var i = C(arguments, 2);
  1830. return this.superClass.prototype[e].apply(t, i)
  1831. }
  1832. function qi(t, e, i) {
  1833. return this.superClass.prototype[e].apply(t, i)
  1834. }
  1835. function Ki(t, e) {
  1836. function i(t) {
  1837. var e = n[t.main];
  1838. return e && e[Gb] || ((e = n[t.main] = {})[Gb] = !0), e
  1839. }
  1840. e = e || {};
  1841. var n = {};
  1842. if (t.registerClass = function(t, e) {
  1843. return e && (Ui(e), (e = Zi(e)).sub ? e.sub !== Gb && (i(e)[e.sub] = t) : n[e.main] = t), t
  1844. }, t.getClass = function(t, e, i) {
  1845. var o = n[t];
  1846. if (o && o[Gb] && (o = e ? o[e] : null), i && !o) throw new Error(e ? "Component " + t + "." + (e || "") +
  1847. " not exists. Load it first." : t + ".type should be specified.");
  1848. return o
  1849. }, t.getClassesByMainType = function(t) {
  1850. t = Zi(t);
  1851. var e = [],
  1852. i = n[t.main];
  1853. return i && i[Gb] ? d(i, function(t, i) {
  1854. i !== Gb && e.push(t)
  1855. }) : e.push(i), e
  1856. }, t.hasClass = function(t) {
  1857. return t = Zi(t), !!n[t.main]
  1858. }, t.getAllClassMainTypes = function() {
  1859. var t = [];
  1860. return d(n, function(e, i) {
  1861. t.push(i)
  1862. }), t
  1863. }, t.hasSubTypes = function(t) {
  1864. t = Zi(t);
  1865. var e = n[t.main];
  1866. return e && e[Gb]
  1867. }, t.parseClassType = Zi, e.registerWhenExtend) {
  1868. var o = t.extend;
  1869. o && (t.extend = function(e) {
  1870. var i = o.call(this, e);
  1871. return t.registerClass(i, e.type)
  1872. })
  1873. }
  1874. return t
  1875. }
  1876. function $i(t) {
  1877. return t > -qb && t < qb
  1878. }
  1879. function Ji(t) {
  1880. return t > qb || t < -qb
  1881. }
  1882. function Qi(t, e, i, n, o) {
  1883. var a = 1 - o;
  1884. return a * a * (a * t + 3 * o * e) + o * o * (o * n + 3 * a * i)
  1885. }
  1886. function tn(t, e, i, n, o) {
  1887. var a = 1 - o;
  1888. return 3 * (((e - t) * a + 2 * (i - e) * o) * a + (n - i) * o * o)
  1889. }
  1890. function en(t, e, i, n, o, a) {
  1891. var r = n + 3 * (e - i) - t,
  1892. s = 3 * (i - 2 * e + t),
  1893. l = 3 * (e - t),
  1894. u = t - o,
  1895. h = s * s - 3 * r * l,
  1896. c = s * l - 9 * r * u,
  1897. d = l * l - 3 * s * u,
  1898. f = 0;
  1899. if ($i(h) && $i(c)) $i(s) ? a[0] = 0 : (M = -l / s) >= 0 && M <= 1 && (a[f++] = M);
  1900. else {
  1901. var p = c * c - 4 * h * d;
  1902. if ($i(p)) {
  1903. var g = c / h,
  1904. m = -g / 2;
  1905. (M = -s / r + g) >= 0 && M <= 1 && (a[f++] = M), m >= 0 && m <= 1 && (a[f++] = m)
  1906. } else if (p > 0) {
  1907. var v = Yb(p),
  1908. y = h * s + 1.5 * r * (-c + v),
  1909. x = h * s + 1.5 * r * (-c - v);
  1910. (M = (-s - ((y = y < 0 ? -jb(-y, Jb) : jb(y, Jb)) + (x = x < 0 ? -jb(-x, Jb) : jb(x, Jb)))) / (3 * r)) >= 0 && M <=
  1911. 1 && (a[f++] = M)
  1912. } else {
  1913. var _ = (2 * h * s - 3 * r * c) / (2 * Yb(h * h * h)),
  1914. w = Math.acos(_) / 3,
  1915. b = Yb(h),
  1916. S = Math.cos(w),
  1917. M = (-s - 2 * b * S) / (3 * r),
  1918. m = (-s + b * (S + $b * Math.sin(w))) / (3 * r),
  1919. I = (-s + b * (S - $b * Math.sin(w))) / (3 * r);
  1920. M >= 0 && M <= 1 && (a[f++] = M), m >= 0 && m <= 1 && (a[f++] = m), I >= 0 && I <= 1 && (a[f++] = I)
  1921. }
  1922. }
  1923. return f
  1924. }
  1925. function nn(t, e, i, n, o) {
  1926. var a = 6 * i - 12 * e + 6 * t,
  1927. r = 9 * e + 3 * n - 3 * t - 9 * i,
  1928. s = 3 * e - 3 * t,
  1929. l = 0;
  1930. if ($i(r)) Ji(a) && (c = -s / a) >= 0 && c <= 1 && (o[l++] = c);
  1931. else {
  1932. var u = a * a - 4 * r * s;
  1933. if ($i(u)) o[0] = -a / (2 * r);
  1934. else if (u > 0) {
  1935. var h = Yb(u),
  1936. c = (-a + h) / (2 * r),
  1937. d = (-a - h) / (2 * r);
  1938. c >= 0 && c <= 1 && (o[l++] = c), d >= 0 && d <= 1 && (o[l++] = d)
  1939. }
  1940. }
  1941. return l
  1942. }
  1943. function on(t, e, i, n, o, a) {
  1944. var r = (e - t) * o + t,
  1945. s = (i - e) * o + e,
  1946. l = (n - i) * o + i,
  1947. u = (s - r) * o + r,
  1948. h = (l - s) * o + s,
  1949. c = (h - u) * o + u;
  1950. a[0] = t, a[1] = r, a[2] = u, a[3] = c, a[4] = c, a[5] = h, a[6] = l, a[7] = n
  1951. }
  1952. function an(t, e, i, n, o, a, r, s, l, u, h) {
  1953. var c, d, f, p, g, m = .005,
  1954. v = 1 / 0;
  1955. Qb[0] = l, Qb[1] = u;
  1956. for (var y = 0; y < 1; y += .05) tS[0] = Qi(t, i, o, r, y), tS[1] = Qi(e, n, a, s, y), (p = iw(Qb, tS)) < v && (c =
  1957. y, v = p);
  1958. v = 1 / 0;
  1959. for (var x = 0; x < 32 && !(m < Kb); x++) d = c - m, f = c + m, tS[0] = Qi(t, i, o, r, d), tS[1] = Qi(e, n, a, s, d),
  1960. p = iw(tS, Qb), d >= 0 && p < v ? (c = d, v = p) : (eS[0] = Qi(t, i, o, r, f), eS[1] = Qi(e, n, a, s, f), g = iw(eS,
  1961. Qb), f <= 1 && g < v ? (c = f, v = g) : m *= .5);
  1962. return h && (h[0] = Qi(t, i, o, r, c), h[1] = Qi(e, n, a, s, c)), Yb(v)
  1963. }
  1964. function rn(t, e, i, n) {
  1965. var o = 1 - n;
  1966. return o * (o * t + 2 * n * e) + n * n * i
  1967. }
  1968. function sn(t, e, i, n) {
  1969. return 2 * ((1 - n) * (e - t) + n * (i - e))
  1970. }
  1971. function ln(t, e, i, n, o) {
  1972. var a = t - 2 * e + i,
  1973. r = 2 * (e - t),
  1974. s = t - n,
  1975. l = 0;
  1976. if ($i(a)) Ji(r) && (c = -s / r) >= 0 && c <= 1 && (o[l++] = c);
  1977. else {
  1978. var u = r * r - 4 * a * s;
  1979. if ($i(u))(c = -r / (2 * a)) >= 0 && c <= 1 && (o[l++] = c);
  1980. else if (u > 0) {
  1981. var h = Yb(u),
  1982. c = (-r + h) / (2 * a),
  1983. d = (-r - h) / (2 * a);
  1984. c >= 0 && c <= 1 && (o[l++] = c), d >= 0 && d <= 1 && (o[l++] = d)
  1985. }
  1986. }
  1987. return l
  1988. }
  1989. function un(t, e, i) {
  1990. var n = t + i - 2 * e;
  1991. return 0 === n ? .5 : (t - e) / n
  1992. }
  1993. function hn(t, e, i, n, o) {
  1994. var a = (e - t) * n + t,
  1995. r = (i - e) * n + e,
  1996. s = (r - a) * n + a;
  1997. o[0] = t, o[1] = a, o[2] = s, o[3] = s, o[4] = r, o[5] = i
  1998. }
  1999. function cn(t, e, i, n, o, a, r, s, l) {
  2000. var u, h = .005,
  2001. c = 1 / 0;
  2002. Qb[0] = r, Qb[1] = s;
  2003. for (var d = 0; d < 1; d += .05) tS[0] = rn(t, i, o, d), tS[1] = rn(e, n, a, d), (m = iw(Qb, tS)) < c && (u = d, c =
  2004. m);
  2005. c = 1 / 0;
  2006. for (var f = 0; f < 32 && !(h < Kb); f++) {
  2007. var p = u - h,
  2008. g = u + h;
  2009. tS[0] = rn(t, i, o, p), tS[1] = rn(e, n, a, p);
  2010. var m = iw(tS, Qb);
  2011. if (p >= 0 && m < c) u = p, c = m;
  2012. else {
  2013. eS[0] = rn(t, i, o, g), eS[1] = rn(e, n, a, g);
  2014. var v = iw(eS, Qb);
  2015. g <= 1 && v < c ? (u = g, c = v) : h *= .5
  2016. }
  2017. }
  2018. return l && (l[0] = rn(t, i, o, u), l[1] = rn(e, n, a, u)), Yb(c)
  2019. }
  2020. function dn(t, e, i) {
  2021. if (0 !== t.length) {
  2022. var n, o = t[0],
  2023. a = o[0],
  2024. r = o[0],
  2025. s = o[1],
  2026. l = o[1];
  2027. for (n = 1; n < t.length; n++) o = t[n], a = iS(a, o[0]), r = nS(r, o[0]), s = iS(s, o[1]), l = nS(l, o[1]);
  2028. e[0] = a, e[1] = s, i[0] = r, i[1] = l
  2029. }
  2030. }
  2031. function fn(t, e, i, n, o, a) {
  2032. o[0] = iS(t, i), o[1] = iS(e, n), a[0] = nS(t, i), a[1] = nS(e, n)
  2033. }
  2034. function pn(t, e, i, n, o, a, r, s, l, u) {
  2035. var h, c = nn,
  2036. d = Qi,
  2037. f = c(t, i, o, r, hS);
  2038. for (l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0, h = 0; h < f; h++) {
  2039. var p = d(t, i, o, r, hS[h]);
  2040. l[0] = iS(p, l[0]), u[0] = nS(p, u[0])
  2041. }
  2042. for (f = c(e, n, a, s, cS), h = 0; h < f; h++) {
  2043. var g = d(e, n, a, s, cS[h]);
  2044. l[1] = iS(g, l[1]), u[1] = nS(g, u[1])
  2045. }
  2046. l[0] = iS(t, l[0]), u[0] = nS(t, u[0]), l[0] = iS(r, l[0]), u[0] = nS(r, u[0]), l[1] = iS(e, l[1]), u[1] = nS(e, u[1]),
  2047. l[1] = iS(s, l[1]), u[1] = nS(s, u[1])
  2048. }
  2049. function gn(t, e, i, n, o, a, r, s) {
  2050. var l = un,
  2051. u = rn,
  2052. h = nS(iS(l(t, i, o), 1), 0),
  2053. c = nS(iS(l(e, n, a), 1), 0),
  2054. d = u(t, i, o, h),
  2055. f = u(e, n, a, c);
  2056. r[0] = iS(t, o, d), r[1] = iS(e, a, f), s[0] = nS(t, o, d), s[1] = nS(e, a, f)
  2057. }
  2058. function mn(t, e, i, n, o, a, r, s, l) {
  2059. var u = tt,
  2060. h = et,
  2061. c = Math.abs(o - a);
  2062. if (c % rS < 1e-4 && c > 1e-4) return s[0] = t - i, s[1] = e - n, l[0] = t + i, void(l[1] = e + n);
  2063. if (sS[0] = aS(o) * i + t, sS[1] = oS(o) * n + e, lS[0] = aS(a) * i + t, lS[1] = oS(a) * n + e, u(s, sS, lS), h(l,
  2064. sS, lS), (o %= rS) < 0 && (o += rS), (a %= rS) < 0 && (a += rS), o > a && !r ? a += rS : o < a && r && (o += rS),
  2065. r) {
  2066. var d = a;
  2067. a = o, o = d
  2068. }
  2069. for (var f = 0; f < a; f += Math.PI / 2) f > o && (uS[0] = aS(f) * i + t, uS[1] = oS(f) * n + e, u(s, uS, s), h(l,
  2070. uS, l))
  2071. }
  2072. function vn(t, e, i, n, o, a, r) {
  2073. if (0 === o) return !1;
  2074. var s = o,
  2075. l = 0,
  2076. u = t;
  2077. 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) return !1;
  2078. if (t === i) return Math.abs(a - t) <= s / 2;
  2079. var h = (l = (e - n) / (t - i)) * a - r + (u = (t * n - i * e) / (t - i));
  2080. return h * h / (l * l + 1) <= s / 2 * s / 2
  2081. }
  2082. function yn(t, e, i, n, o, a, r, s, l, u, h) {
  2083. if (0 === l) return !1;
  2084. var c = l;
  2085. return !(h > e + c && h > n + c && h > a + c && h > s + c || h < e - c && h < n - c && h < a - c && h < s - c || u >
  2086. t + c && u > i + c && u > o + c && u > r + c || u < t - c && u < i - c && u < o - c && u < r - c) && an(t, e, i, n,
  2087. o, a, r, s, u, h, null) <= c / 2
  2088. }
  2089. function xn(t, e, i, n, o, a, r, s, l) {
  2090. if (0 === r) return !1;
  2091. var u = r;
  2092. return !(l > e + u && l > n + u && l > a + u || l < e - u && l < n - u && l < a - u || s > t + u && s > i + u && s >
  2093. o + u || s < t - u && s < i - u && s < o - u) && cn(t, e, i, n, o, a, s, l, null) <= u / 2
  2094. }
  2095. function _n(t) {
  2096. return (t %= IS) < 0 && (t += IS), t
  2097. }
  2098. function wn(t, e, i, n, o, a, r, s, l) {
  2099. if (0 === r) return !1;
  2100. var u = r;
  2101. s -= t, l -= e;
  2102. var h = Math.sqrt(s * s + l * l);
  2103. if (h - u > i || h + u < i) return !1;
  2104. if (Math.abs(n - o) % TS < 1e-4) return !0;
  2105. if (a) {
  2106. var c = n;
  2107. n = _n(o), o = _n(c)
  2108. } else n = _n(n), o = _n(o);
  2109. n > o && (o += TS);
  2110. var d = Math.atan2(l, s);
  2111. return d < 0 && (d += TS), d >= n && d <= o || d + TS >= n && d + TS <= o
  2112. }
  2113. function bn(t, e, i, n, o, a) {
  2114. if (a > e && a > n || a < e && a < n) return 0;
  2115. if (n === e) return 0;
  2116. var r = n < e ? 1 : -1,
  2117. s = (a - e) / (n - e);
  2118. 1 !== s && 0 !== s || (r = n < e ? .5 : -.5);
  2119. var l = s * (i - t) + t;
  2120. return l === o ? 1 / 0 : l > o ? r : 0
  2121. }
  2122. function Sn(t, e) {
  2123. return Math.abs(t - e) < CS
  2124. }
  2125. function Mn() {
  2126. var t = kS[0];
  2127. kS[0] = kS[1], kS[1] = t
  2128. }
  2129. function In(t, e, i, n, o, a, r, s, l, u) {
  2130. if (u > e && u > n && u > a && u > s || u < e && u < n && u < a && u < s) return 0;
  2131. var h = en(e, n, a, s, u, LS);
  2132. if (0 === h) return 0;
  2133. for (var c, d, f = 0, p = -1, g = 0; g < h; g++) {
  2134. var m = LS[g],
  2135. v = 0 === m || 1 === m ? .5 : 1;
  2136. Qi(t, i, o, r, m) < l || (p < 0 && (p = nn(e, n, a, s, kS), kS[1] < kS[0] && p > 1 && Mn(), c = Qi(e, n, a, s, kS[0]),
  2137. p > 1 && (d = Qi(e, n, a, s, kS[1]))), 2 == p ? m < kS[0] ? f += c < e ? v : -v : m < kS[1] ? f += d < c ? v : -
  2138. v : f += s < d ? v : -v : m < kS[0] ? f += c < e ? v : -v : f += s < c ? v : -v)
  2139. }
  2140. return f
  2141. }
  2142. function Tn(t, e, i, n, o, a, r, s) {
  2143. if (s > e && s > n && s > a || s < e && s < n && s < a) return 0;
  2144. var l = ln(e, n, a, s, LS);
  2145. if (0 === l) return 0;
  2146. var u = un(e, n, a);
  2147. if (u >= 0 && u <= 1) {
  2148. for (var h = 0, c = rn(e, n, a, u), d = 0; d < l; d++) {
  2149. f = 0 === LS[d] || 1 === LS[d] ? .5 : 1;
  2150. (p = rn(t, i, o, LS[d])) < r || (LS[d] < u ? h += c < e ? f : -f : h += a < c ? f : -f)
  2151. }
  2152. return h
  2153. }
  2154. var f = 0 === LS[0] || 1 === LS[0] ? .5 : 1,
  2155. p = rn(t, i, o, LS[0]);
  2156. return p < r ? 0 : a < e ? f : -f
  2157. }
  2158. function An(t, e, i, n, o, a, r, s) {
  2159. if ((s -= e) > i || s < -i) return 0;
  2160. u = Math.sqrt(i * i - s * s);
  2161. LS[0] = -u, LS[1] = u;
  2162. var l = Math.abs(n - o);
  2163. if (l < 1e-4) return 0;
  2164. if (l % DS < 1e-4) {
  2165. n = 0, o = DS;
  2166. p = a ? 1 : -1;
  2167. return r >= LS[0] + t && r <= LS[1] + t ? p : 0
  2168. }
  2169. if (a) {
  2170. var u = n;
  2171. n = _n(o), o = _n(u)
  2172. } else n = _n(n), o = _n(o);
  2173. n > o && (o += DS);
  2174. for (var h = 0, c = 0; c < 2; c++) {
  2175. var d = LS[c];
  2176. if (d + t > r) {
  2177. var f = Math.atan2(s, d),
  2178. p = a ? 1 : -1;
  2179. f < 0 && (f = DS + f), (f >= n && f <= o || f + DS >= n && f + DS <= o) && (f > Math.PI / 2 && f < 1.5 * Math.PI &&
  2180. (p = -p), h += p)
  2181. }
  2182. }
  2183. return h
  2184. }
  2185. function Dn(t, e, i, n, o) {
  2186. for (var a = 0, r = 0, s = 0, l = 0, u = 0, h = 0; h < t.length;) {
  2187. var c = t[h++];
  2188. switch (c === AS.M && h > 1 && (i || (a += bn(r, s, l, u, n, o))), 1 == h && (l = r = t[h], u = s = t[h + 1]), c) {
  2189. case AS.M:
  2190. r = l = t[h++], s = u = t[h++];
  2191. break;
  2192. case AS.L:
  2193. if (i) {
  2194. if (vn(r, s, t[h], t[h + 1], e, n, o)) return !0
  2195. } else a += bn(r, s, t[h], t[h + 1], n, o) || 0;
  2196. r = t[h++], s = t[h++];
  2197. break;
  2198. case AS.C:
  2199. if (i) {
  2200. if (yn(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], e, n, o)) return !0
  2201. } else a += In(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], n, o) || 0;
  2202. r = t[h++], s = t[h++];
  2203. break;
  2204. case AS.Q:
  2205. if (i) {
  2206. if (xn(r, s, t[h++], t[h++], t[h], t[h + 1], e, n, o)) return !0
  2207. } else a += Tn(r, s, t[h++], t[h++], t[h], t[h + 1], n, o) || 0;
  2208. r = t[h++], s = t[h++];
  2209. break;
  2210. case AS.A:
  2211. var d = t[h++],
  2212. f = t[h++],
  2213. p = t[h++],
  2214. g = t[h++],
  2215. m = t[h++],
  2216. v = t[h++],
  2217. y = (t[h++], 1 - t[h++]),
  2218. x = Math.cos(m) * p + d,
  2219. _ = Math.sin(m) * g + f;
  2220. h > 1 ? a += bn(r, s, x, _, n, o) : (l = x, u = _);
  2221. var w = (n - d) * g / p + d;
  2222. if (i) {
  2223. if (wn(d, f, g, m, m + v, y, e, w, o)) return !0
  2224. } else a += An(d, f, g, m, m + v, y, w, o);
  2225. r = Math.cos(m + v) * p + d, s = Math.sin(m + v) * g + f;
  2226. break;
  2227. case AS.R:
  2228. l = r = t[h++], u = s = t[h++];
  2229. var x = l + t[h++],
  2230. _ = u + t[h++];
  2231. if (i) {
  2232. if (vn(l, u, x, u, e, n, o) || vn(x, u, x, _, e, n, o) || vn(x, _, l, _, e, n, o) || vn(l, _, l, u, e, n, o))
  2233. return !0
  2234. } else a += bn(x, u, x, _, n, o), a += bn(l, _, l, u, n, o);
  2235. break;
  2236. case AS.Z:
  2237. if (i) {
  2238. if (vn(r, s, l, u, e, n, o)) return !0
  2239. } else a += bn(r, s, l, u, n, o);
  2240. r = l, s = u
  2241. }
  2242. }
  2243. return i || Sn(s, u) || (a += bn(r, s, l, u, n, o) || 0), 0 !== a
  2244. }
  2245. function Cn(t, e, i) {
  2246. return Dn(t, 0, !1, e, i)
  2247. }
  2248. function Ln(t, e, i, n) {
  2249. return Dn(t, e, !0, i, n)
  2250. }
  2251. function kn(t) {
  2252. ui.call(this, t), this.path = null
  2253. }
  2254. function Pn(t, e, i, n, o, a, r, s, l, u, h) {
  2255. var c = l * (HS / 180),
  2256. d = WS(c) * (t - i) / 2 + FS(c) * (e - n) / 2,
  2257. f = -1 * FS(c) * (t - i) / 2 + WS(c) * (e - n) / 2,
  2258. p = d * d / (r * r) + f * f / (s * s);
  2259. p > 1 && (r *= GS(p), s *= GS(p));
  2260. var g = (o === a ? -1 : 1) * GS((r * r * (s * s) - r * r * (f * f) - s * s * (d * d)) / (r * r * (f * f) + s * s * (
  2261. d * d))) || 0,
  2262. m = g * r * f / s,
  2263. v = g * -s * d / r,
  2264. y = (t + i) / 2 + WS(c) * m - FS(c) * v,
  2265. x = (e + n) / 2 + FS(c) * m + WS(c) * v,
  2266. _ = XS([1, 0], [(d - m) / r, (f - v) / s]),
  2267. w = [(d - m) / r, (f - v) / s],
  2268. b = [(-1 * d - m) / r, (-1 * f - v) / s],
  2269. S = XS(w, b);
  2270. US(w, b) <= -1 && (S = HS), US(w, b) >= 1 && (S = 0), 0 === a && S > 0 && (S -= 2 * HS), 1 === a && S < 0 && (S += 2 *
  2271. HS), h.addData(u, y, x, r, s, _, S, c, a)
  2272. }
  2273. function Nn(t) {
  2274. if (!t) return new MS;
  2275. for (var e, i = 0, n = 0, o = i, a = n, r = new MS, s = MS.CMD, l = t.match(jS), u = 0; u < l.length; u++) {
  2276. for (var h, c = l[u], d = c.charAt(0), f = c.match(YS) || [], p = f.length, g = 0; g < p; g++) f[g] = parseFloat(f[
  2277. g]);
  2278. for (var m = 0; m < p;) {
  2279. var v, y, x, _, w, b, S, M = i,
  2280. I = n;
  2281. switch (d) {
  2282. case "l":
  2283. i += f[m++], n += f[m++], h = s.L, r.addData(h, i, n);
  2284. break;
  2285. case "L":
  2286. i = f[m++], n = f[m++], h = s.L, r.addData(h, i, n);
  2287. break;
  2288. case "m":
  2289. i += f[m++], n += f[m++], h = s.M, r.addData(h, i, n), o = i, a = n, d = "l";
  2290. break;
  2291. case "M":
  2292. i = f[m++], n = f[m++], h = s.M, r.addData(h, i, n), o = i, a = n, d = "L";
  2293. break;
  2294. case "h":
  2295. i += f[m++], h = s.L, r.addData(h, i, n);
  2296. break;
  2297. case "H":
  2298. i = f[m++], h = s.L, r.addData(h, i, n);
  2299. break;
  2300. case "v":
  2301. n += f[m++], h = s.L, r.addData(h, i, n);
  2302. break;
  2303. case "V":
  2304. n = f[m++], h = s.L, r.addData(h, i, n);
  2305. break;
  2306. case "C":
  2307. h = s.C, r.addData(h, f[m++], f[m++], f[m++], f[m++], f[m++], f[m++]), i = f[m - 2], n = f[m - 1];
  2308. break;
  2309. case "c":
  2310. h = s.C, r.addData(h, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n), i += f[m - 2], n +=
  2311. f[m - 1];
  2312. break;
  2313. case "S":
  2314. v = i, y = n;
  2315. var T = r.len(),
  2316. A = r.data;
  2317. e === s.C && (v += i - A[T - 4], y += n - A[T - 3]), h = s.C, M = f[m++], I = f[m++], i = f[m++], n = f[m++], r.addData(
  2318. h, v, y, M, I, i, n);
  2319. break;
  2320. case "s":
  2321. v = i, y = n;
  2322. var T = r.len(),
  2323. A = r.data;
  2324. e === s.C && (v += i - A[T - 4], y += n - A[T - 3]), h = s.C, M = i + f[m++], I = n + f[m++], i += f[m++], n +=
  2325. f[m++], r.addData(h, v, y, M, I, i, n);
  2326. break;
  2327. case "Q":
  2328. M = f[m++], I = f[m++], i = f[m++], n = f[m++], h = s.Q, r.addData(h, M, I, i, n);
  2329. break;
  2330. case "q":
  2331. M = f[m++] + i, I = f[m++] + n, i += f[m++], n += f[m++], h = s.Q, r.addData(h, M, I, i, n);
  2332. break;
  2333. case "T":
  2334. v = i, y = n;
  2335. var T = r.len(),
  2336. A = r.data;
  2337. e === s.Q && (v += i - A[T - 4], y += n - A[T - 3]), i = f[m++], n = f[m++], h = s.Q, r.addData(h, v, y, i, n);
  2338. break;
  2339. case "t":
  2340. v = i, y = n;
  2341. var T = r.len(),
  2342. A = r.data;
  2343. e === s.Q && (v += i - A[T - 4], y += n - A[T - 3]), i += f[m++], n += f[m++], h = s.Q, r.addData(h, v, y, i, n);
  2344. break;
  2345. case "A":
  2346. x = f[m++], _ = f[m++], w = f[m++], b = f[m++], S = f[m++], Pn(M = i, I = n, i = f[m++], n = f[m++], b, S, x, _,
  2347. w, h = s.A, r);
  2348. break;
  2349. case "a":
  2350. x = f[m++], _ = f[m++], w = f[m++], b = f[m++], S = f[m++], Pn(M = i, I = n, i += f[m++], n += f[m++], b, S, x,
  2351. _, w, h = s.A, r)
  2352. }
  2353. }
  2354. "z" !== d && "Z" !== d || (h = s.Z, r.addData(h), i = o, n = a), e = h
  2355. }
  2356. return r.toStatic(), r
  2357. }
  2358. function On(t, e) {
  2359. var i = Nn(t);
  2360. return e = e || {}, e.buildPath = function(t) {
  2361. if (t.setData) t.setData(i.data), (e = t.getContext()) && t.rebuildPath(e);
  2362. else {
  2363. var e = t;
  2364. i.rebuildPath(e)
  2365. }
  2366. }, e.applyTransform = function(t) {
  2367. VS(i, t), this.dirty(!0)
  2368. }, e
  2369. }
  2370. function En(t, e) {
  2371. return new kn(On(t, e))
  2372. }
  2373. function Rn(t, e) {
  2374. return kn.extend(On(t, e))
  2375. }
  2376. function zn(t, e, i, n, o, a, r) {
  2377. var s = .5 * (i - t),
  2378. l = .5 * (n - e);
  2379. return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e
  2380. }
  2381. function Bn(t, e, i) {
  2382. var n = e.points,
  2383. o = e.smooth;
  2384. if (n && n.length >= 2) {
  2385. if (o && "spline" !== o) {
  2386. var a = iM(n, o, i, e.smoothConstraint);
  2387. t.moveTo(n[0][0], n[0][1]);
  2388. for (var r = n.length, s = 0; s < (i ? r : r - 1); s++) {
  2389. var l = a[2 * s],
  2390. u = a[2 * s + 1],
  2391. h = n[(s + 1) % r];
  2392. t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1])
  2393. }
  2394. } else {
  2395. "spline" === o && (n = eM(n, i)), t.moveTo(n[0][0], n[0][1]);
  2396. for (var s = 1, c = n.length; s < c; s++) t.lineTo(n[s][0], n[s][1])
  2397. }
  2398. i && t.closePath()
  2399. }
  2400. }
  2401. function Vn(t, e, i) {
  2402. var n = t.cpx2,
  2403. o = t.cpy2;
  2404. return null === n || null === o ? [(i ? tn : Qi)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? tn : Qi)(t.y1, t.cpy1, t.cpy2,
  2405. t.y2, e)] : [(i ? sn : rn)(t.x1, t.cpx1, t.x2, e), (i ? sn : rn)(t.y1, t.cpy1, t.y2, e)]
  2406. }
  2407. function Gn(t) {
  2408. ui.call(this, t), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0
  2409. }
  2410. function Fn(t) {
  2411. return kn.extend(t)
  2412. }
  2413. function Wn(t, e, i, n) {
  2414. var o = En(t, e);
  2415. return i && ("center" === n && (i = Zn(i, o.getBoundingRect())), Un(o, i)), o
  2416. }
  2417. function Hn(t, e, i) {
  2418. var n = new hi({
  2419. style: {
  2420. image: t,
  2421. x: e.x,
  2422. y: e.y,
  2423. width: e.width,
  2424. height: e.height
  2425. },
  2426. onload: function(t) {
  2427. if ("center" === i) {
  2428. var o = {
  2429. width: t.width,
  2430. height: t.height
  2431. };
  2432. n.setStyle(Zn(e, o))
  2433. }
  2434. }
  2435. });
  2436. return n
  2437. }
  2438. function Zn(t, e) {
  2439. var i, n = e.width / e.height,
  2440. o = t.height * n;
  2441. return i = o <= t.width ? t.height : (o = t.width) / n, {
  2442. x: t.x + t.width / 2 - o / 2,
  2443. y: t.y + t.height / 2 - i / 2,
  2444. width: o,
  2445. height: i
  2446. }
  2447. }
  2448. function Un(t, e) {
  2449. if (t.applyTransform) {
  2450. var i = t.getBoundingRect().calculateTransform(e);
  2451. t.applyTransform(i)
  2452. }
  2453. }
  2454. function Xn(t) {
  2455. var e = t.shape,
  2456. i = t.style.lineWidth;
  2457. return gM(2 * e.x1) === gM(2 * e.x2) && (e.x1 = e.x2 = Yn(e.x1, i, !0)), gM(2 * e.y1) === gM(2 * e.y2) && (e.y1 = e.y2 =
  2458. Yn(e.y1, i, !0)), t
  2459. }
  2460. function jn(t) {
  2461. var e = t.shape,
  2462. i = t.style.lineWidth,
  2463. n = e.x,
  2464. o = e.y,
  2465. a = e.width,
  2466. r = e.height;
  2467. return e.x = Yn(e.x, i, !0), e.y = Yn(e.y, i, !0), e.width = Math.max(Yn(n + a, i, !1) - e.x, 0 === a ? 0 : 1), e.height =
  2468. Math.max(Yn(o + r, i, !1) - e.y, 0 === r ? 0 : 1), t
  2469. }
  2470. function Yn(t, e, i) {
  2471. var n = gM(2 * t);
  2472. return (n + gM(e)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2
  2473. }
  2474. function qn(t) {
  2475. return null != t && "none" !== t
  2476. }
  2477. function Kn(t) {
  2478. if ("string" != typeof t) return t;
  2479. var e = _M.get(t);
  2480. return e || (e = Gt(t, -.1), wM < 1e4 && (_M.set(t, e), wM++)), e
  2481. }
  2482. function $n(t) {
  2483. if (t.__hoverStlDirty) {
  2484. t.__hoverStlDirty = !1;
  2485. var e = t.__hoverStl;
  2486. if (e) {
  2487. var i = t.__normalStl = {},
  2488. n = t.style;
  2489. for (var o in e) null != e[o] && (i[o] = n[o]);
  2490. i.fill = n.fill, i.stroke = n.stroke
  2491. } else t.__normalStl = null
  2492. }
  2493. }
  2494. function Jn(t) {
  2495. var e = t.__hoverStl;
  2496. if (e && !t.__highlighted) {
  2497. var i = t.useHoverLayer;
  2498. t.__highlighted = i ? "layer" : "plain";
  2499. var n = t.__zr;
  2500. if (n || !i) {
  2501. var o = t,
  2502. a = t.style;
  2503. i && (a = (o = n.addHover(t)).style), xo(a), i || $n(o), a.extendFrom(e), Qn(a, e, "fill"), Qn(a, e, "stroke"), yo(
  2504. a), i || (t.dirty(!1), t.z2 += 1)
  2505. }
  2506. }
  2507. }
  2508. function Qn(t, e, i) {
  2509. !qn(e[i]) && qn(t[i]) && (t[i] = Kn(t[i]))
  2510. }
  2511. function to(t) {
  2512. t.__highlighted && (eo(t), t.__highlighted = !1)
  2513. }
  2514. function eo(t) {
  2515. var e = t.__highlighted;
  2516. if ("layer" === e) t.__zr && t.__zr.removeHover(t);
  2517. else if (e) {
  2518. var i = t.style,
  2519. n = t.__normalStl;
  2520. n && (xo(i), t.setStyle(n), yo(i), t.z2 -= 1)
  2521. }
  2522. }
  2523. function io(t, e) {
  2524. t.isGroup ? t.traverse(function(t) {
  2525. !t.isGroup && e(t)
  2526. }) : e(t)
  2527. }
  2528. function no(t, e) {
  2529. e = t.__hoverStl = !1 !== e && (e || {}), t.__hoverStlDirty = !0, t.__highlighted && (to(t), Jn(t))
  2530. }
  2531. function oo(t) {
  2532. return t && t.__isEmphasisEntered
  2533. }
  2534. function ao(t) {
  2535. this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasisEntered && io(this, Jn)
  2536. }
  2537. function ro(t) {
  2538. this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasisEntered && io(this, to)
  2539. }
  2540. function so() {
  2541. this.__isEmphasisEntered = !0, io(this, Jn)
  2542. }
  2543. function lo() {
  2544. this.__isEmphasisEntered = !1, io(this, to)
  2545. }
  2546. function uo(t, e, i) {
  2547. t.isGroup ? t.traverse(function(t) {
  2548. !t.isGroup && no(t, t.hoverStyle || e)
  2549. }) : no(t, t.hoverStyle || e), ho(t, i)
  2550. }
  2551. function ho(t, e) {
  2552. var i = !1 === e;
  2553. if (t.__hoverSilentOnTouch = null != e && e.hoverSilentOnTouch, !i || t.__hoverStyleTrigger) {
  2554. var n = i ? "off" : "on";
  2555. t[n]("mouseover", ao)[n]("mouseout", ro), t[n]("emphasis", so)[n]("normal", lo), t.__hoverStyleTrigger = !i
  2556. }
  2557. }
  2558. function co(t, e, i, n, o, a, r) {
  2559. var s, l = (o = o || yM).labelFetcher,
  2560. u = o.labelDataIndex,
  2561. h = o.labelDimIndex,
  2562. c = i.getShallow("show"),
  2563. d = n.getShallow("show");
  2564. (c || d) && (l && (s = l.getFormattedLabel(u, "normal", null, h)), null == s && (s = x(o.defaultText) ? o.defaultText(
  2565. u, o) : o.defaultText));
  2566. var f = c ? s : null,
  2567. p = d ? A(l ? l.getFormattedLabel(u, "emphasis", null, h) : null, s) : null;
  2568. null == f && null == p || (fo(t, i, a, o), fo(e, n, r, o, !0)), t.text = f, e.text = p
  2569. }
  2570. function fo(t, e, i, n, o) {
  2571. return po(t, e, n, o), i && a(t, i), t
  2572. }
  2573. function po(t, e, i, n) {
  2574. if ((i = i || yM).isRectText) {
  2575. var o = e.getShallow("position") || (n ? null : "inside");
  2576. "outside" === o && (o = "top"), t.textPosition = o, t.textOffset = e.getShallow("offset");
  2577. var a = e.getShallow("rotate");
  2578. null != a && (a *= Math.PI / 180), t.textRotation = a, t.textDistance = A(e.getShallow("distance"), n ? null : 5)
  2579. }
  2580. var r, s = e.ecModel,
  2581. l = s && s.option.textStyle,
  2582. u = go(e);
  2583. if (u) {
  2584. r = {};
  2585. for (var h in u)
  2586. if (u.hasOwnProperty(h)) {
  2587. var c = e.getModel(["rich", h]);
  2588. mo(r[h] = {}, c, l, i, n)
  2589. }
  2590. }
  2591. return t.rich = r, mo(t, e, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), t
  2592. }
  2593. function go(t) {
  2594. for (var e; t && t !== t.ecModel;) {
  2595. var i = (t.option || yM).rich;
  2596. if (i) {
  2597. e = e || {};
  2598. for (var n in i) i.hasOwnProperty(n) && (e[n] = 1)
  2599. }
  2600. t = t.parentModel
  2601. }
  2602. return e
  2603. }
  2604. function mo(t, e, i, n, o, a) {
  2605. i = !o && i || yM, t.textFill = vo(e.getShallow("color"), n) || i.color, t.textStroke = vo(e.getShallow(
  2606. "textBorderColor"), n) || i.textBorderColor, t.textStrokeWidth = A(e.getShallow("textBorderWidth"), i.textBorderWidth),
  2607. t.insideRawTextPosition = t.textPosition, o || (a && (t.insideRollbackOpt = n, yo(t)), null == t.textFill && (t.textFill =
  2608. n.autoColor)), t.fontStyle = e.getShallow("fontStyle") || i.fontStyle, t.fontWeight = e.getShallow("fontWeight") ||
  2609. i.fontWeight, t.fontSize = e.getShallow("fontSize") || i.fontSize, t.fontFamily = e.getShallow("fontFamily") || i.fontFamily,
  2610. t.textAlign = e.getShallow("align"), t.textVerticalAlign = e.getShallow("verticalAlign") || e.getShallow("baseline"),
  2611. t.textLineHeight = e.getShallow("lineHeight"), t.textWidth = e.getShallow("width"), t.textHeight = e.getShallow(
  2612. "height"), t.textTag = e.getShallow("tag"), a && n.disableBox || (t.textBackgroundColor = vo(e.getShallow(
  2613. "backgroundColor"), n), t.textPadding = e.getShallow("padding"), t.textBorderColor = vo(e.getShallow(
  2614. "borderColor"), n), t.textBorderWidth = e.getShallow("borderWidth"), t.textBorderRadius = e.getShallow(
  2615. "borderRadius"), t.textBoxShadowColor = e.getShallow("shadowColor"), t.textBoxShadowBlur = e.getShallow(
  2616. "shadowBlur"), t.textBoxShadowOffsetX = e.getShallow("shadowOffsetX"), t.textBoxShadowOffsetY = e.getShallow(
  2617. "shadowOffsetY")), t.textShadowColor = e.getShallow("textShadowColor") || i.textShadowColor, t.textShadowBlur = e.getShallow(
  2618. "textShadowBlur") || i.textShadowBlur, t.textShadowOffsetX = e.getShallow("textShadowOffsetX") || i.textShadowOffsetX,
  2619. t.textShadowOffsetY = e.getShallow("textShadowOffsetY") || i.textShadowOffsetY
  2620. }
  2621. function vo(t, e) {
  2622. return "auto" !== t ? t : e && e.autoColor ? e.autoColor : null
  2623. }
  2624. function yo(t) {
  2625. var e = t.insideRollbackOpt;
  2626. if (e && null == t.textFill) {
  2627. var i, n = e.useInsideStyle,
  2628. o = t.insideRawTextPosition,
  2629. a = e.autoColor;
  2630. !1 !== n && (!0 === n || e.isRectText && o && "string" == typeof o && o.indexOf("inside") >= 0) ? (i = {
  2631. textFill: null,
  2632. textStroke: t.textStroke,
  2633. textStrokeWidth: t.textStrokeWidth
  2634. }, t.textFill = "#fff", null == t.textStroke && (t.textStroke = a, null == t.textStrokeWidth && (t.textStrokeWidth =
  2635. 2))) : null != a && (i = {
  2636. textFill: null
  2637. }, t.textFill = a), i && (t.insideRollback = i)
  2638. }
  2639. }
  2640. function xo(t) {
  2641. var e = t.insideRollback;
  2642. e && (t.textFill = e.textFill, t.textStroke = e.textStroke, t.textStrokeWidth = e.textStrokeWidth, t.insideRollback =
  2643. null)
  2644. }
  2645. function _o(t, e) {
  2646. var i = e || e.getModel("textStyle");
  2647. return P([t.fontStyle || i && i.getShallow("fontStyle") || "", t.fontWeight || i && i.getShallow("fontWeight") || "",
  2648. (t.fontSize || i && i.getShallow("fontSize") || 12) + "px", t.fontFamily || i && i.getShallow("fontFamily") ||
  2649. "sans-serif"
  2650. ].join(" "))
  2651. }
  2652. function wo(t, e, i, n, o, a) {
  2653. if ("function" == typeof o && (a = o, o = null), n && n.isAnimationEnabled()) {
  2654. var r = t ? "Update" : "",
  2655. s = n.getShallow("animationDuration" + r),
  2656. l = n.getShallow("animationEasing" + r),
  2657. u = n.getShallow("animationDelay" + r);
  2658. "function" == typeof u && (u = u(o, n.getAnimationDelayParams ? n.getAnimationDelayParams(e, o) : null)),
  2659. "function" == typeof s && (s = s(o)), s > 0 ? e.animateTo(i, s, u || 0, l, a, !!a) : (e.stopAnimation(), e.attr(i),
  2660. a && a())
  2661. } else e.stopAnimation(), e.attr(i), a && a()
  2662. }
  2663. function bo(t, e, i, n, o) {
  2664. wo(!0, t, e, i, n, o)
  2665. }
  2666. function So(t, e, i, n, o) {
  2667. wo(!1, t, e, i, n, o)
  2668. }
  2669. function Mo(t, e) {
  2670. for (var i = vt([]); t && t !== e;) xt(i, t.getLocalTransform(), i), t = t.parent;
  2671. return i
  2672. }
  2673. function Io(t, e, i) {
  2674. return e && !c(e) && (e = mw.getLocalTransform(e)), i && (e = St([], e)), Q([], t, e)
  2675. }
  2676. function To(t, e, i) {
  2677. var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]),
  2678. o = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]),
  2679. a = ["left" === t ? -n : "right" === t ? n : 0, "top" === t ? -o : "bottom" === t ? o : 0];
  2680. return a = Io(a, e, i), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top"
  2681. }
  2682. function Ao(t, e, i, n) {
  2683. function o(t) {
  2684. var e = {
  2685. position: F(t.position),
  2686. rotation: t.rotation
  2687. };
  2688. return t.shape && (e.shape = a({}, t.shape)), e
  2689. }
  2690. if (t && e) {
  2691. var r = function(t) {
  2692. var e = {};
  2693. return t.traverse(function(t) {
  2694. !t.isGroup && t.anid && (e[t.anid] = t)
  2695. }), e
  2696. }(t);
  2697. e.traverse(function(t) {
  2698. if (!t.isGroup && t.anid) {
  2699. var e = r[t.anid];
  2700. if (e) {
  2701. var n = o(t);
  2702. t.attr(o(e)), bo(t, n, i, t.dataIndex)
  2703. }
  2704. }
  2705. })
  2706. }
  2707. }
  2708. function Do(t, e) {
  2709. return f(t, function(t) {
  2710. var i = t[0];
  2711. i = mM(i, e.x), i = vM(i, e.x + e.width);
  2712. var n = t[1];
  2713. return n = mM(n, e.y), n = vM(n, e.y + e.height), [i, n]
  2714. })
  2715. }
  2716. function Co(t, e, i) {
  2717. var n = (e = a({
  2718. rectHover: !0
  2719. }, e)).style = {
  2720. strokeNoScale: !0
  2721. };
  2722. if (i = i || {
  2723. x: -1,
  2724. y: -1,
  2725. width: 2,
  2726. height: 2
  2727. }, t) return 0 === t.indexOf("image://") ? (n.image = t.slice(8), r(n, i), new hi(e)) : Wn(t.replace("path://", ""),
  2728. e, i, "center")
  2729. }
  2730. function Lo(t, e, i) {
  2731. this.parentModel = e, this.ecModel = i, this.option = t
  2732. }
  2733. function ko(t, e, i) {
  2734. for (var n = 0; n < e.length && (!e[n] || null != (t = t && "object" == typeof t ? t[e[n]] : null)); n++);
  2735. return null == t && i && (t = i.get(e)), t
  2736. }
  2737. function Po(t, e) {
  2738. var i = DM(t).getParent;
  2739. return i ? i.call(t, e) : t.parentModel
  2740. }
  2741. function No(t) {
  2742. return [t || "", CM++, Math.random().toFixed(5)].join("_")
  2743. }
  2744. function Oo(t) {
  2745. return t.replace(/^\s+/, "").replace(/\s+$/, "")
  2746. }
  2747. function Eo(t, e, i, n) {
  2748. var o = e[1] - e[0],
  2749. a = i[1] - i[0];
  2750. if (0 === o) return 0 === a ? i[0] : (i[0] + i[1]) / 2;
  2751. if (n)
  2752. if (o > 0) {
  2753. if (t <= e[0]) return i[0];
  2754. if (t >= e[1]) return i[1]
  2755. } else {
  2756. if (t >= e[0]) return i[0];
  2757. if (t <= e[1]) return i[1]
  2758. }
  2759. else {
  2760. if (t === e[0]) return i[0];
  2761. if (t === e[1]) return i[1]
  2762. }
  2763. return (t - e[0]) / o * a + i[0]
  2764. }
  2765. function Ro(t, e) {
  2766. switch (t) {
  2767. case "center":
  2768. case "middle":
  2769. t = "50%";
  2770. break;
  2771. case "left":
  2772. case "top":
  2773. t = "0%";
  2774. break;
  2775. case "right":
  2776. case "bottom":
  2777. t = "100%"
  2778. }
  2779. return "string" == typeof t ? Oo(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? NaN : +t
  2780. }
  2781. function zo(t, e, i) {
  2782. return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), i ? t : +t
  2783. }
  2784. function Bo(t) {
  2785. return t.sort(function(t, e) {
  2786. return t - e
  2787. }), t
  2788. }
  2789. function Vo(t) {
  2790. if (t = +t, isNaN(t)) return 0;
  2791. for (var e = 1, i = 0; Math.round(t * e) / e !== t;) e *= 10, i++;
  2792. return i
  2793. }
  2794. function Go(t) {
  2795. var e = t.toString(),
  2796. i = e.indexOf("e");
  2797. if (i > 0) {
  2798. var n = +e.slice(i + 1);
  2799. return n < 0 ? -n : 0
  2800. }
  2801. var o = e.indexOf(".");
  2802. return o < 0 ? 0 : e.length - 1 - o
  2803. }
  2804. function Fo(t, e) {
  2805. var i = Math.log,
  2806. n = Math.LN10,
  2807. o = Math.floor(i(t[1] - t[0]) / n),
  2808. a = Math.round(i(Math.abs(e[1] - e[0])) / n),
  2809. r = Math.min(Math.max(-o + a, 0), 20);
  2810. return isFinite(r) ? r : 20
  2811. }
  2812. function Wo(t, e, i) {
  2813. if (!t[e]) return 0;
  2814. var n = p(t, function(t, e) {
  2815. return t + (isNaN(e) ? 0 : e)
  2816. }, 0);
  2817. if (0 === n) return 0;
  2818. for (var o = Math.pow(10, i), a = f(t, function(t) {
  2819. return (isNaN(t) ? 0 : t) / n * o * 100
  2820. }), r = 100 * o, s = f(a, function(t) {
  2821. return Math.floor(t)
  2822. }), l = p(s, function(t, e) {
  2823. return t + e
  2824. }, 0), u = f(a, function(t, e) {
  2825. return t - s[e]
  2826. }); l < r;) {
  2827. for (var h = Number.NEGATIVE_INFINITY, c = null, d = 0, g = u.length; d < g; ++d) u[d] > h && (h = u[d], c = d);
  2828. ++s[c], u[c] = 0, ++l
  2829. }
  2830. return s[e] / o
  2831. }
  2832. function Ho(t) {
  2833. var e = 2 * Math.PI;
  2834. return (t % e + e) % e
  2835. }
  2836. function Zo(t) {
  2837. return t > -LM && t < LM
  2838. }
  2839. function Uo(t) {
  2840. if (t instanceof Date) return t;
  2841. if ("string" == typeof t) {
  2842. var e = PM.exec(t);
  2843. if (!e) return new Date(NaN);
  2844. if (e[8]) {
  2845. var i = +e[4] || 0;
  2846. return "Z" !== e[8].toUpperCase() && (i -= e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] ||
  2847. 1, i, +(e[5] || 0), +e[6] || 0, +e[7] || 0))
  2848. }
  2849. return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, +e[7] || 0)
  2850. }
  2851. return null == t ? new Date(NaN) : new Date(Math.round(t))
  2852. }
  2853. function Xo(t) {
  2854. return Math.pow(10, jo(t))
  2855. }
  2856. function jo(t) {
  2857. return Math.floor(Math.log(t) / Math.LN10)
  2858. }
  2859. function Yo(t, e) {
  2860. var i, n = jo(t),
  2861. o = Math.pow(10, n),
  2862. a = t / o;
  2863. 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 ?
  2864. 5 : 10, t = i * o, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t
  2865. }
  2866. function qo(t) {
  2867. function e(t, i, n) {
  2868. return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] == (n ? -1 : 1) ||
  2869. !n && e(t, i, 1))
  2870. }
  2871. t.sort(function(t, i) {
  2872. return e(t, i, 0) ? -1 : 1
  2873. });
  2874. for (var i = -1 / 0, n = 1, o = 0; o < t.length;) {
  2875. for (var a = t[o].interval, r = t[o].close, s = 0; s < 2; s++) a[s] <= i && (a[s] = i, r[s] = s ? 1 : 1 - n), i = a[
  2876. s], n = r[s];
  2877. a[0] === a[1] && r[0] * r[1] != 1 ? t.splice(o, 1) : o++
  2878. }
  2879. return t
  2880. }
  2881. function Ko(t) {
  2882. return t - parseFloat(t) >= 0
  2883. }
  2884. function $o(t) {
  2885. return isNaN(t) ? "-" : (t = (t + "").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length >
  2886. 1 ? "." + t[1] : "")
  2887. }
  2888. function Jo(t, e) {
  2889. return t = (t || "").toLowerCase().replace(/-(.)/g, function(t, e) {
  2890. return e.toUpperCase()
  2891. }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t
  2892. }
  2893. function Qo(t) {
  2894. return null == t ? "" : (t + "").replace(EM, function(t, e) {
  2895. return RM[e]
  2896. })
  2897. }
  2898. function ta(t, e, i) {
  2899. y(e) || (e = [e]);
  2900. var n = e.length;
  2901. if (!n) return "";
  2902. for (var o = e[0].$vars || [], a = 0; a < o.length; a++) {
  2903. var r = zM[a];
  2904. t = t.replace(BM(r), BM(r, 0))
  2905. }
  2906. for (var s = 0; s < n; s++)
  2907. for (var l = 0; l < o.length; l++) {
  2908. var u = e[s][o[l]];
  2909. t = t.replace(BM(zM[l], s), i ? Qo(u) : u)
  2910. }
  2911. return t
  2912. }
  2913. function ea(t, e, i) {
  2914. return d(e, function(e, n) {
  2915. t = t.replace("{" + n + "}", i ? Qo(e) : e)
  2916. }), t
  2917. }
  2918. function ia(t, e) {
  2919. var i = (t = _(t) ? {
  2920. color: t,
  2921. extraCssText: e
  2922. } : t || {}).color,
  2923. n = t.type,
  2924. e = t.extraCssText,
  2925. o = t.renderMode || "html",
  2926. a = t.markerId || "X";
  2927. return i ? "html" === o ? "subItem" === n ?
  2928. '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' +
  2929. Qo(i) + ";" + (e || "") + '"></span>' :
  2930. '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' +
  2931. Qo(i) + ";" + (e || "") + '"></span>' : {
  2932. renderMode: o,
  2933. content: "{marker" + a + "|} ",
  2934. style: {
  2935. color: i
  2936. }
  2937. } : ""
  2938. }
  2939. function na(t, e) {
  2940. return t += "", "0000".substr(0, e - t.length) + t
  2941. }
  2942. function oa(t, e, i) {
  2943. "week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "MM-dd\nyyyy");
  2944. var n = Uo(e),
  2945. o = i ? "UTC" : "",
  2946. a = n["get" + o + "FullYear"](),
  2947. r = n["get" + o + "Month"]() + 1,
  2948. s = n["get" + o + "Date"](),
  2949. l = n["get" + o + "Hours"](),
  2950. u = n["get" + o + "Minutes"](),
  2951. h = n["get" + o + "Seconds"](),
  2952. c = n["get" + o + "Milliseconds"]();
  2953. return t = t.replace("MM", na(r, 2)).replace("M", r).replace("yyyy", a).replace("yy", a % 100).replace("dd", na(s, 2))
  2954. .replace("d", s).replace("hh", na(l, 2)).replace("h", l).replace("mm", na(u, 2)).replace("m", u).replace("ss", na(h,
  2955. 2)).replace("s", h).replace("SSS", na(c, 3))
  2956. }
  2957. function aa(t) {
  2958. return t ? t.charAt(0).toUpperCase() + t.substr(1) : t
  2959. }
  2960. function ra(t, e, i, n, o) {
  2961. var a = 0,
  2962. r = 0;
  2963. null == n && (n = 1 / 0), null == o && (o = 1 / 0);
  2964. var s = 0;
  2965. e.eachChild(function(l, u) {
  2966. var h, c, d = l.position,
  2967. f = l.getBoundingRect(),
  2968. p = e.childAt(u + 1),
  2969. g = p && p.getBoundingRect();
  2970. if ("horizontal" === t) {
  2971. var m = f.width + (g ? -g.x + f.x : 0);
  2972. (h = a + m) > n || l.newline ? (a = 0, h = m, r += s + i, s = f.height) : s = Math.max(s, f.height)
  2973. } else {
  2974. var v = f.height + (g ? -g.y + f.y : 0);
  2975. (c = r + v) > o || l.newline ? (a += s + i, r = 0, c = v, s = f.width) : s = Math.max(s, f.width)
  2976. }
  2977. l.newline || (d[0] = a, d[1] = r, "horizontal" === t ? a = h + i : r = c + i)
  2978. })
  2979. }
  2980. function sa(t, e, i) {
  2981. var n = e.width,
  2982. o = e.height,
  2983. a = Ro(t.x, n),
  2984. r = Ro(t.y, o),
  2985. s = Ro(t.x2, n),
  2986. l = Ro(t.y2, o);
  2987. return (isNaN(a) || isNaN(parseFloat(t.x))) && (a = 0), (isNaN(s) || isNaN(parseFloat(t.x2))) && (s = n), (isNaN(r) ||
  2988. isNaN(parseFloat(t.y))) && (r = 0), (isNaN(l) || isNaN(parseFloat(t.y2))) && (l = o), i = OM(i || 0), {
  2989. width: Math.max(s - a - i[1] - i[3], 0),
  2990. height: Math.max(l - r - i[0] - i[2], 0)
  2991. }
  2992. }
  2993. function la(t, e, i) {
  2994. i = OM(i || 0);
  2995. var n = e.width,
  2996. o = e.height,
  2997. a = Ro(t.left, n),
  2998. r = Ro(t.top, o),
  2999. s = Ro(t.right, n),
  3000. l = Ro(t.bottom, o),
  3001. u = Ro(t.width, n),
  3002. h = Ro(t.height, o),
  3003. c = i[2] + i[0],
  3004. d = i[1] + i[3],
  3005. f = t.aspect;
  3006. switch (isNaN(u) && (u = n - s - d - a), isNaN(h) && (h = o - l - c - r), null != f && (isNaN(u) && isNaN(h) && (f >
  3007. n / o ? u = .8 * n : h = .8 * o), isNaN(u) && (u = f * h), isNaN(h) && (h = u / f)), isNaN(a) && (a = n - s - u -
  3008. d), isNaN(r) && (r = o - l - h - c), t.left || t.right) {
  3009. case "center":
  3010. a = n / 2 - u / 2 - i[3];
  3011. break;
  3012. case "right":
  3013. a = n - u - d
  3014. }
  3015. switch (t.top || t.bottom) {
  3016. case "middle":
  3017. case "center":
  3018. r = o / 2 - h / 2 - i[0];
  3019. break;
  3020. case "bottom":
  3021. r = o - h - c
  3022. }
  3023. a = a || 0, r = r || 0, isNaN(u) && (u = n - d - a - (s || 0)), isNaN(h) && (h = o - c - r - (l || 0));
  3024. var p = new ue(a + i[3], r + i[0], u, h);
  3025. return p.margin = i, p
  3026. }
  3027. function ua(t, e, i, n, o) {
  3028. var a = !o || !o.hv || o.hv[0],
  3029. s = !o || !o.hv || o.hv[1],
  3030. l = o && o.boundingMode || "all";
  3031. if (a || s) {
  3032. var u;
  3033. if ("raw" === l) u = "group" === t.type ? new ue(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
  3034. else if (u = t.getBoundingRect(), t.needLocalTransform()) {
  3035. var h = t.getLocalTransform();
  3036. (u = u.clone()).applyTransform(h)
  3037. }
  3038. e = la(r({
  3039. width: u.width,
  3040. height: u.height
  3041. }, e), i, n);
  3042. var c = t.position,
  3043. d = a ? e.x - u.x : 0,
  3044. f = s ? e.y - u.y : 0;
  3045. t.attr("position", "raw" === l ? [d, f] : [c[0] + d, c[1] + f])
  3046. }
  3047. }
  3048. function ha(t, e) {
  3049. return null != t[ZM[e][0]] || null != t[ZM[e][1]] && null != t[ZM[e][2]]
  3050. }
  3051. function ca(t, e, i) {
  3052. function n(i, n) {
  3053. var r = {},
  3054. l = 0,
  3055. u = {},
  3056. h = 0;
  3057. if (WM(i, function(e) {
  3058. u[e] = t[e]
  3059. }), WM(i, function(t) {
  3060. o(e, t) && (r[t] = u[t] = e[t]), a(r, t) && l++, a(u, t) && h++
  3061. }), s[n]) return a(e, i[1]) ? u[i[2]] = null : a(e, i[2]) && (u[i[1]] = null), u;
  3062. if (2 !== h && l) {
  3063. if (l >= 2) return r;
  3064. for (var c = 0; c < i.length; c++) {
  3065. var d = i[c];
  3066. if (!o(r, d) && o(t, d)) {
  3067. r[d] = t[d];
  3068. break
  3069. }
  3070. }
  3071. return r
  3072. }
  3073. return u
  3074. }
  3075. function o(t, e) {
  3076. return t.hasOwnProperty(e)
  3077. }
  3078. function a(t, e) {
  3079. return null != t[e] && "auto" !== t[e]
  3080. }
  3081. function r(t, e, i) {
  3082. WM(t, function(t) {
  3083. e[t] = i[t]
  3084. })
  3085. }!w(i) && (i = {});
  3086. var s = i.ignoreSize;
  3087. !y(s) && (s = [s, s]);
  3088. var l = n(ZM[0], 0),
  3089. u = n(ZM[1], 1);
  3090. r(ZM[0], t, l), r(ZM[1], t, u)
  3091. }
  3092. function da(t) {
  3093. return fa({}, t)
  3094. }
  3095. function fa(t, e) {
  3096. return e && t && WM(HM, function(i) {
  3097. e.hasOwnProperty(i) && (t[i] = e[i])
  3098. }), t
  3099. }
  3100. function pa(t, e) {
  3101. for (var i = t.length, n = 0; n < i; n++)
  3102. if (t[n].length > e) return t[n];
  3103. return t[i - 1]
  3104. }
  3105. function ga(t) {
  3106. var e = t.get("coordinateSystem"),
  3107. i = {
  3108. coordSysName: e,
  3109. coordSysDims: [],
  3110. axisMap: R(),
  3111. categoryAxisMap: R()
  3112. },
  3113. n = QM[e];
  3114. if (n) return n(t, i, i.axisMap, i.categoryAxisMap), i
  3115. }
  3116. function ma(t) {
  3117. return "category" === t.get("type")
  3118. }
  3119. function va(t) {
  3120. this.fromDataset = t.fromDataset, this.data = t.data || (t.sourceFormat === nI ? {} : []), this.sourceFormat = t.sourceFormat ||
  3121. oI, this.seriesLayoutBy = t.seriesLayoutBy || rI, this.dimensionsDefine = t.dimensionsDefine, this.encodeDefine = t
  3122. .encodeDefine && R(t.encodeDefine), this.startIndex = t.startIndex || 0, this.dimensionsDetectCount = t.dimensionsDetectCount
  3123. }
  3124. function ya(t) {
  3125. var e = t.option.source,
  3126. i = oI;
  3127. if (S(e)) i = aI;
  3128. else if (y(e)) {
  3129. 0 === e.length && (i = eI);
  3130. for (var n = 0, o = e.length; n < o; n++) {
  3131. var a = e[n];
  3132. if (null != a) {
  3133. if (y(a)) {
  3134. i = eI;
  3135. break
  3136. }
  3137. if (w(a)) {
  3138. i = iI;
  3139. break
  3140. }
  3141. }
  3142. }
  3143. } else if (w(e)) {
  3144. for (var r in e)
  3145. if (e.hasOwnProperty(r) && c(e[r])) {
  3146. i = nI;
  3147. break
  3148. }
  3149. } else if (null != e) throw new Error("Invalid data");
  3150. lI(t).sourceFormat = i
  3151. }
  3152. function xa(t) {
  3153. return lI(t).source
  3154. }
  3155. function _a(t) {
  3156. lI(t).datasetMap = R()
  3157. }
  3158. function wa(t) {
  3159. var e = t.option,
  3160. i = e.data,
  3161. n = S(i) ? aI : tI,
  3162. o = !1,
  3163. a = e.seriesLayoutBy,
  3164. r = e.sourceHeader,
  3165. s = e.dimensions,
  3166. l = Aa(t);
  3167. if (l) {
  3168. var u = l.option;
  3169. i = u.source, n = lI(l).sourceFormat, o = !0, a = a || u.seriesLayoutBy, null == r && (r = u.sourceHeader), s = s ||
  3170. u.dimensions
  3171. }
  3172. var h = ba(i, n, a, r, s),
  3173. c = e.encode;
  3174. !c && l && (c = Ta(t, l, i, n, a, h)), lI(t).source = new va({
  3175. data: i,
  3176. fromDataset: o,
  3177. seriesLayoutBy: a,
  3178. sourceFormat: n,
  3179. dimensionsDefine: h.dimensionsDefine,
  3180. startIndex: h.startIndex,
  3181. dimensionsDetectCount: h.dimensionsDetectCount,
  3182. encodeDefine: c
  3183. })
  3184. }
  3185. function ba(t, e, i, n, o) {
  3186. if (!t) return {
  3187. dimensionsDefine: Sa(o)
  3188. };
  3189. var a, r, s;
  3190. if (e === eI) "auto" === n || null == n ? Ma(function(t) {
  3191. null != t && "-" !== t && (_(t) ? null == r && (r = 1) : r = 0)
  3192. }, i, t, 10) : r = n ? 1 : 0, o || 1 !== r || (o = [], Ma(function(t, e) {
  3193. o[e] = null != t ? t : ""
  3194. }, i, t)), a = o ? o.length : i === sI ? t.length : t[0] ? t[0].length : null;
  3195. else if (e === iI) o || (o = Ia(t), s = !0);
  3196. else if (e === nI) o || (o = [], s = !0, d(t, function(t, e) {
  3197. o.push(e)
  3198. }));
  3199. else if (e === tI) {
  3200. var l = Li(t[0]);
  3201. a = y(l) && l.length || 1
  3202. }
  3203. var u;
  3204. return s && d(o, function(t, e) {
  3205. "name" === (w(t) ? t.name : t) && (u = e)
  3206. }), {
  3207. startIndex: r,
  3208. dimensionsDefine: Sa(o),
  3209. dimensionsDetectCount: a,
  3210. potentialNameDimIndex: u
  3211. }
  3212. }
  3213. function Sa(t) {
  3214. if (t) {
  3215. var e = R();
  3216. return f(t, function(t, i) {
  3217. if (null == (t = a({}, w(t) ? t : {
  3218. name: t
  3219. })).name) return t;
  3220. t.name += "", null == t.displayName && (t.displayName = t.name);
  3221. var n = e.get(t.name);
  3222. return n ? t.name += "-" + n.count++ : e.set(t.name, {
  3223. count: 1
  3224. }), t
  3225. })
  3226. }
  3227. }
  3228. function Ma(t, e, i, n) {
  3229. if (null == n && (n = 1 / 0), e === sI)
  3230. for (a = 0; a < i.length && a < n; a++) t(i[a] ? i[a][0] : null, a);
  3231. else
  3232. for (var o = i[0] || [], a = 0; a < o.length && a < n; a++) t(o[a], a)
  3233. }
  3234. function Ia(t) {
  3235. for (var e, i = 0; i < t.length && !(e = t[i++]););
  3236. if (e) {
  3237. var n = [];
  3238. return d(e, function(t, e) {
  3239. n.push(e)
  3240. }), n
  3241. }
  3242. }
  3243. function Ta(t, e, i, n, o, a) {
  3244. var r = ga(t),
  3245. s = {},
  3246. l = [],
  3247. u = [],
  3248. h = t.subType,
  3249. c = R(["pie", "map", "funnel"]),
  3250. f = R(["line", "bar", "pictorialBar", "scatter", "effectScatter", "candlestick", "boxplot"]);
  3251. if (r && null != f.get(h)) {
  3252. var p = t.ecModel,
  3253. g = lI(p).datasetMap,
  3254. m = e.uid + "_" + o,
  3255. v = g.get(m) || g.set(m, {
  3256. categoryWayDim: 1,
  3257. valueWayDim: 0
  3258. });
  3259. d(r.coordSysDims, function(t) {
  3260. if (null == r.firstCategoryDimIndex) {
  3261. e = v.valueWayDim++;
  3262. s[t] = e, u.push(e)
  3263. } else if (r.categoryAxisMap.get(t)) s[t] = 0, l.push(0);
  3264. else {
  3265. var e = v.categoryWayDim++;
  3266. s[t] = e, u.push(e)
  3267. }
  3268. })
  3269. } else if (null != c.get(h)) {
  3270. for (var y, x = 0; x < 5 && null == y; x++) Ca(i, n, o, a.dimensionsDefine, a.startIndex, x) || (y = x);
  3271. if (null != y) {
  3272. s.value = y;
  3273. var _ = a.potentialNameDimIndex || Math.max(y - 1, 0);
  3274. u.push(_), l.push(_)
  3275. }
  3276. }
  3277. return l.length && (s.itemName = l), u.length && (s.seriesName = u), s
  3278. }
  3279. function Aa(t) {
  3280. var e = t.option;
  3281. if (!e.data) return t.ecModel.getComponent("dataset", e.datasetIndex || 0)
  3282. }
  3283. function Da(t, e) {
  3284. return Ca(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e)
  3285. }
  3286. function Ca(t, e, i, n, o, a) {
  3287. function r(t) {
  3288. return (null == t || !isFinite(t) || "" === t) && (!(!_(t) || "-" === t) || void 0)
  3289. }
  3290. var s;
  3291. if (S(t)) return !1;
  3292. var l;
  3293. if (n && (l = w(l = n[a]) ? l.name : l), e === eI)
  3294. if (i === sI) {
  3295. for (var u = t[a], h = 0; h < (u || []).length && h < 5; h++)
  3296. if (null != (s = r(u[o + h]))) return s
  3297. } else
  3298. for (h = 0; h < t.length && h < 5; h++) {
  3299. var c = t[o + h];
  3300. if (c && null != (s = r(c[a]))) return s
  3301. } else if (e === iI) {
  3302. if (!l) return;
  3303. for (h = 0; h < t.length && h < 5; h++)
  3304. if ((d = t[h]) && null != (s = r(d[l]))) return s
  3305. } else if (e === nI) {
  3306. if (!l) return;
  3307. if (!(u = t[l]) || S(u)) return !1;
  3308. for (h = 0; h < u.length && h < 5; h++)
  3309. if (null != (s = r(u[h]))) return s
  3310. } else if (e === tI)
  3311. for (h = 0; h < t.length && h < 5; h++) {
  3312. var d = t[h],
  3313. f = Li(d);
  3314. if (!y(f)) return !1;
  3315. if (null != (s = r(f[a]))) return s
  3316. }
  3317. return !1
  3318. }
  3319. function La(t, e) {
  3320. if (e) {
  3321. var i = e.seiresIndex,
  3322. n = e.seriesId,
  3323. o = e.seriesName;
  3324. return null != i && t.componentIndex !== i || null != n && t.id !== n || null != o && t.name !== o
  3325. }
  3326. }
  3327. function ka(t, e) {
  3328. var o = t.color && !t.colorLayer;
  3329. d(e, function(e, a) {
  3330. "colorLayer" === a && o || YM.hasClass(a) || ("object" == typeof e ? t[a] = t[a] ? n(t[a], e, !1) : i(e) : null ==
  3331. t[a] && (t[a] = e))
  3332. })
  3333. }
  3334. function Pa(t) {
  3335. t = t, this.option = {}, this.option[uI] = 1, this._componentsMap = R({
  3336. series: []
  3337. }), this._seriesIndices, this._seriesIndicesMap, ka(t, this._theme.option), n(t, KM, !1), this.mergeOption(t)
  3338. }
  3339. function Na(t, e) {
  3340. y(e) || (e = e ? [e] : []);
  3341. var i = {};
  3342. return d(e, function(e) {
  3343. i[e] = (t.get(e) || []).slice()
  3344. }), i
  3345. }
  3346. function Oa(t, e, i) {
  3347. return e.type ? e.type : i ? i.subType : YM.determineSubType(t, e)
  3348. }
  3349. function Ea(t, e) {
  3350. t._seriesIndicesMap = R(t._seriesIndices = f(e, function(t) {
  3351. return t.componentIndex
  3352. }) || [])
  3353. }
  3354. function Ra(t, e) {
  3355. return e.hasOwnProperty("subType") ? g(t, function(t) {
  3356. return t.subType === e.subType
  3357. }) : t
  3358. }
  3359. function za(t) {
  3360. d(cI, function(e) {
  3361. this[e] = m(t[e], t)
  3362. }, this)
  3363. }
  3364. function Ba() {
  3365. this._coordinateSystems = []
  3366. }
  3367. function Va(t) {
  3368. this._api = t, this._timelineOptions = [], this._mediaList = [], this._mediaDefault, this._currentMediaIndices = [],
  3369. this._optionBackup, this._newBaseOption
  3370. }
  3371. function Ga(t, e, i) {
  3372. var n, o, a = [],
  3373. r = [],
  3374. s = t.timeline;
  3375. if (t.baseOption && (o = t.baseOption), (s || t.options) && (o = o || {}, a = (t.options || []).slice()), t.media) {
  3376. o = o || {};
  3377. var l = t.media;
  3378. fI(l, function(t) {
  3379. t && t.option && (t.query ? r.push(t) : n || (n = t))
  3380. })
  3381. }
  3382. return o || (o = t), o.timeline || (o.timeline = s), fI([o].concat(a).concat(f(r, function(t) {
  3383. return t.option
  3384. })), function(t) {
  3385. fI(e, function(e) {
  3386. e(t, i)
  3387. })
  3388. }), {
  3389. baseOption: o,
  3390. timelineOptions: a,
  3391. mediaDefault: n,
  3392. mediaList: r
  3393. }
  3394. }
  3395. function Fa(t, e, i) {
  3396. var n = {
  3397. width: e,
  3398. height: i,
  3399. aspectratio: e / i
  3400. },
  3401. o = !0;
  3402. return d(t, function(t, e) {
  3403. var i = e.match(vI);
  3404. if (i && i[1] && i[2]) {
  3405. var a = i[1],
  3406. r = i[2].toLowerCase();
  3407. Wa(n[r], t, a) || (o = !1)
  3408. }
  3409. }), o
  3410. }
  3411. function Wa(t, e, i) {
  3412. return "min" === i ? t >= e : "max" === i ? t <= e : t === e
  3413. }
  3414. function Ha(t, e) {
  3415. return t.join(",") === e.join(",")
  3416. }
  3417. function Za(t, e) {
  3418. fI(e = e || {}, function(e, i) {
  3419. if (null != e) {
  3420. var n = t[i];
  3421. if (YM.hasClass(i)) {
  3422. e = Di(e);
  3423. var o = Pi(n = Di(n), e);
  3424. t[i] = gI(o, function(t) {
  3425. return t.option && t.exist ? mI(t.exist, t.option, !0) : t.exist || t.option
  3426. })
  3427. } else t[i] = mI(n, e, !0)
  3428. }
  3429. })
  3430. }
  3431. function Ua(t) {
  3432. var e = t && t.itemStyle;
  3433. if (e)
  3434. for (var i = 0, o = _I.length; i < o; i++) {
  3435. var a = _I[i],
  3436. r = e.normal,
  3437. s = e.emphasis;
  3438. r && r[a] && (t[a] = t[a] || {}, t[a].normal ? n(t[a].normal, r[a]) : t[a].normal = r[a], r[a] = null), s && s[a] &&
  3439. (t[a] = t[a] || {}, t[a].emphasis ? n(t[a].emphasis, s[a]) : t[a].emphasis = s[a], s[a] = null)
  3440. }
  3441. }
  3442. function Xa(t, e, i) {
  3443. if (t && t[e] && (t[e].normal || t[e].emphasis)) {
  3444. var n = t[e].normal,
  3445. o = t[e].emphasis;
  3446. n && (i ? (t[e].normal = t[e].emphasis = null, r(t[e], n)) : t[e] = n), o && (t.emphasis = t.emphasis || {}, t.emphasis[
  3447. e] = o)
  3448. }
  3449. }
  3450. function ja(t) {
  3451. Xa(t, "itemStyle"), Xa(t, "lineStyle"), Xa(t, "areaStyle"), Xa(t, "label"), Xa(t, "labelLine"), Xa(t, "upperLabel"),
  3452. Xa(t, "edgeLabel")
  3453. }
  3454. function Ya(t, e) {
  3455. var i = xI(t) && t[e],
  3456. n = xI(i) && i.textStyle;
  3457. if (n)
  3458. for (var o = 0, a = zb.length; o < a; o++) {
  3459. var e = zb[o];
  3460. n.hasOwnProperty(e) && (i[e] = n[e])
  3461. }
  3462. }
  3463. function qa(t) {
  3464. t && (ja(t), Ya(t, "label"), t.emphasis && Ya(t.emphasis, "label"))
  3465. }
  3466. function Ka(t) {
  3467. if (xI(t)) {
  3468. Ua(t), ja(t), Ya(t, "label"), Ya(t, "upperLabel"), Ya(t, "edgeLabel"), t.emphasis && (Ya(t.emphasis, "label"), Ya(t
  3469. .emphasis, "upperLabel"), Ya(t.emphasis, "edgeLabel"));
  3470. var e = t.markPoint;
  3471. e && (Ua(e), qa(e));
  3472. var i = t.markLine;
  3473. i && (Ua(i), qa(i));
  3474. var n = t.markArea;
  3475. n && qa(n);
  3476. var o = t.data;
  3477. if ("graph" === t.type) {
  3478. o = o || t.nodes;
  3479. var a = t.links || t.edges;
  3480. if (a && !S(a))
  3481. for (s = 0; s < a.length; s++) qa(a[s]);
  3482. d(t.categories, function(t) {
  3483. ja(t)
  3484. })
  3485. }
  3486. if (o && !S(o))
  3487. for (s = 0; s < o.length; s++) qa(o[s]);
  3488. if ((e = t.markPoint) && e.data)
  3489. for (var r = e.data, s = 0; s < r.length; s++) qa(r[s]);
  3490. if ((i = t.markLine) && i.data)
  3491. for (var l = i.data, s = 0; s < l.length; s++) y(l[s]) ? (qa(l[s][0]), qa(l[s][1])) : qa(l[s]);
  3492. "gauge" === t.type ? (Ya(t, "axisLabel"), Ya(t, "title"), Ya(t, "detail")) : "treemap" === t.type ? (Xa(t.breadcrumb,
  3493. "itemStyle"), d(t.levels, function(t) {
  3494. ja(t)
  3495. })) : "tree" === t.type && ja(t.leaves)
  3496. }
  3497. }
  3498. function $a(t) {
  3499. return y(t) ? t : t ? [t] : []
  3500. }
  3501. function Ja(t) {
  3502. return (y(t) ? t[0] : t) || {}
  3503. }
  3504. function Qa(t, e) {
  3505. e = e.split(",");
  3506. for (var i = t, n = 0; n < e.length && null != (i = i && i[e[n]]); n++);
  3507. return i
  3508. }
  3509. function tr(t, e, i, n) {
  3510. e = e.split(",");
  3511. for (var o, a = t, r = 0; r < e.length - 1; r++) null == a[o = e[r]] && (a[o] = {}), a = a[o];
  3512. (n || null == a[e[r]]) && (a[e[r]] = i)
  3513. }
  3514. function er(t) {
  3515. d(bI, function(e) {
  3516. e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]])
  3517. })
  3518. }
  3519. function ir(t) {
  3520. d(t, function(e, i) {
  3521. var n = [],
  3522. o = [NaN, NaN],
  3523. a = [e.stackResultDimension, e.stackedOverDimension],
  3524. r = e.data,
  3525. s = e.isStackedByIndex,
  3526. l = r.map(a, function(a, l, u) {
  3527. var h = r.get(e.stackedDimension, u);
  3528. if (isNaN(h)) return o;
  3529. var c, d;
  3530. s ? d = r.getRawIndex(u) : c = r.get(e.stackedByDimension, u);
  3531. for (var f = NaN, p = i - 1; p >= 0; p--) {
  3532. var g = t[p];
  3533. if (s || (d = g.data.rawIndexOf(g.stackedByDimension, c)), d >= 0) {
  3534. var m = g.data.getByRawIndex(g.stackResultDimension, d);
  3535. if (h >= 0 && m > 0 || h <= 0 && m < 0) {
  3536. h += m, f = m;
  3537. break
  3538. }
  3539. }
  3540. }
  3541. return n[0] = h, n[1] = f, n
  3542. });
  3543. r.hostModel.setData(l), e.data = l
  3544. })
  3545. }
  3546. function nr(t, e) {
  3547. va.isInstance(t) || (t = va.seriesDataToSource(t)), this._source = t;
  3548. var i = this._data = t.data,
  3549. n = t.sourceFormat;
  3550. n === aI && (this._offset = 0, this._dimSize = e, this._data = i), a(this, TI[n === eI ? n + "_" + t.seriesLayoutBy :
  3551. n])
  3552. }
  3553. function or() {
  3554. return this._data.length
  3555. }
  3556. function ar(t) {
  3557. return this._data[t]
  3558. }
  3559. function rr(t) {
  3560. for (var e = 0; e < t.length; e++) this._data.push(t[e])
  3561. }
  3562. function sr(t, e, i, n) {
  3563. return null != i ? t[i] : t
  3564. }
  3565. function lr(t, e, i, n) {
  3566. return ur(t[n], this._dimensionInfos[e])
  3567. }
  3568. function ur(t, e) {
  3569. var i = e && e.type;
  3570. if ("ordinal" === i) {
  3571. var n = e && e.ordinalMeta;
  3572. return n ? n.parseAndCollect(t) : t
  3573. }
  3574. return "time" === i && "number" != typeof t && null != t && "-" !== t && (t = +Uo(t)), null == t || "" === t ? NaN :
  3575. +t
  3576. }
  3577. function hr(t, e, i) {
  3578. if (t) {
  3579. var n = t.getRawDataItem(e);
  3580. if (null != n) {
  3581. var o, a, r = t.getProvider().getSource().sourceFormat,
  3582. s = t.getDimensionInfo(i);
  3583. return s && (o = s.name, a = s.index), AI[r](n, e, a, o)
  3584. }
  3585. }
  3586. }
  3587. function cr(t, e, i) {
  3588. if (t) {
  3589. var n = t.getProvider().getSource().sourceFormat;
  3590. if (n === tI || n === iI) {
  3591. var o = t.getRawDataItem(e);
  3592. return n !== tI || w(o) || (o = null), o ? o[i] : void 0
  3593. }
  3594. }
  3595. }
  3596. function dr(t) {
  3597. return new fr(t)
  3598. }
  3599. function fr(t) {
  3600. t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !
  3601. 0, this.context
  3602. }
  3603. function pr(t, e, i, n, o, a) {
  3604. PI.reset(i, n, o, a), t._callingProgress = e, t._callingProgress({
  3605. start: i,
  3606. end: n,
  3607. count: n - i,
  3608. next: PI.next
  3609. }, t.context)
  3610. }
  3611. function gr(t, e) {
  3612. t._dueIndex = t._outputDueEnd = t._dueEnd = 0, t._settedOutputEnd = null;
  3613. var i, n;
  3614. !e && t._reset && ((i = t._reset(t.context)) && i.progress && (n = i.forceFirstProgress, i = i.progress), y(i) && !i
  3615. .length && (i = null)), t._progress = i, t._modBy = t._modDataCount = null;
  3616. var o = t._downstream;
  3617. return o && o.dirty(), n
  3618. }
  3619. function mr(t) {
  3620. var e = t.name;
  3621. Oi(t) || (t.name = vr(t) || e)
  3622. }
  3623. function vr(t) {
  3624. var e = t.getRawData(),
  3625. i = [];
  3626. return d(e.mapDimension("seriesName", !0), function(t) {
  3627. var n = e.getDimensionInfo(t);
  3628. n.displayName && i.push(n.displayName)
  3629. }), i.join(" ")
  3630. }
  3631. function yr(t) {
  3632. return t.model.getRawData().count()
  3633. }
  3634. function xr(t) {
  3635. var e = t.model;
  3636. return e.setData(e.getRawData().cloneShallow()), _r
  3637. }
  3638. function _r(t, e) {
  3639. t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData)
  3640. }
  3641. function wr(t, e) {
  3642. d(t.CHANGABLE_METHODS, function(i) {
  3643. t.wrapMethod(i, v(br, e))
  3644. })
  3645. }
  3646. function br(t) {
  3647. var e = Sr(t);
  3648. e && e.setOutputEnd(this.count())
  3649. }
  3650. function Sr(t) {
  3651. var e = (t.ecModel || {}).scheduler,
  3652. i = e && e.getPipeline(t.uid);
  3653. if (i) {
  3654. var n = i.currentTask;
  3655. if (n) {
  3656. var o = n.agentStubMap;
  3657. o && (n = o.get(t.uid))
  3658. }
  3659. return n
  3660. }
  3661. }
  3662. function Mr() {
  3663. this.group = new Zw, this.uid = No("viewChart"), this.renderTask = dr({
  3664. plan: Ar,
  3665. reset: Dr
  3666. }), this.renderTask.context = {
  3667. view: this
  3668. }
  3669. }
  3670. function Ir(t, e) {
  3671. if (t && (t.trigger(e), "group" === t.type))
  3672. for (var i = 0; i < t.childCount(); i++) Ir(t.childAt(i), e)
  3673. }
  3674. function Tr(t, e, i) {
  3675. var n = zi(t, e);
  3676. null != n ? d(Di(n), function(e) {
  3677. Ir(t.getItemGraphicEl(e), i)
  3678. }) : t.eachItemGraphicEl(function(t) {
  3679. Ir(t, i)
  3680. })
  3681. }
  3682. function Ar(t) {
  3683. return VI(t.model)
  3684. }
  3685. function Dr(t) {
  3686. var e = t.model,
  3687. i = t.ecModel,
  3688. n = t.api,
  3689. o = t.payload,
  3690. a = e.pipelineContext.progressiveRender,
  3691. r = t.view,
  3692. s = o && BI(o).updateMethod,
  3693. l = a ? "incrementalPrepareRender" : s && r[s] ? s : "render";
  3694. return "render" !== l && r[l](e, i, n, o), FI[l]
  3695. }
  3696. function Cr(t, e, i) {
  3697. function n() {
  3698. h = (new Date).getTime(), c = null, t.apply(r, s || [])
  3699. }
  3700. var o, a, r, s, l, u = 0,
  3701. h = 0,
  3702. c = null;
  3703. e = e || 0;
  3704. var d = function() {
  3705. o = (new Date).getTime(), r = this, s = arguments;
  3706. var t = l || e,
  3707. d = l || i;
  3708. l = null, a = o - (d ? u : h) - t, clearTimeout(c), d ? c = setTimeout(n, t) : a >= 0 ? n() : c = setTimeout(n, -a),
  3709. u = o
  3710. };
  3711. return d.clear = function() {
  3712. c && (clearTimeout(c), c = null)
  3713. }, d.debounceNextCall = function(t) {
  3714. l = t
  3715. }, d
  3716. }
  3717. function Lr(t, e, i, n) {
  3718. var o = t[e];
  3719. if (o) {
  3720. var a = o[WI] || o,
  3721. r = o[ZI];
  3722. if (o[HI] !== i || r !== n) {
  3723. if (null == i || !n) return t[e] = a;
  3724. (o = t[e] = Cr(a, i, "debounce" === n))[WI] = a, o[ZI] = n, o[HI] = i
  3725. }
  3726. return o
  3727. }
  3728. }
  3729. function kr(t, e) {
  3730. var i = t[e];
  3731. i && i[WI] && (t[e] = i[WI])
  3732. }
  3733. function Pr(t, e, i, n) {
  3734. this.ecInstance = t, this.api = e, this.unfinished;
  3735. var i = this._dataProcessorHandlers = i.slice(),
  3736. n = this._visualHandlers = n.slice();
  3737. this._allHandlers = i.concat(n), this._stageTaskMap = R()
  3738. }
  3739. function Nr(t, e, i, n, o) {
  3740. function a(t, e) {
  3741. return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id))
  3742. }
  3743. o = o || {};
  3744. var r;
  3745. d(e, function(e, s) {
  3746. if (!o.visualType || o.visualType === e.visualType) {
  3747. var l = t._stageTaskMap.get(e.uid),
  3748. u = l.seriesTaskMap,
  3749. h = l.overallTask;
  3750. if (h) {
  3751. var c, d = h.agentStubMap;
  3752. d.each(function(t) {
  3753. a(o, t) && (t.dirty(), c = !0)
  3754. }), c && h.dirty(), KI(h, n);
  3755. var f = t.getPerformArgs(h, o.block);
  3756. d.each(function(t) {
  3757. t.perform(f)
  3758. }), r |= h.perform(f)
  3759. } else u && u.each(function(s, l) {
  3760. a(o, s) && s.dirty();
  3761. var u = t.getPerformArgs(s, o.block);
  3762. u.skip = !e.performRawSeries && i.isSeriesFiltered(s.context.model), KI(s, n), r |= s.perform(u)
  3763. })
  3764. }
  3765. }), t.unfinished |= r
  3766. }
  3767. function Or(t, e, i, n, o) {
  3768. function a(i) {
  3769. var a = i.uid,
  3770. s = r.get(a) || r.set(a, dr({
  3771. plan: Gr,
  3772. reset: Fr,
  3773. count: Hr
  3774. }));
  3775. s.context = {
  3776. model: i,
  3777. ecModel: n,
  3778. api: o,
  3779. useClearVisual: e.isVisual && !e.isLayout,
  3780. plan: e.plan,
  3781. reset: e.reset,
  3782. scheduler: t
  3783. }, Zr(t, i, s)
  3784. }
  3785. var r = i.seriesTaskMap || (i.seriesTaskMap = R()),
  3786. s = e.seriesType,
  3787. l = e.getTargetSeries;
  3788. e.createOnAllSeries ? n.eachRawSeries(a) : s ? n.eachRawSeriesByType(s, a) : l && l(n, o).each(a);
  3789. var u = t._pipelineMap;
  3790. r.each(function(t, e) {
  3791. u.get(e) || (t.dispose(), r.removeKey(e))
  3792. })
  3793. }
  3794. function Er(t, e, i, n, o) {
  3795. function a(e) {
  3796. var i = e.uid,
  3797. n = s.get(i);
  3798. n || (n = s.set(i, dr({
  3799. reset: zr,
  3800. onDirty: Vr
  3801. })), r.dirty()), n.context = {
  3802. model: e,
  3803. overallProgress: h,
  3804. modifyOutputEnd: c
  3805. }, n.agent = r, n.__block = h, Zr(t, e, n)
  3806. }
  3807. var r = i.overallTask = i.overallTask || dr({
  3808. reset: Rr
  3809. });
  3810. r.context = {
  3811. ecModel: n,
  3812. api: o,
  3813. overallReset: e.overallReset,
  3814. scheduler: t
  3815. };
  3816. var s = r.agentStubMap = r.agentStubMap || R(),
  3817. l = e.seriesType,
  3818. u = e.getTargetSeries,
  3819. h = !0,
  3820. c = e.modifyOutputEnd;
  3821. l ? n.eachRawSeriesByType(l, a) : u ? u(n, o).each(a) : (h = !1, d(n.getSeries(), a));
  3822. var f = t._pipelineMap;
  3823. s.each(function(t, e) {
  3824. f.get(e) || (t.dispose(), r.dirty(), s.removeKey(e))
  3825. })
  3826. }
  3827. function Rr(t) {
  3828. t.overallReset(t.ecModel, t.api, t.payload)
  3829. }
  3830. function zr(t, e) {
  3831. return t.overallProgress && Br
  3832. }
  3833. function Br() {
  3834. this.agent.dirty(), this.getDownstream().dirty()
  3835. }
  3836. function Vr() {
  3837. this.agent && this.agent.dirty()
  3838. }
  3839. function Gr(t) {
  3840. return t.plan && t.plan(t.model, t.ecModel, t.api, t.payload)
  3841. }
  3842. function Fr(t) {
  3843. t.useClearVisual && t.data.clearAllVisual();
  3844. var e = t.resetDefines = Di(t.reset(t.model, t.ecModel, t.api, t.payload));
  3845. return e.length > 1 ? f(e, function(t, e) {
  3846. return Wr(e)
  3847. }) : $I
  3848. }
  3849. function Wr(t) {
  3850. return function(e, i) {
  3851. var n = i.data,
  3852. o = i.resetDefines[t];
  3853. if (o && o.dataEach)
  3854. for (var a = e.start; a < e.end; a++) o.dataEach(n, a);
  3855. else o && o.progress && o.progress(e, n)
  3856. }
  3857. }
  3858. function Hr(t) {
  3859. return t.data.count()
  3860. }
  3861. function Zr(t, e, i) {
  3862. var n = e.uid,
  3863. o = t._pipelineMap.get(n);
  3864. !o.head && (o.head = i), o.tail && o.tail.pipe(i), o.tail = i, i.__idxInPipeline = o.count++, i.__pipeline = o
  3865. }
  3866. function Ur(t) {
  3867. JI = null;
  3868. try {
  3869. t(QI, tT)
  3870. } catch (t) {}
  3871. return JI
  3872. }
  3873. function Xr(t, e) {
  3874. for (var i in e.prototype) t[i] = B
  3875. }
  3876. function jr(t) {
  3877. for (_(t) && (t = (new DOMParser).parseFromString(t, "text/xml")), 9 === t.nodeType && (t = t.firstChild);
  3878. "svg" !== t.nodeName.toLowerCase() || 1 !== t.nodeType;) t = t.nextSibling;
  3879. return t
  3880. }
  3881. function Yr() {
  3882. this._defs = {}, this._root = null, this._isDefine = !1, this._isText = !1
  3883. }
  3884. function qr(t, e) {
  3885. for (var i = t.firstChild; i;) {
  3886. if (1 === i.nodeType) {
  3887. var n = i.getAttribute("offset");
  3888. n = n.indexOf("%") > 0 ? parseInt(n, 10) / 100 : n ? parseFloat(n) : 0;
  3889. var o = i.getAttribute("stop-color") || "#000000";
  3890. e.addColorStop(n, o)
  3891. }
  3892. i = i.nextSibling
  3893. }
  3894. }
  3895. function Kr(t, e) {
  3896. t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), r(e.__inheritedStyle, t.__inheritedStyle))
  3897. }
  3898. function $r(t) {
  3899. for (var e = P(t).split(rT), i = [], n = 0; n < e.length; n += 2) {
  3900. var o = parseFloat(e[n]),
  3901. a = parseFloat(e[n + 1]);
  3902. i.push([o, a])
  3903. }
  3904. return i
  3905. }
  3906. function Jr(t, e, i, n) {
  3907. var o = e.__inheritedStyle || {},
  3908. r = "text" === e.type;
  3909. if (1 === t.nodeType && (ts(t, e), a(o, es(t)), !n))
  3910. for (var s in uT)
  3911. if (uT.hasOwnProperty(s)) {
  3912. var l = t.getAttribute(s);
  3913. null != l && (o[uT[s]] = l)
  3914. } var u = r ? "textFill" : "fill",
  3915. h = r ? "textStroke" : "stroke";
  3916. e.style = e.style || new $w;
  3917. var c = e.style;
  3918. null != o.fill && c.set(u, Qr(o.fill, i)), null != o.stroke && c.set(h, Qr(o.stroke, i)), d(["lineWidth", "opacity",
  3919. "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"
  3920. ], function(t) {
  3921. var e = "lineWidth" === t && r ? "textStrokeWidth" : t;
  3922. null != o[t] && c.set(e, parseFloat(o[t]))
  3923. }), o.textBaseline && "auto" !== o.textBaseline || (o.textBaseline = "alphabetic"), "alphabetic" === o.textBaseline &&
  3924. (o.textBaseline = "bottom"), "start" === o.textAlign && (o.textAlign = "left"), "end" === o.textAlign && (o.textAlign =
  3925. "right"), d(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign",
  3926. "textBaseline"
  3927. ], function(t) {
  3928. null != o[t] && c.set(t, o[t])
  3929. }), o.lineDash && (e.style.lineDash = P(o.lineDash).split(rT)), c[h] && "none" !== c[h] && (e[h] = !0), e.__inheritedStyle =
  3930. o
  3931. }
  3932. function Qr(t, e) {
  3933. var i = e && t && t.match(hT);
  3934. return i ? e[P(i[1])] : t
  3935. }
  3936. function ts(t, e) {
  3937. var i = t.getAttribute("transform");
  3938. if (i) {
  3939. var n = null,
  3940. o = [];
  3941. (i = i.replace(/,/g, " ")).replace(cT, function(t, e, i) {
  3942. o.push(e, i)
  3943. });
  3944. for (var a = o.length - 1; a > 0; a -= 2) {
  3945. var r = o[a],
  3946. s = o[a - 1];
  3947. switch (n = n || mt(), s) {
  3948. case "translate":
  3949. r = P(r).split(rT), _t(n, n, [parseFloat(r[0]), parseFloat(r[1] || 0)]);
  3950. break;
  3951. case "scale":
  3952. r = P(r).split(rT), bt(n, n, [parseFloat(r[0]), parseFloat(r[1] || r[0])]);
  3953. break;
  3954. case "rotate":
  3955. r = P(r).split(rT), wt(n, n, parseFloat(r[0]));
  3956. break;
  3957. case "skew":
  3958. r = P(r).split(rT), console.warn("Skew transform is not supported yet");
  3959. break;
  3960. case "matrix":
  3961. r = P(r).split(rT);
  3962. n[0] = parseFloat(r[0]), n[1] = parseFloat(r[1]), n[2] = parseFloat(r[2]), n[3] = parseFloat(r[3]), n[4] =
  3963. parseFloat(r[4]), n[5] = parseFloat(r[5])
  3964. }
  3965. }
  3966. }
  3967. e.setLocalTransform(n)
  3968. }
  3969. function es(t) {
  3970. var e = t.getAttribute("style"),
  3971. i = {};
  3972. if (!e) return i;
  3973. var n = {};
  3974. dT.lastIndex = 0;
  3975. for (var o; null != (o = dT.exec(e));) n[o[1]] = o[2];
  3976. for (var a in uT) uT.hasOwnProperty(a) && null != n[a] && (i[uT[a]] = n[a]);
  3977. return i
  3978. }
  3979. function is(t, e, i) {
  3980. var n = e / t.width,
  3981. o = i / t.height,
  3982. a = Math.min(n, o);
  3983. return {
  3984. scale: [a, a],
  3985. position: [-(t.x + t.width / 2) * a + e / 2, -(t.y + t.height / 2) * a + i / 2]
  3986. }
  3987. }
  3988. function ns(t, e) {
  3989. return (new Yr).parse(t, e)
  3990. }
  3991. function os(t) {
  3992. return function(e, i, n) {
  3993. e = e && e.toLowerCase(), aw.prototype[t].call(this, e, i, n)
  3994. }
  3995. }
  3996. function as() {
  3997. aw.call(this)
  3998. }
  3999. function rs(t, e, n) {
  4000. function o(t, e) {
  4001. return t.__prio - e.__prio
  4002. }
  4003. n = n || {}, "string" == typeof e && (e = BT[e]), this.id, this.group, this._dom = t;
  4004. var a = this._zr = Ii(t, {
  4005. renderer: n.renderer || "canvas",
  4006. devicePixelRatio: n.devicePixelRatio,
  4007. width: n.width,
  4008. height: n.height
  4009. });
  4010. this._throttledZrFlush = Cr(m(a.flush, a), 17), (e = i(e)) && MI(e, !0), this._theme = e, this._chartsViews = [],
  4011. this._chartsMap = {}, this._componentsViews = [], this._componentsMap = {}, this._coordSysMgr = new Ba;
  4012. var r = this._api = Ms(this);
  4013. ve(zT, o), ve(OT, o), this._scheduler = new Pr(this, r, OT, zT), aw.call(this, this._ecEventProcessor = new Is),
  4014. this._messageCenter = new as, this._initEvents(), this.resize = m(this.resize, this), this._pendingActions = [], a.animation
  4015. .on("frame", this._onframe, this), ps(a, this), N(this)
  4016. }
  4017. function ss(t, e, i) {
  4018. var n, o = this._model,
  4019. a = this._coordSysMgr.getCoordinateSystems();
  4020. e = Vi(o, e);
  4021. for (var r = 0; r < a.length; r++) {
  4022. var s = a[r];
  4023. if (s[t] && null != (n = s[t](o, e, i))) return n
  4024. }
  4025. }
  4026. function ls(t) {
  4027. var e = t._model,
  4028. i = t._scheduler;
  4029. i.restorePipelines(e), i.prepareStageTasks(), gs(t, "component", e, i), gs(t, "chart", e, i), i.plan()
  4030. }
  4031. function us(t, e, i, n, o) {
  4032. function a(n) {
  4033. n && n.__alive && n[e] && n[e](n.__model, r, t._api, i)
  4034. }
  4035. var r = t._model;
  4036. if (n) {
  4037. var s = {};
  4038. s[n + "Id"] = i[n + "Id"], s[n + "Index"] = i[n + "Index"], s[n + "Name"] = i[n + "Name"];
  4039. var l = {
  4040. mainType: n,
  4041. query: s
  4042. };
  4043. o && (l.subType = o);
  4044. var u = i.excludeSeriesId;
  4045. null != u && (u = R(Di(u))), r && r.eachComponent(l, function(e) {
  4046. u && null != u.get(e.id) || a(t["series" === n ? "_chartsMap" : "_componentsMap"][e.__viewId])
  4047. }, t)
  4048. } else vT(t._componentsViews.concat(t._chartsViews), a)
  4049. }
  4050. function hs(t, e) {
  4051. var i = t._chartsMap,
  4052. n = t._scheduler;
  4053. e.eachSeries(function(t) {
  4054. n.updateStreamModes(t, i[t.__viewId])
  4055. })
  4056. }
  4057. function cs(t, e) {
  4058. var i = t.type,
  4059. n = t.escapeConnect,
  4060. o = PT[i],
  4061. s = o.actionInfo,
  4062. l = (s.update || "update").split(":"),
  4063. u = l.pop();
  4064. l = null != l[0] && _T(l[0]), this[TT] = !0;
  4065. var h = [t],
  4066. c = !1;
  4067. t.batch && (c = !0, h = f(t.batch, function(e) {
  4068. return e = r(a({}, e), t), e.batch = null, e
  4069. }));
  4070. var d, p = [],
  4071. g = "highlight" === i || "downplay" === i;
  4072. vT(h, function(t) {
  4073. d = o.action(t, this._model, this._api), (d = d || a({}, t)).type = s.event || d.type, p.push(d), g ? us(this, u,
  4074. t, "series") : l && us(this, u, t, l.main, l.sub)
  4075. }, this), "none" === u || g || l || (this[AT] ? (ls(this), LT.update.call(this, t), this[AT] = !1) : LT[u].call(
  4076. this, t)), d = c ? {
  4077. type: s.event || i,
  4078. escapeConnect: n,
  4079. batch: p
  4080. } : p[0], this[TT] = !1, !e && this._messageCenter.trigger(d.type, d)
  4081. }
  4082. function ds(t) {
  4083. for (var e = this._pendingActions; e.length;) {
  4084. var i = e.shift();
  4085. cs.call(this, i, t)
  4086. }
  4087. }
  4088. function fs(t) {
  4089. !t && this.trigger("updated")
  4090. }
  4091. function ps(t, e) {
  4092. t.on("rendered", function() {
  4093. e.trigger("rendered"), !t.animation.isFinished() || e[AT] || e._scheduler.unfinished || e._pendingActions.length ||
  4094. e.trigger("finished")
  4095. })
  4096. }
  4097. function gs(t, e, i, n) {
  4098. function o(t) {
  4099. var e = "_ec_" + t.id + "_" + t.type,
  4100. o = s[e];
  4101. if (!o) {
  4102. var h = _T(t.type);
  4103. (o = new(a ? EI.getClass(h.main, h.sub) : Mr.getClass(h.sub))).init(i, u), s[e] = o, r.push(o), l.add(o.group)
  4104. }
  4105. t.__viewId = o.__id = e, o.__alive = !0, o.__model = t, o.group.__ecComponentInfo = {
  4106. mainType: t.mainType,
  4107. index: t.componentIndex
  4108. }, !a && n.prepareView(o, t, i, u)
  4109. }
  4110. for (var a = "component" === e, r = a ? t._componentsViews : t._chartsViews, s = a ? t._componentsMap : t._chartsMap,
  4111. l = t._zr, u = t._api, h = 0; h < r.length; h++) r[h].__alive = !1;
  4112. a ? i.eachComponent(function(t, e) {
  4113. "series" !== t && o(e)
  4114. }) : i.eachSeries(o);
  4115. for (h = 0; h < r.length;) {
  4116. var c = r[h];
  4117. c.__alive ? h++ : (!a && c.renderTask.dispose(), l.remove(c.group), c.dispose(i, u), r.splice(h, 1), delete s[c.__id],
  4118. c.__id = c.group.__ecComponentInfo = null)
  4119. }
  4120. }
  4121. function ms(t) {
  4122. t.clearColorPalette(), t.eachSeries(function(t) {
  4123. t.clearColorPalette()
  4124. })
  4125. }
  4126. function vs(t, e, i, n) {
  4127. ys(t, e, i, n), vT(t._chartsViews, function(t) {
  4128. t.__alive = !1
  4129. }), xs(t, e, i, n), vT(t._chartsViews, function(t) {
  4130. t.__alive || t.remove(e, i)
  4131. })
  4132. }
  4133. function ys(t, e, i, n, o) {
  4134. vT(o || t._componentsViews, function(t) {
  4135. var o = t.__model;
  4136. t.render(o, e, i, n), Ss(o, t)
  4137. })
  4138. }
  4139. function xs(t, e, i, n, o) {
  4140. var a, r = t._scheduler;
  4141. e.eachSeries(function(e) {
  4142. var i = t._chartsMap[e.__viewId];
  4143. i.__alive = !0;
  4144. var s = i.renderTask;
  4145. r.updatePayload(s, n), o && o.get(e.uid) && s.dirty(), a |= s.perform(r.getPerformArgs(s)), i.group.silent = !!e.get(
  4146. "silent"), Ss(e, i), bs(e, i)
  4147. }), r.unfinished |= a, ws(t._zr, e), jI(t._zr.dom, e)
  4148. }
  4149. function _s(t, e) {
  4150. vT(RT, function(i) {
  4151. i(t, e)
  4152. })
  4153. }
  4154. function ws(t, e) {
  4155. var i = t.storage,
  4156. n = 0;
  4157. i.traverse(function(t) {
  4158. t.isGroup || n++
  4159. }), n > e.get("hoverLayerThreshold") && !z_.node && i.traverse(function(t) {
  4160. t.isGroup || (t.useHoverLayer = !0)
  4161. })
  4162. }
  4163. function bs(t, e) {
  4164. var i = t.get("blendMode") || null;
  4165. e.group.traverse(function(t) {
  4166. t.isGroup || t.style.blend !== i && t.setStyle("blend", i), t.eachPendingDisplayable && t.eachPendingDisplayable(
  4167. function(t) {
  4168. t.setStyle("blend", i)
  4169. })
  4170. })
  4171. }
  4172. function Ss(t, e) {
  4173. var i = t.get("z"),
  4174. n = t.get("zlevel");
  4175. e.group.traverse(function(t) {
  4176. "group" !== t.type && (null != i && (t.z = i), null != n && (t.zlevel = n))
  4177. })
  4178. }
  4179. function Ms(t) {
  4180. var e = t._coordSysMgr;
  4181. return a(new za(t), {
  4182. getCoordinateSystems: m(e.getCoordinateSystems, e),
  4183. getComponentByElement: function(e) {
  4184. for (; e;) {
  4185. var i = e.__ecComponentInfo;
  4186. if (null != i) return t._model.getComponent(i.mainType, i.index);
  4187. e = e.parent
  4188. }
  4189. }
  4190. })
  4191. }
  4192. function Is() {
  4193. this.eventInfo
  4194. }
  4195. function Ts(t) {
  4196. function e(t, e) {
  4197. for (var n = 0; n < t.length; n++) t[n][i] = e
  4198. }
  4199. var i = "__connectUpdateStatus";
  4200. vT(NT, function(n, o) {
  4201. t._messageCenter.on(o, function(n) {
  4202. if (FT[t.group] && 0 !== t[i]) {
  4203. if (n && n.escapeConnect) return;
  4204. var o = t.makeActionFromEvent(n),
  4205. a = [];
  4206. vT(GT, function(e) {
  4207. e !== t && e.group === t.group && a.push(e)
  4208. }), e(a, 0), vT(a, function(t) {
  4209. 1 !== t[i] && t.dispatchAction(o)
  4210. }), e(a, 2)
  4211. }
  4212. })
  4213. })
  4214. }
  4215. function As(t) {
  4216. FT[t] = !1
  4217. }
  4218. function Ds(t) {
  4219. return GT[Wi(t, ZT)]
  4220. }
  4221. function Cs(t, e) {
  4222. BT[t] = e
  4223. }
  4224. function Ls(t) {
  4225. ET.push(t)
  4226. }
  4227. function ks(t, e) {
  4228. Rs(OT, t, e, bT)
  4229. }
  4230. function Ps(t, e, i) {
  4231. "function" == typeof e && (i = e, e = "");
  4232. var n = xT(t) ? t.type : [t, t = {
  4233. event: e
  4234. }][0];
  4235. t.event = (t.event || n).toLowerCase(), e = t.event, mT(DT.test(n) && DT.test(e)), PT[n] || (PT[n] = {
  4236. action: i,
  4237. actionInfo: t
  4238. }), NT[e] = n
  4239. }
  4240. function Ns(t, e) {
  4241. Ba.register(t, e)
  4242. }
  4243. function Os(t, e) {
  4244. Rs(zT, t, e, ST, "layout")
  4245. }
  4246. function Es(t, e) {
  4247. Rs(zT, t, e, MT, "visual")
  4248. }
  4249. function Rs(t, e, i, n, o) {
  4250. (yT(e) || xT(e)) && (i = e, e = n);
  4251. var a = Pr.wrapStageHandler(i, o);
  4252. return a.__prio = e, a.__raw = i, t.push(a), a
  4253. }
  4254. function zs(t, e) {
  4255. VT[t] = e
  4256. }
  4257. function Bs(t) {
  4258. return YM.extend(t)
  4259. }
  4260. function Vs(t) {
  4261. return EI.extend(t)
  4262. }
  4263. function Gs(t) {
  4264. return OI.extend(t)
  4265. }
  4266. function Fs(t) {
  4267. return Mr.extend(t)
  4268. }
  4269. function Ws(t) {
  4270. return t
  4271. }
  4272. function Hs(t, e, i, n, o) {
  4273. this._old = t, this._new = e, this._oldKeyGetter = i || Ws, this._newKeyGetter = n || Ws, this.context = o
  4274. }
  4275. function Zs(t, e, i, n, o) {
  4276. for (var a = 0; a < t.length; a++) {
  4277. var r = "_ec_" + o[n](t[a], a),
  4278. s = e[r];
  4279. null == s ? (i.push(r), e[r] = a) : (s.length || (e[r] = s = [s]), s.push(a))
  4280. }
  4281. }
  4282. function Us(t) {
  4283. var e = {},
  4284. i = e.encode = {},
  4285. n = R(),
  4286. o = [],
  4287. a = [];
  4288. d(t.dimensions, function(e) {
  4289. var r = t.getDimensionInfo(e),
  4290. s = r.coordDim;
  4291. if (s) {
  4292. var l = i[s];
  4293. i.hasOwnProperty(s) || (l = i[s] = []), l[r.coordDimIndex] = e, r.isExtraCoord || (n.set(s, 1), js(r.type) && (o[
  4294. 0] = e)), r.defaultTooltip && a.push(e)
  4295. }
  4296. jT.each(function(t, e) {
  4297. var n = i[e];
  4298. i.hasOwnProperty(e) || (n = i[e] = []);
  4299. var o = r.otherDims[e];
  4300. null != o && !1 !== o && (n[o] = r.name)
  4301. })
  4302. });
  4303. var r = [],
  4304. s = {};
  4305. n.each(function(t, e) {
  4306. var n = i[e];
  4307. s[e] = n[0], r = r.concat(n)
  4308. }), e.dataDimsOnCoord = r, e.encodeFirstDimNotExtra = s;
  4309. var l = i.label;
  4310. l && l.length && (o = l.slice());
  4311. var u = i.tooltip;
  4312. return u && u.length ? a = u.slice() : a.length || (a = o.slice()), i.defaultedLabel = o, i.defaultedTooltip = a, e
  4313. }
  4314. function Xs(t) {
  4315. return "category" === t ? "ordinal" : "time" === t ? "time" : "float"
  4316. }
  4317. function js(t) {
  4318. return !("ordinal" === t || "time" === t)
  4319. }
  4320. function Ys(t) {
  4321. return t._rawCount > 65535 ? $T : JT
  4322. }
  4323. function qs(t) {
  4324. var e = t.constructor;
  4325. return e === Array ? t.slice() : new e(t)
  4326. }
  4327. function Ks(t, e) {
  4328. d(QT.concat(e.__wrappedMethods || []), function(i) {
  4329. e.hasOwnProperty(i) && (t[i] = e[i])
  4330. }), t.__wrappedMethods = e.__wrappedMethods, d(tA, function(n) {
  4331. t[n] = i(e[n])
  4332. }), t._calculationInfo = a(e._calculationInfo)
  4333. }
  4334. function $s(t) {
  4335. var e = t._invertedIndicesMap;
  4336. d(e, function(i, n) {
  4337. var o = t._dimensionInfos[n].ordinalMeta;
  4338. if (o) {
  4339. i = e[n] = new $T(o.categories.length);
  4340. for (a = 0; a < i.length; a++) i[a] = NaN;
  4341. for (var a = 0; a < t._count; a++) i[t.get(n, a)] = a
  4342. }
  4343. })
  4344. }
  4345. function Js(t, e, i) {
  4346. var n;
  4347. if (null != e) {
  4348. var o = t._chunkSize,
  4349. a = Math.floor(i / o),
  4350. r = i % o,
  4351. s = t.dimensions[e],
  4352. l = t._storage[s][a];
  4353. if (l) {
  4354. n = l[r];
  4355. var u = t._dimensionInfos[s].ordinalMeta;
  4356. u && u.categories.length && (n = u.categories[n])
  4357. }
  4358. }
  4359. return n
  4360. }
  4361. function Qs(t) {
  4362. return t
  4363. }
  4364. function tl(t) {
  4365. return t < this._count && t >= 0 ? this._indices[t] : -1
  4366. }
  4367. function el(t, e) {
  4368. var i = t._idList[e];
  4369. return null == i && (i = Js(t, t._idDimIdx, e)), null == i && (i = qT + e), i
  4370. }
  4371. function il(t) {
  4372. return y(t) || (t = [t]), t
  4373. }
  4374. function nl(t, e) {
  4375. var i = t.dimensions,
  4376. n = new eA(f(i, t.getDimensionInfo, t), t.hostModel);
  4377. Ks(n, t);
  4378. for (var o = n._storage = {}, a = t._storage, r = 0; r < i.length; r++) {
  4379. var s = i[r];
  4380. a[s] && (l(e, s) >= 0 ? (o[s] = ol(a[s]), n._rawExtent[s] = al(), n._extent[s] = null) : o[s] = a[s])
  4381. }
  4382. return n
  4383. }
  4384. function ol(t) {
  4385. for (var e = new Array(t.length), i = 0; i < t.length; i++) e[i] = qs(t[i]);
  4386. return e
  4387. }
  4388. function al() {
  4389. return [1 / 0, -1 / 0]
  4390. }
  4391. function rl(t, e, n) {
  4392. function o(t, e, i) {
  4393. null != jT.get(e) ? t.otherDims[e] = i : (t.coordDim = e, t.coordDimIndex = i, h.set(e, !0))
  4394. }
  4395. va.isInstance(e) || (e = va.seriesDataToSource(e)), n = n || {}, t = (t || []).slice();
  4396. for (var s = (n.dimsDef || []).slice(), l = R(n.encodeDef), u = R(), h = R(), c = [], f = sl(e, t, s, n.dimCount), p =
  4397. 0; p < f; p++) {
  4398. var g = s[p] = a({}, w(s[p]) ? s[p] : {
  4399. name: s[p]
  4400. }),
  4401. m = g.name,
  4402. v = c[p] = {
  4403. otherDims: {}
  4404. };
  4405. null != m && null == u.get(m) && (v.name = v.displayName = m, u.set(m, p)), null != g.type && (v.type = g.type),
  4406. null != g.displayName && (v.displayName = g.displayName)
  4407. }
  4408. l.each(function(t, e) {
  4409. if (1 === (t = Di(t).slice()).length && t[0] < 0) l.set(e, !1);
  4410. else {
  4411. var i = l.set(e, []);
  4412. d(t, function(t, n) {
  4413. _(t) && (t = u.get(t)), null != t && t < f && (i[n] = t, o(c[t], e, n))
  4414. })
  4415. }
  4416. });
  4417. var y = 0;
  4418. d(t, function(t, e) {
  4419. var n, t, a, s;
  4420. if (_(t)) n = t, t = {};
  4421. else {
  4422. n = t.name;
  4423. var u = t.ordinalMeta;
  4424. t.ordinalMeta = null, (t = i(t)).ordinalMeta = u, a = t.dimsDef, s = t.otherDims, t.name = t.coordDim = t.coordDimIndex =
  4425. t.dimsDef = t.otherDims = null
  4426. }
  4427. var h = l.get(n);
  4428. if (!1 !== h) {
  4429. if (!(h = Di(h)).length)
  4430. for (var f = 0; f < (a && a.length || 1); f++) {
  4431. for (; y < c.length && null != c[y].coordDim;) y++;
  4432. y < c.length && h.push(y++)
  4433. }
  4434. d(h, function(e, i) {
  4435. var l = c[e];
  4436. if (o(r(l, t), n, i), null == l.name && a) {
  4437. var u = a[i];
  4438. !w(u) && (u = {
  4439. name: u
  4440. }), l.name = l.displayName = u.name, l.defaultTooltip = u.defaultTooltip
  4441. }
  4442. s && r(l.otherDims, s)
  4443. })
  4444. }
  4445. });
  4446. var x = n.generateCoord,
  4447. b = n.generateCoordCount,
  4448. S = null != b;
  4449. b = x ? b || 1 : 0;
  4450. for (var M = x || "value", I = 0; I < f; I++) null == (v = c[I] = c[I] || {}).coordDim && (v.coordDim = ll(M, h, S),
  4451. v.coordDimIndex = 0, (!x || b <= 0) && (v.isExtraCoord = !0), b--), null == v.name && (v.name = ll(v.coordDim, u)),
  4452. null == v.type && Da(e, I, v.name) && (v.type = "ordinal");
  4453. return c
  4454. }
  4455. function sl(t, e, i, n) {
  4456. var o = Math.max(t.dimensionsDetectCount || 1, e.length, i.length, n || 0);
  4457. return d(e, function(t) {
  4458. var e = t.dimsDef;
  4459. e && (o = Math.max(o, e.length))
  4460. }), o
  4461. }
  4462. function ll(t, e, i) {
  4463. if (i || null != e.get(t)) {
  4464. for (var n = 0; null != e.get(t + n);) n++;
  4465. t += n
  4466. }
  4467. return e.set(t, !0), t
  4468. }
  4469. function ul(t, e, i) {
  4470. var n, o, a, r, s = (i = i || {}).byIndex,
  4471. l = i.stackedCoordDimension,
  4472. u = !(!t || !t.get("stack"));
  4473. if (d(e, function(t, i) {
  4474. _(t) && (e[i] = t = {
  4475. name: t
  4476. }), u && !t.isExtraCoord && (s || n || !t.ordinalMeta || (n = t), o || "ordinal" === t.type || "time" === t.type ||
  4477. l && l !== t.coordDim || (o = t))
  4478. }), !o || s || n || (s = !0), o) {
  4479. a = "__\0ecstackresult", r = "__\0ecstackedover", n && (n.createInvertedIndices = !0);
  4480. var h = o.coordDim,
  4481. c = o.type,
  4482. f = 0;
  4483. d(e, function(t) {
  4484. t.coordDim === h && f++
  4485. }), e.push({
  4486. name: a,
  4487. coordDim: h,
  4488. coordDimIndex: f,
  4489. type: c,
  4490. isExtraCoord: !0,
  4491. isCalculationCoord: !0
  4492. }), f++, e.push({
  4493. name: r,
  4494. coordDim: r,
  4495. coordDimIndex: f,
  4496. type: c,
  4497. isExtraCoord: !0,
  4498. isCalculationCoord: !0
  4499. })
  4500. }
  4501. return {
  4502. stackedDimension: o && o.name,
  4503. stackedByDimension: n && n.name,
  4504. isStackedByIndex: s,
  4505. stackedOverDimension: r,
  4506. stackResultDimension: a
  4507. }
  4508. }
  4509. function hl(t, e) {
  4510. return !!e && e === t.getCalculationInfo("stackedDimension")
  4511. }
  4512. function cl(t, e) {
  4513. return hl(t, e) ? t.getCalculationInfo("stackResultDimension") : e
  4514. }
  4515. function dl(t, e, i) {
  4516. i = i || {}, va.isInstance(t) || (t = va.seriesDataToSource(t));
  4517. var n, o = e.get("coordinateSystem"),
  4518. a = Ba.get(o),
  4519. r = ga(e);
  4520. r && (n = f(r.coordSysDims, function(t) {
  4521. var e = {
  4522. name: t
  4523. },
  4524. i = r.axisMap.get(t);
  4525. if (i) {
  4526. var n = i.get("type");
  4527. e.type = Xs(n)
  4528. }
  4529. return e
  4530. })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]);
  4531. var s, l, u = oA(t, {
  4532. coordDimensions: n,
  4533. generateCoord: i.generateCoord
  4534. });
  4535. r && d(u, function(t, e) {
  4536. var i = t.coordDim,
  4537. n = r.categoryAxisMap.get(i);
  4538. n && (null == s && (s = e), t.ordinalMeta = n.getOrdinalMeta()), null != t.otherDims.itemName && (l = !0)
  4539. }), l || null == s || (u[s].otherDims.itemName = 0);
  4540. var h = ul(e, u),
  4541. c = new eA(u, e);
  4542. c.setCalculationInfo(h);
  4543. var p = null != s && fl(t) ? function(t, e, i, n) {
  4544. return n === s ? i : this.defaultDimValueGetter(t, e, i, n)
  4545. } : null;
  4546. return c.hasItemOption = !1, c.initData(t, null, p), c
  4547. }
  4548. function fl(t) {
  4549. if (t.sourceFormat === tI) {
  4550. var e = pl(t.data || []);
  4551. return null != e && !y(Li(e))
  4552. }
  4553. }
  4554. function pl(t) {
  4555. for (var e = 0; e < t.length && null == t[e];) e++;
  4556. return t[e]
  4557. }
  4558. function gl(t) {
  4559. this._setting = t || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this,
  4560. arguments)
  4561. }
  4562. function ml(t) {
  4563. this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this
  4564. ._map
  4565. }
  4566. function vl(t) {
  4567. return t._map || (t._map = R(t.categories))
  4568. }
  4569. function yl(t) {
  4570. return w(t) && null != t.value ? t.value : t + ""
  4571. }
  4572. function xl(t, e, i, n) {
  4573. var o = {},
  4574. a = t[1] - t[0],
  4575. r = o.interval = Yo(a / e, !0);
  4576. null != i && r < i && (r = o.interval = i), null != n && r > n && (r = o.interval = n);
  4577. var s = o.intervalPrecision = _l(r);
  4578. return bl(o.niceTickExtent = [lA(Math.ceil(t[0] / r) * r, s), lA(Math.floor(t[1] / r) * r, s)], t), o
  4579. }
  4580. function _l(t) {
  4581. return Go(t) + 2
  4582. }
  4583. function wl(t, e, i) {
  4584. t[e] = Math.max(Math.min(t[e], i[1]), i[0])
  4585. }
  4586. function bl(t, e) {
  4587. !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), wl(t, 0, e), wl(t, 1, e), t[0] > t[1] && (t[0] =
  4588. t[1])
  4589. }
  4590. function Sl(t, e, i, n) {
  4591. var o = [];
  4592. if (!t) return o;
  4593. e[0] < i[0] && o.push(e[0]);
  4594. for (var a = i[0]; a <= i[1] && (o.push(a), (a = lA(a + t, n)) !== o[o.length - 1]);)
  4595. if (o.length > 1e4) return [];
  4596. return e[1] > (o.length ? o[o.length - 1] : i[1]) && o.push(e[1]), o
  4597. }
  4598. function Ml(t) {
  4599. return t.get("stack") || cA + t.seriesIndex
  4600. }
  4601. function Il(t) {
  4602. return t.dim + t.index
  4603. }
  4604. function Tl(t) {
  4605. var e = [],
  4606. i = t.axis;
  4607. if ("category" === i.type) {
  4608. for (var n = i.getBandWidth(), o = 0; o < t.count; o++) e.push(r({
  4609. bandWidth: n,
  4610. axisKey: "axis0",
  4611. stackId: cA + o
  4612. }, t));
  4613. for (var a = Cl(e), s = [], o = 0; o < t.count; o++) {
  4614. var l = a.axis0[cA + o];
  4615. l.offsetCenter = l.offset + l.width / 2, s.push(l)
  4616. }
  4617. return s
  4618. }
  4619. }
  4620. function Al(t, e) {
  4621. var i = [];
  4622. return e.eachSeriesByType(t, function(t) {
  4623. Pl(t) && !Nl(t) && i.push(t)
  4624. }), i
  4625. }
  4626. function Dl(t) {
  4627. var e = [];
  4628. return d(t, function(t) {
  4629. var i = t.getData(),
  4630. n = t.coordinateSystem.getBaseAxis(),
  4631. o = n.getExtent(),
  4632. a = "category" === n.type ? n.getBandWidth() : Math.abs(o[1] - o[0]) / i.count(),
  4633. r = Ro(t.get("barWidth"), a),
  4634. s = Ro(t.get("barMaxWidth"), a),
  4635. l = t.get("barGap"),
  4636. u = t.get("barCategoryGap");
  4637. e.push({
  4638. bandWidth: a,
  4639. barWidth: r,
  4640. barMaxWidth: s,
  4641. barGap: l,
  4642. barCategoryGap: u,
  4643. axisKey: Il(n),
  4644. stackId: Ml(t)
  4645. })
  4646. }), Cl(e)
  4647. }
  4648. function Cl(t) {
  4649. var e = {};
  4650. d(t, function(t, i) {
  4651. var n = t.axisKey,
  4652. o = t.bandWidth,
  4653. a = e[n] || {
  4654. bandWidth: o,
  4655. remainedWidth: o,
  4656. autoWidthCount: 0,
  4657. categoryGap: "20%",
  4658. gap: "30%",
  4659. stacks: {}
  4660. },
  4661. r = a.stacks;
  4662. e[n] = a;
  4663. var s = t.stackId;
  4664. r[s] || a.autoWidthCount++, r[s] = r[s] || {
  4665. width: 0,
  4666. maxWidth: 0
  4667. };
  4668. var l = t.barWidth;
  4669. l && !r[s].width && (r[s].width = l, l = Math.min(a.remainedWidth, l), a.remainedWidth -= l);
  4670. var u = t.barMaxWidth;
  4671. u && (r[s].maxWidth = u);
  4672. var h = t.barGap;
  4673. null != h && (a.gap = h);
  4674. var c = t.barCategoryGap;
  4675. null != c && (a.categoryGap = c)
  4676. });
  4677. var i = {};
  4678. return d(e, function(t, e) {
  4679. i[e] = {};
  4680. var n = t.stacks,
  4681. o = t.bandWidth,
  4682. a = Ro(t.categoryGap, o),
  4683. r = Ro(t.gap, 1),
  4684. s = t.remainedWidth,
  4685. l = t.autoWidthCount,
  4686. u = (s - a) / (l + (l - 1) * r);
  4687. u = Math.max(u, 0), d(n, function(t, e) {
  4688. var i = t.maxWidth;
  4689. i && i < u && (i = Math.min(i, s), t.width && (i = Math.min(i, t.width)), s -= i, t.width = i, l--)
  4690. }), u = (s - a) / (l + (l - 1) * r), u = Math.max(u, 0);
  4691. var h, c = 0;
  4692. d(n, function(t, e) {
  4693. t.width || (t.width = u), h = t, c += t.width * (1 + r)
  4694. }), h && (c -= h.width * r);
  4695. var f = -c / 2;
  4696. d(n, function(t, n) {
  4697. i[e][n] = i[e][n] || {
  4698. offset: f,
  4699. width: t.width
  4700. }, f += t.width * (1 + r)
  4701. })
  4702. }), i
  4703. }
  4704. function Ll(t, e, i) {
  4705. if (t && e) {
  4706. var n = t[Il(e)];
  4707. return null != n && null != i && (n = n[Ml(i)]), n
  4708. }
  4709. }
  4710. function kl(t, e) {
  4711. var i = Al(t, e),
  4712. n = Dl(i),
  4713. o = {};
  4714. d(i, function(t) {
  4715. var e = t.getData(),
  4716. i = t.coordinateSystem,
  4717. a = i.getBaseAxis(),
  4718. r = Ml(t),
  4719. s = n[Il(a)][r],
  4720. l = s.offset,
  4721. u = s.width,
  4722. h = i.getOtherAxis(a),
  4723. c = t.get("barMinHeight") || 0;
  4724. o[r] = o[r] || [], e.setLayout({
  4725. offset: l,
  4726. size: u
  4727. });
  4728. for (var d = e.mapDimension(h.dim), f = e.mapDimension(a.dim), p = hl(e, d), g = h.isHorizontal(), m = Ol(a, h, p),
  4729. v = 0, y = e.count(); v < y; v++) {
  4730. var x = e.get(d, v),
  4731. _ = e.get(f, v);
  4732. if (!isNaN(x)) {
  4733. var w = x >= 0 ? "p" : "n",
  4734. b = m;
  4735. p && (o[r][_] || (o[r][_] = {
  4736. p: m,
  4737. n: m
  4738. }), b = o[r][_][w]);
  4739. var S, M, I, T;
  4740. if (g) S = b, M = (A = i.dataToPoint([x, _]))[1] + l, I = A[0] - m, T = u, Math.abs(I) < c && (I = (I < 0 ? -1 :
  4741. 1) * c), p && (o[r][_][w] += I);
  4742. else {
  4743. var A = i.dataToPoint([_, x]);
  4744. S = A[0] + l, M = b, I = u, T = A[1] - m, Math.abs(T) < c && (T = (T <= 0 ? -1 : 1) * c), p && (o[r][_][w] +=
  4745. T)
  4746. }
  4747. e.setItemLayout(v, {
  4748. x: S,
  4749. y: M,
  4750. width: I,
  4751. height: T
  4752. })
  4753. }
  4754. }
  4755. }, this)
  4756. }
  4757. function Pl(t) {
  4758. return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type
  4759. }
  4760. function Nl(t) {
  4761. return t.pipelineContext && t.pipelineContext.large
  4762. }
  4763. function Ol(t, e, i) {
  4764. var n, o, a = e.getGlobalExtent();
  4765. a[0] > a[1] ? (n = a[1], o = a[0]) : (n = a[0], o = a[1]);
  4766. var r = e.toGlobalCoord(e.dataToCoord(0));
  4767. return r < n && (r = n), r > o && (r = o), r
  4768. }
  4769. function El(t, e) {
  4770. return SA(t, bA(e))
  4771. }
  4772. function Rl(t, e) {
  4773. var i, n, o, a = t.type,
  4774. r = e.getMin(),
  4775. s = e.getMax(),
  4776. l = null != r,
  4777. u = null != s,
  4778. h = t.getExtent();
  4779. "ordinal" === a ? i = e.getCategories().length : (y(n = e.get("boundaryGap")) || (n = [n || 0, n || 0]), "boolean" ==
  4780. typeof n[0] && (n = [0, 0]), n[0] = Ro(n[0], 1), n[1] = Ro(n[1], 1), o = h[1] - h[0] || Math.abs(h[0])), null == r &&
  4781. (r = "ordinal" === a ? i ? 0 : NaN : h[0] - n[0] * o), null == s && (s = "ordinal" === a ? i ? i - 1 : NaN : h[1] +
  4782. n[1] * o), "dataMin" === r ? r = h[0] : "function" == typeof r && (r = r({
  4783. min: h[0],
  4784. max: h[1]
  4785. })), "dataMax" === s ? s = h[1] : "function" == typeof s && (s = s({
  4786. min: h[0],
  4787. max: h[1]
  4788. })), (null == r || !isFinite(r)) && (r = NaN), (null == s || !isFinite(s)) && (s = NaN), t.setBlank(I(r) || I(s) ||
  4789. "ordinal" === a && !t.getOrdinalMeta().categories.length), e.getNeedCrossZero() && (r > 0 && s > 0 && !l && (r = 0),
  4790. r < 0 && s < 0 && !u && (s = 0));
  4791. var c = e.ecModel;
  4792. if (c && "time" === a) {
  4793. var f, p = Al("bar", c);
  4794. if (d(p, function(t) {
  4795. f |= t.getBaseAxis() === e.axis
  4796. }), f) {
  4797. var g = Dl(p),
  4798. m = zl(r, s, e, g);
  4799. r = m.min, s = m.max
  4800. }
  4801. }
  4802. return [r, s]
  4803. }
  4804. function zl(t, e, i, n) {
  4805. var o = i.axis.getExtent(),
  4806. a = o[1] - o[0],
  4807. r = Ll(n, i.axis);
  4808. if (void 0 === r) return {
  4809. min: t,
  4810. max: e
  4811. };
  4812. var s = 1 / 0;
  4813. d(r, function(t) {
  4814. s = Math.min(t.offset, s)
  4815. });
  4816. var l = -1 / 0;
  4817. d(r, function(t) {
  4818. l = Math.max(t.offset + t.width, l)
  4819. }), s = Math.abs(s), l = Math.abs(l);
  4820. var u = s + l,
  4821. h = e - t,
  4822. c = h / (1 - (s + l) / a) - h;
  4823. return e += c * (l / u), t -= c * (s / u), {
  4824. min: t,
  4825. max: e
  4826. }
  4827. }
  4828. function Bl(t, e) {
  4829. var i = Rl(t, e),
  4830. n = null != e.getMin(),
  4831. o = null != e.getMax(),
  4832. a = e.get("splitNumber");
  4833. "log" === t.type && (t.base = e.get("logBase"));
  4834. var r = t.type;
  4835. t.setExtent(i[0], i[1]), t.niceExtent({
  4836. splitNumber: a,
  4837. fixMin: n,
  4838. fixMax: o,
  4839. minInterval: "interval" === r || "time" === r ? e.get("minInterval") : null,
  4840. maxInterval: "interval" === r || "time" === r ? e.get("maxInterval") : null
  4841. });
  4842. var s = e.get("interval");
  4843. null != s && t.setInterval && t.setInterval(s)
  4844. }
  4845. function Vl(t, e) {
  4846. if (e = e || t.get("type")) switch (e) {
  4847. case "category":
  4848. return new sA(t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(), [1 / 0, -1 / 0]);
  4849. case "value":
  4850. return new hA;
  4851. default:
  4852. return (gl.getClass(e) || hA).create(t)
  4853. }
  4854. }
  4855. function Gl(t) {
  4856. var e = t.scale.getExtent(),
  4857. i = e[0],
  4858. n = e[1];
  4859. return !(i > 0 && n > 0 || i < 0 && n < 0)
  4860. }
  4861. function Fl(t) {
  4862. var e = t.getLabelModel().get("formatter"),
  4863. i = "category" === t.type ? t.scale.getExtent()[0] : null;
  4864. return "string" == typeof e ? e = function(e) {
  4865. return function(i) {
  4866. return i = t.scale.getLabel(i), e.replace("{value}", null != i ? i : "")
  4867. }
  4868. }(e) : "function" == typeof e ? function(n, o) {
  4869. return null != i && (o = n - i), e(Wl(t, n), o)
  4870. } : function(e) {
  4871. return t.scale.getLabel(e)
  4872. }
  4873. }
  4874. function Wl(t, e) {
  4875. return "category" === t.type ? t.scale.getLabel(e) : e
  4876. }
  4877. function Hl(t) {
  4878. var e = t.model,
  4879. i = t.scale;
  4880. if (e.get("axisLabel.show") && !i.isBlank()) {
  4881. var n, o, a = "category" === t.type,
  4882. r = i.getExtent();
  4883. o = a ? i.count() : (n = i.getTicks()).length;
  4884. var s, l = t.getLabelModel(),
  4885. u = Fl(t),
  4886. h = 1;
  4887. o > 40 && (h = Math.ceil(o / 40));
  4888. for (var c = 0; c < o; c += h) {
  4889. var d = u(n ? n[c] : r[0] + c),
  4890. f = Zl(l.getTextRect(d), l.get("rotate") || 0);
  4891. s ? s.union(f) : s = f
  4892. }
  4893. return s
  4894. }
  4895. }
  4896. function Zl(t, e) {
  4897. var i = e * Math.PI / 180,
  4898. n = t.plain(),
  4899. o = n.width,
  4900. a = n.height,
  4901. r = o * Math.cos(i) + a * Math.sin(i),
  4902. s = o * Math.sin(i) + a * Math.cos(i);
  4903. return new ue(n.x, n.y, r, s)
  4904. }
  4905. function Ul(t, e) {
  4906. if ("image" !== this.type) {
  4907. var i = this.style,
  4908. n = this.shape;
  4909. n && "line" === n.symbolType ? i.stroke = t : this.__isEmptyBrush ? (i.stroke = t, i.fill = e || "#fff") : (i.fill &&
  4910. (i.fill = t), i.stroke && (i.stroke = t)), this.dirty(!1)
  4911. }
  4912. }
  4913. function Xl(t, e, i, n, o, a, r) {
  4914. var s = 0 === t.indexOf("empty");
  4915. s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
  4916. var l;
  4917. return l = 0 === t.indexOf("image://") ? Hn(t.slice(8), new ue(e, i, n, o), r ? "center" : "cover") : 0 === t.indexOf(
  4918. "path://") ? Wn(t.slice(7), {}, new ue(e, i, n, o), r ? "center" : "cover") : new RA({
  4919. shape: {
  4920. symbolType: t,
  4921. x: e,
  4922. y: i,
  4923. width: n,
  4924. height: o
  4925. }
  4926. }), l.__isEmptyBrush = s, l.setColor = Ul, l.setColor(a), l
  4927. }
  4928. function jl(t, e) {
  4929. return Math.abs(t - e) < VA
  4930. }
  4931. function Yl(t, e, i) {
  4932. var n = 0,
  4933. o = t[0];
  4934. if (!o) return !1;
  4935. for (var a = 1; a < t.length; a++) {
  4936. var r = t[a];
  4937. n += bn(o[0], o[1], r[0], r[1], e, i), o = r
  4938. }
  4939. var s = t[0];
  4940. return jl(o[0], s[0]) && jl(o[1], s[1]) || (n += bn(o[0], o[1], s[0], s[1], e, i)), 0 !== n
  4941. }
  4942. function ql(t, e, i) {
  4943. if (this.name = t, this.geometries = e, i) i = [i[0], i[1]];
  4944. else {
  4945. var n = this.getBoundingRect();
  4946. i = [n.x + n.width / 2, n.y + n.height / 2]
  4947. }
  4948. this.center = i
  4949. }
  4950. function Kl(t) {
  4951. if (!t.UTF8Encoding) return t;
  4952. var e = t.UTF8Scale;
  4953. null == e && (e = 1024);
  4954. for (var i = t.features, n = 0; n < i.length; n++)
  4955. for (var o = i[n].geometry, a = o.coordinates, r = o.encodeOffsets, s = 0; s < a.length; s++) {
  4956. var l = a[s];
  4957. if ("Polygon" === o.type) a[s] = $l(l, r[s], e);
  4958. else if ("MultiPolygon" === o.type)
  4959. for (var u = 0; u < l.length; u++) {
  4960. var h = l[u];
  4961. l[u] = $l(h, r[s][u], e)
  4962. }
  4963. }
  4964. return t.UTF8Encoding = !1, t
  4965. }
  4966. function $l(t, e, i) {
  4967. for (var n = [], o = e[0], a = e[1], r = 0; r < t.length; r += 2) {
  4968. var s = t.charCodeAt(r) - 64,
  4969. l = t.charCodeAt(r + 1) - 64;
  4970. s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), o = s += o, a = l += a, n.push([s / i, l / i])
  4971. }
  4972. return n
  4973. }
  4974. function Jl(t) {
  4975. return "category" === t.type ? tu(t) : nu(t)
  4976. }
  4977. function Ql(t, e) {
  4978. return "category" === t.type ? iu(t, e) : {
  4979. ticks: t.scale.getTicks()
  4980. }
  4981. }
  4982. function tu(t) {
  4983. var e = t.getLabelModel(),
  4984. i = eu(t, e);
  4985. return !e.get("show") || t.scale.isBlank() ? {
  4986. labels: [],
  4987. labelCategoryInterval: i.labelCategoryInterval
  4988. } : i
  4989. }
  4990. function eu(t, e) {
  4991. var i = ou(t, "labels"),
  4992. n = du(e),
  4993. o = au(i, n);
  4994. if (o) return o;
  4995. var a, r;
  4996. return a = x(n) ? cu(t, n) : hu(t, r = "auto" === n ? su(t) : n), ru(i, n, {
  4997. labels: a,
  4998. labelCategoryInterval: r
  4999. })
  5000. }
  5001. function iu(t, e) {
  5002. var i = ou(t, "ticks"),
  5003. n = du(e),
  5004. o = au(i, n);
  5005. if (o) return o;
  5006. var a, r;
  5007. if (e.get("show") && !t.scale.isBlank() || (a = []), x(n)) a = cu(t, n, !0);
  5008. else if ("auto" === n) {
  5009. var s = eu(t, t.getLabelModel());
  5010. r = s.labelCategoryInterval, a = f(s.labels, function(t) {
  5011. return t.tickValue
  5012. })
  5013. } else a = hu(t, r = n, !0);
  5014. return ru(i, n, {
  5015. ticks: a,
  5016. tickCategoryInterval: r
  5017. })
  5018. }
  5019. function nu(t) {
  5020. var e = t.scale.getTicks(),
  5021. i = Fl(t);
  5022. return {
  5023. labels: f(e, function(e, n) {
  5024. return {
  5025. formattedLabel: i(e, n),
  5026. rawLabel: t.scale.getLabel(e),
  5027. tickValue: e
  5028. }
  5029. })
  5030. }
  5031. }
  5032. function ou(t, e) {
  5033. return FA(t)[e] || (FA(t)[e] = [])
  5034. }
  5035. function au(t, e) {
  5036. for (var i = 0; i < t.length; i++)
  5037. if (t[i].key === e) return t[i].value
  5038. }
  5039. function ru(t, e, i) {
  5040. return t.push({
  5041. key: e,
  5042. value: i
  5043. }), i
  5044. }
  5045. function su(t) {
  5046. var e = FA(t).autoInterval;
  5047. return null != e ? e : FA(t).autoInterval = t.calculateCategoryInterval()
  5048. }
  5049. function lu(t) {
  5050. var e = uu(t),
  5051. i = Fl(t),
  5052. n = (e.axisRotate - e.labelRotate) / 180 * Math.PI,
  5053. o = t.scale,
  5054. a = o.getExtent(),
  5055. r = o.count();
  5056. if (a[1] - a[0] < 1) return 0;
  5057. var s = 1;
  5058. r > 40 && (s = Math.max(1, Math.floor(r / 40)));
  5059. for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), h = Math.abs(u * Math.cos(n)), c = Math.abs(u * Math
  5060. .sin(n)), d = 0, f = 0; l <= a[1]; l += s) {
  5061. var p = 0,
  5062. g = 0,
  5063. m = De(i(l), e.font, "center", "top");
  5064. p = 1.3 * m.width, g = 1.3 * m.height, d = Math.max(d, p, 7), f = Math.max(f, g, 7)
  5065. }
  5066. var v = d / h,
  5067. y = f / c;
  5068. isNaN(v) && (v = 1 / 0), isNaN(y) && (y = 1 / 0);
  5069. var x = Math.max(0, Math.floor(Math.min(v, y))),
  5070. _ = FA(t.model),
  5071. w = _.lastAutoInterval,
  5072. b = _.lastTickCount;
  5073. return null != w && null != b && Math.abs(w - x) <= 1 && Math.abs(b - r) <= 1 && w > x ? x = w : (_.lastTickCount =
  5074. r, _.lastAutoInterval = x), x
  5075. }
  5076. function uu(t) {
  5077. var e = t.getLabelModel();
  5078. return {
  5079. axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
  5080. labelRotate: e.get("rotate") || 0,
  5081. font: e.getFont()
  5082. }
  5083. }
  5084. function hu(t, e, i) {
  5085. function n(t) {
  5086. l.push(i ? t : {
  5087. formattedLabel: o(t),
  5088. rawLabel: a.getLabel(t),
  5089. tickValue: t
  5090. })
  5091. }
  5092. var o = Fl(t),
  5093. a = t.scale,
  5094. r = a.getExtent(),
  5095. s = t.getLabelModel(),
  5096. l = [],
  5097. u = Math.max((e || 0) + 1, 1),
  5098. h = r[0],
  5099. c = a.count();
  5100. 0 !== h && u > 1 && c / u > 2 && (h = Math.round(Math.ceil(h / u) * u));
  5101. var d = {
  5102. min: s.get("showMinLabel"),
  5103. max: s.get("showMaxLabel")
  5104. };
  5105. d.min && h !== r[0] && n(r[0]);
  5106. for (var f = h; f <= r[1]; f += u) n(f);
  5107. return d.max && f !== r[1] && n(r[1]), l
  5108. }
  5109. function cu(t, e, i) {
  5110. var n = t.scale,
  5111. o = Fl(t),
  5112. a = [];
  5113. return d(n.getTicks(), function(t) {
  5114. var r = n.getLabel(t);
  5115. e(t, r) && a.push(i ? t : {
  5116. formattedLabel: o(t),
  5117. rawLabel: r,
  5118. tickValue: t
  5119. })
  5120. }), a
  5121. }
  5122. function du(t) {
  5123. var e = t.get("interval");
  5124. return null == e ? "auto" : e
  5125. }
  5126. function fu(t, e) {
  5127. var i = (t[1] - t[0]) / e / 2;
  5128. t[0] += i, t[1] -= i
  5129. }
  5130. function pu(t, e, i, n, o) {
  5131. function a(t, e) {
  5132. return h ? t > e : t < e
  5133. }
  5134. var r = e.length;
  5135. if (t.onBand && !n && r) {
  5136. var s, l = t.getExtent();
  5137. if (1 === r) e[0].coord = l[0], s = e[1] = {
  5138. coord: l[0]
  5139. };
  5140. else {
  5141. var u = e[1].coord - e[0].coord;
  5142. d(e, function(t) {
  5143. t.coord -= u / 2;
  5144. var e = e || 0;
  5145. e % 2 > 0 && (t.coord -= u / (2 * (e + 1)))
  5146. }), s = {
  5147. coord: e[r - 1].coord + u
  5148. }, e.push(s)
  5149. }
  5150. var h = l[0] > l[1];
  5151. a(e[0].coord, l[0]) && (o ? e[0].coord = l[0] : e.shift()), o && a(l[0], e[0].coord) && e.unshift({
  5152. coord: l[0]
  5153. }), a(l[1], s.coord) && (o ? s.coord = l[1] : e.pop()), o && a(s.coord, l[1]) && e.push({
  5154. coord: l[1]
  5155. })
  5156. }
  5157. }
  5158. function gu(t, e) {
  5159. var i = t.mapDimension("defaultedLabel", !0),
  5160. n = i.length;
  5161. if (1 === n) return hr(t, e, i[0]);
  5162. if (n) {
  5163. for (var o = [], a = 0; a < i.length; a++) {
  5164. var r = hr(t, e, i[a]);
  5165. o.push(r)
  5166. }
  5167. return o.join(" ")
  5168. }
  5169. }
  5170. function mu(t, e, i) {
  5171. Zw.call(this), this.updateData(t, e, i)
  5172. }
  5173. function vu(t) {
  5174. return [t[0] / 2, t[1] / 2]
  5175. }
  5176. function yu(t, e) {
  5177. this.parent.drift(t, e)
  5178. }
  5179. function xu() {
  5180. !oo(this) && wu.call(this)
  5181. }
  5182. function _u() {
  5183. !oo(this) && bu.call(this)
  5184. }
  5185. function wu() {
  5186. if (!this.incremental && !this.useHoverLayer) {
  5187. var t = this.__symbolOriginalScale,
  5188. e = t[1] / t[0];
  5189. this.animateTo({
  5190. scale: [Math.max(1.1 * t[0], t[0] + 3), Math.max(1.1 * t[1], t[1] + 3 * e)]
  5191. }, 400, "elasticOut")
  5192. }
  5193. }
  5194. function bu() {
  5195. this.incremental || this.useHoverLayer || this.animateTo({
  5196. scale: this.__symbolOriginalScale
  5197. }, 400, "elasticOut")
  5198. }
  5199. function Su(t) {
  5200. this.group = new Zw, this._symbolCtor = t || mu
  5201. }
  5202. function Mu(t, e, i, n) {
  5203. return e && !isNaN(e[0]) && !isNaN(e[1]) && !(n.isIgnore && n.isIgnore(i)) && !(n.clipShape && !n.clipShape.contain(
  5204. e[0], e[1])) && "none" !== t.getItemVisual(i, "symbol")
  5205. }
  5206. function Iu(t) {
  5207. return null == t || w(t) || (t = {
  5208. isIgnore: t
  5209. }), t || {}
  5210. }
  5211. function Tu(t) {
  5212. var e = t.hostModel;
  5213. return {
  5214. itemStyle: e.getModel("itemStyle").getItemStyle(["color"]),
  5215. hoverItemStyle: e.getModel("emphasis.itemStyle").getItemStyle(),
  5216. symbolRotate: e.get("symbolRotate"),
  5217. symbolOffset: e.get("symbolOffset"),
  5218. hoverAnimation: e.get("hoverAnimation"),
  5219. labelModel: e.getModel("label"),
  5220. hoverLabelModel: e.getModel("emphasis.label"),
  5221. cursorStyle: e.get("cursor")
  5222. }
  5223. }
  5224. function Au(t, e, i) {
  5225. var n, o = t.getBaseAxis(),
  5226. a = t.getOtherAxis(o),
  5227. r = Du(a, i),
  5228. s = o.dim,
  5229. l = a.dim,
  5230. u = e.mapDimension(l),
  5231. h = e.mapDimension(s),
  5232. c = "x" === l || "radius" === l ? 1 : 0,
  5233. d = f(t.dimensions, function(t) {
  5234. return e.mapDimension(t)
  5235. }),
  5236. p = e.getCalculationInfo("stackResultDimension");
  5237. return (n |= hl(e, d[0])) && (d[0] = p), (n |= hl(e, d[1])) && (d[1] = p), {
  5238. dataDimsForPoint: d,
  5239. valueStart: r,
  5240. valueAxisDim: l,
  5241. baseAxisDim: s,
  5242. stacked: !!n,
  5243. valueDim: u,
  5244. baseDim: h,
  5245. baseDataOffset: c,
  5246. stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  5247. }
  5248. }
  5249. function Du(t, e) {
  5250. var i = 0,
  5251. n = t.scale.getExtent();
  5252. return "start" === e ? i = n[0] : "end" === e ? i = n[1] : n[0] > 0 ? i = n[0] : n[1] < 0 && (i = n[1]), i
  5253. }
  5254. function Cu(t, e, i, n) {
  5255. var o = NaN;
  5256. t.stacked && (o = i.get(i.getCalculationInfo("stackedOverDimension"), n)), isNaN(o) && (o = t.valueStart);
  5257. var a = t.baseDataOffset,
  5258. r = [];
  5259. return r[a] = i.get(t.baseDim, n), r[1 - a] = o, e.dataToPoint(r)
  5260. }
  5261. function Lu(t, e) {
  5262. var i = [];
  5263. return e.diff(t).add(function(t) {
  5264. i.push({
  5265. cmd: "+",
  5266. idx: t
  5267. })
  5268. }).update(function(t, e) {
  5269. i.push({
  5270. cmd: "=",
  5271. idx: e,
  5272. idx1: t
  5273. })
  5274. }).remove(function(t) {
  5275. i.push({
  5276. cmd: "-",
  5277. idx: t
  5278. })
  5279. }).execute(), i
  5280. }
  5281. function ku(t) {
  5282. return isNaN(t[0]) || isNaN(t[1])
  5283. }
  5284. function Pu(t, e, i, n, o, a, r, s, l, u, h) {
  5285. return "none" !== u && u ? Nu.apply(this, arguments) : Ou.apply(this, arguments)
  5286. }
  5287. function Nu(t, e, i, n, o, a, r, s, l, u, h) {
  5288. for (var c = 0, d = i, f = 0; f < n; f++) {
  5289. var p = e[d];
  5290. if (d >= o || d < 0) break;
  5291. if (ku(p)) {
  5292. if (h) {
  5293. d += a;
  5294. continue
  5295. }
  5296. break
  5297. }
  5298. if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]);
  5299. else if (l > 0) {
  5300. var g = e[c],
  5301. m = "y" === u ? 1 : 0,
  5302. v = (p[m] - g[m]) * l;
  5303. oD(rD, g), rD[m] = g[m] + v, oD(sD, p), sD[m] = p[m] - v, t.bezierCurveTo(rD[0], rD[1], sD[0], sD[1], p[0], p[1])
  5304. } else t.lineTo(p[0], p[1]);
  5305. c = d, d += a
  5306. }
  5307. return f
  5308. }
  5309. function Ou(t, e, i, n, o, a, r, s, l, u, h) {
  5310. for (var c = 0, d = i, f = 0; f < n; f++) {
  5311. var p = e[d];
  5312. if (d >= o || d < 0) break;
  5313. if (ku(p)) {
  5314. if (h) {
  5315. d += a;
  5316. continue
  5317. }
  5318. break
  5319. }
  5320. if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]), oD(rD, p);
  5321. else if (l > 0) {
  5322. var g = d + a,
  5323. m = e[g];
  5324. if (h)
  5325. for (; m && ku(e[g]);) m = e[g += a];
  5326. var v = .5,
  5327. y = e[c];
  5328. if (!(m = e[g]) || ku(m)) oD(sD, p);
  5329. else {
  5330. ku(m) && !h && (m = p), U(aD, m, y);
  5331. var x, _;
  5332. if ("x" === u || "y" === u) {
  5333. var w = "x" === u ? 0 : 1;
  5334. x = Math.abs(p[w] - y[w]), _ = Math.abs(p[w] - m[w])
  5335. } else x = ew(p, y), _ = ew(p, m);
  5336. nD(sD, p, aD, -l * (1 - (v = _ / (_ + x))))
  5337. }
  5338. eD(rD, rD, s), iD(rD, rD, r), eD(sD, sD, s), iD(sD, sD, r), t.bezierCurveTo(rD[0], rD[1], sD[0], sD[1], p[0], p[1]),
  5339. nD(rD, p, aD, l * v)
  5340. } else t.lineTo(p[0], p[1]);
  5341. c = d, d += a
  5342. }
  5343. return f
  5344. }
  5345. function Eu(t, e) {
  5346. var i = [1 / 0, 1 / 0],
  5347. n = [-1 / 0, -1 / 0];
  5348. if (e)
  5349. for (var o = 0; o < t.length; o++) {
  5350. var a = t[o];
  5351. a[0] < i[0] && (i[0] = a[0]), a[1] < i[1] && (i[1] = a[1]), a[0] > n[0] && (n[0] = a[0]), a[1] > n[1] && (n[1] = a[
  5352. 1])
  5353. }
  5354. return {
  5355. min: e ? i : n,
  5356. max: e ? n : i
  5357. }
  5358. }
  5359. function Ru(t, e) {
  5360. if (t.length === e.length) {
  5361. for (var i = 0; i < t.length; i++) {
  5362. var n = t[i],
  5363. o = e[i];
  5364. if (n[0] !== o[0] || n[1] !== o[1]) return
  5365. }
  5366. return !0
  5367. }
  5368. }
  5369. function zu(t) {
  5370. return "number" == typeof t ? t : t ? .5 : 0
  5371. }
  5372. function Bu(t) {
  5373. var e = t.getGlobalExtent();
  5374. if (t.onBand) {
  5375. var i = t.getBandWidth() / 2 - 1,
  5376. n = e[1] > e[0] ? 1 : -1;
  5377. e[0] += n * i, e[1] -= n * i
  5378. }
  5379. return e
  5380. }
  5381. function Vu(t, e, i) {
  5382. if (!i.valueDim) return [];
  5383. for (var n = [], o = 0, a = e.count(); o < a; o++) n.push(Cu(i, t, e, o));
  5384. return n
  5385. }
  5386. function Gu(t, e, i, n) {
  5387. var o = Bu(t.getAxis("x")),
  5388. a = Bu(t.getAxis("y")),
  5389. r = t.getBaseAxis().isHorizontal(),
  5390. s = Math.min(o[0], o[1]),
  5391. l = Math.min(a[0], a[1]),
  5392. u = Math.max(o[0], o[1]) - s,
  5393. h = Math.max(a[0], a[1]) - l;
  5394. if (i) s -= .5, u += .5, l -= .5, h += .5;
  5395. else {
  5396. var c = n.get("lineStyle.width") || 2,
  5397. d = n.get("clipOverflow") ? c / 2 : Math.max(u, h);
  5398. r ? (l -= d, h += 2 * d) : (s -= d, u += 2 * d)
  5399. }
  5400. var f = new aM({
  5401. shape: {
  5402. x: s,
  5403. y: l,
  5404. width: u,
  5405. height: h
  5406. }
  5407. });
  5408. return e && (f.shape[r ? "width" : "height"] = 0, So(f, {
  5409. shape: {
  5410. width: u,
  5411. height: h
  5412. }
  5413. }, n)), f
  5414. }
  5415. function Fu(t, e, i, n) {
  5416. var o = t.getAngleAxis(),
  5417. a = t.getRadiusAxis().getExtent().slice();
  5418. a[0] > a[1] && a.reverse();
  5419. var r = o.getExtent(),
  5420. s = Math.PI / 180;
  5421. i && (a[0] -= .5, a[1] += .5);
  5422. var l = new QS({
  5423. shape: {
  5424. cx: zo(t.cx, 1),
  5425. cy: zo(t.cy, 1),
  5426. r0: zo(a[0], 1),
  5427. r: zo(a[1], 1),
  5428. startAngle: -r[0] * s,
  5429. endAngle: -r[1] * s,
  5430. clockwise: o.inverse
  5431. }
  5432. });
  5433. return e && (l.shape.endAngle = -r[0] * s, So(l, {
  5434. shape: {
  5435. endAngle: -r[1] * s
  5436. }
  5437. }, n)), l
  5438. }
  5439. function Wu(t, e, i, n) {
  5440. return "polar" === t.type ? Fu(t, e, i, n) : Gu(t, e, i, n)
  5441. }
  5442. function Hu(t, e, i) {
  5443. for (var n = e.getBaseAxis(), o = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], r = 0; r < t.length - 1; r++) {
  5444. var s = t[r + 1],
  5445. l = t[r];
  5446. a.push(l);
  5447. var u = [];
  5448. switch (i) {
  5449. case "end":
  5450. u[o] = s[o], u[1 - o] = l[1 - o], a.push(u);
  5451. break;
  5452. case "middle":
  5453. var h = (l[o] + s[o]) / 2,
  5454. c = [];
  5455. u[o] = c[o] = h, u[1 - o] = l[1 - o], c[1 - o] = s[1 - o], a.push(u), a.push(c);
  5456. break;
  5457. default:
  5458. u[o] = l[o], u[1 - o] = s[1 - o], a.push(u)
  5459. }
  5460. }
  5461. return t[r] && a.push(t[r]), a
  5462. }
  5463. function Zu(t, e) {
  5464. var i = t.getVisual("visualMeta");
  5465. if (i && i.length && t.count() && "cartesian2d" === e.type) {
  5466. for (var n, o, a = i.length - 1; a >= 0; a--) {
  5467. var r = i[a].dimension,
  5468. s = t.dimensions[r],
  5469. l = t.getDimensionInfo(s);
  5470. if ("x" === (n = l && l.coordDim) || "y" === n) {
  5471. o = i[a];
  5472. break
  5473. }
  5474. }
  5475. if (o) {
  5476. var u = e.getAxis(n),
  5477. h = f(o.stops, function(t) {
  5478. return {
  5479. coord: u.toGlobalCoord(u.dataToCoord(t.value)),
  5480. color: t.color
  5481. }
  5482. }),
  5483. c = h.length,
  5484. p = o.outerColors.slice();
  5485. c && h[0].coord > h[c - 1].coord && (h.reverse(), p.reverse());
  5486. var g = h[0].coord - 10,
  5487. m = h[c - 1].coord + 10,
  5488. v = m - g;
  5489. if (v < .001) return "transparent";
  5490. d(h, function(t) {
  5491. t.offset = (t.coord - g) / v
  5492. }), h.push({
  5493. offset: c ? h[c - 1].offset : .5,
  5494. color: p[1] || "transparent"
  5495. }), h.unshift({
  5496. offset: c ? h[0].offset : .5,
  5497. color: p[0] || "transparent"
  5498. });
  5499. var y = new dM(0, 0, 0, 0, h, !0);
  5500. return y[n] = g, y[n + "2"] = m, y
  5501. }
  5502. }
  5503. }
  5504. function Uu(t, e, i) {
  5505. var n = t.get("showAllSymbol"),
  5506. o = "auto" === n;
  5507. if (!n || o) {
  5508. var a = i.getAxesByScale("ordinal")[0];
  5509. if (a && (!o || !Xu(a, e))) {
  5510. var r = e.mapDimension(a.dim),
  5511. s = {};
  5512. return d(a.getViewLabels(), function(t) {
  5513. s[t.tickValue] = 1
  5514. }),
  5515. function(t) {
  5516. return !s.hasOwnProperty(e.get(r, t))
  5517. }
  5518. }
  5519. }
  5520. }
  5521. function Xu(t, e) {
  5522. var i = t.getExtent(),
  5523. n = Math.abs(i[1] - i[0]) / t.scale.count();
  5524. isNaN(n) && (n = 0);
  5525. for (var o = e.count(), a = Math.max(1, Math.round(o / 5)), r = 0; r < o; r += a)
  5526. if (1.5 * mu.getSymbolSize(e, r)[t.isHorizontal() ? 1 : 0] > n) return !1;
  5527. return !0
  5528. }
  5529. function ju(t) {
  5530. return this._axes[t]
  5531. }
  5532. function Yu(t) {
  5533. pD.call(this, t)
  5534. }
  5535. function qu(t, e) {
  5536. return e.type || (e.data ? "category" : "value")
  5537. }
  5538. function Ku(t, e, i) {
  5539. return t.getCoordSysModel() === e
  5540. }
  5541. function $u(t, e, i) {
  5542. this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(t, e, i),
  5543. this.model = t
  5544. }
  5545. function Ju(t, e, i, n) {
  5546. function o(t) {
  5547. return t.dim + "_" + t.index
  5548. }
  5549. i.getAxesOnZeroOf = function() {
  5550. return a ? [a] : []
  5551. };
  5552. var a, r = t[e],
  5553. s = i.model,
  5554. l = s.get("axisLine.onZero"),
  5555. u = s.get("axisLine.onZeroAxisIndex");
  5556. if (l) {
  5557. if (null != u) Qu(r[u]) && (a = r[u]);
  5558. else
  5559. for (var h in r)
  5560. if (r.hasOwnProperty(h) && Qu(r[h]) && !n[o(r[h])]) {
  5561. a = r[h];
  5562. break
  5563. } a && (n[o(a)] = !0)
  5564. }
  5565. }
  5566. function Qu(t) {
  5567. return t && "category" !== t.type && "time" !== t.type && Gl(t)
  5568. }
  5569. function th(t, e) {
  5570. var i = t.getExtent(),
  5571. n = i[0] + i[1];
  5572. t.toGlobalCoord = "x" === t.dim ? function(t) {
  5573. return t + e
  5574. } : function(t) {
  5575. return n - t + e
  5576. }, t.toLocalCoord = "x" === t.dim ? function(t) {
  5577. return t - e
  5578. } : function(t) {
  5579. return n - t + e
  5580. }
  5581. }
  5582. function eh(t, e) {
  5583. return f(SD, function(e) {
  5584. return t.getReferringComponents(e)[0]
  5585. })
  5586. }
  5587. function ih(t) {
  5588. return "cartesian2d" === t.get("coordinateSystem")
  5589. }
  5590. function nh(t) {
  5591. var e = {
  5592. componentType: t.mainType,
  5593. componentIndex: t.componentIndex
  5594. };
  5595. return e[t.mainType + "Index"] = t.componentIndex, e
  5596. }
  5597. function oh(t, e, i, n) {
  5598. var o, a, r = Ho(i - t.rotation),
  5599. s = n[0] > n[1],
  5600. l = "start" === e && !s || "start" !== e && s;
  5601. return Zo(r - MD / 2) ? (a = l ? "bottom" : "top", o = "center") : Zo(r - 1.5 * MD) ? (a = l ? "top" : "bottom", o =
  5602. "center") : (a = "middle", o = r < 1.5 * MD && r > MD / 2 ? l ? "left" : "right" : l ? "right" : "left"), {
  5603. rotation: r,
  5604. textAlign: o,
  5605. textVerticalAlign: a
  5606. }
  5607. }
  5608. function ah(t) {
  5609. var e = t.get("tooltip");
  5610. return t.get("silent") || !(t.get("triggerEvent") || e && e.show)
  5611. }
  5612. function rh(t, e, i) {
  5613. var n = t.get("axisLabel.showMinLabel"),
  5614. o = t.get("axisLabel.showMaxLabel");
  5615. e = e || [], i = i || [];
  5616. var a = e[0],
  5617. r = e[1],
  5618. s = e[e.length - 1],
  5619. l = e[e.length - 2],
  5620. u = i[0],
  5621. h = i[1],
  5622. c = i[i.length - 1],
  5623. d = i[i.length - 2];
  5624. !1 === n ? (sh(a), sh(u)) : lh(a, r) && (n ? (sh(r), sh(h)) : (sh(a), sh(u))), !1 === o ? (sh(s), sh(c)) : lh(l, s) &&
  5625. (o ? (sh(l), sh(d)) : (sh(s), sh(c)))
  5626. }
  5627. function sh(t) {
  5628. t && (t.ignore = !0)
  5629. }
  5630. function lh(t, e, i) {
  5631. var n = t && t.getBoundingRect().clone(),
  5632. o = e && e.getBoundingRect().clone();
  5633. if (n && o) {
  5634. var a = vt([]);
  5635. return wt(a, a, -t.rotation), n.applyTransform(xt([], a, t.getLocalTransform())), o.applyTransform(xt([], a, e.getLocalTransform())),
  5636. n.intersect(o)
  5637. }
  5638. }
  5639. function uh(t) {
  5640. return "middle" === t || "center" === t
  5641. }
  5642. function hh(t, e, i) {
  5643. var n = e.axis;
  5644. if (e.get("axisTick.show") && !n.scale.isBlank()) {
  5645. for (var o = e.getModel("axisTick"), a = o.getModel("lineStyle"), s = o.get("length"), l = n.getTicksCoords(), u = [],
  5646. h = [], c = t._transform, d = [], f = 0; f < l.length; f++) {
  5647. var p = l[f].coord;
  5648. u[0] = p, u[1] = 0, h[0] = p, h[1] = i.tickDirection * s, c && (Q(u, u, c), Q(h, h, c));
  5649. var g = new rM(Xn({
  5650. anid: "tick_" + l[f].tickValue,
  5651. shape: {
  5652. x1: u[0],
  5653. y1: u[1],
  5654. x2: h[0],
  5655. y2: h[1]
  5656. },
  5657. style: r(a.getLineStyle(), {
  5658. stroke: e.get("axisLine.lineStyle.color")
  5659. }),
  5660. z2: 2,
  5661. silent: !0
  5662. }));
  5663. t.group.add(g), d.push(g)
  5664. }
  5665. return d
  5666. }
  5667. }
  5668. function ch(t, e, i) {
  5669. var n = e.axis;
  5670. if (T(i.axisLabelShow, e.get("axisLabel.show")) && !n.scale.isBlank()) {
  5671. var o = e.getModel("axisLabel"),
  5672. a = o.get("margin"),
  5673. r = n.getViewLabels(),
  5674. s = (T(i.labelRotate, o.get("rotate")) || 0) * MD / 180,
  5675. l = AD(i.rotation, s, i.labelDirection),
  5676. u = e.getCategories(!0),
  5677. h = [],
  5678. c = ah(e),
  5679. f = e.get("triggerEvent");
  5680. return d(r, function(r, s) {
  5681. var d = r.tickValue,
  5682. p = r.formattedLabel,
  5683. g = r.rawLabel,
  5684. m = o;
  5685. u && u[d] && u[d].textStyle && (m = new Lo(u[d].textStyle, o, e.ecModel));
  5686. var v = m.getTextColor() || e.get("axisLine.lineStyle.color"),
  5687. y = [n.dataToCoord(d), i.labelOffset + i.labelDirection * a],
  5688. x = new qS({
  5689. anid: "label_" + d,
  5690. position: y,
  5691. rotation: l.rotation,
  5692. silent: c,
  5693. z2: 10
  5694. });
  5695. fo(x.style, m, {
  5696. text: p,
  5697. textAlign: m.getShallow("align", !0) || l.textAlign,
  5698. textVerticalAlign: m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || l.textVerticalAlign,
  5699. textFill: "function" == typeof v ? v("category" === n.type ? g : "value" === n.type ? d + "" : d, s) : v
  5700. }), f && (x.eventData = nh(e), x.eventData.targetType = "axisLabel", x.eventData.value = g), t._dumbGroup.add(x),
  5701. x.updateTransform(), h.push(x), t.group.add(x), x.decomposeTransform()
  5702. }), h
  5703. }
  5704. }
  5705. function dh(t, e) {
  5706. var i = {
  5707. axesInfo: {},
  5708. seriesInvolved: !1,
  5709. coordSysAxesInfo: {},
  5710. coordSysMap: {}
  5711. };
  5712. return fh(i, t, e), i.seriesInvolved && gh(i, t), i
  5713. }
  5714. function fh(t, e, i) {
  5715. var n = e.getComponent("tooltip"),
  5716. o = e.getComponent("axisPointer"),
  5717. a = o.get("link", !0) || [],
  5718. r = [];
  5719. DD(i.getCoordinateSystems(), function(i) {
  5720. function s(n, s, l) {
  5721. var c = l.model.getModel("axisPointer", o),
  5722. d = c.get("show");
  5723. if (d && ("auto" !== d || n || wh(c))) {
  5724. null == s && (s = c.get("triggerTooltip"));
  5725. var f = (c = n ? ph(l, h, o, e, n, s) : c).get("snap"),
  5726. p = bh(l.model),
  5727. g = s || f || "category" === l.type,
  5728. m = t.axesInfo[p] = {
  5729. key: p,
  5730. axis: l,
  5731. coordSys: i,
  5732. axisPointerModel: c,
  5733. triggerTooltip: s,
  5734. involveSeries: g,
  5735. snap: f,
  5736. useHandle: wh(c),
  5737. seriesModels: []
  5738. };
  5739. u[p] = m, t.seriesInvolved |= g;
  5740. var v = mh(a, l);
  5741. if (null != v) {
  5742. var y = r[v] || (r[v] = {
  5743. axesInfo: {}
  5744. });
  5745. y.axesInfo[p] = m, y.mapper = a[v].mapper, m.linkGroup = y
  5746. }
  5747. }
  5748. }
  5749. if (i.axisPointerEnabled) {
  5750. var l = bh(i.model),
  5751. u = t.coordSysAxesInfo[l] = {};
  5752. t.coordSysMap[l] = i;
  5753. var h = i.model.getModel("tooltip", n);
  5754. if (DD(i.getAxes(), CD(s, !1, null)), i.getTooltipAxes && n && h.get("show")) {
  5755. var c = "axis" === h.get("trigger"),
  5756. d = "cross" === h.get("axisPointer.type"),
  5757. f = i.getTooltipAxes(h.get("axisPointer.axis"));
  5758. (c || d) && DD(f.baseAxes, CD(s, !d || "cross", c)), d && DD(f.otherAxes, CD(s, "cross", !1))
  5759. }
  5760. }
  5761. })
  5762. }
  5763. function ph(t, e, n, o, a, s) {
  5764. var l = e.getModel("axisPointer"),
  5765. u = {};
  5766. DD(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate",
  5767. "animationEasingUpdate", "z"
  5768. ], function(t) {
  5769. u[t] = i(l.get(t))
  5770. }), u.snap = "category" !== t.type && !!s, "cross" === l.get("type") && (u.type = "line");
  5771. var h = u.label || (u.label = {});
  5772. if (null == h.show && (h.show = !1), "cross" === a) {
  5773. var c = l.get("label.show");
  5774. if (h.show = null == c || c, !s) {
  5775. var d = u.lineStyle = l.get("crossStyle");
  5776. d && r(h, d.textStyle)
  5777. }
  5778. }
  5779. return t.model.getModel("axisPointer", new Lo(u, n, o))
  5780. }
  5781. function gh(t, e) {
  5782. e.eachSeries(function(e) {
  5783. var i = e.coordinateSystem,
  5784. n = e.get("tooltip.trigger", !0),
  5785. o = e.get("tooltip.show", !0);
  5786. i && "none" !== n && !1 !== n && "item" !== n && !1 !== o && !1 !== e.get("axisPointer.show", !0) && DD(t.coordSysAxesInfo[
  5787. bh(i.model)], function(t) {
  5788. var n = t.axis;
  5789. i.getAxis(n.dim) === n && (t.seriesModels.push(e), null == t.seriesDataCount && (t.seriesDataCount = 0), t.seriesDataCount +=
  5790. e.getData().count())
  5791. })
  5792. }, this)
  5793. }
  5794. function mh(t, e) {
  5795. for (var i = e.model, n = e.dim, o = 0; o < t.length; o++) {
  5796. var a = t[o] || {};
  5797. if (vh(a[n + "AxisId"], i.id) || vh(a[n + "AxisIndex"], i.componentIndex) || vh(a[n + "AxisName"], i.name)) return o
  5798. }
  5799. }
  5800. function vh(t, e) {
  5801. return "all" === t || y(t) && l(t, e) >= 0 || t === e
  5802. }
  5803. function yh(t) {
  5804. var e = xh(t);
  5805. if (e) {
  5806. var i = e.axisPointerModel,
  5807. n = e.axis.scale,
  5808. o = i.option,
  5809. a = i.get("status"),
  5810. r = i.get("value");
  5811. null != r && (r = n.parse(r));
  5812. var s = wh(i);
  5813. null == a && (o.status = s ? "show" : "hide");
  5814. var l = n.getExtent().slice();
  5815. l[0] > l[1] && l.reverse(), (null == r || r > l[1]) && (r = l[1]), r < l[0] && (r = l[0]), o.value = r, s && (o.status =
  5816. e.axis.scale.isBlank() ? "hide" : "show")
  5817. }
  5818. }
  5819. function xh(t) {
  5820. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  5821. return e && e.axesInfo[bh(t)]
  5822. }
  5823. function _h(t) {
  5824. var e = xh(t);
  5825. return e && e.axisPointerModel
  5826. }
  5827. function wh(t) {
  5828. return !!t.get("handle.show")
  5829. }
  5830. function bh(t) {
  5831. return t.type + "||" + t.id
  5832. }
  5833. function Sh(t, e, i, n, o, a) {
  5834. var r = LD.getAxisPointerClass(t.axisPointerClass);
  5835. if (r) {
  5836. var s = _h(e);
  5837. s ? (t._axisPointer || (t._axisPointer = new r)).render(e, s, n, a) : Mh(t, n)
  5838. }
  5839. }
  5840. function Mh(t, e, i) {
  5841. var n = t._axisPointer;
  5842. n && n.dispose(e, i), t._axisPointer = null
  5843. }
  5844. function Ih(t, e, i) {
  5845. i = i || {};
  5846. var n = t.coordinateSystem,
  5847. o = e.axis,
  5848. a = {},
  5849. r = o.getAxesOnZeroOf()[0],
  5850. s = o.position,
  5851. l = r ? "onZero" : s,
  5852. u = o.dim,
  5853. h = n.getRect(),
  5854. c = [h.x, h.x + h.width, h.y, h.y + h.height],
  5855. d = {
  5856. left: 0,
  5857. right: 1,
  5858. top: 0,
  5859. bottom: 1,
  5860. onZero: 2
  5861. },
  5862. f = e.get("offset") || 0,
  5863. p = "x" === u ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f];
  5864. if (r) {
  5865. var g = r.toGlobalCoord(r.dataToCoord(0));
  5866. p[d.onZero] = Math.max(Math.min(g, p[1]), p[0])
  5867. }
  5868. a.position = ["y" === u ? p[d[l]] : c[0], "x" === u ? p[d[l]] : c[3]], a.rotation = Math.PI / 2 * ("x" === u ? 0 : 1);
  5869. var m = {
  5870. top: -1,
  5871. bottom: 1,
  5872. left: -1,
  5873. right: 1
  5874. };
  5875. a.labelDirection = a.tickDirection = a.nameDirection = m[s], a.labelOffset = r ? p[d[s]] - p[d.onZero] : 0, e.get(
  5876. "axisTick.inside") && (a.tickDirection = -a.tickDirection), T(i.labelInside, e.get("axisLabel.inside")) && (a.labelDirection = -
  5877. a.labelDirection);
  5878. var v = e.get("axisLabel.rotate");
  5879. return a.labelRotate = "top" === l ? -v : v, a.z2 = 1, a
  5880. }
  5881. function Th(t, e, i, n, o, a, r) {
  5882. co(t, e, i.getModel("label"), i.getModel("emphasis.label"), {
  5883. labelFetcher: o,
  5884. labelDataIndex: a,
  5885. defaultText: gu(o.getData(), a),
  5886. isRectText: !0,
  5887. autoColor: n
  5888. }), Ah(t), Ah(e)
  5889. }
  5890. function Ah(t, e) {
  5891. "outside" === t.textPosition && (t.textPosition = e)
  5892. }
  5893. function Dh(t, e, i) {
  5894. i.style.text = null, bo(i, {
  5895. shape: {
  5896. width: 0
  5897. }
  5898. }, e, t, function() {
  5899. i.parent && i.parent.remove(i)
  5900. })
  5901. }
  5902. function Ch(t, e, i) {
  5903. i.style.text = null, bo(i, {
  5904. shape: {
  5905. r: i.shape.r0
  5906. }
  5907. }, e, t, function() {
  5908. i.parent && i.parent.remove(i)
  5909. })
  5910. }
  5911. function Lh(t, e, i, n, o, a, s, l) {
  5912. var u = e.getItemVisual(i, "color"),
  5913. h = e.getItemVisual(i, "opacity"),
  5914. c = n.getModel("itemStyle"),
  5915. d = n.getModel("emphasis.itemStyle").getBarItemStyle();
  5916. l || t.setShape("r", c.get("barBorderRadius") || 0), t.useStyle(r({
  5917. fill: u,
  5918. opacity: h
  5919. }, c.getBarItemStyle()));
  5920. var f = n.getShallow("cursor");
  5921. f && t.attr("cursor", f);
  5922. var p = s ? o.height > 0 ? "bottom" : "top" : o.width > 0 ? "left" : "right";
  5923. l || Th(t.style, d, n, u, a, i, p), uo(t, d)
  5924. }
  5925. function kh(t, e) {
  5926. var i = t.get(BD) || 0;
  5927. return Math.min(i, Math.abs(e.width), Math.abs(e.height))
  5928. }
  5929. function Ph(t, e, i) {
  5930. var n = t.getData(),
  5931. o = [],
  5932. a = n.getLayout("valueAxisHorizontal") ? 1 : 0;
  5933. o[1 - a] = n.getLayout("valueAxisStart");
  5934. var r = new FD({
  5935. shape: {
  5936. points: n.getLayout("largePoints")
  5937. },
  5938. incremental: !!i,
  5939. __startPoint: o,
  5940. __valueIdx: a
  5941. });
  5942. e.add(r), Nh(r, t, n)
  5943. }
  5944. function Nh(t, e, i) {
  5945. var n = i.getVisual("borderColor") || i.getVisual("color"),
  5946. o = e.getModel("itemStyle").getItemStyle(["color", "borderColor"]);
  5947. t.useStyle(o), t.style.fill = null, t.style.stroke = n, t.style.lineWidth = i.getLayout("barWidth")
  5948. }
  5949. function Oh(t, e, i, n) {
  5950. var o = e.getData(),
  5951. a = this.dataIndex,
  5952. r = o.getName(a),
  5953. s = e.get("selectedOffset");
  5954. n.dispatchAction({
  5955. type: "pieToggleSelect",
  5956. from: t,
  5957. name: r,
  5958. seriesId: e.id
  5959. }), o.each(function(t) {
  5960. Eh(o.getItemGraphicEl(t), o.getItemLayout(t), e.isSelected(o.getName(t)), s, i)
  5961. })
  5962. }
  5963. function Eh(t, e, i, n, o) {
  5964. var a = (e.startAngle + e.endAngle) / 2,
  5965. r = Math.cos(a),
  5966. s = Math.sin(a),
  5967. l = i ? n : 0,
  5968. u = [r * l, s * l];
  5969. o ? t.animate().when(200, {
  5970. position: u
  5971. }).start("bounceOut") : t.attr("position", u)
  5972. }
  5973. function Rh(t, e) {
  5974. function i() {
  5975. a.ignore = a.hoverIgnore, r.ignore = r.hoverIgnore
  5976. }
  5977. function n() {
  5978. a.ignore = a.normalIgnore, r.ignore = r.normalIgnore
  5979. }
  5980. Zw.call(this);
  5981. var o = new QS({
  5982. z2: 2
  5983. }),
  5984. a = new oM,
  5985. r = new qS;
  5986. this.add(o), this.add(a), this.add(r), this.updateData(t, e, !0), this.on("emphasis", i).on("normal", n).on(
  5987. "mouseover", i).on("mouseout", n)
  5988. }
  5989. function zh(t, e, i, n, o, a, r) {
  5990. function s(e, i) {
  5991. for (var n = e; n >= 0 && (t[n].y -= i, !(n > 0 && t[n].y > t[n - 1].y + t[n - 1].height)); n--);
  5992. }
  5993. function l(t, e, i, n, o, a) {
  5994. for (var r = e ? Number.MAX_VALUE : 0, s = 0, l = t.length; s < l; s++)
  5995. if ("center" !== t[s].position) {
  5996. var u = Math.abs(t[s].y - n),
  5997. h = t[s].len,
  5998. c = t[s].len2,
  5999. d = u < o + h ? Math.sqrt((o + h + c) * (o + h + c) - u * u) : Math.abs(t[s].x - i);
  6000. e && d >= r && (d = r - 10), !e && d <= r && (d = r + 10), t[s].x = i + d * a, r = d
  6001. }
  6002. }
  6003. t.sort(function(t, e) {
  6004. return t.y - e.y
  6005. });
  6006. for (var u, h = 0, c = t.length, d = [], f = [], p = 0; p < c; p++)(u = t[p].y - h) < 0 && function(e, i, n, o) {
  6007. for (var a = e; a < i; a++)
  6008. if (t[a].y += n, a > e && a + 1 < i && t[a + 1].y > t[a].y + t[a].height) return void s(a, n / 2);
  6009. s(i - 1, n / 2)
  6010. }(p, c, -u), h = t[p].y + t[p].height;
  6011. r - h < 0 && s(c - 1, h - r);
  6012. for (p = 0; p < c; p++) t[p].y >= i ? f.push(t[p]) : d.push(t[p]);
  6013. l(d, !1, e, i, n, o), l(f, !0, e, i, n, o)
  6014. }
  6015. function Bh(t, e, i, n, o, a) {
  6016. for (var r = [], s = [], l = 0; l < t.length; l++) t[l].x < e ? r.push(t[l]) : s.push(t[l]);
  6017. zh(s, e, i, n, 1, o, a), zh(r, e, i, n, -1, o, a);
  6018. for (l = 0; l < t.length; l++) {
  6019. var u = t[l].linePoints;
  6020. if (u) {
  6021. var h = u[1][0] - u[2][0];
  6022. t[l].x < e ? u[2][0] = t[l].x + 3 : u[2][0] = t[l].x - 3, u[1][1] = u[2][1] = t[l].y, u[1][0] = u[2][0] + h
  6023. }
  6024. }
  6025. }
  6026. function Vh() {
  6027. this.group = new Zw
  6028. }
  6029. function Gh(t, e, i) {
  6030. HA.call(this, t, e, i), this.type = "value", this.angle = 0, this.name = "", this.model
  6031. }
  6032. function Fh(t, e, i) {
  6033. this._model = t, this.dimensions = [], this._indicatorAxes = f(t.getIndicatorModels(), function(t, e) {
  6034. var i = "indicator_" + e,
  6035. n = new Gh(i, new hA);
  6036. return n.name = t.get("name"), n.model = t, t.axis = n, this.dimensions.push(i), n
  6037. }, this), this.resize(t, i), this.cx, this.cy, this.r, this.r0, this.startAngle
  6038. }
  6039. function Wh(t, e) {
  6040. return r({
  6041. show: e
  6042. }, t)
  6043. }
  6044. function Hh(t) {
  6045. return y(t) || (t = [+t, +t]), t
  6046. }
  6047. function Zh() {
  6048. mw.call(this)
  6049. }
  6050. function Uh(t) {
  6051. this.name = t, this.zoomLimit, mw.call(this), this._roamTransformable = new Zh, this._rawTransformable = new Zh,
  6052. this._center, this._zoom
  6053. }
  6054. function Xh(t, e, i, n) {
  6055. var o = i.seriesModel,
  6056. a = o ? o.coordinateSystem : null;
  6057. return a === this ? a[t](n) : null
  6058. }
  6059. function jh(t) {
  6060. for (var e, i = 0; i < t.length; i++) {
  6061. var n = t[i].getBoundingRect();
  6062. (e = e || n.clone()).union(n)
  6063. }
  6064. return e
  6065. }
  6066. function Yh(t, e) {
  6067. var i, n, o = t.svgXML;
  6068. try {
  6069. k(null != (n = (i = o && ns(o, {
  6070. ignoreViewBox: !0,
  6071. ignoreRootClip: !0
  6072. }) || {}).root))
  6073. } catch (t) {
  6074. throw new Error("Invalid svg format\n" + t.message)
  6075. }
  6076. var a = i.width,
  6077. r = i.height,
  6078. s = i.viewBoxRect;
  6079. if (e || (e = null == a || null == r ? n.getBoundingRect() : new ue(0, 0, 0, 0), null != a && (e.width = a), null !=
  6080. r && (e.height = r)), s) {
  6081. var l = is(s, e.width, e.height),
  6082. u = n;
  6083. (n = new Zw).add(u), u.scale = l.scale, u.position = l.position
  6084. }
  6085. return n.setClipPath(new aM({
  6086. shape: e.plain()
  6087. })), {
  6088. root: n,
  6089. boundingRect: e
  6090. }
  6091. }
  6092. function qh(t) {
  6093. return function(e, i) {
  6094. var n = [];
  6095. return d(Kh(e), function(o) {
  6096. var a = yC[o.type][t];
  6097. a && n.push(a(e, o, i))
  6098. }), n
  6099. }
  6100. }
  6101. function Kh(t) {
  6102. return pT.retrieveMap(t) || []
  6103. }
  6104. function $h(t, e, i, n) {
  6105. Uh.call(this, t), this.map = e;
  6106. var o = xC.load(e, i);
  6107. this._nameCoordMap = o.nameCoordMap, this._regionsMap = o.nameCoordMap, this._invertLongitute = null == n || n, this
  6108. .regions = o.regions, this._rect = o.boundingRect
  6109. }
  6110. function Jh(t, e, i, n) {
  6111. var o = i.geoModel,
  6112. a = i.seriesModel,
  6113. r = o ? o.coordinateSystem : a ? a.coordinateSystem || (a.getReferringComponents("geo")[0] || {}).coordinateSystem :
  6114. null;
  6115. return r === this ? r[t](n) : null
  6116. }
  6117. function Qh(t, e) {
  6118. var i = t.get("boundingCoords");
  6119. if (null != i) {
  6120. var n = i[0],
  6121. o = i[1];
  6122. 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[
  6123. 1])
  6124. }
  6125. var a, r = this.getBoundingRect(),
  6126. s = t.get("layoutCenter"),
  6127. l = t.get("layoutSize"),
  6128. u = e.getWidth(),
  6129. h = e.getHeight(),
  6130. c = r.width / r.height * this.aspectScale,
  6131. d = !1;
  6132. s && l && (s = [Ro(s[0], u), Ro(s[1], h)], l = Ro(l, Math.min(u, h)), isNaN(s[0]) || isNaN(s[1]) || isNaN(l) || (d = !
  6133. 0));
  6134. if (d) {
  6135. var f = {};
  6136. c > 1 ? (f.width = l, f.height = l / c) : (f.height = l, f.width = l * c), f.y = s[1] - f.height / 2, f.x = s[0] -
  6137. f.width / 2
  6138. } else(a = t.getBoxLayoutParams()).aspect = c, f = la(a, {
  6139. width: u,
  6140. height: h
  6141. });
  6142. this.setViewRect(f.x, f.y, f.width, f.height), this.setCenter(t.get("center")), this.setZoom(t.get("zoom"))
  6143. }
  6144. function tc(t, e) {
  6145. d(e.get("geoCoord"), function(e, i) {
  6146. t.addGeoCoord(i, e)
  6147. })
  6148. }
  6149. function ec(t, e, i) {
  6150. oc(t)[e] = i
  6151. }
  6152. function ic(t, e, i) {
  6153. var n = oc(t);
  6154. n[e] === i && (n[e] = null)
  6155. }
  6156. function nc(t, e) {
  6157. return !!oc(t)[e]
  6158. }
  6159. function oc(t) {
  6160. return t[bC] || (t[bC] = {})
  6161. }
  6162. function ac(t) {
  6163. this.pointerChecker, this._zr = t, this._opt = {};
  6164. var e = m,
  6165. n = e(rc, this),
  6166. o = e(sc, this),
  6167. a = e(lc, this),
  6168. s = e(uc, this),
  6169. l = e(hc, this);
  6170. aw.call(this), this.setPointerChecker = function(t) {
  6171. this.pointerChecker = t
  6172. }, this.enable = function(e, u) {
  6173. this.disable(), this._opt = r(i(u) || {}, {
  6174. zoomOnMouseWheel: !0,
  6175. moveOnMouseMove: !0,
  6176. moveOnMouseWheel: !1,
  6177. preventDefaultMouseMove: !0
  6178. }), null == e && (e = !0), !0 !== e && "move" !== e && "pan" !== e || (t.on("mousedown", n), t.on("mousemove", o),
  6179. t.on("mouseup", a)), !0 !== e && "scale" !== e && "zoom" !== e || (t.on("mousewheel", s), t.on("pinch", l))
  6180. }, this.disable = function() {
  6181. t.off("mousedown", n), t.off("mousemove", o), t.off("mouseup", a), t.off("mousewheel", s), t.off("pinch", l)
  6182. }, this.dispose = this.disable, this.isDragging = function() {
  6183. return this._dragging
  6184. }, this.isPinching = function() {
  6185. return this._pinching
  6186. }
  6187. }
  6188. function rc(t) {
  6189. if (!(ct(t) || t.target && t.target.draggable)) {
  6190. var e = t.offsetX,
  6191. i = t.offsetY;
  6192. this.pointerChecker && this.pointerChecker(t, e, i) && (this._x = e, this._y = i, this._dragging = !0)
  6193. }
  6194. }
  6195. function sc(t) {
  6196. if (!ct(t) && fc("moveOnMouseMove", t, this._opt) && this._dragging && "pinch" !== t.gestureEvent && !nc(this._zr,
  6197. "globalPan")) {
  6198. var e = t.offsetX,
  6199. i = t.offsetY,
  6200. n = this._x,
  6201. o = this._y,
  6202. a = e - n,
  6203. r = i - o;
  6204. this._x = e, this._y = i, this._opt.preventDefaultMouseMove && lw(t.event), dc(this, "pan", "moveOnMouseMove", t, {
  6205. dx: a,
  6206. dy: r,
  6207. oldX: n,
  6208. oldY: o,
  6209. newX: e,
  6210. newY: i
  6211. })
  6212. }
  6213. }
  6214. function lc(t) {
  6215. ct(t) || (this._dragging = !1)
  6216. }
  6217. function uc(t) {
  6218. var e = fc("zoomOnMouseWheel", t, this._opt),
  6219. i = fc("moveOnMouseWheel", t, this._opt),
  6220. n = t.wheelDelta,
  6221. o = Math.abs(n),
  6222. a = t.offsetX,
  6223. r = t.offsetY;
  6224. if (0 !== n && (e || i)) {
  6225. if (e) {
  6226. var s = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1;
  6227. cc(this, "zoom", "zoomOnMouseWheel", t, {
  6228. scale: n > 0 ? s : 1 / s,
  6229. originX: a,
  6230. originY: r
  6231. })
  6232. }
  6233. if (i) {
  6234. var l = Math.abs(n);
  6235. cc(this, "scrollMove", "moveOnMouseWheel", t, {
  6236. scrollDelta: (n > 0 ? 1 : -1) * (l > 3 ? .4 : l > 1 ? .15 : .05),
  6237. originX: a,
  6238. originY: r
  6239. })
  6240. }
  6241. }
  6242. }
  6243. function hc(t) {
  6244. nc(this._zr, "globalPan") || cc(this, "zoom", null, t, {
  6245. scale: t.pinchScale > 1 ? 1.1 : 1 / 1.1,
  6246. originX: t.pinchX,
  6247. originY: t.pinchY
  6248. })
  6249. }
  6250. function cc(t, e, i, n, o) {
  6251. t.pointerChecker && t.pointerChecker(n, o.originX, o.originY) && (lw(n.event), dc(t, e, i, n, o))
  6252. }
  6253. function dc(t, e, i, n, o) {
  6254. o.isAvailableBehavior = m(fc, null, i, n), t.trigger(e, o)
  6255. }
  6256. function fc(t, e, i) {
  6257. var n = i[t];
  6258. return !t || n && (!_(n) || e.event[n + "Key"])
  6259. }
  6260. function pc(t, e, i) {
  6261. var n = t.target,
  6262. o = n.position;
  6263. o[0] += e, o[1] += i, n.dirty()
  6264. }
  6265. function gc(t, e, i, n) {
  6266. var o = t.target,
  6267. a = t.zoomLimit,
  6268. r = o.position,
  6269. s = o.scale,
  6270. l = t.zoom = t.zoom || 1;
  6271. if (l *= e, a) {
  6272. var u = a.min || 0,
  6273. h = a.max || 1 / 0;
  6274. l = Math.max(Math.min(h, l), u)
  6275. }
  6276. var c = l / t.zoom;
  6277. t.zoom = l, r[0] -= (i - r[0]) * (c - 1), r[1] -= (n - r[1]) * (c - 1), s[0] *= c, s[1] *= c, o.dirty()
  6278. }
  6279. function mc(t, e, i) {
  6280. var n = e.getComponentByElement(t.topTarget),
  6281. o = n && n.coordinateSystem;
  6282. return n && n !== i && !SC[n.mainType] && o && o.model !== i
  6283. }
  6284. function vc(t, e) {
  6285. var i = t.getItemStyle(),
  6286. n = t.get("areaColor");
  6287. return null != n && (i.fill = n), i
  6288. }
  6289. function yc(t, e, i, n, o) {
  6290. i.off("click"), i.off("mousedown"), e.get("selectedMode") && (i.on("mousedown", function() {
  6291. t._mouseDownFlag = !0
  6292. }), i.on("click", function(a) {
  6293. if (t._mouseDownFlag) {
  6294. t._mouseDownFlag = !1;
  6295. for (var r = a.target; !r.__regions;) r = r.parent;
  6296. if (r) {
  6297. var s = {
  6298. type: ("geo" === e.mainType ? "geo" : "map") + "ToggleSelect",
  6299. batch: f(r.__regions, function(t) {
  6300. return {
  6301. name: t.name,
  6302. from: o.uid
  6303. }
  6304. })
  6305. };
  6306. s[e.mainType + "Id"] = e.id, n.dispatchAction(s), xc(e, i)
  6307. }
  6308. }
  6309. }))
  6310. }
  6311. function xc(t, e) {
  6312. e.eachChild(function(e) {
  6313. d(e.__regions, function(i) {
  6314. e.trigger(t.isSelected(i.name) ? "emphasis" : "normal")
  6315. })
  6316. })
  6317. }
  6318. function _c(t, e) {
  6319. var i = new Zw;
  6320. this.uid = No("ec_map_draw"), this._controller = new ac(t.getZr()), this._controllerHost = {
  6321. target: e ? i : null
  6322. }, this.group = i, this._updateGroup = e, this._mouseDownFlag, this._mapName, this._initialized, i.add(this._regionsGroup =
  6323. new Zw), i.add(this._backgroundGroup = new Zw)
  6324. }
  6325. function wc(t, e, i) {
  6326. var n = t.getZoom(),
  6327. o = t.getCenter(),
  6328. a = e.zoom,
  6329. r = t.dataToPoint(o);
  6330. if (null != e.dx && null != e.dy) {
  6331. r[0] -= e.dx, r[1] -= e.dy;
  6332. o = t.pointToData(r);
  6333. t.setCenter(o)
  6334. }
  6335. if (null != a) {
  6336. if (i) {
  6337. var s = i.min || 0,
  6338. l = i.max || 1 / 0;
  6339. a = Math.max(Math.min(n * a, l), s) / n
  6340. }
  6341. t.scale[0] *= a, t.scale[1] *= a;
  6342. var u = t.position,
  6343. h = (e.originX - u[0]) * (a - 1),
  6344. c = (e.originY - u[1]) * (a - 1);
  6345. u[0] -= h, u[1] -= c, t.updateTransform();
  6346. o = t.pointToData(r);
  6347. t.setCenter(o), t.setZoom(a * n)
  6348. }
  6349. return {
  6350. center: t.getCenter(),
  6351. zoom: t.getZoom()
  6352. }
  6353. }
  6354. function bc(t, e) {
  6355. var i = {};
  6356. return d(t, function(t) {
  6357. t.each(t.mapDimension("value"), function(e, n) {
  6358. var o = "ec-" + t.getName(n);
  6359. i[o] = i[o] || [], isNaN(e) || i[o].push(e)
  6360. })
  6361. }), t[0].map(t[0].mapDimension("value"), function(n, o) {
  6362. for (var a = "ec-" + t[0].getName(o), r = 0, s = 1 / 0, l = -1 / 0, u = i[a].length, h = 0; h < u; h++) s = Math.min(
  6363. s, i[a][h]), l = Math.max(l, i[a][h]), r += i[a][h];
  6364. var c;
  6365. return c = "min" === e ? s : "max" === e ? l : "average" === e ? r / u : r, 0 === u ? NaN : c
  6366. })
  6367. }
  6368. function Sc(t) {
  6369. var e = t.mainData,
  6370. i = t.datas;
  6371. i || (i = {
  6372. main: e
  6373. }, t.datasAttr = {
  6374. main: "data"
  6375. }), t.datas = t.mainData = null, Cc(e, i, t), MC(i, function(i) {
  6376. MC(e.TRANSFERABLE_METHODS, function(e) {
  6377. i.wrapMethod(e, v(Mc, t))
  6378. })
  6379. }), e.wrapMethod("cloneShallow", v(Tc, t)), MC(e.CHANGABLE_METHODS, function(i) {
  6380. e.wrapMethod(i, v(Ic, t))
  6381. }), k(i[e.dataType] === e)
  6382. }
  6383. function Mc(t, e) {
  6384. if (Dc(this)) {
  6385. var i = a({}, this[IC]);
  6386. i[this.dataType] = e, Cc(e, i, t)
  6387. } else Lc(e, this.dataType, this[TC], t);
  6388. return e
  6389. }
  6390. function Ic(t, e) {
  6391. return t.struct && t.struct.update(this), e
  6392. }
  6393. function Tc(t, e) {
  6394. return MC(e[IC], function(i, n) {
  6395. i !== e && Lc(i.cloneShallow(), n, e, t)
  6396. }), e
  6397. }
  6398. function Ac(t) {
  6399. var e = this[TC];
  6400. return null == t || null == e ? e : e[IC][t]
  6401. }
  6402. function Dc(t) {
  6403. return t[TC] === t
  6404. }
  6405. function Cc(t, e, i) {
  6406. t[IC] = {}, MC(e, function(e, n) {
  6407. Lc(e, n, t, i)
  6408. })
  6409. }
  6410. function Lc(t, e, i, n) {
  6411. i[IC][e] = t, t[TC] = i, t.dataType = e, n.struct && (t[n.structAttr] = n.struct, n.struct[n.datasAttr[e]] = t), t.getLinkedData =
  6412. Ac
  6413. }
  6414. function kc(t, e, i) {
  6415. this.root, this.data, this._nodes = [], this.hostModel = t, this.levelModels = f(e || [], function(e) {
  6416. return new Lo(e, t, t.ecModel)
  6417. }), this.leavesModel = new Lo(i || {}, t, t.ecModel)
  6418. }
  6419. function Pc(t, e) {
  6420. var i = e.children;
  6421. t.parentNode !== e && (i.push(t), t.parentNode = e)
  6422. }
  6423. function Nc(t) {
  6424. t.hierNode = {
  6425. defaultAncestor: null,
  6426. ancestor: t,
  6427. prelim: 0,
  6428. modifier: 0,
  6429. change: 0,
  6430. shift: 0,
  6431. i: 0,
  6432. thread: null
  6433. };
  6434. for (var e, i, n = [t]; e = n.pop();)
  6435. if (i = e.children, e.isExpand && i.length)
  6436. for (var o = i.length - 1; o >= 0; o--) {
  6437. var a = i[o];
  6438. a.hierNode = {
  6439. defaultAncestor: null,
  6440. ancestor: a,
  6441. prelim: 0,
  6442. modifier: 0,
  6443. change: 0,
  6444. shift: 0,
  6445. i: o,
  6446. thread: null
  6447. }, n.push(a)
  6448. }
  6449. }
  6450. function Oc(t, e) {
  6451. var i = t.isExpand ? t.children : [],
  6452. n = t.parentNode.children,
  6453. o = t.hierNode.i ? n[t.hierNode.i - 1] : null;
  6454. if (i.length) {
  6455. Vc(t);
  6456. var a = (i[0].hierNode.prelim + i[i.length - 1].hierNode.prelim) / 2;
  6457. o ? (t.hierNode.prelim = o.hierNode.prelim + e(t, o), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim =
  6458. a
  6459. } else o && (t.hierNode.prelim = o.hierNode.prelim + e(t, o));
  6460. t.parentNode.hierNode.defaultAncestor = Gc(t, o, t.parentNode.hierNode.defaultAncestor || n[0], e)
  6461. }
  6462. function Ec(t) {
  6463. var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  6464. t.setLayout({
  6465. x: e
  6466. }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier
  6467. }
  6468. function Rc(t) {
  6469. return arguments.length ? t : Uc
  6470. }
  6471. function zc(t, e) {
  6472. var i = {};
  6473. return t -= Math.PI / 2, i.x = e * Math.cos(t), i.y = e * Math.sin(t), i
  6474. }
  6475. function Bc(t, e) {
  6476. return la(t.getBoxLayoutParams(), {
  6477. width: e.getWidth(),
  6478. height: e.getHeight()
  6479. })
  6480. }
  6481. function Vc(t) {
  6482. for (var e = t.children, i = e.length, n = 0, o = 0; --i >= 0;) {
  6483. var a = e[i];
  6484. a.hierNode.prelim += n, a.hierNode.modifier += n, o += a.hierNode.change, n += a.hierNode.shift + o
  6485. }
  6486. }
  6487. function Gc(t, e, i, n) {
  6488. if (e) {
  6489. for (var o = t, a = t, r = a.parentNode.children[0], s = e, l = o.hierNode.modifier, u = a.hierNode.modifier, h = r
  6490. .hierNode.modifier, c = s.hierNode.modifier; s = Fc(s), a = Wc(a), s && a;) {
  6491. o = Fc(o), r = Wc(r), o.hierNode.ancestor = t;
  6492. var d = s.hierNode.prelim + c - a.hierNode.prelim - u + n(s, a);
  6493. d > 0 && (Zc(Hc(s, t, i), t, d), u += d, l += d), c += s.hierNode.modifier, u += a.hierNode.modifier, l += o.hierNode
  6494. .modifier, h += r.hierNode.modifier
  6495. }
  6496. s && !Fc(o) && (o.hierNode.thread = s, o.hierNode.modifier += c - l), a && !Wc(r) && (r.hierNode.thread = a, r.hierNode
  6497. .modifier += u - h, i = t)
  6498. }
  6499. return i
  6500. }
  6501. function Fc(t) {
  6502. var e = t.children;
  6503. return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread
  6504. }
  6505. function Wc(t) {
  6506. var e = t.children;
  6507. return e.length && t.isExpand ? e[0] : t.hierNode.thread
  6508. }
  6509. function Hc(t, e, i) {
  6510. return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : i
  6511. }
  6512. function Zc(t, e, i) {
  6513. var n = i / (e.hierNode.i - t.hierNode.i);
  6514. e.hierNode.change -= n, e.hierNode.shift += i, e.hierNode.modifier += i, e.hierNode.prelim += i, t.hierNode.change +=
  6515. n
  6516. }
  6517. function Uc(t, e) {
  6518. return t.parentNode === e.parentNode ? 1 : 2
  6519. }
  6520. function Xc(t, e) {
  6521. var i = t.getItemLayout(e);
  6522. return i && !isNaN(i.x) && !isNaN(i.y) && "none" !== t.getItemVisual(e, "symbol")
  6523. }
  6524. function jc(t, e, i) {
  6525. return i.itemModel = e, i.itemStyle = e.getModel("itemStyle").getItemStyle(), i.hoverItemStyle = e.getModel(
  6526. "emphasis.itemStyle").getItemStyle(), i.lineStyle = e.getModel("lineStyle").getLineStyle(), i.labelModel = e.getModel(
  6527. "label"), i.hoverLabelModel = e.getModel("emphasis.label"), !1 === t.isExpand && 0 !== t.children.length ? i.symbolInnerColor =
  6528. i.itemStyle.fill : i.symbolInnerColor = "#fff", i
  6529. }
  6530. function Yc(t, e, i, n, o, a) {
  6531. var s = !i,
  6532. l = t.tree.getNodeByDataIndex(e),
  6533. a = jc(l, l.getModel(), a),
  6534. u = t.tree.root,
  6535. h = l.parentNode === u ? l : l.parentNode || l,
  6536. c = t.getItemGraphicEl(h.dataIndex),
  6537. d = h.getLayout(),
  6538. f = c ? {
  6539. x: c.position[0],
  6540. y: c.position[1],
  6541. rawX: c.__radialOldRawX,
  6542. rawY: c.__radialOldRawY
  6543. } : d,
  6544. p = l.getLayout();
  6545. s ? (i = new mu(t, e, a)).attr("position", [f.x, f.y]) : i.updateData(t, e, a), i.__radialOldRawX = i.__radialRawX,
  6546. i.__radialOldRawY = i.__radialRawY, i.__radialRawX = p.rawX, i.__radialRawY = p.rawY, n.add(i), t.setItemGraphicEl(
  6547. e, i), bo(i, {
  6548. position: [p.x, p.y]
  6549. }, o);
  6550. var g = i.getSymbolPath();
  6551. if ("radial" === a.layout) {
  6552. var m, v, y = u.children[0],
  6553. x = y.getLayout(),
  6554. _ = y.children.length;
  6555. if (p.x === x.x && !0 === l.isExpand) {
  6556. var w = {};
  6557. w.x = (y.children[0].getLayout().x + y.children[_ - 1].getLayout().x) / 2, w.y = (y.children[0].getLayout().y + y.children[
  6558. _ - 1].getLayout().y) / 2, (m = Math.atan2(w.y - x.y, w.x - x.x)) < 0 && (m = 2 * Math.PI + m), (v = w.x < x.x) &&
  6559. (m -= Math.PI)
  6560. } else(m = Math.atan2(p.y - x.y, p.x - x.x)) < 0 && (m = 2 * Math.PI + m), 0 === l.children.length || 0 !== l.children
  6561. .length && !1 === l.isExpand ? (v = p.x < x.x) && (m -= Math.PI) : (v = p.x > x.x) || (m -= Math.PI);
  6562. var b = v ? "left" : "right";
  6563. g.setStyle({
  6564. textPosition: b,
  6565. textRotation: -m,
  6566. textOrigin: "center",
  6567. verticalAlign: "middle"
  6568. })
  6569. }
  6570. if (l.parentNode && l.parentNode !== u) {
  6571. var S = i.__edge;
  6572. S || (S = i.__edge = new lM({
  6573. shape: Kc(a, f, f),
  6574. style: r({
  6575. opacity: 0,
  6576. strokeNoScale: !0
  6577. }, a.lineStyle)
  6578. })), bo(S, {
  6579. shape: Kc(a, d, p),
  6580. style: {
  6581. opacity: 1
  6582. }
  6583. }, o), n.add(S)
  6584. }
  6585. }
  6586. function qc(t, e, i, n, o, a) {
  6587. for (var r, s = t.tree.getNodeByDataIndex(e), l = t.tree.root, a = jc(s, s.getModel(), a), u = s.parentNode === l ?
  6588. s : s.parentNode || s; null == (r = u.getLayout());) u = u.parentNode === l ? u : u.parentNode || u;
  6589. bo(i, {
  6590. position: [r.x + 1, r.y + 1]
  6591. }, o, function() {
  6592. n.remove(i), t.setItemGraphicEl(e, null)
  6593. }), i.fadeOut(null, {
  6594. keepLabel: !0
  6595. });
  6596. var h = i.__edge;
  6597. h && bo(h, {
  6598. shape: Kc(a, r, r),
  6599. style: {
  6600. opacity: 0
  6601. }
  6602. }, o, function() {
  6603. n.remove(h)
  6604. })
  6605. }
  6606. function Kc(t, e, i) {
  6607. var n, o, a, r, s, l, u, h, c = t.orient;
  6608. if ("radial" === t.layout) {
  6609. s = e.rawX, u = e.rawY, l = i.rawX, h = i.rawY;
  6610. var d = zc(s, u),
  6611. f = zc(s, u + (h - u) * t.curvature),
  6612. p = zc(l, h + (u - h) * t.curvature),
  6613. g = zc(l, h);
  6614. return {
  6615. x1: d.x,
  6616. y1: d.y,
  6617. x2: g.x,
  6618. y2: g.y,
  6619. cpx1: f.x,
  6620. cpy1: f.y,
  6621. cpx2: p.x,
  6622. cpy2: p.y
  6623. }
  6624. }
  6625. return s = e.x, u = e.y, l = i.x, h = i.y, "LR" !== c && "RL" !== c || (n = s + (l - s) * t.curvature, o = u, a = l +
  6626. (s - l) * t.curvature, r = h), "TB" !== c && "BT" !== c || (n = s, o = u + (h - u) * t.curvature, a = l, r = h + (
  6627. u - h) * t.curvature), {
  6628. x1: s,
  6629. y1: u,
  6630. x2: l,
  6631. y2: h,
  6632. cpx1: n,
  6633. cpy1: o,
  6634. cpx2: a,
  6635. cpy2: r
  6636. }
  6637. }
  6638. function $c(t, e, i) {
  6639. for (var n, o = [t], a = []; n = o.pop();)
  6640. if (a.push(n), n.isExpand) {
  6641. var r = n.children;
  6642. if (r.length)
  6643. for (var s = 0; s < r.length; s++) o.push(r[s])
  6644. } for (; n = a.pop();) e(n, i)
  6645. }
  6646. function Jc(t, e) {
  6647. for (var i, n = [t]; i = n.pop();)
  6648. if (e(i), i.isExpand) {
  6649. var o = i.children;
  6650. if (o.length)
  6651. for (var a = o.length - 1; a >= 0; a--) n.push(o[a])
  6652. }
  6653. }
  6654. function Qc(t, e) {
  6655. var i = Bc(t, e);
  6656. t.layoutInfo = i;
  6657. var n = t.get("layout"),
  6658. o = 0,
  6659. a = 0,
  6660. r = null;
  6661. "radial" === n ? (o = 2 * Math.PI, a = Math.min(i.height, i.width) / 2, r = Rc(function(t, e) {
  6662. return (t.parentNode === e.parentNode ? 1 : 2) / t.depth
  6663. })) : (o = i.width, a = i.height, r = Rc());
  6664. var s = t.getData().tree.root,
  6665. l = s.children[0];
  6666. if (l) {
  6667. Nc(s), $c(l, Oc, r), s.hierNode.modifier = -l.hierNode.prelim, Jc(l, Ec);
  6668. var u = l,
  6669. h = l,
  6670. c = l;
  6671. Jc(l, function(t) {
  6672. var e = t.getLayout().x;
  6673. e < u.getLayout().x && (u = t), e > h.getLayout().x && (h = t), t.depth > c.depth && (c = t)
  6674. });
  6675. var d = u === h ? 1 : r(u, h) / 2,
  6676. f = d - u.getLayout().x,
  6677. p = 0,
  6678. g = 0,
  6679. m = 0,
  6680. v = 0;
  6681. if ("radial" === n) p = o / (h.getLayout().x + d + f), g = a / (c.depth - 1 || 1), Jc(l, function(t) {
  6682. m = (t.getLayout().x + f) * p, v = (t.depth - 1) * g;
  6683. var e = zc(m, v);
  6684. t.setLayout({
  6685. x: e.x,
  6686. y: e.y,
  6687. rawX: m,
  6688. rawY: v
  6689. }, !0)
  6690. });
  6691. else {
  6692. var y = t.getOrient();
  6693. "RL" === y || "LR" === y ? (g = a / (h.getLayout().x + d + f), p = o / (c.depth - 1 || 1), Jc(l, function(t) {
  6694. v = (t.getLayout().x + f) * g, m = "LR" === y ? (t.depth - 1) * p : o - (t.depth - 1) * p, t.setLayout({
  6695. x: m,
  6696. y: v
  6697. }, !0)
  6698. })) : "TB" !== y && "BT" !== y || (p = o / (h.getLayout().x + d + f), g = a / (c.depth - 1 || 1), Jc(l, function(
  6699. t) {
  6700. m = (t.getLayout().x + f) * p, v = "TB" === y ? (t.depth - 1) * g : a - (t.depth - 1) * g, t.setLayout({
  6701. x: m,
  6702. y: v
  6703. }, !0)
  6704. }))
  6705. }
  6706. }
  6707. }
  6708. function td(t, e, i) {
  6709. if (t && l(e, t.type) >= 0) {
  6710. var n = i.getData().tree.root,
  6711. o = t.targetNode;
  6712. if ("string" == typeof o && (o = n.getNodeById(o)), o && n.contains(o)) return {
  6713. node: o
  6714. };
  6715. var a = t.targetNodeId;
  6716. if (null != a && (o = n.getNodeById(a))) return {
  6717. node: o
  6718. }
  6719. }
  6720. }
  6721. function ed(t) {
  6722. for (var e = []; t;)(t = t.parentNode) && e.push(t);
  6723. return e.reverse()
  6724. }
  6725. function id(t, e) {
  6726. return l(ed(t), e) >= 0
  6727. }
  6728. function nd(t, e) {
  6729. for (var i = []; t;) {
  6730. var n = t.dataIndex;
  6731. i.push({
  6732. name: t.name,
  6733. dataIndex: n,
  6734. value: e.getRawValue(n)
  6735. }), t = t.parentNode
  6736. }
  6737. return i.reverse(), i
  6738. }
  6739. function od(t) {
  6740. var e = 0;
  6741. d(t.children, function(t) {
  6742. od(t);
  6743. var i = t.value;
  6744. y(i) && (i = i[0]), e += i
  6745. });
  6746. var i = t.value;
  6747. y(i) && (i = i[0]), (null == i || isNaN(i)) && (i = e), i < 0 && (i = 0), y(t.value) ? t.value[0] = i : t.value = i
  6748. }
  6749. function ad(t, e) {
  6750. var i = e.get("color");
  6751. if (i) {
  6752. var n;
  6753. return d(t = t || [], function(t) {
  6754. var e = new Lo(t),
  6755. i = e.get("color");
  6756. (e.get("itemStyle.color") || i && "none" !== i) && (n = !0)
  6757. }), n || ((t[0] || (t[0] = {})).color = i.slice()), t
  6758. }
  6759. }
  6760. function rd(t) {
  6761. this.group = new Zw, t.add(this.group)
  6762. }
  6763. function sd(t, e, i, n, o, a) {
  6764. var r = [
  6765. [o ? t : t - DC, e],
  6766. [t + i, e],
  6767. [t + i, e + n],
  6768. [o ? t : t - DC, e + n]
  6769. ];
  6770. return !a && r.splice(2, 0, [t + i + DC, e + n / 2]), !o && r.push([t, e + n / 2]), r
  6771. }
  6772. function ld(t, e, i) {
  6773. t.eventData = {
  6774. componentType: "series",
  6775. componentSubType: "treemap",
  6776. componentIndex: e.componentIndex,
  6777. seriesIndex: e.componentIndex,
  6778. seriesName: e.name,
  6779. seriesType: "treemap",
  6780. selfType: "breadcrumb",
  6781. nodeData: {
  6782. dataIndex: i && i.dataIndex,
  6783. name: i && i.name
  6784. },
  6785. treePathInfo: i && nd(i, e)
  6786. }
  6787. }
  6788. function ud() {
  6789. var t, e = [],
  6790. i = {};
  6791. return {
  6792. add: function(t, n, o, a, r) {
  6793. return _(a) && (r = a, a = 0), !i[t.id] && (i[t.id] = 1, e.push({
  6794. el: t,
  6795. target: n,
  6796. time: o,
  6797. delay: a,
  6798. easing: r
  6799. }), !0)
  6800. },
  6801. done: function(e) {
  6802. return t = e, this
  6803. },
  6804. start: function() {
  6805. for (var n = e.length, o = 0, a = e.length; o < a; o++) {
  6806. var r = e[o];
  6807. r.el.animateTo(r.target, r.time, r.delay, r.easing, function() {
  6808. --n || (e.length = 0, i = {}, t && t())
  6809. })
  6810. }
  6811. return this
  6812. }
  6813. }
  6814. }
  6815. function hd(t, e, n, o, r, s, l, u, h, c) {
  6816. function d(t, e) {
  6817. w ? !t.invisible && s.push(t) : (e(), t.__tmWillVisible || (t.invisible = !1))
  6818. }
  6819. function f(e, n, o, a, r, s) {
  6820. var u = l.getModel(),
  6821. h = T(t.getFormattedLabel(l.dataIndex, "normal", null, null, s ? "upperLabel" : "label"), u.get("name"));
  6822. if (!s && v.isLeafRoot) {
  6823. var c = t.get("drillDownIcon", !0);
  6824. h = c ? c + " " + h : h
  6825. }
  6826. var d = u.getModel(s ? EC : NC),
  6827. f = u.getModel(s ? RC : OC),
  6828. p = d.getShallow("show");
  6829. co(e, n, d, f, {
  6830. defaultText: p ? h : null,
  6831. autoColor: o,
  6832. isRectText: !0
  6833. }), s && (e.textRect = i(s)), e.truncate = p && d.get("ellipsis") ? {
  6834. outerWidth: a,
  6835. outerHeight: r,
  6836. minChar: 2
  6837. } : null
  6838. }
  6839. function p(t, i, o, a) {
  6840. var s = null != S && n[t][S],
  6841. l = r[t];
  6842. return s ? (n[t][S] = null, g(l, s, t)) : w || ((s = new i({
  6843. z: cd(o, a)
  6844. })).__tmDepth = o, s.__tmStorageName = t, m(l, s, t)), e[t][b] = s
  6845. }
  6846. function g(t, e, i) {
  6847. (t[b] = {}).old = "nodeGroup" === i ? e.position.slice() : a({}, e.shape)
  6848. }
  6849. function m(t, e, i) {
  6850. var n = t[b] = {},
  6851. a = l.parentNode;
  6852. if (a && (!o || "drillDown" === o.direction)) {
  6853. var s = 0,
  6854. u = 0,
  6855. h = r.background[a.getRawIndex()];
  6856. !o && h && h.old && (s = h.old.width, u = h.old.height), n.old = "nodeGroup" === i ? [0, u] : {
  6857. x: s,
  6858. y: u,
  6859. width: 0,
  6860. height: 0
  6861. }
  6862. }
  6863. n.fadein = "nodeGroup" !== i
  6864. }
  6865. if (l) {
  6866. var v = l.getLayout();
  6867. if (v && v.isInView) {
  6868. var y = v.width,
  6869. x = v.height,
  6870. _ = v.borderWidth,
  6871. w = v.invisible,
  6872. b = l.getRawIndex(),
  6873. S = u && u.getRawIndex(),
  6874. M = l.viewChildren,
  6875. I = v.upperHeight,
  6876. A = M && M.length,
  6877. D = l.getModel("itemStyle"),
  6878. C = l.getModel("emphasis.itemStyle"),
  6879. L = p("nodeGroup", LC);
  6880. if (L) {
  6881. if (h.add(L), L.attr("position", [v.x || 0, v.y || 0]), L.__tmNodeWidth = y, L.__tmNodeHeight = x, v.isAboveViewRoot)
  6882. return L;
  6883. var k = p("background", kC, c, BC);
  6884. if (k && function(e, i, n) {
  6885. i.dataIndex = l.dataIndex, i.seriesIndex = t.seriesIndex, i.setShape({
  6886. x: 0,
  6887. y: 0,
  6888. width: y,
  6889. height: x
  6890. });
  6891. var o = l.getVisual("borderColor", !0),
  6892. a = C.get("borderColor");
  6893. d(i, function() {
  6894. var t = FC(D);
  6895. t.fill = o;
  6896. var e = GC(C);
  6897. if (e.fill = a, n) {
  6898. var r = y - 2 * _;
  6899. f(t, e, o, r, I, {
  6900. x: _,
  6901. y: 0,
  6902. width: r,
  6903. height: I
  6904. })
  6905. } else t.text = e.text = null;
  6906. i.setStyle(t), uo(i, e)
  6907. }), e.add(i)
  6908. }(L, k, A && v.upperHeight), !A) {
  6909. var P = p("content", kC, c, VC);
  6910. P && function(e, i) {
  6911. i.dataIndex = l.dataIndex, i.seriesIndex = t.seriesIndex;
  6912. var n = Math.max(y - 2 * _, 0),
  6913. o = Math.max(x - 2 * _, 0);
  6914. i.culling = !0, i.setShape({
  6915. x: _,
  6916. y: _,
  6917. width: n,
  6918. height: o
  6919. });
  6920. var a = l.getVisual("color", !0);
  6921. d(i, function() {
  6922. var t = FC(D);
  6923. t.fill = a;
  6924. var e = GC(C);
  6925. f(t, e, a, n, o), i.setStyle(t), uo(i, e)
  6926. }), e.add(i)
  6927. }(L, P)
  6928. }
  6929. return L
  6930. }
  6931. }
  6932. }
  6933. }
  6934. function cd(t, e) {
  6935. var i = t * zC + e;
  6936. return (i - 1) / i
  6937. }
  6938. function dd(t) {
  6939. var e = t.pieceList;
  6940. t.hasSpecialVisual = !1, d(e, function(e, i) {
  6941. e.originIndex = i, null != e.visual && (t.hasSpecialVisual = !0)
  6942. })
  6943. }
  6944. function fd(t) {
  6945. var e = t.categories,
  6946. i = t.visual,
  6947. n = t.categoryMap = {};
  6948. if (ZC(e, function(t, e) {
  6949. n[t] = e
  6950. }), !y(i)) {
  6951. var o = [];
  6952. w(i) ? ZC(i, function(t, e) {
  6953. var i = n[e];
  6954. o[null != i ? i : XC] = t
  6955. }) : o[XC] = i, i = bd(t, o)
  6956. }
  6957. for (var a = e.length - 1; a >= 0; a--) null == i[a] && (delete n[e[a]], e.pop())
  6958. }
  6959. function pd(t, e) {
  6960. var i = t.visual,
  6961. n = [];
  6962. w(i) ? ZC(i, function(t) {
  6963. n.push(t)
  6964. }) : null != i && n.push(i);
  6965. var o = {
  6966. color: 1,
  6967. symbol: 1
  6968. };
  6969. e || 1 !== n.length || o.hasOwnProperty(t.type) || (n[1] = n[0]), bd(t, n)
  6970. }
  6971. function gd(t) {
  6972. return {
  6973. applyVisual: function(e, i, n) {
  6974. e = this.mapValueToVisual(e), n("color", t(i("color"), e))
  6975. },
  6976. _doMap: _d([0, 1])
  6977. }
  6978. }
  6979. function md(t) {
  6980. var e = this.option.visual;
  6981. return e[Math.round(Eo(t, [0, 1], [0, e.length - 1], !0))] || {}
  6982. }
  6983. function vd(t) {
  6984. return function(e, i, n) {
  6985. n(t, this.mapValueToVisual(e))
  6986. }
  6987. }
  6988. function yd(t) {
  6989. var e = this.option.visual;
  6990. return e[this.option.loop && t !== XC ? t % e.length : t]
  6991. }
  6992. function xd() {
  6993. return this.option.visual[0]
  6994. }
  6995. function _d(t) {
  6996. return {
  6997. linear: function(e) {
  6998. return Eo(e, t, this.option.visual, !0)
  6999. },
  7000. category: yd,
  7001. piecewise: function(e, i) {
  7002. var n = wd.call(this, i);
  7003. return null == n && (n = Eo(e, t, this.option.visual, !0)), n
  7004. },
  7005. fixed: xd
  7006. }
  7007. }
  7008. function wd(t) {
  7009. var e = this.option,
  7010. i = e.pieceList;
  7011. if (e.hasSpecialVisual) {
  7012. var n = i[jC.findPieceIndex(t, i)];
  7013. if (n && n.visual) return n.visual[this.type]
  7014. }
  7015. }
  7016. function bd(t, e) {
  7017. return t.visual = e, "color" === t.type && (t.parsedVisual = f(e, function(t) {
  7018. return zt(t)
  7019. })), e
  7020. }
  7021. function Sd(t, e, i) {
  7022. return t ? e <= i : e < i
  7023. }
  7024. function Md(t, e, i, n, o, a) {
  7025. var r = t.getModel(),
  7026. s = t.getLayout();
  7027. if (s && !s.invisible && s.isInView) {
  7028. var l, u = t.getModel($C),
  7029. h = Id(u, e, i[t.depth], n),
  7030. c = u.get("borderColor"),
  7031. f = u.get("borderColorSaturation");
  7032. null != f && (c = Ad(f, l = Td(h))), t.setVisual("borderColor", c);
  7033. var p = t.viewChildren;
  7034. if (p && p.length) {
  7035. var g = Cd(t, r, s, u, h, p);
  7036. d(p, function(t, e) {
  7037. (t.depth >= o.length || t === o[t.depth]) && Md(t, kd(r, h, t, e, g, a), i, n, o, a)
  7038. })
  7039. } else l = Td(h), t.setVisual("color", l)
  7040. }
  7041. }
  7042. function Id(t, e, i, n) {
  7043. var o = a({}, e);
  7044. return d(["color", "colorAlpha", "colorSaturation"], function(a) {
  7045. var r = t.get(a, !0);
  7046. null == r && i && (r = i[a]), null == r && (r = e[a]), null == r && (r = n.get(a)), null != r && (o[a] = r)
  7047. }), o
  7048. }
  7049. function Td(t) {
  7050. var e = Dd(t, "color");
  7051. if (e) {
  7052. var i = Dd(t, "colorAlpha"),
  7053. n = Dd(t, "colorSaturation");
  7054. return n && (e = Zt(e, null, null, n)), i && (e = Ut(e, i)), e
  7055. }
  7056. }
  7057. function Ad(t, e) {
  7058. return null != e ? Zt(e, null, null, t) : null
  7059. }
  7060. function Dd(t, e) {
  7061. var i = t[e];
  7062. if (null != i && "none" !== i) return i
  7063. }
  7064. function Cd(t, e, i, n, o, a) {
  7065. if (a && a.length) {
  7066. var r = Ld(e, "color") || null != o.color && "none" !== o.color && (Ld(e, "colorAlpha") || Ld(e, "colorSaturation"));
  7067. if (r) {
  7068. var s = e.get("visualMin"),
  7069. l = e.get("visualMax"),
  7070. u = i.dataExtent.slice();
  7071. null != s && s < u[0] && (u[0] = s), null != l && l > u[1] && (u[1] = l);
  7072. var h = e.get("colorMappingBy"),
  7073. c = {
  7074. type: r.name,
  7075. dataExtent: u,
  7076. visual: r.range
  7077. };
  7078. "color" !== c.type || "index" !== h && "id" !== h ? c.mappingMethod = "linear" : (c.mappingMethod = "category", c.loop = !
  7079. 0);
  7080. var d = new jC(c);
  7081. return d.__drColorMappingBy = h, d
  7082. }
  7083. }
  7084. }
  7085. function Ld(t, e) {
  7086. var i = t.get(e);
  7087. return KC(i) && i.length ? {
  7088. name: e,
  7089. range: i
  7090. } : null
  7091. }
  7092. function kd(t, e, i, n, o, r) {
  7093. var s = a({}, e);
  7094. if (o) {
  7095. var l = o.type,
  7096. u = "color" === l && o.__drColorMappingBy,
  7097. h = "index" === u ? n : "id" === u ? r.mapIdToIndex(i.getId()) : i.getValue(t.get("visualDimension"));
  7098. s[l] = o.mapValueToVisual(h)
  7099. }
  7100. return s
  7101. }
  7102. function Pd(t, e, i, n) {
  7103. var o, a;
  7104. if (!t.isRemoved()) {
  7105. var r = t.getLayout();
  7106. o = r.width, a = r.height;
  7107. var s = (f = t.getModel()).get(nL),
  7108. l = f.get(oL) / 2,
  7109. u = Wd(f),
  7110. h = Math.max(s, u),
  7111. c = s - l,
  7112. d = h - l,
  7113. f = t.getModel();
  7114. t.setLayout({
  7115. borderWidth: s,
  7116. upperHeight: h,
  7117. upperLabelHeight: u
  7118. }, !0);
  7119. var p = (o = QC(o - 2 * c, 0)) * (a = QC(a - c - d, 0)),
  7120. g = Nd(t, f, p, e, i, n);
  7121. if (g.length) {
  7122. var m = {
  7123. x: c,
  7124. y: d,
  7125. width: o,
  7126. height: a
  7127. },
  7128. v = tL(o, a),
  7129. y = 1 / 0,
  7130. x = [];
  7131. x.area = 0;
  7132. for (var _ = 0, w = g.length; _ < w;) {
  7133. var b = g[_];
  7134. x.push(b), x.area += b.getLayout().area;
  7135. var S = zd(x, v, e.squareRatio);
  7136. S <= y ? (_++, y = S) : (x.area -= x.pop().getLayout().area, Bd(x, v, m, l, !1), v = tL(m.width, m.height), x.length =
  7137. x.area = 0, y = 1 / 0)
  7138. }
  7139. if (x.length && Bd(x, v, m, l, !0), !i) {
  7140. var M = f.get("childrenVisibleMin");
  7141. null != M && p < M && (i = !0)
  7142. }
  7143. for (var _ = 0, w = g.length; _ < w; _++) Pd(g[_], e, i, n + 1)
  7144. }
  7145. }
  7146. }
  7147. function Nd(t, e, i, n, o, a) {
  7148. var r = t.children || [],
  7149. s = n.sort;
  7150. "asc" !== s && "desc" !== s && (s = null);
  7151. var l = null != n.leafDepth && n.leafDepth <= a;
  7152. if (o && !l) return t.viewChildren = [];
  7153. Ed(r = g(r, function(t) {
  7154. return !t.isRemoved()
  7155. }), s);
  7156. var u = Rd(e, r, s);
  7157. if (0 === u.sum) return t.viewChildren = [];
  7158. if (u.sum = Od(e, i, u.sum, s, r), 0 === u.sum) return t.viewChildren = [];
  7159. for (var h = 0, c = r.length; h < c; h++) {
  7160. var d = r[h].getValue() / u.sum * i;
  7161. r[h].setLayout({
  7162. area: d
  7163. })
  7164. }
  7165. return l && (r.length && t.setLayout({
  7166. isLeafRoot: !0
  7167. }, !0), r.length = 0), t.viewChildren = r, t.setLayout({
  7168. dataExtent: u.dataExtent
  7169. }, !0), r
  7170. }
  7171. function Od(t, e, i, n, o) {
  7172. if (!n) return i;
  7173. for (var a = t.get("visibleMin"), r = o.length, s = r, l = r - 1; l >= 0; l--) {
  7174. var u = o["asc" === n ? r - l - 1 : l].getValue();
  7175. u / i * e < a && (s = l, i -= u)
  7176. }
  7177. return "asc" === n ? o.splice(0, r - s) : o.splice(s, r - s), i
  7178. }
  7179. function Ed(t, e) {
  7180. return e && t.sort(function(t, i) {
  7181. var n = "asc" === e ? t.getValue() - i.getValue() : i.getValue() - t.getValue();
  7182. return 0 === n ? "asc" === e ? t.dataIndex - i.dataIndex : i.dataIndex - t.dataIndex : n
  7183. }), t
  7184. }
  7185. function Rd(t, e, i) {
  7186. for (var n = 0, o = 0, a = e.length; o < a; o++) n += e[o].getValue();
  7187. var r = t.get("visualDimension");
  7188. if (e && e.length)
  7189. if ("value" === r && i) s = [e[e.length - 1].getValue(), e[0].getValue()], "asc" === i && s.reverse();
  7190. else {
  7191. var s = [1 / 0, -1 / 0];
  7192. iL(e, function(t) {
  7193. var e = t.getValue(r);
  7194. e < s[0] && (s[0] = e), e > s[1] && (s[1] = e)
  7195. })
  7196. }
  7197. else s = [NaN, NaN];
  7198. return {
  7199. sum: n,
  7200. dataExtent: s
  7201. }
  7202. }
  7203. function zd(t, e, i) {
  7204. for (var n, o = 0, a = 1 / 0, r = 0, s = t.length; r < s; r++)(n = t[r].getLayout().area) && (n < a && (a = n), n >
  7205. o && (o = n));
  7206. var l = t.area * t.area,
  7207. u = e * e * i;
  7208. return l ? QC(u * o / l, l / (u * a)) : 1 / 0
  7209. }
  7210. function Bd(t, e, i, n, o) {
  7211. var a = e === i.width ? 0 : 1,
  7212. r = 1 - a,
  7213. s = ["x", "y"],
  7214. l = ["width", "height"],
  7215. u = i[s[a]],
  7216. h = e ? t.area / e : 0;
  7217. (o || h > i[l[r]]) && (h = i[l[r]]);
  7218. for (var c = 0, d = t.length; c < d; c++) {
  7219. var f = t[c],
  7220. p = {},
  7221. g = h ? f.getLayout().area / h : 0,
  7222. m = p[l[r]] = QC(h - 2 * n, 0),
  7223. v = i[s[a]] + i[l[a]] - u,
  7224. y = c === d - 1 || v < g ? v : g,
  7225. x = p[l[a]] = QC(y - 2 * n, 0);
  7226. p[s[r]] = i[s[r]] + tL(n, m / 2), p[s[a]] = u + tL(n, x / 2), u += y, f.setLayout(p, !0)
  7227. }
  7228. i[s[r]] += h, i[l[r]] -= h
  7229. }
  7230. function Vd(t, e, i, n, o) {
  7231. var a = (e || {}).node,
  7232. r = [n, o];
  7233. if (!a || a === i) return r;
  7234. for (var s, l = n * o, u = l * t.option.zoomToNodeRatio; s = a.parentNode;) {
  7235. for (var h = 0, c = s.children, d = 0, f = c.length; d < f; d++) h += c[d].getValue();
  7236. var p = a.getValue();
  7237. if (0 === p) return r;
  7238. u *= h / p;
  7239. var g = s.getModel(),
  7240. m = g.get(nL);
  7241. (u += 4 * m * m + (3 * m + Math.max(m, Wd(g))) * Math.pow(u, .5)) > kM && (u = kM), a = s
  7242. }
  7243. u < l && (u = l);
  7244. var v = Math.pow(u / l, .5);
  7245. return [n * v, o * v]
  7246. }
  7247. function Gd(t, e, i) {
  7248. if (e) return {
  7249. x: e.x,
  7250. y: e.y
  7251. };
  7252. var n = {
  7253. x: 0,
  7254. y: 0
  7255. };
  7256. if (!i) return n;
  7257. var o = i.node,
  7258. a = o.getLayout();
  7259. if (!a) return n;
  7260. for (var r = [a.width / 2, a.height / 2], s = o; s;) {
  7261. var l = s.getLayout();
  7262. r[0] += l.x, r[1] += l.y, s = s.parentNode
  7263. }
  7264. return {
  7265. x: t.width / 2 - r[0],
  7266. y: t.height / 2 - r[1]
  7267. }
  7268. }
  7269. function Fd(t, e, i, n, o) {
  7270. var a = t.getLayout(),
  7271. r = i[o],
  7272. s = r && r === t;
  7273. if (!(r && !s || o === i.length && t !== n)) {
  7274. t.setLayout({
  7275. isInView: !0,
  7276. invisible: !s && !e.intersect(a),
  7277. isAboveViewRoot: s
  7278. }, !0);
  7279. var l = new ue(e.x - a.x, e.y - a.y, e.width, e.height);
  7280. iL(t.viewChildren || [], function(t) {
  7281. Fd(t, l, i, n, o + 1)
  7282. })
  7283. }
  7284. }
  7285. function Wd(t) {
  7286. return t.get(aL) ? t.get(rL) : 0
  7287. }
  7288. function Hd(t) {
  7289. return "_EC_" + t
  7290. }
  7291. function Zd(t, e) {
  7292. this.id = null == t ? "" : t, this.inEdges = [], this.outEdges = [], this.edges = [], this.hostGraph, this.dataIndex =
  7293. null == e ? -1 : e
  7294. }
  7295. function Ud(t, e, i) {
  7296. this.node1 = t, this.node2 = e, this.dataIndex = null == i ? -1 : i
  7297. }
  7298. function Xd(t) {
  7299. return isNaN(+t.cpx1) || isNaN(+t.cpy1)
  7300. }
  7301. function jd(t) {
  7302. return "_" + t + "Type"
  7303. }
  7304. function Yd(t, e, i) {
  7305. var n = e.getItemVisual(i, "color"),
  7306. o = e.getItemVisual(i, t),
  7307. a = e.getItemVisual(i, t + "Size");
  7308. if (o && "none" !== o) {
  7309. y(a) || (a = [a, a]);
  7310. var r = Xl(o, -a[0] / 2, -a[1] / 2, a[0], a[1], n);
  7311. return r.name = t, r
  7312. }
  7313. }
  7314. function qd(t) {
  7315. var e = new gL({
  7316. name: "line"
  7317. });
  7318. return Kd(e.shape, t), e
  7319. }
  7320. function Kd(t, e) {
  7321. var i = e[0],
  7322. n = e[1],
  7323. o = e[2];
  7324. t.x1 = i[0], t.y1 = i[1], t.x2 = n[0], t.y2 = n[1], t.percent = 1, o ? (t.cpx1 = o[0], t.cpy1 = o[1]) : (t.cpx1 =
  7325. NaN, t.cpy1 = NaN)
  7326. }
  7327. function $d(t, e, i) {
  7328. Zw.call(this), this._createLine(t, e, i)
  7329. }
  7330. function Jd(t) {
  7331. this._ctor = t || $d, this.group = new Zw
  7332. }
  7333. function Qd(t, e, i, n) {
  7334. if ( of (e.getItemLayout(i))) {
  7335. var o = new t._ctor(e, i, n);
  7336. e.setItemGraphicEl(i, o), t.group.add(o)
  7337. }
  7338. }
  7339. function tf(t, e, i, n, o, a) {
  7340. var r = e.getItemGraphicEl(n); of (i.getItemLayout(o)) ? (r ? r.updateData(i, o, a) : r = new t._ctor(i, o, a), i.setItemGraphicEl(
  7341. o, r), t.group.add(r)) : t.group.remove(r)
  7342. }
  7343. function ef(t) {
  7344. var e = t.hostModel;
  7345. return {
  7346. lineStyle: e.getModel("lineStyle").getLineStyle(),
  7347. hoverLineStyle: e.getModel("emphasis.lineStyle").getLineStyle(),
  7348. labelModel: e.getModel("label"),
  7349. hoverLabelModel: e.getModel("emphasis.label")
  7350. }
  7351. }
  7352. function nf(t) {
  7353. return isNaN(t[0]) || isNaN(t[1])
  7354. }
  7355. function of (t) {
  7356. return !nf(t[0]) && !nf(t[1])
  7357. }
  7358. function af(t, e, i) {
  7359. for (var n, o = t[0], a = t[1], r = t[2], s = 1 / 0, l = i * i, u = .1, h = .1; h <= .9; h += .1) xL[0] = bL(o[0], a[
  7360. 0], r[0], h), xL[1] = bL(o[1], a[1], r[1], h), (f = ML(SL(xL, e) - l)) < s && (s = f, n = h);
  7361. for (var c = 0; c < 32; c++) {
  7362. var d = n + u;
  7363. _L[0] = bL(o[0], a[0], r[0], n), _L[1] = bL(o[1], a[1], r[1], n), wL[0] = bL(o[0], a[0], r[0], d), wL[1] = bL(o[1],
  7364. a[1], r[1], d);
  7365. var f = SL(_L, e) - l;
  7366. if (ML(f) < .01) break;
  7367. var p = SL(wL, e) - l;
  7368. u /= 2, f < 0 ? p >= 0 ? n += u : n -= u : p >= 0 ? n -= u : n += u
  7369. }
  7370. return n
  7371. }
  7372. function rf(t, e) {
  7373. return t.getVisual("opacity") || t.getModel().get(e)
  7374. }
  7375. function sf(t, e, i) {
  7376. var n = t.getGraphicEl(),
  7377. o = rf(t, e);
  7378. null != i && (null == o && (o = 1), o *= i), n.downplay && n.downplay(), n.traverse(function(t) {
  7379. "group" !== t.type && t.setStyle("opacity", o)
  7380. })
  7381. }
  7382. function lf(t, e) {
  7383. var i = rf(t, e),
  7384. n = t.getGraphicEl();
  7385. n.highlight && n.highlight(), n.traverse(function(t) {
  7386. "group" !== t.type && t.setStyle("opacity", i)
  7387. })
  7388. }
  7389. function uf(t) {
  7390. return t instanceof Array || (t = [t, t]), t
  7391. }
  7392. function hf(t) {
  7393. var e = t.coordinateSystem;
  7394. if (!e || "view" === e.type) {
  7395. var i = t.getGraph();
  7396. i.eachNode(function(t) {
  7397. var e = t.getModel();
  7398. t.setLayout([+e.get("x"), +e.get("y")])
  7399. }), cf(i)
  7400. }
  7401. }
  7402. function cf(t) {
  7403. t.eachEdge(function(t) {
  7404. var e = t.getModel().get("lineStyle.curveness") || 0,
  7405. i = F(t.node1.getLayout()),
  7406. n = F(t.node2.getLayout()),
  7407. o = [i, n]; + e && o.push([(i[0] + n[0]) / 2 - (i[1] - n[1]) * e, (i[1] + n[1]) / 2 - (n[0] - i[0]) * e]), t.setLayout(
  7408. o)
  7409. })
  7410. }
  7411. function df(t) {
  7412. var e = t.coordinateSystem;
  7413. if (!e || "view" === e.type) {
  7414. var i = e.getBoundingRect(),
  7415. n = t.getData(),
  7416. o = n.graph,
  7417. a = 0,
  7418. r = n.getSum("value"),
  7419. s = 2 * Math.PI / (r || n.count()),
  7420. l = i.width / 2 + i.x,
  7421. u = i.height / 2 + i.y,
  7422. h = Math.min(i.width, i.height) / 2;
  7423. o.eachNode(function(t) {
  7424. var e = t.getValue("value");
  7425. a += s * (r ? e : 1) / 2, t.setLayout([h * Math.cos(a) + l, h * Math.sin(a) + u]), a += s * (r ? e : 1) / 2
  7426. }), n.setLayout({
  7427. cx: l,
  7428. cy: u
  7429. }), o.eachEdge(function(t) {
  7430. var e, i = t.getModel().get("lineStyle.curveness") || 0,
  7431. n = F(t.node1.getLayout()),
  7432. o = F(t.node2.getLayout()),
  7433. a = (n[0] + o[0]) / 2,
  7434. r = (n[1] + o[1]) / 2; + i && (e = [l * (i *= 3) + a * (1 - i), u * i + r * (1 - i)]), t.setLayout([n, o, e])
  7435. })
  7436. }
  7437. }
  7438. function ff(t, e, i) {
  7439. 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,
  7440. l = 0; l < t.length; l++) {
  7441. var u = t[l];
  7442. u.p || (u.p = V(o * (Math.random() - .5) + r[0], a * (Math.random() - .5) + r[1])), u.pp = F(u.p), u.edges = null
  7443. }
  7444. var h = .6;
  7445. return {
  7446. warmUp: function() {
  7447. h = .5
  7448. },
  7449. setFixed: function(e) {
  7450. t[e].fixed = !0
  7451. },
  7452. setUnfixed: function(e) {
  7453. t[e].fixed = !1
  7454. },
  7455. step: function(i) {
  7456. for (var n = [], o = t.length, a = 0; a < e.length; a++) {
  7457. var l = e[a],
  7458. u = l.n1;
  7459. U(n, (p = l.n2).p, u.p);
  7460. var c = X(n) - l.d,
  7461. d = p.w / (u.w + p.w);
  7462. isNaN(d) && (d = 0), q(n, n), !u.fixed && DL(u.p, u.p, n, d * c * h), !p.fixed && DL(p.p, p.p, n, -(1 - d) * c *
  7463. h)
  7464. }
  7465. for (a = 0; a < o; a++)(v = t[a]).fixed || (U(n, r, v.p), DL(v.p, v.p, n, s * h));
  7466. for (a = 0; a < o; a++)
  7467. for (var u = t[a], f = a + 1; f < o; f++) {
  7468. var p = t[f];
  7469. U(n, p.p, u.p), 0 === (c = X(n)) && (W(n, Math.random() - .5, Math.random() - .5), c = 1);
  7470. var g = (u.rep + p.rep) / c / c;
  7471. !u.fixed && DL(u.pp, u.pp, n, g), !p.fixed && DL(p.pp, p.pp, n, -g)
  7472. }
  7473. for (var m = [], a = 0; a < o; a++) {
  7474. var v = t[a];
  7475. v.fixed || (U(m, v.p, v.pp), DL(v.p, v.p, m, h), G(v.pp, v.p))
  7476. }
  7477. h *= .992, i && i(t, e, h < .01)
  7478. }
  7479. }
  7480. }
  7481. function pf(t, e, i) {
  7482. var n = t.getBoxLayoutParams();
  7483. return n.aspect = i, la(n, {
  7484. width: e.getWidth(),
  7485. height: e.getHeight()
  7486. })
  7487. }
  7488. function gf(t, e) {
  7489. var i = t.get("center"),
  7490. n = e.getWidth(),
  7491. o = e.getHeight(),
  7492. a = Math.min(n, o);
  7493. return {
  7494. cx: Ro(i[0], e.getWidth()),
  7495. cy: Ro(i[1], e.getHeight()),
  7496. r: Ro(t.get("radius"), a / 2)
  7497. }
  7498. }
  7499. function mf(t, e) {
  7500. return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t : "") : "function" == typeof e && (t = e(
  7501. t))), t
  7502. }
  7503. function vf(t, e) {
  7504. function i() {
  7505. a.ignore = a.hoverIgnore, r.ignore = r.hoverIgnore
  7506. }
  7507. function n() {
  7508. a.ignore = a.normalIgnore, r.ignore = r.normalIgnore
  7509. }
  7510. Zw.call(this);
  7511. var o = new nM,
  7512. a = new oM,
  7513. r = new qS;
  7514. this.add(o), this.add(a), this.add(r), this.updateData(t, e, !0), this.on("emphasis", i).on("normal", n).on(
  7515. "mouseover", i).on("mouseout", n)
  7516. }
  7517. function yf(t, e) {
  7518. return la(t.getBoxLayoutParams(), {
  7519. width: e.getWidth(),
  7520. height: e.getHeight()
  7521. })
  7522. }
  7523. function xf(t, e) {
  7524. for (var i = t.mapDimension("value"), n = t.mapArray(i, function(t) {
  7525. return t
  7526. }), o = [], a = "ascending" === e, r = 0, s = t.count(); r < s; r++) o[r] = r;
  7527. return "function" == typeof e ? o.sort(e) : "none" !== e && o.sort(function(t, e) {
  7528. return a ? n[t] - n[e] : n[e] - n[t]
  7529. }), o
  7530. }
  7531. function _f(t) {
  7532. t.each(function(e) {
  7533. var i, n, o, a, r = t.getItemModel(e),
  7534. s = r.getModel("label").get("position"),
  7535. l = r.getModel("labelLine"),
  7536. u = t.getItemLayout(e),
  7537. h = u.points,
  7538. c = "inner" === s || "inside" === s || "center" === s;
  7539. if (c) i = "center", a = [
  7540. [n = (h[0][0] + h[1][0] + h[2][0] + h[3][0]) / 4, o = (h[0][1] + h[1][1] + h[2][1] + h[3][1]) / 4],
  7541. [n, o]
  7542. ];
  7543. else {
  7544. var d, f, p, g = l.get("length");
  7545. "left" === s ? (d = (h[3][0] + h[0][0]) / 2, f = (h[3][1] + h[0][1]) / 2, n = (p = d - g) - 5, i = "right") : (d =
  7546. (h[1][0] + h[2][0]) / 2, f = (h[1][1] + h[2][1]) / 2, n = (p = d + g) + 5, i = "left");
  7547. var m = f;
  7548. a = [
  7549. [d, f],
  7550. [p, m]
  7551. ], o = m
  7552. }
  7553. u.label = {
  7554. linePoints: a,
  7555. x: n,
  7556. y: o,
  7557. verticalAlign: "middle",
  7558. textAlign: i,
  7559. inside: c
  7560. }
  7561. })
  7562. }
  7563. function wf(t) {
  7564. if (!t.parallel) {
  7565. var e = !1;
  7566. d(t.series, function(t) {
  7567. t && "parallel" === t.type && (e = !0)
  7568. }), e && (t.parallel = [{}])
  7569. }
  7570. }
  7571. function bf(t) {
  7572. d(Di(t.parallelAxis), function(e) {
  7573. if (w(e)) {
  7574. var i = e.parallelIndex || 0,
  7575. o = Di(t.parallel)[i];
  7576. o && o.parallelAxisDefault && n(e, o.parallelAxisDefault, !1)
  7577. }
  7578. })
  7579. }
  7580. function Sf(t, e) {
  7581. var i = t[e] - t[1 - e];
  7582. return {
  7583. span: Math.abs(i),
  7584. sign: i > 0 ? -1 : i < 0 ? 1 : e ? -1 : 1
  7585. }
  7586. }
  7587. function Mf(t, e) {
  7588. return Math.min(e[1], Math.max(e[0], t))
  7589. }
  7590. function If(t, e, i) {
  7591. this._axesMap = R(), this._axesLayout = {}, this.dimensions = t.dimensions, this._rect, this._model = t, this._init(
  7592. t, e, i)
  7593. }
  7594. function Tf(t, e) {
  7595. return zL(BL(t, e[0]), e[1])
  7596. }
  7597. function Af(t, e) {
  7598. var i = e.layoutLength / (e.axisCount - 1);
  7599. return {
  7600. position: i * t,
  7601. axisNameAvailableWidth: i,
  7602. axisLabelShow: !0
  7603. }
  7604. }
  7605. function Df(t, e) {
  7606. var i, n, o = e.layoutLength,
  7607. a = e.axisExpandWidth,
  7608. r = e.axisCount,
  7609. s = e.axisCollapseWidth,
  7610. l = e.winInnerIndices,
  7611. u = s,
  7612. h = !1;
  7613. return t < l[0] ? (i = t * s, n = s) : t <= l[1] ? (i = e.axisExpandWindow0Pos + t * a - e.axisExpandWindow[0], u =
  7614. a, h = !0) : (i = o - (r - 1 - t) * s, n = s), {
  7615. position: i,
  7616. axisNameAvailableWidth: u,
  7617. axisLabelShow: h,
  7618. nameTruncateMaxWidth: n
  7619. }
  7620. }
  7621. function Cf(t) {
  7622. aw.call(this), this._zr = t, this.group = new Zw, this._brushType, this._brushOption, this._panels, this._track = [],
  7623. this._dragging, this._covers = [], this._creatingCover, this._creatingPanel, this._enableGlobalPan, this._uid =
  7624. "brushController_" + ok++, this._handlers = {}, XL(ak, function(t, e) {
  7625. this._handlers[e] = m(t, this)
  7626. }, this)
  7627. }
  7628. function Lf(t, e) {
  7629. var o = t._zr;
  7630. t._enableGlobalPan || ec(o, tk, t._uid), XL(t._handlers, function(t, e) {
  7631. o.on(e, t)
  7632. }), t._brushType = e.brushType, t._brushOption = n(i(nk), e, !0)
  7633. }
  7634. function kf(t) {
  7635. var e = t._zr;
  7636. ic(e, tk, t._uid), XL(t._handlers, function(t, i) {
  7637. e.off(i, t)
  7638. }), t._brushType = t._brushOption = null
  7639. }
  7640. function Pf(t, e) {
  7641. var i = rk[e.brushType].createCover(t, e);
  7642. return i.__brushOption = e, Ef(i, e), t.group.add(i), i
  7643. }
  7644. function Nf(t, e) {
  7645. var i = zf(e);
  7646. return i.endCreating && (i.endCreating(t, e), Ef(e, e.__brushOption)), e
  7647. }
  7648. function Of(t, e) {
  7649. var i = e.__brushOption;
  7650. zf(e).updateCoverShape(t, e, i.range, i)
  7651. }
  7652. function Ef(t, e) {
  7653. var i = e.z;
  7654. null == i && (i = $L), t.traverse(function(t) {
  7655. t.z = i, t.z2 = i
  7656. })
  7657. }
  7658. function Rf(t, e) {
  7659. zf(e).updateCommon(t, e), Of(t, e)
  7660. }
  7661. function zf(t) {
  7662. return rk[t.__brushOption.brushType]
  7663. }
  7664. function Bf(t, e, i) {
  7665. var n = t._panels;
  7666. if (!n) return !0;
  7667. var o, a = t._transform;
  7668. return XL(n, function(t) {
  7669. t.isTargetByCursor(e, i, a) && (o = t)
  7670. }), o
  7671. }
  7672. function Vf(t, e) {
  7673. var i = t._panels;
  7674. if (!i) return !0;
  7675. var n = e.__brushOption.panelId;
  7676. return null == n || i[n]
  7677. }
  7678. function Gf(t) {
  7679. var e = t._covers,
  7680. i = e.length;
  7681. return XL(e, function(e) {
  7682. t.group.remove(e)
  7683. }, t), e.length = 0, !!i
  7684. }
  7685. function Ff(t, e) {
  7686. var n = jL(t._covers, function(t) {
  7687. var e = t.__brushOption,
  7688. n = i(e.range);
  7689. return {
  7690. brushType: e.brushType,
  7691. panelId: e.panelId,
  7692. range: n
  7693. }
  7694. });
  7695. t.trigger("brush", n, {
  7696. isEnd: !!e.isEnd,
  7697. removeOnClick: !!e.removeOnClick
  7698. })
  7699. }
  7700. function Wf(t) {
  7701. var e = t._track;
  7702. if (!e.length) return !1;
  7703. var i = e[e.length - 1],
  7704. n = e[0],
  7705. o = i[0] - n[0],
  7706. a = i[1] - n[1];
  7707. return KL(o * o + a * a, .5) > JL
  7708. }
  7709. function Hf(t) {
  7710. var e = t.length - 1;
  7711. return e < 0 && (e = 0), [t[0], t[e]]
  7712. }
  7713. function Zf(t, e, i, n) {
  7714. var o = new Zw;
  7715. return o.add(new aM({
  7716. name: "main",
  7717. style: Yf(i),
  7718. silent: !0,
  7719. draggable: !0,
  7720. cursor: "move",
  7721. drift: UL(t, e, o, "nswe"),
  7722. ondragend: UL(Ff, e, {
  7723. isEnd: !0
  7724. })
  7725. })), XL(n, function(i) {
  7726. o.add(new aM({
  7727. name: i,
  7728. style: {
  7729. opacity: 0
  7730. },
  7731. draggable: !0,
  7732. silent: !0,
  7733. invisible: !0,
  7734. drift: UL(t, e, o, i),
  7735. ondragend: UL(Ff, e, {
  7736. isEnd: !0
  7737. })
  7738. }))
  7739. }), o
  7740. }
  7741. function Uf(t, e, i, n) {
  7742. var o = n.brushStyle.lineWidth || 0,
  7743. a = qL(o, QL),
  7744. r = i[0][0],
  7745. s = i[1][0],
  7746. l = r - o / 2,
  7747. u = s - o / 2,
  7748. h = i[0][1],
  7749. c = i[1][1],
  7750. d = h - a + o / 2,
  7751. f = c - a + o / 2,
  7752. p = h - r,
  7753. g = c - s,
  7754. m = p + o,
  7755. v = g + o;
  7756. jf(t, e, "main", r, s, p, g), n.transformable && (jf(t, e, "w", l, u, a, v), jf(t, e, "e", d, u, a, v), jf(t, e, "n",
  7757. l, u, m, a), jf(t, e, "s", l, f, m, a), jf(t, e, "nw", l, u, a, a), jf(t, e, "ne", d, u, a, a), jf(t, e, "sw", l,
  7758. f, a, a), jf(t, e, "se", d, f, a, a))
  7759. }
  7760. function Xf(t, e) {
  7761. var i = e.__brushOption,
  7762. n = i.transformable,
  7763. o = e.childAt(0);
  7764. o.useStyle(Yf(i)), o.attr({
  7765. silent: !n,
  7766. cursor: n ? "move" : "default"
  7767. }), XL(["w", "e", "n", "s", "se", "sw", "ne", "nw"], function(i) {
  7768. var o = e.childOfName(i),
  7769. a = $f(t, i);
  7770. o && o.attr({
  7771. silent: !n,
  7772. invisible: !n,
  7773. cursor: n ? ik[a] + "-resize" : null
  7774. })
  7775. })
  7776. }
  7777. function jf(t, e, i, n, o, a, r) {
  7778. var s = e.childOfName(i);
  7779. s && s.setShape(ip(ep(t, e, [
  7780. [n, o],
  7781. [n + a, o + r]
  7782. ])))
  7783. }
  7784. function Yf(t) {
  7785. return r({
  7786. strokeNoScale: !0
  7787. }, t.brushStyle)
  7788. }
  7789. function qf(t, e, i, n) {
  7790. var o = [YL(t, i), YL(e, n)],
  7791. a = [qL(t, i), qL(e, n)];
  7792. return [
  7793. [o[0], a[0]],
  7794. [o[1], a[1]]
  7795. ]
  7796. }
  7797. function Kf(t) {
  7798. return Mo(t.group)
  7799. }
  7800. function $f(t, e) {
  7801. if (e.length > 1) return ("e" === (n = [$f(t, (e = e.split(""))[0]), $f(t, e[1])])[0] || "w" === n[0]) && n.reverse(),
  7802. n.join("");
  7803. var i = {
  7804. left: "w",
  7805. right: "e",
  7806. top: "n",
  7807. bottom: "s"
  7808. },
  7809. n = To({
  7810. w: "left",
  7811. e: "right",
  7812. n: "top",
  7813. s: "bottom"
  7814. } [e], Kf(t));
  7815. return i[n]
  7816. }
  7817. function Jf(t, e, i, n, o, a, r, s) {
  7818. var l = n.__brushOption,
  7819. u = t(l.range),
  7820. h = tp(i, a, r);
  7821. XL(o.split(""), function(t) {
  7822. var e = ek[t];
  7823. u[e[0]][e[1]] += h[e[0]]
  7824. }), l.range = e(qf(u[0][0], u[1][0], u[0][1], u[1][1])), Rf(i, n), Ff(i, {
  7825. isEnd: !1
  7826. })
  7827. }
  7828. function Qf(t, e, i, n, o) {
  7829. var a = e.__brushOption.range,
  7830. r = tp(t, i, n);
  7831. XL(a, function(t) {
  7832. t[0] += r[0], t[1] += r[1]
  7833. }), Rf(t, e), Ff(t, {
  7834. isEnd: !1
  7835. })
  7836. }
  7837. function tp(t, e, i) {
  7838. var n = t.group,
  7839. o = n.transformCoordToLocal(e, i),
  7840. a = n.transformCoordToLocal(0, 0);
  7841. return [o[0] - a[0], o[1] - a[1]]
  7842. }
  7843. function ep(t, e, n) {
  7844. var o = Vf(t, e);
  7845. return o && !0 !== o ? o.clipPath(n, t._transform) : i(n)
  7846. }
  7847. function ip(t) {
  7848. var e = YL(t[0][0], t[1][0]),
  7849. i = YL(t[0][1], t[1][1]);
  7850. return {
  7851. x: e,
  7852. y: i,
  7853. width: qL(t[0][0], t[1][0]) - e,
  7854. height: qL(t[0][1], t[1][1]) - i
  7855. }
  7856. }
  7857. function np(t, e, i) {
  7858. if (t._brushType) {
  7859. var n = t._zr,
  7860. o = t._covers,
  7861. a = Bf(t, e, i);
  7862. if (!t._dragging)
  7863. for (var r = 0; r < o.length; r++) {
  7864. var s = o[r].__brushOption;
  7865. if (a && (!0 === a || s.panelId === a.panelId) && rk[s.brushType].contain(o[r], i[0], i[1])) return
  7866. }
  7867. a && n.setCursorStyle("crosshair")
  7868. }
  7869. }
  7870. function op(t) {
  7871. var e = t.event;
  7872. e.preventDefault && e.preventDefault()
  7873. }
  7874. function ap(t, e, i) {
  7875. return t.childOfName("main").contain(e, i)
  7876. }
  7877. function rp(t, e, n, o) {
  7878. var a, r = t._creatingCover,
  7879. s = t._creatingPanel,
  7880. l = t._brushOption;
  7881. if (t._track.push(n.slice()), Wf(t) || r) {
  7882. if (s && !r) {
  7883. "single" === l.brushMode && Gf(t);
  7884. var u = i(l);
  7885. u.brushType = sp(u.brushType, s), u.panelId = !0 === s ? null : s.panelId, r = t._creatingCover = Pf(t, u), t._covers
  7886. .push(r)
  7887. }
  7888. if (r) {
  7889. var h = rk[sp(t._brushType, s)];
  7890. r.__brushOption.range = h.getCreatingRange(ep(t, r, t._track)), o && (Nf(t, r), h.updateCommon(t, r)), Of(t, r), a = {
  7891. isEnd: o
  7892. }
  7893. }
  7894. } else o && "single" === l.brushMode && l.removeOnClick && Bf(t, e, n) && Gf(t) && (a = {
  7895. isEnd: o,
  7896. removeOnClick: !0
  7897. });
  7898. return a
  7899. }
  7900. function sp(t, e) {
  7901. return "auto" === t ? e.defaultBrushType : t
  7902. }
  7903. function lp(t) {
  7904. if (this._dragging) {
  7905. op(t);
  7906. var e = rp(this, t, this.group.transformCoordToLocal(t.offsetX, t.offsetY), !0);
  7907. this._dragging = !1, this._track = [], this._creatingCover = null, e && Ff(this, e)
  7908. }
  7909. }
  7910. function up(t) {
  7911. return {
  7912. createCover: function(e, i) {
  7913. return Zf(UL(Jf, function(e) {
  7914. var i = [e, [0, 100]];
  7915. return t && i.reverse(), i
  7916. }, function(e) {
  7917. return e[t]
  7918. }), e, i, [
  7919. ["w", "e"],
  7920. ["n", "s"]
  7921. ][t])
  7922. },
  7923. getCreatingRange: function(e) {
  7924. var i = Hf(e);
  7925. return [YL(i[0][t], i[1][t]), qL(i[0][t], i[1][t])]
  7926. },
  7927. updateCoverShape: function(e, i, n, o) {
  7928. var a, r = Vf(e, i);
  7929. if (!0 !== r && r.getLinearBrushOtherExtent) a = r.getLinearBrushOtherExtent(t, e._transform);
  7930. else {
  7931. var s = e._zr;
  7932. a = [0, [s.getWidth(), s.getHeight()][1 - t]]
  7933. }
  7934. var l = [n, a];
  7935. t && l.reverse(), Uf(e, i, l, o)
  7936. },
  7937. updateCommon: Xf,
  7938. contain: ap
  7939. }
  7940. }
  7941. function hp(t) {
  7942. return t = fp(t),
  7943. function(e, i) {
  7944. return Do(e, t)
  7945. }
  7946. }
  7947. function cp(t, e) {
  7948. return t = fp(t),
  7949. function(i) {
  7950. var n = null != e ? e : i,
  7951. o = n ? t.width : t.height,
  7952. a = n ? t.x : t.y;
  7953. return [a, a + (o || 0)]
  7954. }
  7955. }
  7956. function dp(t, e, i) {
  7957. return t = fp(t),
  7958. function(n, o, a) {
  7959. return t.contain(o[0], o[1]) && !mc(n, e, i)
  7960. }
  7961. }
  7962. function fp(t) {
  7963. return ue.create(t)
  7964. }
  7965. function pp(t, e, i) {
  7966. return i && "axisAreaSelect" === i.type && e.findComponents({
  7967. mainType: "parallelAxis",
  7968. query: i
  7969. })[0] === t
  7970. }
  7971. function gp(t) {
  7972. var e = t.axis;
  7973. return f(t.activeIntervals, function(t) {
  7974. return {
  7975. brushType: "lineX",
  7976. panelId: "pl",
  7977. range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]
  7978. }
  7979. })
  7980. }
  7981. function mp(t, e) {
  7982. return e.getComponent("parallel", t.get("parallelIndex"))
  7983. }
  7984. function vp(t, e) {
  7985. var i = t._model;
  7986. return i.get("axisExpandable") && i.get("axisExpandTriggerOn") === e
  7987. }
  7988. function yp(t, e) {
  7989. if (!t.encodeDefine) {
  7990. var i = e.ecModel.getComponent("parallel", e.get("parallelIndex"));
  7991. if (i) {
  7992. var n = t.encodeDefine = R();
  7993. d(i.dimensions, function(t) {
  7994. var e = xp(t);
  7995. n.set(t, e)
  7996. })
  7997. }
  7998. }
  7999. }
  8000. function xp(t) {
  8001. return +t.replace("dim", "")
  8002. }
  8003. function _p(t, e, i) {
  8004. var n = t.model,
  8005. o = t.getRect(),
  8006. a = new aM({
  8007. shape: {
  8008. x: o.x,
  8009. y: o.y,
  8010. width: o.width,
  8011. height: o.height
  8012. }
  8013. }),
  8014. r = "horizontal" === n.get("layout") ? "width" : "height";
  8015. return a.setShape(r, 0), So(a, {
  8016. shape: {
  8017. width: o.width,
  8018. height: o.height
  8019. }
  8020. }, e, i), a
  8021. }
  8022. function wp(t, e, i, n) {
  8023. for (var o = [], a = 0; a < i.length; a++) {
  8024. var r = i[a],
  8025. s = t.get(t.mapDimension(r), e);
  8026. Ip(s, n.getAxis(r).type) || o.push(n.dataToPoint(s, r))
  8027. }
  8028. return o
  8029. }
  8030. function bp(t, e, i, n, o) {
  8031. var a = wp(t, i, n, o),
  8032. r = new oM({
  8033. shape: {
  8034. points: a
  8035. },
  8036. silent: !0,
  8037. z2: 10
  8038. });
  8039. return e.add(r), t.setItemGraphicEl(i, r), r
  8040. }
  8041. function Sp(t) {
  8042. var e = t.get("smooth", !0);
  8043. return !0 === e && (e = hk), {
  8044. lineStyle: t.getModel("lineStyle").getLineStyle(),
  8045. smooth: null != e ? e : hk
  8046. }
  8047. }
  8048. function Mp(t, e, i, n) {
  8049. var o = n.lineStyle;
  8050. e.hasItemOption && (o = e.getItemModel(i).getModel("lineStyle").getLineStyle()), t.useStyle(o);
  8051. var a = t.style;
  8052. a.fill = null, a.stroke = e.getItemVisual(i, "color"), a.opacity = e.getItemVisual(i, "opacity"), n.smooth && (t.shape
  8053. .smooth = n.smooth)
  8054. }
  8055. function Ip(t, e) {
  8056. return "category" === e ? null == t : null == t || isNaN(t)
  8057. }
  8058. function Tp(t, e) {
  8059. return t.getVisual("opacity") || t.getModel().get(e)
  8060. }
  8061. function Ap(t, e, i) {
  8062. var n = t.getGraphicEl(),
  8063. o = Tp(t, e);
  8064. null != i && (null == o && (o = 1), o *= i), n.downplay && n.downplay(), n.traverse(function(t) {
  8065. "group" !== t.type && t.setStyle("opacity", o)
  8066. })
  8067. }
  8068. function Dp(t, e) {
  8069. var i = Tp(t, e),
  8070. n = t.getGraphicEl();
  8071. n.highlight && n.highlight(), n.traverse(function(t) {
  8072. "group" !== t.type && t.setStyle("opacity", i)
  8073. })
  8074. }
  8075. function Cp(t, e, i) {
  8076. var n = new aM({
  8077. shape: {
  8078. x: t.x - 10,
  8079. y: t.y - 10,
  8080. width: 0,
  8081. height: t.height + 20
  8082. }
  8083. });
  8084. return So(n, {
  8085. shape: {
  8086. width: t.width + 20,
  8087. height: t.height + 20
  8088. }
  8089. }, e, i), n
  8090. }
  8091. function Lp() {
  8092. function t(e, n) {
  8093. if (n >= i.length) return e;
  8094. for (var o = -1, a = e.length, r = i[n++], s = {}, l = {}; ++o < a;) {
  8095. var u = r(e[o]),
  8096. h = l[u];
  8097. h ? h.push(e[o]) : l[u] = [e[o]]
  8098. }
  8099. return d(l, function(e, i) {
  8100. s[i] = t(e, n)
  8101. }), s
  8102. }
  8103. function e(t, o) {
  8104. if (o >= i.length) return t;
  8105. var a = [],
  8106. r = n[o++];
  8107. return d(t, function(t, i) {
  8108. a.push({
  8109. key: i,
  8110. values: e(t, o)
  8111. })
  8112. }), r ? a.sort(function(t, e) {
  8113. return r(t.key, e.key)
  8114. }) : a
  8115. }
  8116. var i = [],
  8117. n = [];
  8118. return {
  8119. key: function(t) {
  8120. return i.push(t), this
  8121. },
  8122. sortKeys: function(t) {
  8123. return n[i.length - 1] = t, this
  8124. },
  8125. entries: function(i) {
  8126. return e(t(i, 0), 0)
  8127. }
  8128. }
  8129. }
  8130. function kp(t, e) {
  8131. return la(t.getBoxLayoutParams(), {
  8132. width: e.getWidth(),
  8133. height: e.getHeight()
  8134. })
  8135. }
  8136. function Pp(t, e, i, n, o, a, r, s) {
  8137. Op(t, e, i, o, a, s), zp(t, e, a, o, n, r, s), Yp(t, s)
  8138. }
  8139. function Np(t) {
  8140. d(t, function(t) {
  8141. var e = Xp(t.outEdges, Up),
  8142. i = Xp(t.inEdges, Up),
  8143. n = Math.max(e, i);
  8144. t.setLayout({
  8145. value: n
  8146. }, !0)
  8147. })
  8148. }
  8149. function Op(t, e, i, n, o, a) {
  8150. for (var r = [], s = [], l = [], u = [], h = 0, c = 0; c < e.length; c++) r[c] = 1;
  8151. for (c = 0; c < t.length; c++) s[c] = t[c].inEdges.length, 0 === s[c] && l.push(t[c]);
  8152. for (; l.length;) {
  8153. for (var d = 0; d < l.length; d++) {
  8154. var f = l[d];
  8155. "vertical" === a ? (f.setLayout({
  8156. y: h
  8157. }, !0), f.setLayout({
  8158. dy: i
  8159. }, !0)) : (f.setLayout({
  8160. x: h
  8161. }, !0), f.setLayout({
  8162. dx: i
  8163. }, !0));
  8164. for (var p = 0; p < f.outEdges.length; p++) {
  8165. var g = f.outEdges[p];
  8166. r[e.indexOf(g)] = 0;
  8167. var m = g.node2;
  8168. 0 == --s[t.indexOf(m)] && u.push(m)
  8169. }
  8170. }++h, l = u, u = []
  8171. }
  8172. for (c = 0; c < r.length; c++);
  8173. Ep(t, h, a), Rp(t, "vertical" === a ? (o - i) / (h - 1) : (n - i) / (h - 1), a)
  8174. }
  8175. function Ep(t, e, i) {
  8176. d(t, function(t) {
  8177. t.outEdges.length || ("vertical" === i ? t.setLayout({
  8178. y: e - 1
  8179. }, !0) : t.setLayout({
  8180. x: e - 1
  8181. }, !0))
  8182. })
  8183. }
  8184. function Rp(t, e, i) {
  8185. d(t, function(t) {
  8186. if ("vertical" === i) {
  8187. var n = t.getLayout().y * e;
  8188. t.setLayout({
  8189. y: n
  8190. }, !0)
  8191. } else {
  8192. var o = t.getLayout().x * e;
  8193. t.setLayout({
  8194. x: o
  8195. }, !0)
  8196. }
  8197. })
  8198. }
  8199. function zp(t, e, i, n, o, a, r) {
  8200. var s = Lp().key(Bp(r)).sortKeys(function(t, e) {
  8201. return t - e
  8202. }).entries(t).map(function(t) {
  8203. return t.values
  8204. });
  8205. Vp(t, s, e, i, n, o, r), Gp(s, o, i, n, r);
  8206. for (var l = 1; a > 0; a--) Fp(s, l *= .99, r), Gp(s, o, i, n, r), jp(s, l, r), Gp(s, o, i, n, r)
  8207. }
  8208. function Bp(t) {
  8209. return "vertical" === t ? function(t) {
  8210. return t.getLayout().y
  8211. } : function(t) {
  8212. return t.getLayout().x
  8213. }
  8214. }
  8215. function Vp(t, e, i, n, o, a, r) {
  8216. var s = [];
  8217. d(e, function(t) {
  8218. var e = t.length,
  8219. i = 0,
  8220. l = 0;
  8221. d(t, function(t) {
  8222. i += t.getLayout().value
  8223. }), l = "vertical" === r ? (o - (e - 1) * a) / i : (n - (e - 1) * a) / i, s.push(l)
  8224. }), s.sort(function(t, e) {
  8225. return t - e
  8226. });
  8227. var l = s[0];
  8228. d(e, function(t) {
  8229. d(t, function(t, e) {
  8230. var i = t.getLayout().value * l;
  8231. "vertical" === r ? (t.setLayout({
  8232. x: e
  8233. }, !0), t.setLayout({
  8234. dx: i
  8235. }, !0)) : (t.setLayout({
  8236. y: e
  8237. }, !0), t.setLayout({
  8238. dy: i
  8239. }, !0))
  8240. })
  8241. }), d(i, function(t) {
  8242. var e = +t.getValue() * l;
  8243. t.setLayout({
  8244. dy: e
  8245. }, !0)
  8246. })
  8247. }
  8248. function Gp(t, e, i, n, o) {
  8249. d(t, function(t) {
  8250. var a, r, s, l = 0,
  8251. u = t.length;
  8252. if ("vertical" === o) {
  8253. var h;
  8254. for (t.sort(function(t, e) {
  8255. return t.getLayout().x - e.getLayout().x
  8256. }), s = 0; s < u; s++)(r = l - (a = t[s]).getLayout().x) > 0 && (h = a.getLayout().x + r, a.setLayout({
  8257. x: h
  8258. }, !0)), l = a.getLayout().x + a.getLayout().dx + e;
  8259. if ((r = l - e - n) > 0)
  8260. for (h = a.getLayout().x - r, a.setLayout({
  8261. x: h
  8262. }, !0), l = h, s = u - 2; s >= 0; --s)(r = (a = t[s]).getLayout().x + a.getLayout().dx + e - l) > 0 && (h = a.getLayout()
  8263. .x - r, a.setLayout({
  8264. x: h
  8265. }, !0)), l = a.getLayout().x
  8266. } else {
  8267. var c;
  8268. for (t.sort(function(t, e) {
  8269. return t.getLayout().y - e.getLayout().y
  8270. }), s = 0; s < u; s++)(r = l - (a = t[s]).getLayout().y) > 0 && (c = a.getLayout().y + r, a.setLayout({
  8271. y: c
  8272. }, !0)), l = a.getLayout().y + a.getLayout().dy + e;
  8273. if ((r = l - e - i) > 0)
  8274. for (c = a.getLayout().y - r, a.setLayout({
  8275. y: c
  8276. }, !0), l = c, s = u - 2; s >= 0; --s)(r = (a = t[s]).getLayout().y + a.getLayout().dy + e - l) > 0 && (c = a.getLayout()
  8277. .y - r, a.setLayout({
  8278. y: c
  8279. }, !0)), l = a.getLayout().y
  8280. }
  8281. })
  8282. }
  8283. function Fp(t, e, i) {
  8284. d(t.slice().reverse(), function(t) {
  8285. d(t, function(t) {
  8286. if (t.outEdges.length) {
  8287. var n = Xp(t.outEdges, Wp, i) / Xp(t.outEdges, Up, i);
  8288. if ("vertical" === i) {
  8289. var o = t.getLayout().x + (n - Zp(t, i)) * e;
  8290. t.setLayout({
  8291. x: o
  8292. }, !0)
  8293. } else {
  8294. var a = t.getLayout().y + (n - Zp(t, i)) * e;
  8295. t.setLayout({
  8296. y: a
  8297. }, !0)
  8298. }
  8299. }
  8300. })
  8301. })
  8302. }
  8303. function Wp(t, e) {
  8304. return Zp(t.node2, e) * t.getValue()
  8305. }
  8306. function Hp(t, e) {
  8307. return Zp(t.node1, e) * t.getValue()
  8308. }
  8309. function Zp(t, e) {
  8310. return "vertical" === e ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2
  8311. }
  8312. function Up(t) {
  8313. return t.getValue()
  8314. }
  8315. function Xp(t, e, i) {
  8316. for (var n = 0, o = t.length, a = -1; ++a < o;) {
  8317. var r = +e.call(t, t[a], i);
  8318. isNaN(r) || (n += r)
  8319. }
  8320. return n
  8321. }
  8322. function jp(t, e, i) {
  8323. d(t, function(t) {
  8324. d(t, function(t) {
  8325. if (t.inEdges.length) {
  8326. var n = Xp(t.inEdges, Hp, i) / Xp(t.inEdges, Up, i);
  8327. if ("vertical" === i) {
  8328. var o = t.getLayout().x + (n - Zp(t, i)) * e;
  8329. t.setLayout({
  8330. x: o
  8331. }, !0)
  8332. } else {
  8333. var a = t.getLayout().y + (n - Zp(t, i)) * e;
  8334. t.setLayout({
  8335. y: a
  8336. }, !0)
  8337. }
  8338. }
  8339. })
  8340. })
  8341. }
  8342. function Yp(t, e) {
  8343. d(t, function(t) {
  8344. "vertical" === e ? (t.outEdges.sort(function(t, e) {
  8345. return t.node2.getLayout().x - e.node2.getLayout().x
  8346. }), t.inEdges.sort(function(t, e) {
  8347. return t.node1.getLayout().x - e.node1.getLayout().x
  8348. })) : (t.outEdges.sort(function(t, e) {
  8349. return t.node2.getLayout().y - e.node2.getLayout().y
  8350. }), t.inEdges.sort(function(t, e) {
  8351. return t.node1.getLayout().y - e.node1.getLayout().y
  8352. }))
  8353. }), d(t, function(t) {
  8354. var e = 0,
  8355. i = 0;
  8356. d(t.outEdges, function(t) {
  8357. t.setLayout({
  8358. sy: e
  8359. }, !0), e += t.getLayout().dy
  8360. }), d(t.inEdges, function(t) {
  8361. t.setLayout({
  8362. ty: i
  8363. }, !0), i += t.getLayout().dy
  8364. })
  8365. })
  8366. }
  8367. function qp(t, e, i, n, o) {
  8368. var a = t.ends,
  8369. r = new xk({
  8370. shape: {
  8371. points: o ? $p(a, n, t) : a
  8372. }
  8373. });
  8374. return Kp(t, r, e, i, o), r
  8375. }
  8376. function Kp(t, e, i, n, o) {
  8377. var a = i.hostModel;
  8378. (0, bM[o ? "initProps" : "updateProps"])(e, {
  8379. shape: {
  8380. points: t.ends
  8381. }
  8382. }, a, n);
  8383. var r = i.getItemModel(n),
  8384. s = r.getModel(vk),
  8385. l = i.getItemVisual(n, "color"),
  8386. u = s.getItemStyle(["borderColor"]);
  8387. u.stroke = l, u.strokeNoScale = !0, e.useStyle(u), e.z2 = 100, uo(e, r.getModel(yk).getItemStyle())
  8388. }
  8389. function $p(t, e, i) {
  8390. return f(t, function(t) {
  8391. return t = t.slice(), t[e] = i.initBaseline, t
  8392. })
  8393. }
  8394. function Jp(t) {
  8395. var e = [],
  8396. i = [];
  8397. return t.eachSeriesByType("boxplot", function(t) {
  8398. var n = t.getBaseAxis(),
  8399. o = l(i, n);
  8400. o < 0 && (o = i.length, i[o] = n, e[o] = {
  8401. axis: n,
  8402. seriesModels: []
  8403. }), e[o].seriesModels.push(t)
  8404. }), e
  8405. }
  8406. function Qp(t) {
  8407. var e, i, n = t.axis,
  8408. o = t.seriesModels,
  8409. a = o.length,
  8410. r = t.boxWidthList = [],
  8411. s = t.boxOffsetList = [],
  8412. l = [];
  8413. if ("category" === n.type) i = n.getBandWidth();
  8414. else {
  8415. var u = 0;
  8416. wk(o, function(t) {
  8417. u = Math.max(u, t.getData().count())
  8418. }), e = n.getExtent(), Math.abs(e[1] - e[0])
  8419. }
  8420. wk(o, function(t) {
  8421. var e = t.get("boxWidth");
  8422. y(e) || (e = [e, e]), l.push([Ro(e[0], i) || 0, Ro(e[1], i) || 0])
  8423. });
  8424. var h = .8 * i - 2,
  8425. c = h / a * .3,
  8426. d = (h - c * (a - 1)) / a,
  8427. f = d / 2 - h / 2;
  8428. wk(o, function(t, e) {
  8429. s.push(f), f += c + d, r.push(Math.min(Math.max(d, l[e][0]), l[e][1]))
  8430. })
  8431. }
  8432. function tg(t, e, i) {
  8433. function n(t, i, n) {
  8434. var o = s.get(i, n),
  8435. a = [];
  8436. a[u] = t, a[h] = o;
  8437. var l;
  8438. return isNaN(t) || isNaN(o) ? l = [NaN, NaN] : (l = r.dataToPoint(a))[u] += e, l
  8439. }
  8440. function o(t, e, i) {
  8441. var n = e.slice(),
  8442. o = e.slice();
  8443. n[u] += l, o[u] -= l, i ? t.push(n, o) : t.push(o, n)
  8444. }
  8445. function a(t, e) {
  8446. var i = e.slice(),
  8447. n = e.slice();
  8448. i[u] -= l, n[u] += l, t.push(i, n)
  8449. }
  8450. var r = t.coordinateSystem,
  8451. s = t.getData(),
  8452. l = i / 2,
  8453. u = "horizontal" === t.get("layout") ? 0 : 1,
  8454. h = 1 - u,
  8455. c = ["x", "y"],
  8456. d = s.mapDimension(c[u]),
  8457. f = s.mapDimension(c[h], !0);
  8458. if (!(null == d || f.length < 5))
  8459. for (var p = 0; p < s.count(); p++) {
  8460. var g = s.get(d, p),
  8461. m = n(g, f[2], p),
  8462. v = n(g, f[0], p),
  8463. y = n(g, f[1], p),
  8464. x = n(g, f[3], p),
  8465. _ = n(g, f[4], p),
  8466. w = [];
  8467. o(w, y, 0), o(w, x, 1), w.push(v, y, _, x), a(w, v), a(w, _), a(w, m), s.setItemLayout(p, {
  8468. initBaseline: m[h],
  8469. ends: w
  8470. })
  8471. }
  8472. }
  8473. function eg(t, e, i) {
  8474. var n = t.ends;
  8475. return new Ik({
  8476. shape: {
  8477. points: i ? ng(n, t) : n
  8478. },
  8479. z2: 100
  8480. })
  8481. }
  8482. function ig(t, e, i, n) {
  8483. var o = e.getItemModel(i),
  8484. a = o.getModel(bk),
  8485. r = e.getItemVisual(i, "color"),
  8486. s = e.getItemVisual(i, "borderColor") || r,
  8487. l = a.getItemStyle(Mk);
  8488. t.useStyle(l), t.style.strokeNoScale = !0, t.style.fill = r, t.style.stroke = s, t.__simpleBox = n, uo(t, o.getModel(
  8489. Sk).getItemStyle())
  8490. }
  8491. function ng(t, e) {
  8492. return f(t, function(t) {
  8493. return t = t.slice(), t[1] = e.initBaseline, t
  8494. })
  8495. }
  8496. function og(t, e, i) {
  8497. var n = t.getData(),
  8498. o = n.getLayout("largePoints"),
  8499. a = new Tk({
  8500. shape: {
  8501. points: o
  8502. },
  8503. __sign: 1
  8504. });
  8505. e.add(a);
  8506. var r = new Tk({
  8507. shape: {
  8508. points: o
  8509. },
  8510. __sign: -1
  8511. });
  8512. e.add(r), ag(1, a, t, n), ag(-1, r, t, n), i && (a.incremental = !0, r.incremental = !0)
  8513. }
  8514. function ag(t, e, i, n) {
  8515. var o = t > 0 ? "P" : "N",
  8516. a = n.getVisual("borderColor" + o) || n.getVisual("color" + o),
  8517. r = i.getModel(bk).getItemStyle(Mk);
  8518. e.useStyle(r), e.style.fill = null, e.style.stroke = a
  8519. }
  8520. function rg(t, e, i, n, o) {
  8521. return i > n ? -1 : i < n ? 1 : e > 0 ? t.get(o, e - 1) <= n ? 1 : -1 : 1
  8522. }
  8523. function sg(t, e) {
  8524. var i, n = t.getBaseAxis(),
  8525. o = "category" === n.type ? n.getBandWidth() : (i = n.getExtent(), Math.abs(i[1] - i[0]) / e.count()),
  8526. a = Ro(A(t.get("barMaxWidth"), o), o),
  8527. r = Ro(A(t.get("barMinWidth"), 1), o),
  8528. s = t.get("barWidth");
  8529. return null != s ? Ro(s, o) : Math.max(Math.min(o / 2, a), r)
  8530. }
  8531. function lg(t) {
  8532. return y(t) || (t = [+t, +t]), t
  8533. }
  8534. function ug(t, e) {
  8535. t.eachChild(function(t) {
  8536. t.attr({
  8537. z: e.z,
  8538. zlevel: e.zlevel,
  8539. style: {
  8540. stroke: "stroke" === e.brushType ? e.color : null,
  8541. fill: "fill" === e.brushType ? e.color : null
  8542. }
  8543. })
  8544. })
  8545. }
  8546. function hg(t, e) {
  8547. Zw.call(this);
  8548. var i = new mu(t, e),
  8549. n = new Zw;
  8550. this.add(i), this.add(n), n.beforeUpdate = function() {
  8551. this.attr(i.getScale())
  8552. }, this.updateData(t, e)
  8553. }
  8554. function cg(t) {
  8555. var e = t.data;
  8556. e && e[0] && e[0][0] && e[0][0].coord && (t.data = f(e, function(t) {
  8557. var e = {
  8558. coords: [t[0].coord, t[1].coord]
  8559. };
  8560. return t[0].name && (e.fromName = t[0].name), t[1].name && (e.toName = t[1].name), o([e, t[0], t[1]])
  8561. }))
  8562. }
  8563. function dg(t, e, i) {
  8564. Zw.call(this), this.add(this.createLine(t, e, i)), this._updateEffectSymbol(t, e)
  8565. }
  8566. function fg(t, e, i) {
  8567. Zw.call(this), this._createPolyline(t, e, i)
  8568. }
  8569. function pg(t, e, i) {
  8570. dg.call(this, t, e, i), this._lastFrame = 0, this._lastFramePercent = 0
  8571. }
  8572. function gg() {
  8573. this.group = new Zw
  8574. }
  8575. function mg(t) {
  8576. return t instanceof Array || (t = [t, t]), t
  8577. }
  8578. function vg() {
  8579. var t = Y_();
  8580. this.canvas = t, this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {}
  8581. }
  8582. function yg(t, e, i) {
  8583. var n = t[1] - t[0],
  8584. o = (e = f(e, function(e) {
  8585. return {
  8586. interval: [(e.interval[0] - t[0]) / n, (e.interval[1] - t[0]) / n]
  8587. }
  8588. })).length,
  8589. a = 0;
  8590. return function(t) {
  8591. for (n = a; n < o; n++)
  8592. if ((r = e[n].interval)[0] <= t && t <= r[1]) {
  8593. a = n;
  8594. break
  8595. } if (n === o)
  8596. for (var n = a - 1; n >= 0; n--) {
  8597. var r = e[n].interval;
  8598. if (r[0] <= t && t <= r[1]) {
  8599. a = n;
  8600. break
  8601. }
  8602. }
  8603. return n >= 0 && n < o && i[n]
  8604. }
  8605. }
  8606. function xg(t, e) {
  8607. var i = t[1] - t[0];
  8608. return e = [(e[0] - t[0]) / i, (e[1] - t[0]) / i],
  8609. function(t) {
  8610. return t >= e[0] && t <= e[1]
  8611. }
  8612. }
  8613. function _g(t) {
  8614. var e = t.dimensions;
  8615. return "lng" === e[0] && "lat" === e[1]
  8616. }
  8617. function wg(t, e, i, n) {
  8618. var o = t.getItemLayout(e),
  8619. a = i.get("symbolRepeat"),
  8620. r = i.get("symbolClip"),
  8621. s = i.get("symbolPosition") || "start",
  8622. l = (i.get("symbolRotate") || 0) * Math.PI / 180 || 0,
  8623. u = i.get("symbolPatternSize") || 2,
  8624. h = i.isAnimationEnabled(),
  8625. c = {
  8626. dataIndex: e,
  8627. layout: o,
  8628. itemModel: i,
  8629. symbolType: t.getItemVisual(e, "symbol") || "circle",
  8630. color: t.getItemVisual(e, "color"),
  8631. symbolClip: r,
  8632. symbolRepeat: a,
  8633. symbolRepeatDirection: i.get("symbolRepeatDirection"),
  8634. symbolPatternSize: u,
  8635. rotation: l,
  8636. animationModel: h ? i : null,
  8637. hoverAnimation: h && i.get("hoverAnimation"),
  8638. z2: i.getShallow("z", !0) || 0
  8639. };
  8640. bg(i, a, o, n, c), Mg(t, e, o, a, r, c.boundingLength, c.pxSign, u, n, c), Ig(i, c.symbolScale, l, n, c);
  8641. var d = c.symbolSize,
  8642. f = i.get("symbolOffset");
  8643. return y(f) && (f = [Ro(f[0], d[0]), Ro(f[1], d[1])]), Tg(i, d, o, a, r, f, s, c.valueLineWidth, c.boundingLength, c
  8644. .repeatCutLength, n, c), c
  8645. }
  8646. function bg(t, e, i, n, o) {
  8647. var a, r = n.valueDim,
  8648. s = t.get("symbolBoundingData"),
  8649. l = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),
  8650. u = l.toGlobalCoord(l.dataToCoord(0)),
  8651. h = 1 - +(i[r.wh] <= 0);
  8652. if (y(s)) {
  8653. var c = [Sg(l, s[0]) - u, Sg(l, s[1]) - u];
  8654. c[1] < c[0] && c.reverse(), a = c[h]
  8655. } else a = null != s ? Sg(l, s) - u : e ? n.coordSysExtent[r.index][h] - u : i[r.wh];
  8656. o.boundingLength = a, e && (o.repeatCutLength = i[r.wh]), o.pxSign = a > 0 ? 1 : a < 0 ? -1 : 0
  8657. }
  8658. function Sg(t, e) {
  8659. return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))
  8660. }
  8661. function Mg(t, e, i, n, o, a, r, s, l, u) {
  8662. var h = l.valueDim,
  8663. c = l.categoryDim,
  8664. d = Math.abs(i[c.wh]),
  8665. f = t.getItemVisual(e, "symbolSize");
  8666. y(f) ? f = f.slice() : (null == f && (f = "100%"), f = [f, f]), f[c.index] = Ro(f[c.index], d), f[h.index] = Ro(f[h.index],
  8667. n ? d : Math.abs(a)), u.symbolSize = f, (u.symbolScale = [f[0] / s, f[1] / s])[h.index] *= (l.isHorizontal ? -1 :
  8668. 1) * r
  8669. }
  8670. function Ig(t, e, i, n, o) {
  8671. var a = t.get(jk) || 0;
  8672. a && (qk.attr({
  8673. scale: e.slice(),
  8674. rotation: i
  8675. }), qk.updateTransform(), a /= qk.getLineScale(), a *= e[n.valueDim.index]), o.valueLineWidth = a
  8676. }
  8677. function Tg(t, e, i, n, o, r, s, l, u, h, c, d) {
  8678. var f = c.categoryDim,
  8679. p = c.valueDim,
  8680. g = d.pxSign,
  8681. m = Math.max(e[p.index] + l, 0),
  8682. v = m;
  8683. if (n) {
  8684. var y = Math.abs(u),
  8685. x = T(t.get("symbolMargin"), "15%") + "",
  8686. _ = !1;
  8687. x.lastIndexOf("!") === x.length - 1 && (_ = !0, x = x.slice(0, x.length - 1)), x = Ro(x, e[p.index]);
  8688. var w = Math.max(m + 2 * x, 0),
  8689. b = _ ? 0 : 2 * x,
  8690. S = Ko(n),
  8691. M = S ? n : Hg((y + b) / w);
  8692. w = m + 2 * (x = (y - M * m) / 2 / (_ ? M : M - 1)), b = _ ? 0 : 2 * x, S || "fixed" === n || (M = h ? Hg((Math.abs(
  8693. h) + b) / w) : 0), v = M * w - b, d.repeatTimes = M, d.symbolMargin = x
  8694. }
  8695. var I = g * (v / 2),
  8696. A = d.pathPosition = [];
  8697. A[f.index] = i[f.wh] / 2, A[p.index] = "start" === s ? I : "end" === s ? u - I : u / 2, r && (A[0] += r[0], A[1] +=
  8698. r[1]);
  8699. var D = d.bundlePosition = [];
  8700. D[f.index] = i[f.xy], D[p.index] = i[p.xy];
  8701. var C = d.barRectShape = a({}, i);
  8702. C[p.wh] = g * Math.max(Math.abs(i[p.wh]), Math.abs(A[p.index] + I)), C[f.wh] = i[f.wh];
  8703. var L = d.clipShape = {};
  8704. L[f.xy] = -i[f.xy], L[f.wh] = c.ecSize[f.wh], L[p.xy] = 0, L[p.wh] = i[p.wh]
  8705. }
  8706. function Ag(t) {
  8707. var e = t.symbolPatternSize,
  8708. i = Xl(t.symbolType, -e / 2, -e / 2, e, e, t.color);
  8709. return i.attr({
  8710. culling: !0
  8711. }), "image" !== i.type && i.setStyle({
  8712. strokeNoScale: !0
  8713. }), i
  8714. }
  8715. function Dg(t, e, i, n) {
  8716. function o(t) {
  8717. var e = l.slice(),
  8718. n = i.pxSign,
  8719. o = t;
  8720. return ("start" === i.symbolRepeatDirection ? n > 0 : n < 0) && (o = h - 1 - t), e[u.index] = d * (o - h / 2 + .5) +
  8721. l[u.index], {
  8722. position: e,
  8723. scale: i.symbolScale.slice(),
  8724. rotation: i.rotation
  8725. }
  8726. }
  8727. var a = t.__pictorialBundle,
  8728. r = i.symbolSize,
  8729. s = i.valueLineWidth,
  8730. l = i.pathPosition,
  8731. u = e.valueDim,
  8732. h = i.repeatTimes || 0,
  8733. c = 0,
  8734. d = r[e.valueDim.index] + s + 2 * i.symbolMargin;
  8735. for (Gg(t, function(t) {
  8736. t.__pictorialAnimationIndex = c, t.__pictorialRepeatTimes = h, c < h ? Fg(t, null, o(c), i, n) : Fg(t, null, {
  8737. scale: [0, 0]
  8738. }, i, n, function() {
  8739. a.remove(t)
  8740. }), Eg(t, i), c++
  8741. }); c < h; c++) {
  8742. var f = Ag(i);
  8743. f.__pictorialAnimationIndex = c, f.__pictorialRepeatTimes = h, a.add(f);
  8744. var p = o(c);
  8745. Fg(f, {
  8746. position: p.position,
  8747. scale: [0, 0]
  8748. }, {
  8749. scale: p.scale,
  8750. rotation: p.rotation
  8751. }, i, n), f.on("mouseover", function() {
  8752. Gg(t, function(t) {
  8753. t.trigger("emphasis")
  8754. })
  8755. }).on("mouseout", function() {
  8756. Gg(t, function(t) {
  8757. t.trigger("normal")
  8758. })
  8759. }), Eg(f, i)
  8760. }
  8761. }
  8762. function Cg(t, e, i, n) {
  8763. var o = t.__pictorialBundle,
  8764. a = t.__pictorialMainPath;
  8765. a ? Fg(a, null, {
  8766. position: i.pathPosition.slice(),
  8767. scale: i.symbolScale.slice(),
  8768. rotation: i.rotation
  8769. }, i, n) : (a = t.__pictorialMainPath = Ag(i), o.add(a), Fg(a, {
  8770. position: i.pathPosition.slice(),
  8771. scale: [0, 0],
  8772. rotation: i.rotation
  8773. }, {
  8774. scale: i.symbolScale.slice()
  8775. }, i, n), a.on("mouseover", function() {
  8776. this.trigger("emphasis")
  8777. }).on("mouseout", function() {
  8778. this.trigger("normal")
  8779. })), Eg(a, i)
  8780. }
  8781. function Lg(t, e, i) {
  8782. var n = a({}, e.barRectShape),
  8783. o = t.__pictorialBarRect;
  8784. o ? Fg(o, null, {
  8785. shape: n
  8786. }, e, i) : (o = t.__pictorialBarRect = new aM({
  8787. z2: 2,
  8788. shape: n,
  8789. silent: !0,
  8790. style: {
  8791. stroke: "transparent",
  8792. fill: "transparent",
  8793. lineWidth: 0
  8794. }
  8795. }), t.add(o))
  8796. }
  8797. function kg(t, e, i, n) {
  8798. if (i.symbolClip) {
  8799. var o = t.__pictorialClipPath,
  8800. r = a({}, i.clipShape),
  8801. s = e.valueDim,
  8802. l = i.animationModel,
  8803. u = i.dataIndex;
  8804. if (o) bo(o, {
  8805. shape: r
  8806. }, l, u);
  8807. else {
  8808. r[s.wh] = 0, o = new aM({
  8809. shape: r
  8810. }), t.__pictorialBundle.setClipPath(o), t.__pictorialClipPath = o;
  8811. var h = {};
  8812. h[s.wh] = i.clipShape[s.wh], bM[n ? "updateProps" : "initProps"](o, {
  8813. shape: h
  8814. }, l, u)
  8815. }
  8816. }
  8817. }
  8818. function Pg(t, e) {
  8819. var i = t.getItemModel(e);
  8820. return i.getAnimationDelayParams = Ng, i.isAnimationEnabled = Og, i
  8821. }
  8822. function Ng(t) {
  8823. return {
  8824. index: t.__pictorialAnimationIndex,
  8825. count: t.__pictorialRepeatTimes
  8826. }
  8827. }
  8828. function Og() {
  8829. return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation")
  8830. }
  8831. function Eg(t, e) {
  8832. t.off("emphasis").off("normal");
  8833. var i = e.symbolScale.slice();
  8834. e.hoverAnimation && t.on("emphasis", function() {
  8835. this.animateTo({
  8836. scale: [1.1 * i[0], 1.1 * i[1]]
  8837. }, 400, "elasticOut")
  8838. }).on("normal", function() {
  8839. this.animateTo({
  8840. scale: i.slice()
  8841. }, 400, "elasticOut")
  8842. })
  8843. }
  8844. function Rg(t, e, i, n) {
  8845. var o = new Zw,
  8846. a = new Zw;
  8847. return o.add(a), o.__pictorialBundle = a, a.attr("position", i.bundlePosition.slice()), i.symbolRepeat ? Dg(o, e, i) :
  8848. Cg(o, e, i), Lg(o, i, n), kg(o, e, i, n), o.__pictorialShapeStr = Vg(t, i), o.__pictorialSymbolMeta = i, o
  8849. }
  8850. function zg(t, e, i) {
  8851. var n = i.animationModel,
  8852. o = i.dataIndex;
  8853. bo(t.__pictorialBundle, {
  8854. position: i.bundlePosition.slice()
  8855. }, n, o), i.symbolRepeat ? Dg(t, e, i, !0) : Cg(t, e, i, !0), Lg(t, i, !0), kg(t, e, i, !0)
  8856. }
  8857. function Bg(t, e, i, n) {
  8858. var o = n.__pictorialBarRect;
  8859. o && (o.style.text = null);
  8860. var a = [];
  8861. Gg(n, function(t) {
  8862. a.push(t)
  8863. }), n.__pictorialMainPath && a.push(n.__pictorialMainPath), n.__pictorialClipPath && (i = null), d(a, function(t) {
  8864. bo(t, {
  8865. scale: [0, 0]
  8866. }, i, e, function() {
  8867. n.parent && n.parent.remove(n)
  8868. })
  8869. }), t.setItemGraphicEl(e, null)
  8870. }
  8871. function Vg(t, e) {
  8872. return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":")
  8873. }
  8874. function Gg(t, e, i) {
  8875. d(t.__pictorialBundle.children(), function(n) {
  8876. n !== t.__pictorialBarRect && e.call(i, n)
  8877. })
  8878. }
  8879. function Fg(t, e, i, n, o, a) {
  8880. e && t.attr(e), n.symbolClip && !o ? i && t.attr(i) : i && bM[o ? "updateProps" : "initProps"](t, i, n.animationModel,
  8881. n.dataIndex, a)
  8882. }
  8883. function Wg(t, e, i) {
  8884. var n = i.color,
  8885. o = i.dataIndex,
  8886. a = i.itemModel,
  8887. s = a.getModel("itemStyle").getItemStyle(["color"]),
  8888. l = a.getModel("emphasis.itemStyle").getItemStyle(),
  8889. u = a.getShallow("cursor");
  8890. Gg(t, function(t) {
  8891. t.setColor(n), t.setStyle(r({
  8892. fill: n,
  8893. opacity: i.opacity
  8894. }, s)), uo(t, l), u && (t.cursor = u), t.z2 = i.z2
  8895. });
  8896. var h = {},
  8897. c = e.valueDim.posDesc[+(i.boundingLength > 0)],
  8898. d = t.__pictorialBarRect;
  8899. Th(d.style, h, a, n, e.seriesModel, o, c), uo(d, h)
  8900. }
  8901. function Hg(t) {
  8902. var e = Math.round(t);
  8903. return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t)
  8904. }
  8905. function Zg(t, e, i) {
  8906. this.dimension = "single", this.dimensions = ["single"], this._axis = null, this._rect, this._init(t, e, i), this.model =
  8907. t
  8908. }
  8909. function Ug(t, e) {
  8910. e = e || {};
  8911. var i = t.coordinateSystem,
  8912. n = t.axis,
  8913. o = {},
  8914. a = n.position,
  8915. r = n.orient,
  8916. s = i.getRect(),
  8917. l = [s.x, s.x + s.width, s.y, s.y + s.height],
  8918. u = {
  8919. horizontal: {
  8920. top: l[2],
  8921. bottom: l[3]
  8922. },
  8923. vertical: {
  8924. left: l[0],
  8925. right: l[1]
  8926. }
  8927. };
  8928. o.position = ["vertical" === r ? u.vertical[a] : l[0], "horizontal" === r ? u.horizontal[a] : l[3]];
  8929. var h = {
  8930. horizontal: 0,
  8931. vertical: 1
  8932. };
  8933. o.rotation = Math.PI / 2 * h[r];
  8934. var c = {
  8935. top: -1,
  8936. bottom: 1,
  8937. right: 1,
  8938. left: -1
  8939. };
  8940. o.labelDirection = o.tickDirection = o.nameDirection = c[a], t.get("axisTick.inside") && (o.tickDirection = -o.tickDirection),
  8941. T(e.labelInside, t.get("axisLabel.inside")) && (o.labelDirection = -o.labelDirection);
  8942. var d = e.rotate;
  8943. return null == d && (d = t.get("axisLabel.rotate")), o.labelRotation = "top" === a ? -d : d, o.z2 = 1, o
  8944. }
  8945. function Xg(t, e, i, n, o) {
  8946. var r = t.axis;
  8947. if (!r.scale.isBlank() && r.containData(e))
  8948. if (t.involveSeries) {
  8949. var s = jg(e, t),
  8950. l = s.payloadBatch,
  8951. u = s.snapToValue;
  8952. l[0] && null == o.seriesIndex && a(o, l[0]), !n && t.snap && r.containData(u) && null != u && (e = u), i.showPointer(
  8953. t, e, l, o), i.showTooltip(t, s, u)
  8954. } else i.showPointer(t, e)
  8955. }
  8956. function jg(t, e) {
  8957. var i = e.axis,
  8958. n = i.dim,
  8959. o = t,
  8960. a = [],
  8961. r = Number.MAX_VALUE,
  8962. s = -1;
  8963. return iP(e.seriesModels, function(e, l) {
  8964. var u, h, c = e.getData().mapDimension(n, !0);
  8965. if (e.getAxisTooltipData) {
  8966. var d = e.getAxisTooltipData(c, t, i);
  8967. h = d.dataIndices, u = d.nestestValue
  8968. } else {
  8969. if (!(h = e.getData().indicesOfNearest(c[0], t, "category" === i.type ? .5 : null)).length) return;
  8970. u = e.getData().get(c[0], h[0])
  8971. }
  8972. if (null != u && isFinite(u)) {
  8973. var f = t - u,
  8974. p = Math.abs(f);
  8975. p <= r && ((p < r || f >= 0 && s < 0) && (r = p, s = f, o = u, a.length = 0), iP(h, function(t) {
  8976. a.push({
  8977. seriesIndex: e.seriesIndex,
  8978. dataIndexInside: t,
  8979. dataIndex: e.getData().getRawIndex(t)
  8980. })
  8981. }))
  8982. }
  8983. }), {
  8984. payloadBatch: a,
  8985. snapToValue: o
  8986. }
  8987. }
  8988. function Yg(t, e, i, n) {
  8989. t[e.key] = {
  8990. value: i,
  8991. payloadBatch: n
  8992. }
  8993. }
  8994. function qg(t, e, i, n) {
  8995. var o = i.payloadBatch,
  8996. a = e.axis,
  8997. r = a.model,
  8998. s = e.axisPointerModel;
  8999. if (e.triggerTooltip && o.length) {
  9000. var l = e.coordSys.model,
  9001. u = bh(l),
  9002. h = t.map[u];
  9003. h || (h = t.map[u] = {
  9004. coordSysId: l.id,
  9005. coordSysIndex: l.componentIndex,
  9006. coordSysType: l.type,
  9007. coordSysMainType: l.mainType,
  9008. dataByAxis: []
  9009. }, t.list.push(h)), h.dataByAxis.push({
  9010. axisDim: a.dim,
  9011. axisIndex: r.componentIndex,
  9012. axisType: r.type,
  9013. axisId: r.id,
  9014. value: n,
  9015. valueLabelOpt: {
  9016. precision: s.get("label.precision"),
  9017. formatter: s.get("label.formatter")
  9018. },
  9019. seriesDataIndices: o.slice()
  9020. })
  9021. }
  9022. }
  9023. function Kg(t, e, i) {
  9024. var n = i.axesInfo = [];
  9025. iP(e, function(e, i) {
  9026. var o = e.axisPointerModel.option,
  9027. a = t[i];
  9028. a ? (!e.useHandle && (o.status = "show"), o.value = a.value, o.seriesDataIndices = (a.payloadBatch || []).slice()) :
  9029. !e.useHandle && (o.status = "hide"), "show" === o.status && n.push({
  9030. axisDim: e.axis.dim,
  9031. axisIndex: e.axis.model.componentIndex,
  9032. value: o.value
  9033. })
  9034. })
  9035. }
  9036. function $g(t, e, i, n) {
  9037. if (!em(e) && t.list.length) {
  9038. var o = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  9039. n({
  9040. type: "showTip",
  9041. escapeConnect: !0,
  9042. x: e[0],
  9043. y: e[1],
  9044. tooltipOption: i.tooltipOption,
  9045. position: i.position,
  9046. dataIndexInside: o.dataIndexInside,
  9047. dataIndex: o.dataIndex,
  9048. seriesIndex: o.seriesIndex,
  9049. dataByCoordSys: t.list
  9050. })
  9051. } else n({
  9052. type: "hideTip"
  9053. })
  9054. }
  9055. function Jg(t, e, i) {
  9056. var n = i.getZr(),
  9057. o = oP(n).axisPointerLastHighlights || {},
  9058. a = oP(n).axisPointerLastHighlights = {};
  9059. iP(t, function(t, e) {
  9060. var i = t.axisPointerModel.option;
  9061. "show" === i.status && iP(i.seriesDataIndices, function(t) {
  9062. var e = t.seriesIndex + " | " + t.dataIndex;
  9063. a[e] = t
  9064. })
  9065. });
  9066. var r = [],
  9067. s = [];
  9068. d(o, function(t, e) {
  9069. !a[e] && s.push(t)
  9070. }), d(a, function(t, e) {
  9071. !o[e] && r.push(t)
  9072. }), s.length && i.dispatchAction({
  9073. type: "downplay",
  9074. escapeConnect: !0,
  9075. batch: s
  9076. }), r.length && i.dispatchAction({
  9077. type: "highlight",
  9078. escapeConnect: !0,
  9079. batch: r
  9080. })
  9081. }
  9082. function Qg(t, e) {
  9083. for (var i = 0; i < (t || []).length; i++) {
  9084. var n = t[i];
  9085. if (e.axis.dim === n.axisDim && e.axis.model.componentIndex === n.axisIndex) return n
  9086. }
  9087. }
  9088. function tm(t) {
  9089. var e = t.axis.model,
  9090. i = {},
  9091. n = i.axisDim = t.axis.dim;
  9092. return i.axisIndex = i[n + "AxisIndex"] = e.componentIndex, i.axisName = i[n + "AxisName"] = e.name, i.axisId = i[n +
  9093. "AxisId"] = e.id, i
  9094. }
  9095. function em(t) {
  9096. return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1])
  9097. }
  9098. function im(t, e, i) {
  9099. if (!z_.node) {
  9100. var n = e.getZr();
  9101. aP(n).records || (aP(n).records = {}), nm(n, e), (aP(n).records[t] || (aP(n).records[t] = {})).handler = i
  9102. }
  9103. }
  9104. function nm(t, e) {
  9105. function i(i, n) {
  9106. t.on(i, function(i) {
  9107. var o = sm(e);
  9108. rP(aP(t).records, function(t) {
  9109. t && n(t, i, o.dispatchAction)
  9110. }), om(o.pendings, e)
  9111. })
  9112. }
  9113. aP(t).initialized || (aP(t).initialized = !0, i("click", v(rm, "click")), i("mousemove", v(rm, "mousemove")), i(
  9114. "globalout", am))
  9115. }
  9116. function om(t, e) {
  9117. var i, n = t.showTip.length,
  9118. o = t.hideTip.length;
  9119. n ? i = t.showTip[n - 1] : o && (i = t.hideTip[o - 1]), i && (i.dispatchAction = null, e.dispatchAction(i))
  9120. }
  9121. function am(t, e, i) {
  9122. t.handler("leave", null, i)
  9123. }
  9124. function rm(t, e, i, n) {
  9125. e.handler(t, i, n)
  9126. }
  9127. function sm(t) {
  9128. var e = {
  9129. showTip: [],
  9130. hideTip: []
  9131. },
  9132. i = function(n) {
  9133. var o = e[n.type];
  9134. o ? o.push(n) : (n.dispatchAction = i, t.dispatchAction(n))
  9135. };
  9136. return {
  9137. dispatchAction: i,
  9138. pendings: e
  9139. }
  9140. }
  9141. function lm(t, e) {
  9142. if (!z_.node) {
  9143. var i = e.getZr();
  9144. (aP(i).records || {})[t] && (aP(i).records[t] = null)
  9145. }
  9146. }
  9147. function um() {}
  9148. function hm(t, e, i, n) {
  9149. cm(lP(i).lastProp, n) || (lP(i).lastProp = n, e ? bo(i, n, t) : (i.stopAnimation(), i.attr(n)))
  9150. }
  9151. function cm(t, e) {
  9152. if (w(t) && w(e)) {
  9153. var i = !0;
  9154. return d(e, function(e, n) {
  9155. i = i && cm(t[n], e)
  9156. }), !!i
  9157. }
  9158. return t === e
  9159. }
  9160. function dm(t, e) {
  9161. t[e.get("label.show") ? "show" : "hide"]()
  9162. }
  9163. function fm(t) {
  9164. return {
  9165. position: t.position.slice(),
  9166. rotation: t.rotation || 0
  9167. }
  9168. }
  9169. function pm(t, e, i) {
  9170. var n = e.get("z"),
  9171. o = e.get("zlevel");
  9172. t && t.traverse(function(t) {
  9173. "group" !== t.type && (null != n && (t.z = n), null != o && (t.zlevel = o), t.silent = i)
  9174. })
  9175. }
  9176. function gm(t) {
  9177. var e, i = t.get("type"),
  9178. n = t.getModel(i + "Style");
  9179. return "line" === i ? (e = n.getLineStyle()).fill = null : "shadow" === i && ((e = n.getAreaStyle()).stroke = null),
  9180. e
  9181. }
  9182. function mm(t, e, i, n, o) {
  9183. var a = ym(i.get("value"), e.axis, e.ecModel, i.get("seriesDataIndices"), {
  9184. precision: i.get("label.precision"),
  9185. formatter: i.get("label.formatter")
  9186. }),
  9187. r = i.getModel("label"),
  9188. s = OM(r.get("padding") || 0),
  9189. l = r.getFont(),
  9190. u = De(a, l),
  9191. h = o.position,
  9192. c = u.width + s[1] + s[3],
  9193. d = u.height + s[0] + s[2],
  9194. f = o.align;
  9195. "right" === f && (h[0] -= c), "center" === f && (h[0] -= c / 2);
  9196. var p = o.verticalAlign;
  9197. "bottom" === p && (h[1] -= d), "middle" === p && (h[1] -= d / 2), vm(h, c, d, n);
  9198. var g = r.get("backgroundColor");
  9199. g && "auto" !== g || (g = e.get("axisLine.lineStyle.color")), t.label = {
  9200. shape: {
  9201. x: 0,
  9202. y: 0,
  9203. width: c,
  9204. height: d,
  9205. r: r.get("borderRadius")
  9206. },
  9207. position: h.slice(),
  9208. style: {
  9209. text: a,
  9210. textFont: l,
  9211. textFill: r.getTextColor(),
  9212. textPosition: "inside",
  9213. fill: g,
  9214. stroke: r.get("borderColor") || "transparent",
  9215. lineWidth: r.get("borderWidth") || 0,
  9216. shadowBlur: r.get("shadowBlur"),
  9217. shadowColor: r.get("shadowColor"),
  9218. shadowOffsetX: r.get("shadowOffsetX"),
  9219. shadowOffsetY: r.get("shadowOffsetY")
  9220. },
  9221. z2: 10
  9222. }
  9223. }
  9224. function vm(t, e, i, n) {
  9225. var o = n.getWidth(),
  9226. a = n.getHeight();
  9227. t[0] = Math.min(t[0] + e, o) - e, t[1] = Math.min(t[1] + i, a) - i, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1],
  9228. 0)
  9229. }
  9230. function ym(t, e, i, n, o) {
  9231. t = e.scale.parse(t);
  9232. var a = e.scale.getLabel(t, {
  9233. precision: o.precision
  9234. }),
  9235. r = o.formatter;
  9236. if (r) {
  9237. var s = {
  9238. value: Wl(e, t),
  9239. seriesData: []
  9240. };
  9241. d(n, function(t) {
  9242. var e = i.getSeriesByIndex(t.seriesIndex),
  9243. n = t.dataIndexInside,
  9244. o = e && e.getDataParams(n);
  9245. o && s.seriesData.push(o)
  9246. }), _(r) ? a = r.replace("{value}", a) : x(r) && (a = r(s))
  9247. }
  9248. return a
  9249. }
  9250. function xm(t, e, i) {
  9251. var n = mt();
  9252. return wt(n, n, i.rotation), _t(n, n, i.position), Io([t.dataToCoord(e), (i.labelOffset || 0) + (i.labelDirection ||
  9253. 1) * (i.labelMargin || 0)], n)
  9254. }
  9255. function _m(t, e, i, n, o, a) {
  9256. var r = ID.innerTextLayout(i.rotation, 0, i.labelDirection);
  9257. i.labelMargin = o.get("label.margin"), mm(e, n, o, a, {
  9258. position: xm(n.axis, t, i),
  9259. align: r.textAlign,
  9260. verticalAlign: r.textVerticalAlign
  9261. })
  9262. }
  9263. function wm(t, e, i) {
  9264. return i = i || 0, {
  9265. x1: t[i],
  9266. y1: t[1 - i],
  9267. x2: e[i],
  9268. y2: e[1 - i]
  9269. }
  9270. }
  9271. function bm(t, e, i) {
  9272. return i = i || 0, {
  9273. x: t[i],
  9274. y: t[1 - i],
  9275. width: e[i],
  9276. height: e[1 - i]
  9277. }
  9278. }
  9279. function Sm(t, e, i, n, o, a) {
  9280. return {
  9281. cx: t,
  9282. cy: e,
  9283. r0: i,
  9284. r: n,
  9285. startAngle: o,
  9286. endAngle: a,
  9287. clockwise: !0
  9288. }
  9289. }
  9290. function Mm(t, e) {
  9291. var i = {};
  9292. return i[e.dim + "AxisIndex"] = e.index, t.getCartesian(i)
  9293. }
  9294. function Im(t) {
  9295. return "x" === t.dim ? 0 : 1
  9296. }
  9297. function Tm(t) {
  9298. return t.isHorizontal() ? 0 : 1
  9299. }
  9300. function Am(t, e) {
  9301. var i = t.getRect();
  9302. return [i[fP[e]], i[fP[e]] + i[pP[e]]]
  9303. }
  9304. function Dm(t, e, i) {
  9305. var n = new aM({
  9306. shape: {
  9307. x: t.x - 10,
  9308. y: t.y - 10,
  9309. width: 0,
  9310. height: t.height + 20
  9311. }
  9312. });
  9313. return So(n, {
  9314. shape: {
  9315. width: t.width + 20,
  9316. height: t.height + 20
  9317. }
  9318. }, e, i), n
  9319. }
  9320. function Cm(t, e, i) {
  9321. if (t.count())
  9322. for (var n, o = e.coordinateSystem, a = e.getLayerSeries(), r = t.mapDimension("single"), s = t.mapDimension(
  9323. "value"), l = f(a, function(e) {
  9324. return f(e.indices, function(e) {
  9325. var i = o.dataToPoint(t.get(r, e));
  9326. return i[1] = t.get(s, e), i
  9327. })
  9328. }), u = Lm(l), h = u.y0, c = i / u.max, d = a.length, p = a[0].indices.length, g = 0; g < p; ++g) {
  9329. n = h[g] * c, t.setItemLayout(a[0].indices[g], {
  9330. layerIndex: 0,
  9331. x: l[0][g][0],
  9332. y0: n,
  9333. y: l[0][g][1] * c
  9334. });
  9335. for (var m = 1; m < d; ++m) n += l[m - 1][g][1] * c, t.setItemLayout(a[m].indices[g], {
  9336. layerIndex: m,
  9337. x: l[m][g][0],
  9338. y0: n,
  9339. y: l[m][g][1] * c
  9340. })
  9341. }
  9342. }
  9343. function Lm(t) {
  9344. for (var e = t.length, i = t[0].length, n = [], o = [], a = 0, r = {}, s = 0; s < i; ++s) {
  9345. for (var l = 0, u = 0; l < e; ++l) u += t[l][s][1];
  9346. u > a && (a = u), n.push(u)
  9347. }
  9348. for (var h = 0; h < i; ++h) o[h] = (a - n[h]) / 2;
  9349. a = 0;
  9350. for (var c = 0; c < i; ++c) {
  9351. var d = n[c] + o[c];
  9352. d > a && (a = d)
  9353. }
  9354. return r.y0 = o, r.max = a, r
  9355. }
  9356. function km(t) {
  9357. var e = 0;
  9358. d(t.children, function(t) {
  9359. km(t);
  9360. var i = t.value;
  9361. y(i) && (i = i[0]), e += i
  9362. });
  9363. var i = t.value;
  9364. y(i) && (i = i[0]), (null == i || isNaN(i)) && (i = e), i < 0 && (i = 0), y(t.value) ? t.value[0] = i : t.value = i
  9365. }
  9366. function Pm(t, e, i) {
  9367. function n() {
  9368. r.ignore = r.hoverIgnore
  9369. }
  9370. function o() {
  9371. r.ignore = r.normalIgnore
  9372. }
  9373. Zw.call(this);
  9374. var a = new QS({
  9375. z2: xP
  9376. });
  9377. a.seriesIndex = e.seriesIndex;
  9378. var r = new qS({
  9379. z2: _P,
  9380. silent: t.getModel("label").get("silent")
  9381. });
  9382. this.add(a), this.add(r), this.updateData(!0, t, "normal", e, i), this.on("emphasis", n).on("normal", o).on(
  9383. "mouseover", n).on("mouseout", o)
  9384. }
  9385. function Nm(t, e, i) {
  9386. var n = t.getVisual("color"),
  9387. o = t.getVisual("visualMeta");
  9388. o && 0 !== o.length || (n = null);
  9389. var a = t.getModel("itemStyle").get("color");
  9390. if (a) return a;
  9391. if (n) return n;
  9392. if (0 === t.depth) return i.option.color[0];
  9393. var r = i.option.color.length;
  9394. return a = i.option.color[Om(t) % r]
  9395. }
  9396. function Om(t) {
  9397. for (var e = t; e.depth > 1;) e = e.parentNode;
  9398. return l(t.getAncestors()[0].children, e)
  9399. }
  9400. function Em(t, e, i) {
  9401. return i !== yP.NONE && (i === yP.SELF ? t === e : i === yP.ANCESTOR ? t === e || t.isAncestorOf(e) : t === e || t.isDescendantOf(
  9402. e))
  9403. }
  9404. function Rm(t, e) {
  9405. var i = t.children || [];
  9406. t.children = zm(i, e), i.length && d(t.children, function(t) {
  9407. Rm(t, e)
  9408. })
  9409. }
  9410. function zm(t, e) {
  9411. if ("function" == typeof e) return t.sort(e);
  9412. var i = "asc" === e;
  9413. return t.sort(function(t, e) {
  9414. var n = (t.getValue() - e.getValue()) * (i ? 1 : -1);
  9415. return 0 === n ? (t.dataIndex - e.dataIndex) * (i ? -1 : 1) : n
  9416. })
  9417. }
  9418. function Bm(t, e) {
  9419. return e = e || [0, 0], f(["x", "y"], function(i, n) {
  9420. var o = this.getAxis(i),
  9421. a = e[n],
  9422. r = t[n] / 2;
  9423. return "category" === o.type ? o.getBandWidth() : Math.abs(o.dataToCoord(a - r) - o.dataToCoord(a + r))
  9424. }, this)
  9425. }
  9426. function Vm(t, e) {
  9427. return e = e || [0, 0], f([0, 1], function(i) {
  9428. var n = e[i],
  9429. o = t[i] / 2,
  9430. a = [],
  9431. r = [];
  9432. return a[i] = n - o, r[i] = n + o, a[1 - i] = r[1 - i] = e[1 - i], Math.abs(this.dataToPoint(a)[i] - this.dataToPoint(
  9433. r)[i])
  9434. }, this)
  9435. }
  9436. function Gm(t, e) {
  9437. var i = this.getAxis(),
  9438. n = e instanceof Array ? e[0] : e,
  9439. o = (t instanceof Array ? t[0] : t) / 2;
  9440. return "category" === i.type ? i.getBandWidth() : Math.abs(i.dataToCoord(n - o) - i.dataToCoord(n + o))
  9441. }
  9442. function Fm(t, e) {
  9443. return f(["Radius", "Angle"], function(i, n) {
  9444. var o = this["get" + i + "Axis"](),
  9445. a = e[n],
  9446. r = t[n] / 2,
  9447. s = "dataTo" + i,
  9448. l = "category" === o.type ? o.getBandWidth() : Math.abs(o[s](a - r) - o[s](a + r));
  9449. return "Angle" === i && (l = l * Math.PI / 180), l
  9450. }, this)
  9451. }
  9452. function Wm(t) {
  9453. var e, i = t.type;
  9454. if ("path" === i) {
  9455. var n = t.shape,
  9456. o = null != n.width && null != n.height ? {
  9457. x: n.x || 0,
  9458. y: n.y || 0,
  9459. width: n.width,
  9460. height: n.height
  9461. } : null,
  9462. a = tv(n);
  9463. (e = Wn(a, null, o, n.layout || "center")).__customPathData = a
  9464. } else "image" === i ? (e = new hi({})).__customImagePath = t.style.image : "text" === i ? (e = new qS({})).__customText =
  9465. t.style.text : e = new(0, bM[i.charAt(0).toUpperCase() + i.slice(1)]);
  9466. return e.__customGraphicType = i, e.name = t.name, e
  9467. }
  9468. function Hm(t, e, n, o, a, r, s) {
  9469. var l = {},
  9470. u = n.style || {};
  9471. if (n.shape && (l.shape = i(n.shape)), n.position && (l.position = n.position.slice()), n.scale && (l.scale = n.scale
  9472. .slice()), n.origin && (l.origin = n.origin.slice()), n.rotation && (l.rotation = n.rotation), "image" === t.type &&
  9473. n.style) {
  9474. h = l.style = {};
  9475. d(["x", "y", "width", "height"], function(e) {
  9476. Zm(e, h, u, t.style, r)
  9477. })
  9478. }
  9479. if ("text" === t.type && n.style) {
  9480. var h = l.style = {};
  9481. d(["x", "y"], function(e) {
  9482. Zm(e, h, u, t.style, r)
  9483. }), !u.hasOwnProperty("textFill") && u.fill && (u.textFill = u.fill), !u.hasOwnProperty("textStroke") && u.stroke &&
  9484. (u.textStroke = u.stroke)
  9485. }
  9486. if ("group" !== t.type && (t.useStyle(u), r)) {
  9487. t.style.opacity = 0;
  9488. var c = u.opacity;
  9489. null == c && (c = 1), So(t, {
  9490. style: {
  9491. opacity: c
  9492. }
  9493. }, o, e)
  9494. }
  9495. r ? t.attr(l) : bo(t, l, o, e), n.hasOwnProperty("z2") && t.attr("z2", n.z2 || 0), n.hasOwnProperty("silent") && t.attr(
  9496. "silent", n.silent), n.hasOwnProperty("invisible") && t.attr("invisible", n.invisible), n.hasOwnProperty("ignore") &&
  9497. t.attr("ignore", n.ignore), n.hasOwnProperty("info") && t.attr("info", n.info);
  9498. var f = n.styleEmphasis,
  9499. p = !1 === f;
  9500. t.__cusHasEmphStl && null == f || !t.__cusHasEmphStl && p || (no(t, f), t.__cusHasEmphStl = !p), s && ho(t, !p)
  9501. }
  9502. function Zm(t, e, i, n, o) {
  9503. null == i[t] || o || (e[t] = i[t], i[t] = n[t])
  9504. }
  9505. function Um(t, e, i, n) {
  9506. function o(t) {
  9507. null == t && (t = h), v && (c = e.getItemModel(t), d = c.getModel(AP), f = c.getModel(DP), p = e.getItemVisual(t,
  9508. "color"), v = !1)
  9509. }
  9510. var s = t.get("renderItem"),
  9511. l = t.coordinateSystem,
  9512. u = {};
  9513. l && (u = l.prepareCustoms ? l.prepareCustoms() : LP[l.type](l));
  9514. var h, c, d, f, p, g = r({
  9515. getWidth: n.getWidth,
  9516. getHeight: n.getHeight,
  9517. getZr: n.getZr,
  9518. getDevicePixelRatio: n.getDevicePixelRatio,
  9519. value: function(t, i) {
  9520. return null == i && (i = h), e.get(e.getDimension(t || 0), i)
  9521. },
  9522. style: function(i, n) {
  9523. null == n && (n = h), o(n);
  9524. var r = c.getModel(IP).getItemStyle();
  9525. null != p && (r.fill = p);
  9526. var s = e.getItemVisual(n, "opacity");
  9527. return null != s && (r.opacity = s), fo(r, d, null, {
  9528. autoColor: p,
  9529. isRectText: !0
  9530. }), r.text = d.getShallow("show") ? A(t.getFormattedLabel(n, "normal"), gu(e, n)) : null, i && a(r, i), r
  9531. },
  9532. styleEmphasis: function(i, n) {
  9533. null == n && (n = h), o(n);
  9534. var r = c.getModel(TP).getItemStyle();
  9535. return fo(r, f, null, {
  9536. isRectText: !0
  9537. }, !0), r.text = f.getShallow("show") ? D(t.getFormattedLabel(n, "emphasis"), t.getFormattedLabel(n, "normal"),
  9538. gu(e, n)) : null, i && a(r, i), r
  9539. },
  9540. visual: function(t, i) {
  9541. return null == i && (i = h), e.getItemVisual(i, t)
  9542. },
  9543. barLayout: function(t) {
  9544. if (l.getBaseAxis) return Tl(r({
  9545. axis: l.getBaseAxis()
  9546. }, t), n)
  9547. },
  9548. currentSeriesIndices: function() {
  9549. return i.getCurrentSeriesIndices()
  9550. },
  9551. font: function(t) {
  9552. return _o(t, i)
  9553. }
  9554. }, u.api || {}),
  9555. m = {
  9556. context: {},
  9557. seriesId: t.id,
  9558. seriesName: t.name,
  9559. seriesIndex: t.seriesIndex,
  9560. coordSys: u.coordSys,
  9561. dataInsideLength: e.count(),
  9562. encode: Xm(t.getData())
  9563. },
  9564. v = !0;
  9565. return function(t, i) {
  9566. return h = t, v = !0, s && s(r({
  9567. dataIndexInside: t,
  9568. dataIndex: e.getRawIndex(t),
  9569. actionType: i ? i.type : null
  9570. }, m), g)
  9571. }
  9572. }
  9573. function Xm(t) {
  9574. var e = {};
  9575. return d(t.dimensions, function(i, n) {
  9576. var o = t.getDimensionInfo(i);
  9577. if (!o.isExtraCoord) {
  9578. var a = o.coordDim;
  9579. (e[a] = e[a] || [])[o.coordDimIndex] = n
  9580. }
  9581. }), e
  9582. }
  9583. function jm(t, e, i, n, o, a) {
  9584. return (t = Ym(t, e, i, n, o, a, !0)) && a.setItemGraphicEl(e, t), t
  9585. }
  9586. function Ym(t, e, i, n, o, a, r) {
  9587. var s = !i,
  9588. l = (i = i || {}).type,
  9589. u = i.shape,
  9590. h = i.style;
  9591. if (t && (s || null != l && l !== t.__customGraphicType || "path" === l && ev(u) && tv(u) !== t.__customPathData ||
  9592. "image" === l && iv(h, "image") && h.image !== t.__customImagePath || "text" === l && iv(u, "text") && h.text !==
  9593. t.__customText) && (o.remove(t), t = null), !s) {
  9594. var c = !t;
  9595. return !t && (t = Wm(i)), Hm(t, e, i, n, a, c, r), "group" === l && qm(t, e, i, n, a), o.add(t), t
  9596. }
  9597. }
  9598. function qm(t, e, i, n, o) {
  9599. var a = i.children,
  9600. r = a ? a.length : 0,
  9601. s = i.$mergeChildren,
  9602. l = "byName" === s || i.diffChildrenByName,
  9603. u = !1 === s;
  9604. if (r || l || u)
  9605. if (l) Km({
  9606. oldChildren: t.children() || [],
  9607. newChildren: a || [],
  9608. dataIndex: e,
  9609. animatableModel: n,
  9610. group: t,
  9611. data: o
  9612. });
  9613. else {
  9614. u && t.removeAll();
  9615. for (var h = 0; h < r; h++) a[h] && Ym(t.childAt(h), e, a[h], n, t, o)
  9616. }
  9617. }
  9618. function Km(t) {
  9619. new Hs(t.oldChildren, t.newChildren, $m, $m, t).add(Jm).update(Jm).remove(Qm).execute()
  9620. }
  9621. function $m(t, e) {
  9622. var i = t && t.name;
  9623. return null != i ? i : CP + e
  9624. }
  9625. function Jm(t, e) {
  9626. var i = this.context,
  9627. n = null != t ? i.newChildren[t] : null;
  9628. Ym(null != e ? i.oldChildren[e] : null, i.dataIndex, n, i.animatableModel, i.group, i.data)
  9629. }
  9630. function Qm(t) {
  9631. var e = this.context,
  9632. i = e.oldChildren[t];
  9633. i && e.group.remove(i)
  9634. }
  9635. function tv(t) {
  9636. return t && (t.pathData || t.d)
  9637. }
  9638. function ev(t) {
  9639. return t && (t.hasOwnProperty("pathData") || t.hasOwnProperty("d"))
  9640. }
  9641. function iv(t, e) {
  9642. return t && t.hasOwnProperty(e)
  9643. }
  9644. function nv(t, e, i, n) {
  9645. var o = i.type,
  9646. a = new(0, bM[o.charAt(0).toUpperCase() + o.slice(1)])(i);
  9647. e.add(a), n.set(t, a), a.__ecGraphicId = t
  9648. }
  9649. function ov(t, e) {
  9650. var i = t && t.parent;
  9651. i && ("group" === t.type && t.traverse(function(t) {
  9652. ov(t, e)
  9653. }), e.removeKey(t.__ecGraphicId), i.remove(t))
  9654. }
  9655. function av(t) {
  9656. return t = a({}, t), d(["id", "parentId", "$action", "hv", "bounding"].concat(HM), function(e) {
  9657. delete t[e]
  9658. }), t
  9659. }
  9660. function rv(t, e) {
  9661. var i;
  9662. return d(e, function(e) {
  9663. null != t[e] && "auto" !== t[e] && (i = !0)
  9664. }), i
  9665. }
  9666. function sv(t, e) {
  9667. var i = t.exist;
  9668. if (e.id = t.keyInfo.id, !e.type && i && (e.type = i.type), null == e.parentId) {
  9669. var n = e.parentOption;
  9670. n ? e.parentId = n.id : i && (e.parentId = i.parentId)
  9671. }
  9672. e.parentOption = null
  9673. }
  9674. function lv(t, e, i) {
  9675. var o = a({}, i),
  9676. r = t[e],
  9677. s = i.$action || "merge";
  9678. "merge" === s ? r ? (n(r, o, !0), ca(r, o, {
  9679. ignoreSize: !0
  9680. }), fa(i, r)) : t[e] = o : "replace" === s ? t[e] = o : "remove" === s && r && (t[e] = null)
  9681. }
  9682. function uv(t, e) {
  9683. t && (t.hv = e.hv = [rv(e, ["left", "right"]), rv(e, ["top", "bottom"])], "group" === t.type && (null == t.width &&
  9684. (t.width = e.width = 0), null == t.height && (t.height = e.height = 0)))
  9685. }
  9686. function hv(t, e, i) {
  9687. var n = t.eventData;
  9688. t.silent || t.ignore || n || (n = t.eventData = {
  9689. componentType: "graphic",
  9690. componentIndex: e.componentIndex,
  9691. name: t.name
  9692. }), n && (n.info = t.info)
  9693. }
  9694. function cv(t, e, i) {
  9695. var n, o = {},
  9696. a = "toggleSelected" === t;
  9697. return i.eachComponent("legend", function(i) {
  9698. a && null != n ? i[n ? "select" : "unSelect"](e.name) : (i[t](e.name), n = i.isSelected(e.name)), d(i.getData(),
  9699. function(t) {
  9700. var e = t.get("name");
  9701. if ("\n" !== e && "" !== e) {
  9702. var n = i.isSelected(e);
  9703. o.hasOwnProperty(e) ? o[e] = o[e] && n : o[e] = n
  9704. }
  9705. })
  9706. }), {
  9707. name: e.name,
  9708. selected: o
  9709. }
  9710. }
  9711. function dv(t, e, i) {
  9712. var n = e.getBoxLayoutParams(),
  9713. o = e.get("padding"),
  9714. a = {
  9715. width: i.getWidth(),
  9716. height: i.getHeight()
  9717. },
  9718. r = la(n, a, o);
  9719. UM(e.get("orient"), t, e.get("itemGap"), r.width, r.height), ua(t, n, a, o)
  9720. }
  9721. function fv(t, e) {
  9722. var i = OM(e.get("padding")),
  9723. n = e.getItemStyle(["color", "opacity"]);
  9724. return n.fill = e.get("backgroundColor"), t = new aM({
  9725. shape: {
  9726. x: t.x - i[3],
  9727. y: t.y - i[0],
  9728. width: t.width + i[1] + i[3],
  9729. height: t.height + i[0] + i[2],
  9730. r: e.get("borderRadius")
  9731. },
  9732. style: n,
  9733. silent: !0,
  9734. z2: -1
  9735. })
  9736. }
  9737. function pv(t, e) {
  9738. e.dispatchAction({
  9739. type: "legendToggleSelect",
  9740. name: t
  9741. })
  9742. }
  9743. function gv(t, e, i, n) {
  9744. var o = i.getZr().storage.getDisplayList()[0];
  9745. o && o.useHoverLayer || i.dispatchAction({
  9746. type: "highlight",
  9747. seriesName: t,
  9748. name: e,
  9749. excludeSeriesId: n
  9750. })
  9751. }
  9752. function mv(t, e, i, n) {
  9753. var o = i.getZr().storage.getDisplayList()[0];
  9754. o && o.useHoverLayer || i.dispatchAction({
  9755. type: "downplay",
  9756. seriesName: t,
  9757. name: e,
  9758. excludeSeriesId: n
  9759. })
  9760. }
  9761. function vv(t, e, i) {
  9762. var n = [1, 1];
  9763. n[t.getOrient().index] = 0, ca(e, i, {
  9764. type: "box",
  9765. ignoreSize: n
  9766. })
  9767. }
  9768. function yv(t) {
  9769. var e = "left " + t + "s cubic-bezier(0.23, 1, 0.32, 1),top " + t + "s cubic-bezier(0.23, 1, 0.32, 1)";
  9770. return f(ZP, function(t) {
  9771. return t + "transition:" + e
  9772. }).join(";")
  9773. }
  9774. function xv(t) {
  9775. var e = [],
  9776. i = t.get("fontSize"),
  9777. n = t.getTextColor();
  9778. return n && e.push("color:" + n), e.push("font:" + t.getFont()), i && e.push("line-height:" + Math.round(3 * i / 2) +
  9779. "px"), WP(["decoration", "align"], function(i) {
  9780. var n = t.get(i);
  9781. n && e.push("text-" + i + ":" + n)
  9782. }), e.join(";")
  9783. }
  9784. function _v(t) {
  9785. var e = [],
  9786. i = t.get("transitionDuration"),
  9787. n = t.get("backgroundColor"),
  9788. o = t.getModel("textStyle"),
  9789. a = t.get("padding");
  9790. return i && e.push(yv(i)), n && (z_.canvasSupported ? e.push("background-Color:" + n) : (e.push("background-Color:#" +
  9791. Ft(n)), e.push("filter:alpha(opacity=70)"))), WP(["width", "color", "radius"], function(i) {
  9792. var n = "border-" + i,
  9793. o = HP(n),
  9794. a = t.get(o);
  9795. null != a && e.push(n + ":" + a + ("color" === i ? "" : "px"))
  9796. }), e.push(xv(o)), null != a && e.push("padding:" + OM(a).join("px ") + "px"), e.join(";") + ";"
  9797. }
  9798. function wv(t, e) {
  9799. if (z_.wxa) return null;
  9800. var i = document.createElement("div"),
  9801. n = this._zr = e.getZr();
  9802. this.el = i, this._x = e.getWidth() / 2, this._y = e.getHeight() / 2, t.appendChild(i), this._container = t, this._show = !
  9803. 1, this._hideTimeout;
  9804. var o = this;
  9805. i.onmouseenter = function() {
  9806. o._enterable && (clearTimeout(o._hideTimeout), o._show = !0), o._inContent = !0
  9807. }, i.onmousemove = function(e) {
  9808. if (e = e || window.event, !o._enterable) {
  9809. var i = n.handler;
  9810. lt(t, e, !0), i.dispatch("mousemove", e)
  9811. }
  9812. }, i.onmouseleave = function() {
  9813. o._enterable && o._show && o.hideLater(o._hideDelay), o._inContent = !1
  9814. }
  9815. }
  9816. function bv(t) {
  9817. this._zr = t.getZr(), this._show = !1, this._hideTimeout
  9818. }
  9819. function Sv(t) {
  9820. for (var e = t.pop(); t.length;) {
  9821. var i = t.pop();
  9822. i && (Lo.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {
  9823. formatter: i
  9824. }), e = new Lo(i, e, e.ecModel))
  9825. }
  9826. return e
  9827. }
  9828. function Mv(t, e) {
  9829. return t.dispatchAction || m(e.dispatchAction, e)
  9830. }
  9831. function Iv(t, e, i, n, o, a, r) {
  9832. var s = i.getOuterSize(),
  9833. l = s.width,
  9834. u = s.height;
  9835. return null != a && (t + l + a > n ? t -= l + a : t += a), null != r && (e + u + r > o ? e -= u + r : e += r), [t, e]
  9836. }
  9837. function Tv(t, e, i, n, o) {
  9838. var a = i.getOuterSize(),
  9839. r = a.width,
  9840. s = a.height;
  9841. return t = Math.min(t + r, n) - r, e = Math.min(e + s, o) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e]
  9842. }
  9843. function Av(t, e, i) {
  9844. var n = i[0],
  9845. o = i[1],
  9846. a = 0,
  9847. r = 0,
  9848. s = e.width,
  9849. l = e.height;
  9850. switch (t) {
  9851. case "inside":
  9852. a = e.x + s / 2 - n / 2, r = e.y + l / 2 - o / 2;
  9853. break;
  9854. case "top":
  9855. a = e.x + s / 2 - n / 2, r = e.y - o - 5;
  9856. break;
  9857. case "bottom":
  9858. a = e.x + s / 2 - n / 2, r = e.y + l + 5;
  9859. break;
  9860. case "left":
  9861. a = e.x - n - 5, r = e.y + l / 2 - o / 2;
  9862. break;
  9863. case "right":
  9864. a = e.x + s + 5, r = e.y + l / 2 - o / 2
  9865. }
  9866. return [a, r]
  9867. }
  9868. function Dv(t) {
  9869. return "center" === t || "middle" === t
  9870. }
  9871. function Cv(t) {
  9872. return t.get("stack") || "__ec_stack_" + t.seriesIndex
  9873. }
  9874. function Lv(t) {
  9875. return t.dim
  9876. }
  9877. function kv(t, e) {
  9878. var i = {};
  9879. d(t, function(t, e) {
  9880. var n = t.getData(),
  9881. o = t.coordinateSystem.getBaseAxis(),
  9882. a = o.getExtent(),
  9883. r = "category" === o.type ? o.getBandWidth() : Math.abs(a[1] - a[0]) / n.count(),
  9884. s = i[Lv(o)] || {
  9885. bandWidth: r,
  9886. remainedWidth: r,
  9887. autoWidthCount: 0,
  9888. categoryGap: "20%",
  9889. gap: "30%",
  9890. stacks: {}
  9891. },
  9892. l = s.stacks;
  9893. i[Lv(o)] = s;
  9894. var u = Cv(t);
  9895. l[u] || s.autoWidthCount++, l[u] = l[u] || {
  9896. width: 0,
  9897. maxWidth: 0
  9898. };
  9899. var h = Ro(t.get("barWidth"), r),
  9900. c = Ro(t.get("barMaxWidth"), r),
  9901. d = t.get("barGap"),
  9902. f = t.get("barCategoryGap");
  9903. h && !l[u].width && (h = Math.min(s.remainedWidth, h), l[u].width = h, s.remainedWidth -= h), c && (l[u].maxWidth =
  9904. c), null != d && (s.gap = d), null != f && (s.categoryGap = f)
  9905. });
  9906. var n = {};
  9907. return d(i, function(t, e) {
  9908. n[e] = {};
  9909. var i = t.stacks,
  9910. o = t.bandWidth,
  9911. a = Ro(t.categoryGap, o),
  9912. r = Ro(t.gap, 1),
  9913. s = t.remainedWidth,
  9914. l = t.autoWidthCount,
  9915. u = (s - a) / (l + (l - 1) * r);
  9916. u = Math.max(u, 0), d(i, function(t, e) {
  9917. var i = t.maxWidth;
  9918. i && i < u && (i = Math.min(i, s), t.width && (i = Math.min(i, t.width)), s -= i, t.width = i, l--)
  9919. }), u = (s - a) / (l + (l - 1) * r), u = Math.max(u, 0);
  9920. var h, c = 0;
  9921. d(i, function(t, e) {
  9922. t.width || (t.width = u), h = t, c += t.width * (1 + r)
  9923. }), h && (c -= h.width * r);
  9924. var f = -c / 2;
  9925. d(i, function(t, i) {
  9926. n[e][i] = n[e][i] || {
  9927. offset: f,
  9928. width: t.width
  9929. }, f += t.width * (1 + r)
  9930. })
  9931. }), n
  9932. }
  9933. function Pv(t, e) {
  9934. HA.call(this, "radius", t, e), this.type = "category"
  9935. }
  9936. function Nv(t, e) {
  9937. e = e || [0, 360], HA.call(this, "angle", t, e), this.type = "category"
  9938. }
  9939. function Ov(t, e) {
  9940. return e.type || (e.data ? "category" : "value")
  9941. }
  9942. function Ev(t, e, i) {
  9943. var n = e.get("center"),
  9944. o = i.getWidth(),
  9945. a = i.getHeight();
  9946. t.cx = Ro(n[0], o), t.cy = Ro(n[1], a);
  9947. var r = t.getRadiusAxis(),
  9948. s = Math.min(o, a) / 2,
  9949. l = Ro(e.get("radius"), s);
  9950. r.inverse ? r.setExtent(l, 0) : r.setExtent(0, l)
  9951. }
  9952. function Rv(t, e) {
  9953. var i = this,
  9954. n = i.getAngleAxis(),
  9955. o = i.getRadiusAxis();
  9956. if (n.scale.setExtent(1 / 0, -1 / 0), o.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function(t) {
  9957. if (t.coordinateSystem === i) {
  9958. var e = t.getData();
  9959. d(e.mapDimension("radius", !0), function(t) {
  9960. o.scale.unionExtentFromData(e, cl(e, t))
  9961. }), d(e.mapDimension("angle", !0), function(t) {
  9962. n.scale.unionExtentFromData(e, cl(e, t))
  9963. })
  9964. }
  9965. }), Bl(n.scale, n.model), Bl(o.scale, o.model), "category" === n.type && !n.onBand) {
  9966. var a = n.getExtent(),
  9967. r = 360 / n.scale.count();
  9968. n.inverse ? a[1] += r : a[1] -= r, n.setExtent(a[0], a[1])
  9969. }
  9970. }
  9971. function zv(t, e) {
  9972. if (t.type = e.get("type"), t.scale = Vl(e), t.onBand = e.get("boundaryGap") && "category" === t.type, t.inverse = e
  9973. .get("inverse"), "angleAxis" === e.mainType) {
  9974. t.inverse ^= e.get("clockwise");
  9975. var i = e.get("startAngle");
  9976. t.setExtent(i, i + (t.inverse ? -360 : 360))
  9977. }
  9978. e.axis = t, t.model = e
  9979. }
  9980. function Bv(t, e, i) {
  9981. e[1] > e[0] && (e = e.slice().reverse());
  9982. var n = t.coordToPoint([e[0], i]),
  9983. o = t.coordToPoint([e[1], i]);
  9984. return {
  9985. x1: n[0],
  9986. y1: n[1],
  9987. x2: o[0],
  9988. y2: o[1]
  9989. }
  9990. }
  9991. function Vv(t) {
  9992. return t.getRadiusAxis().inverse ? 0 : 1
  9993. }
  9994. function Gv(t) {
  9995. var e = t[0],
  9996. i = t[t.length - 1];
  9997. e && i && Math.abs(Math.abs(e.coord - i.coord) - 360) < 1e-4 && t.pop()
  9998. }
  9999. function Fv(t, e, i) {
  10000. return {
  10001. position: [t.cx, t.cy],
  10002. rotation: i / 180 * Math.PI,
  10003. labelDirection: -1,
  10004. tickDirection: -1,
  10005. nameDirection: 1,
  10006. labelRotate: e.getModel("axisLabel").get("rotate"),
  10007. z2: 1
  10008. }
  10009. }
  10010. function Wv(t, e, i, n, o) {
  10011. var a = e.axis,
  10012. r = a.dataToCoord(t),
  10013. s = n.getAngleAxis().getExtent()[0];
  10014. s = s / 180 * Math.PI;
  10015. var l, u, h, c = n.getRadiusAxis().getExtent();
  10016. if ("radius" === a.dim) {
  10017. var d = mt();
  10018. wt(d, d, s), _t(d, d, [n.cx, n.cy]), l = Io([r, -o], d);
  10019. var f = e.getModel("axisLabel").get("rotate") || 0,
  10020. p = ID.innerTextLayout(s, f * Math.PI / 180, -1);
  10021. u = p.textAlign, h = p.textVerticalAlign
  10022. } else {
  10023. var g = c[1];
  10024. l = n.coordToPoint([g + o, r]);
  10025. var m = n.cx,
  10026. v = n.cy;
  10027. u = Math.abs(l[0] - m) / g < .3 ? "center" : l[0] > m ? "left" : "right", h = Math.abs(l[1] - v) / g < .3 ?
  10028. "middle" : l[1] > v ? "top" : "bottom"
  10029. }
  10030. return {
  10031. position: l,
  10032. align: u,
  10033. verticalAlign: h
  10034. }
  10035. }
  10036. function Hv(t, e) {
  10037. e.update = "updateView", Ps(e, function(e, i) {
  10038. var n = {};
  10039. return i.eachComponent({
  10040. mainType: "geo",
  10041. query: e
  10042. }, function(i) {
  10043. i[t](e.name), d(i.coordinateSystem.regions, function(t) {
  10044. n[t.name] = i.isSelected(t.name) || !1
  10045. })
  10046. }), {
  10047. selected: n,
  10048. name: e.name
  10049. }
  10050. })
  10051. }
  10052. function Zv(t) {
  10053. var e = {};
  10054. d(t, function(t) {
  10055. e[t] = 1
  10056. }), t.length = 0, d(e, function(e, i) {
  10057. t.push(i)
  10058. })
  10059. }
  10060. function Uv(t) {
  10061. if (t)
  10062. for (var e in t)
  10063. if (t.hasOwnProperty(e)) return !0
  10064. }
  10065. function Xv(t, e, n) {
  10066. function o() {
  10067. var t = function() {};
  10068. return t.prototype.__hidden = t.prototype, new t
  10069. }
  10070. var a = {};
  10071. return rN(e, function(e) {
  10072. var r = a[e] = o();
  10073. rN(t[e], function(t, o) {
  10074. if (jC.isValidType(o)) {
  10075. var a = {
  10076. type: o,
  10077. visual: t
  10078. };
  10079. n && n(a, e), r[o] = new jC(a), "opacity" === o && ((a = i(a)).type = "colorAlpha", r.__hidden.__alphaForOpacity =
  10080. new jC(a))
  10081. }
  10082. })
  10083. }), a
  10084. }
  10085. function jv(t, e, n) {
  10086. var o;
  10087. d(n, function(t) {
  10088. e.hasOwnProperty(t) && Uv(e[t]) && (o = !0)
  10089. }), o && d(n, function(n) {
  10090. e.hasOwnProperty(n) && Uv(e[n]) ? t[n] = i(e[n]) : delete t[n]
  10091. })
  10092. }
  10093. function Yv(t, e, i, n, o, a) {
  10094. function r(t) {
  10095. return i.getItemVisual(h, t)
  10096. }
  10097. function s(t, e) {
  10098. i.setItemVisual(h, t, e)
  10099. }
  10100. function l(t, l) {
  10101. h = null == a ? t : l;
  10102. var c = i.getRawDataItem(h);
  10103. if (!c || !1 !== c.visualMap)
  10104. for (var d = n.call(o, t), f = e[d], p = u[d], g = 0, m = p.length; g < m; g++) {
  10105. var v = p[g];
  10106. f[v] && f[v].applyVisual(t, r, s)
  10107. }
  10108. }
  10109. var u = {};
  10110. d(t, function(t) {
  10111. var i = jC.prepareVisualTypes(e[t]);
  10112. u[t] = i
  10113. });
  10114. var h;
  10115. null == a ? i.each(l) : i.each([a], l)
  10116. }
  10117. function qv(t, e, i, n) {
  10118. var o = {};
  10119. return d(t, function(t) {
  10120. var i = jC.prepareVisualTypes(e[t]);
  10121. o[t] = i
  10122. }), {
  10123. progress: function(t, a) {
  10124. null != n && (n = a.getDimension(n));
  10125. for (var r; null != (r = t.next());) {
  10126. var s = a.getRawDataItem(r);
  10127. if (s && !1 === s.visualMap) return;
  10128. for (var l = null != n ? a.get(n, r, !0) : r, u = i(l), h = e[u], c = o[u], d = 0, f = c.length; d < f; d++) {
  10129. var p = c[d];
  10130. h[p] && h[p].applyVisual(l, function(t) {
  10131. return a.getItemVisual(r, t)
  10132. }, function(t, e) {
  10133. a.setItemVisual(r, t, e)
  10134. })
  10135. }
  10136. }
  10137. }
  10138. }
  10139. }
  10140. function Kv(t) {
  10141. var e = ["x", "y"],
  10142. i = ["width", "height"];
  10143. return {
  10144. point: function(e, i, n) {
  10145. if (e) {
  10146. var o = n.range;
  10147. return $v(e[t], o)
  10148. }
  10149. },
  10150. rect: function(n, o, a) {
  10151. if (n) {
  10152. var r = a.range,
  10153. s = [n[e[t]], n[e[t]] + n[i[t]]];
  10154. return s[1] < s[0] && s.reverse(), $v(s[0], r) || $v(s[1], r) || $v(r[0], s) || $v(r[1], s)
  10155. }
  10156. }
  10157. }
  10158. }
  10159. function $v(t, e) {
  10160. return e[0] <= t && t <= e[1]
  10161. }
  10162. function Jv(t, e, i, n, o) {
  10163. for (var a = 0, r = o[o.length - 1]; a < o.length; a++) {
  10164. var s = o[a];
  10165. if (Qv(t, e, i, n, s[0], s[1], r[0], r[1])) return !0;
  10166. r = s
  10167. }
  10168. }
  10169. function Qv(t, e, i, n, o, a, r, s) {
  10170. var l = ey(i - t, o - r, n - e, a - s);
  10171. if (ty(l)) return !1;
  10172. var u = ey(o - t, o - r, a - e, a - s) / l;
  10173. if (u < 0 || u > 1) return !1;
  10174. var h = ey(i - t, o - t, n - e, a - e) / l;
  10175. return !(h < 0 || h > 1)
  10176. }
  10177. function ty(t) {
  10178. return t <= 1e-6 && t >= -1e-6
  10179. }
  10180. function ey(t, e, i, n) {
  10181. return t * n - e * i
  10182. }
  10183. function iy(t, e, i) {
  10184. var n = this._targetInfoList = [],
  10185. o = {},
  10186. a = oy(e, t);
  10187. lN(pN, function(t, e) {
  10188. (!i || !i.include || uN(i.include, e) >= 0) && t(a, n, o)
  10189. })
  10190. }
  10191. function ny(t) {
  10192. return t[0] > t[1] && t.reverse(), t
  10193. }
  10194. function oy(t, e) {
  10195. return Vi(t, e, {
  10196. includeMainTypes: dN
  10197. })
  10198. }
  10199. function ay(t, e, i, n) {
  10200. var o = i.getAxis(["x", "y"][t]),
  10201. a = ny(f([0, 1], function(t) {
  10202. return e ? o.coordToData(o.toLocalCoord(n[t])) : o.toGlobalCoord(o.dataToCoord(n[t]))
  10203. })),
  10204. r = [];
  10205. return r[t] = a, r[1 - t] = [NaN, NaN], {
  10206. values: a,
  10207. xyMinMax: r
  10208. }
  10209. }
  10210. function ry(t, e, i, n) {
  10211. return [e[0] - n[t] * i[0], e[1] - n[t] * i[1]]
  10212. }
  10213. function sy(t, e) {
  10214. var i = ly(t),
  10215. n = ly(e),
  10216. o = [i[0] / n[0], i[1] / n[1]];
  10217. return isNaN(o[0]) && (o[0] = 1), isNaN(o[1]) && (o[1] = 1), o
  10218. }
  10219. function ly(t) {
  10220. return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN]
  10221. }
  10222. function uy(t, e, i, n, o) {
  10223. if (o) {
  10224. var a = t.getZr();
  10225. a[wN] || (a[_N] || (a[_N] = hy), Lr(a, _N, i, e)(t, n))
  10226. }
  10227. }
  10228. function hy(t, e) {
  10229. if (!t.isDisposed()) {
  10230. var i = t.getZr();
  10231. i[wN] = !0, t.dispatchAction({
  10232. type: "brushSelect",
  10233. batch: e
  10234. }), i[wN] = !1
  10235. }
  10236. }
  10237. function cy(t, e, i, n) {
  10238. for (var o = 0, a = e.length; o < a; o++) {
  10239. var r = e[o];
  10240. if (t[r.brushType](n, i, r.selectors, r)) return !0
  10241. }
  10242. }
  10243. function dy(t) {
  10244. var e = t.brushSelector;
  10245. if (_(e)) {
  10246. var i = [];
  10247. return d(sN, function(t, n) {
  10248. i[n] = function(i, n, o, a) {
  10249. var r = n.getItemLayout(i);
  10250. return t[e](r, o, a)
  10251. }
  10252. }), i
  10253. }
  10254. if (x(e)) {
  10255. var n = {};
  10256. return d(sN, function(t, i) {
  10257. n[i] = e
  10258. }), n
  10259. }
  10260. return e
  10261. }
  10262. function fy(t, e) {
  10263. var i = t.option.seriesIndex;
  10264. return null != i && "all" !== i && (y(i) ? l(i, e) < 0 : e !== i)
  10265. }
  10266. function py(t) {
  10267. var e = t.selectors = {};
  10268. return d(sN[t.brushType], function(i, n) {
  10269. e[n] = function(n) {
  10270. return i(n, e, t)
  10271. }
  10272. }), t
  10273. }
  10274. function gy(t) {
  10275. return new ue(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0])
  10276. }
  10277. function my(t, e) {
  10278. return n({
  10279. brushType: t.brushType,
  10280. brushMode: t.brushMode,
  10281. transformable: t.transformable,
  10282. brushStyle: new Lo(t.brushStyle).getItemStyle(),
  10283. removeOnClick: t.removeOnClick,
  10284. z: t.z
  10285. }, e, !0)
  10286. }
  10287. function vy(t, e, i, n) {
  10288. (!n || n.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption)
  10289. .updateCovers(t.areas.slice())
  10290. }
  10291. function yy(t, e) {
  10292. IN[t] = e
  10293. }
  10294. function xy(t) {
  10295. return IN[t]
  10296. }
  10297. function _y(t, e, i) {
  10298. this.model = t, this.ecModel = e, this.api = i, this._brushType, this._brushMode
  10299. }
  10300. function wy(t, e, i) {
  10301. this._model = t
  10302. }
  10303. function by(t, e, i, n) {
  10304. var o = i.calendarModel,
  10305. a = i.seriesModel,
  10306. r = o ? o.coordinateSystem : a ? a.coordinateSystem : null;
  10307. return r === this ? r[t](n) : null
  10308. }
  10309. function Sy(t, e) {
  10310. var i = t.cellSize;
  10311. y(i) ? 1 === i.length && (i[1] = i[0]) : i = t.cellSize = [i, i];
  10312. var n = f([0, 1], function(t) {
  10313. return ha(e, t) && (i[t] = "auto"), null != i[t] && "auto" !== i[t]
  10314. });
  10315. ca(t, e, {
  10316. type: "box",
  10317. ignoreSize: n
  10318. })
  10319. }
  10320. function My(t) {
  10321. return l(kN, t) >= 0
  10322. }
  10323. function Iy(t, e, i) {
  10324. function n(t, e) {
  10325. return l(e.nodes, t) >= 0
  10326. }
  10327. function o(t, n) {
  10328. var o = !1;
  10329. return e(function(e) {
  10330. d(i(t, e) || [], function(t) {
  10331. n.records[e.name][t] && (o = !0)
  10332. })
  10333. }), o
  10334. }
  10335. function a(t, n) {
  10336. n.nodes.push(t), e(function(e) {
  10337. d(i(t, e) || [], function(t) {
  10338. n.records[e.name][t] = !0
  10339. })
  10340. })
  10341. }
  10342. return function(i) {
  10343. var r = {
  10344. nodes: [],
  10345. records: {}
  10346. };
  10347. if (e(function(t) {
  10348. r.records[t.name] = {}
  10349. }), !i) return r;
  10350. a(i, r);
  10351. var s;
  10352. do {
  10353. s = !1, t(function(t) {
  10354. !n(t, r) && o(t, r) && (a(t, r), s = !0)
  10355. })
  10356. } while (s);
  10357. return r
  10358. }
  10359. }
  10360. function Ty(t, e, i) {
  10361. var n = [1 / 0, -1 / 0];
  10362. return NN(i, function(t) {
  10363. var i = t.getData();
  10364. i && NN(i.mapDimension(e, !0), function(t) {
  10365. var e = i.getApproximateExtent(t);
  10366. e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1])
  10367. })
  10368. }), n[1] < n[0] && (n = [NaN, NaN]), Ay(t, n), n
  10369. }
  10370. function Ay(t, e) {
  10371. var i = t.getAxisModel(),
  10372. n = i.getMin(!0),
  10373. o = "category" === i.get("type"),
  10374. a = o && i.getCategories().length;
  10375. null != n && "dataMin" !== n && "function" != typeof n ? e[0] = n : o && (e[0] = a > 0 ? 0 : NaN);
  10376. var r = i.getMax(!0);
  10377. return null != r && "dataMax" !== r && "function" != typeof r ? e[1] = r : o && (e[1] = a > 0 ? a - 1 : NaN), i.get(
  10378. "scale", !0) || (e[0] > 0 && (e[0] = 0), e[1] < 0 && (e[1] = 0)), e
  10379. }
  10380. function Dy(t, e) {
  10381. var i = t.getAxisModel(),
  10382. n = t._percentWindow,
  10383. o = t._valueWindow;
  10384. if (n) {
  10385. var a = Fo(o, [0, 500]);
  10386. a = Math.min(a, 20);
  10387. var r = e || 0 === n[0] && 100 === n[1];
  10388. i.setRange(r ? null : +o[0].toFixed(a), r ? null : +o[1].toFixed(a))
  10389. }
  10390. }
  10391. function Cy(t) {
  10392. var e = t._minMaxSpan = {},
  10393. i = t._dataZoomModel;
  10394. NN(["min", "max"], function(n) {
  10395. e[n + "Span"] = i.get(n + "Span");
  10396. var o = i.get(n + "ValueSpan");
  10397. if (null != o && (e[n + "ValueSpan"] = o, null != (o = t.getAxisModel().axis.scale.parse(o)))) {
  10398. var a = t._dataExtent;
  10399. e[n + "Span"] = Eo(a[0] + o, a, [0, 100], !0)
  10400. }
  10401. })
  10402. }
  10403. function Ly(t) {
  10404. var e = {};
  10405. return RN(["start", "end", "startValue", "endValue", "throttle"], function(i) {
  10406. t.hasOwnProperty(i) && (e[i] = t[i])
  10407. }), e
  10408. }
  10409. function ky(t, e) {
  10410. var i = t._rangePropMode,
  10411. n = t.get("rangeMode");
  10412. RN([
  10413. ["start", "startValue"],
  10414. ["end", "endValue"]
  10415. ], function(t, o) {
  10416. var a = null != e[t[0]],
  10417. r = null != e[t[1]];
  10418. a && !r ? i[o] = "percent" : !a && r ? i[o] = "value" : n ? i[o] = n[o] : a && (i[o] = "percent")
  10419. })
  10420. }
  10421. function Py(t) {
  10422. return {
  10423. x: "y",
  10424. y: "x",
  10425. radius: "angle",
  10426. angle: "radius"
  10427. } [t]
  10428. }
  10429. function Ny(t) {
  10430. return "vertical" === t ? "ns-resize" : "ew-resize"
  10431. }
  10432. function Oy(t, e) {
  10433. var i = zy(t),
  10434. n = e.dataZoomId,
  10435. o = e.coordId;
  10436. d(i, function(t, i) {
  10437. var a = t.dataZoomInfos;
  10438. a[n] && l(e.allCoordIds, o) < 0 && (delete a[n], t.count--)
  10439. }), Vy(i);
  10440. var a = i[o];
  10441. a || ((a = i[o] = {
  10442. coordId: o,
  10443. dataZoomInfos: {},
  10444. count: 0
  10445. }).controller = By(t, a), a.dispatchAction = v(Gy, t)), !a.dataZoomInfos[n] && a.count++, a.dataZoomInfos[n] = e;
  10446. var r = Fy(a.dataZoomInfos);
  10447. a.controller.enable(r.controlType, r.opt), a.controller.setPointerChecker(e.containsPoint), Lr(a, "dispatchAction",
  10448. e.dataZoomModel.get("throttle", !0), "fixRate")
  10449. }
  10450. function Ey(t, e) {
  10451. var i = zy(t);
  10452. d(i, function(t) {
  10453. t.controller.dispose();
  10454. var i = t.dataZoomInfos;
  10455. i[e] && (delete i[e], t.count--)
  10456. }), Vy(i)
  10457. }
  10458. function Ry(t) {
  10459. return t.type + "\0_" + t.id
  10460. }
  10461. function zy(t) {
  10462. var e = t.getZr();
  10463. return e[qN] || (e[qN] = {})
  10464. }
  10465. function By(t, e) {
  10466. var i = new ac(t.getZr());
  10467. return d(["pan", "zoom", "scrollMove"], function(t) {
  10468. i.on(t, function(i) {
  10469. var n = [];
  10470. d(e.dataZoomInfos, function(o) {
  10471. if (i.isAvailableBehavior(o.dataZoomModel.option)) {
  10472. var a = (o.getRange || {})[t],
  10473. r = a && a(e.controller, i);
  10474. !o.dataZoomModel.get("disabled", !0) && r && n.push({
  10475. dataZoomId: o.dataZoomId,
  10476. start: r[0],
  10477. end: r[1]
  10478. })
  10479. }
  10480. }), n.length && e.dispatchAction(n)
  10481. })
  10482. }), i
  10483. }
  10484. function Vy(t) {
  10485. d(t, function(e, i) {
  10486. e.count || (e.controller.dispose(), delete t[i])
  10487. })
  10488. }
  10489. function Gy(t, e) {
  10490. t.dispatchAction({
  10491. type: "dataZoom",
  10492. batch: e
  10493. })
  10494. }
  10495. function Fy(t) {
  10496. var e, i = {
  10497. type_true: 2,
  10498. type_move: 1,
  10499. type_false: 0,
  10500. type_undefined: -1
  10501. },
  10502. n = !0;
  10503. return d(t, function(t) {
  10504. var o = t.dataZoomModel,
  10505. a = !o.get("disabled", !0) && (!o.get("zoomLock", !0) || "move");
  10506. i["type_" + a] > i["type_" + e] && (e = a), n &= o.get("preventDefaultMouseMove", !0)
  10507. }), {
  10508. controlType: e,
  10509. opt: {
  10510. zoomOnMouseWheel: !0,
  10511. moveOnMouseMove: !0,
  10512. moveOnMouseWheel: !0,
  10513. preventDefaultMouseMove: !!n
  10514. }
  10515. }
  10516. }
  10517. function Wy(t) {
  10518. return function(e, i, n, o) {
  10519. var a = this._range,
  10520. r = a.slice(),
  10521. s = e.axisModels[0];
  10522. if (s) {
  10523. var l = t(r, s, e, i, n, o);
  10524. return EL(l, r, [0, 100], "all"), this._range = r, a[0] !== r[0] || a[1] !== r[1] ? r : void 0
  10525. }
  10526. }
  10527. }
  10528. function Hy(t, e) {
  10529. return t && t.hasOwnProperty && t.hasOwnProperty(e)
  10530. }
  10531. function Zy(t, e, i, n) {
  10532. for (var o = e.targetVisuals[n], a = jC.prepareVisualTypes(o), r = {
  10533. color: t.getData().getVisual("color")
  10534. }, s = 0, l = a.length; s < l; s++) {
  10535. var u = a[s],
  10536. h = o["opacity" === u ? "__alphaForOpacity" : u];
  10537. h && h.applyVisual(i, function(t) {
  10538. return r[t]
  10539. }, function(t, e) {
  10540. r[t] = e
  10541. })
  10542. }
  10543. return r.color
  10544. }
  10545. function Uy(t, e, i) {
  10546. if (i[0] === i[1]) return i.slice();
  10547. for (var n = (i[1] - i[0]) / 200, o = i[0], a = [], r = 0; r <= 200 && o < i[1]; r++) a.push(o), o += n;
  10548. return a.push(i[1]), a
  10549. }
  10550. function Xy(t, e, i) {
  10551. var n = t.option,
  10552. o = n.align;
  10553. if (null != o && "auto" !== o) return o;
  10554. for (var a = {
  10555. width: e.getWidth(),
  10556. height: e.getHeight()
  10557. }, r = "horizontal" === n.orient ? 1 : 0, s = [
  10558. ["left", "right", "width"],
  10559. ["top", "bottom", "height"]
  10560. ], l = s[r], u = [0, null, 10], h = {}, c = 0; c < 3; c++) h[s[1 - r][c]] = u[c], h[l[c]] = 2 === c ? i[0] : n[l[c]];
  10561. var d = [
  10562. ["x", "width", 3],
  10563. ["y", "height", 0]
  10564. ][r],
  10565. f = la(h, a, n.padding);
  10566. return l[(f.margin[d[2]] || 0) + f[d[0]] + .5 * f[d[1]] < .5 * a[d[1]] ? 0 : 1]
  10567. }
  10568. function jy(t) {
  10569. return d(t || [], function(e) {
  10570. null != t.dataIndex && (t.dataIndexInside = t.dataIndex, t.dataIndex = null)
  10571. }), t
  10572. }
  10573. function Yy(t, e, i, n) {
  10574. return new nM({
  10575. shape: {
  10576. points: t
  10577. },
  10578. draggable: !!i,
  10579. cursor: e,
  10580. drift: i,
  10581. onmousemove: function(t) {
  10582. lw(t.event)
  10583. },
  10584. ondragend: n
  10585. })
  10586. }
  10587. function qy(t, e) {
  10588. return 0 === t ? [
  10589. [0, 0],
  10590. [e, 0],
  10591. [e, -e]
  10592. ] : [
  10593. [0, 0],
  10594. [e, 0],
  10595. [e, e]
  10596. ]
  10597. }
  10598. function Ky(t, e, i, n) {
  10599. return t ? [
  10600. [0, -yO(e, xO(i, 0))],
  10601. [wO, 0],
  10602. [0, yO(e, xO(n - i, 0))]
  10603. ] : [
  10604. [0, 0],
  10605. [5, -5],
  10606. [5, 5]
  10607. ]
  10608. }
  10609. function $y(t, e, i) {
  10610. var n = _O / 2,
  10611. o = t.get("hoverLinkDataSize");
  10612. return o && (n = mO(o, e, i, !0) / 2), n
  10613. }
  10614. function Jy(t) {
  10615. var e = t.get("hoverLinkOnHandle");
  10616. return !!(null == e ? t.get("realtime") : e)
  10617. }
  10618. function Qy(t) {
  10619. return "vertical" === t ? "ns-resize" : "ew-resize"
  10620. }
  10621. function tx(t, e) {
  10622. var i = t.inverse;
  10623. ("vertical" === t.orient ? !i : i) && e.reverse()
  10624. }
  10625. function ex(t) {
  10626. Ci(t, "label", ["show"])
  10627. }
  10628. function ix(t) {
  10629. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)))
  10630. }
  10631. function nx(t) {
  10632. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y))
  10633. }
  10634. function ox(t, e, i, n, o, a) {
  10635. var r = [],
  10636. s = hl(e, n) ? e.getCalculationInfo("stackResultDimension") : n,
  10637. l = hx(e, s, t),
  10638. u = e.indicesOfNearest(s, l)[0];
  10639. r[o] = e.get(i, u), r[a] = e.get(n, u);
  10640. var h = Vo(e.get(n, u));
  10641. return (h = Math.min(h, 20)) >= 0 && (r[a] = +r[a].toFixed(h)), r
  10642. }
  10643. function ax(t, e) {
  10644. var n = t.getData(),
  10645. o = t.coordinateSystem;
  10646. if (e && !nx(e) && !y(e.coord) && o) {
  10647. var a = o.dimensions,
  10648. r = rx(e, n, o, t);
  10649. if ((e = i(e)).type && LO[e.type] && r.baseAxis && r.valueAxis) {
  10650. var s = DO(a, r.baseAxis.dim),
  10651. l = DO(a, r.valueAxis.dim);
  10652. e.coord = LO[e.type](n, r.baseDataDim, r.valueDataDim, s, l), e.value = e.coord[l]
  10653. } else {
  10654. for (var u = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis], h = 0; h < 2; h++)
  10655. LO[u[h]] && (u[h] = hx(n, n.mapDimension(a[h]), u[h]));
  10656. e.coord = u
  10657. }
  10658. }
  10659. return e
  10660. }
  10661. function rx(t, e, i, n) {
  10662. var o = {};
  10663. return null != t.valueIndex || null != t.valueDim ? (o.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) :
  10664. t.valueDim, o.valueAxis = i.getAxis(sx(n, o.valueDataDim)), o.baseAxis = i.getOtherAxis(o.valueAxis), o.baseDataDim =
  10665. e.mapDimension(o.baseAxis.dim)) : (o.baseAxis = n.getBaseAxis(), o.valueAxis = i.getOtherAxis(o.baseAxis), o.baseDataDim =
  10666. e.mapDimension(o.baseAxis.dim), o.valueDataDim = e.mapDimension(o.valueAxis.dim)), o
  10667. }
  10668. function sx(t, e) {
  10669. var i = t.getData(),
  10670. n = i.dimensions;
  10671. e = i.getDimension(e);
  10672. for (var o = 0; o < n.length; o++) {
  10673. var a = i.getDimensionInfo(n[o]);
  10674. if (a.name === e) return a.coordDim
  10675. }
  10676. }
  10677. function lx(t, e) {
  10678. return !(t && t.containData && e.coord && !ix(e)) || t.containData(e.coord)
  10679. }
  10680. function ux(t, e, i, n) {
  10681. return n < 2 ? t.coord && t.coord[n] : t.value
  10682. }
  10683. function hx(t, e, i) {
  10684. if ("average" === i) {
  10685. var n = 0,
  10686. o = 0;
  10687. return t.each(e, function(t, e) {
  10688. isNaN(t) || (n += t, o++)
  10689. }), n / o
  10690. }
  10691. return "median" === i ? t.getMedian(e) : t.getDataExtent(e, !0)["max" === i ? 1 : 0]
  10692. }
  10693. function cx(t, e, i) {
  10694. var n = e.coordinateSystem;
  10695. t.each(function(o) {
  10696. var a, r = t.getItemModel(o),
  10697. s = Ro(r.get("x"), i.getWidth()),
  10698. l = Ro(r.get("y"), i.getHeight());
  10699. if (isNaN(s) || isNaN(l)) {
  10700. if (e.getMarkerPosition) a = e.getMarkerPosition(t.getValues(t.dimensions, o));
  10701. else if (n) {
  10702. var u = t.get(n.dimensions[0], o),
  10703. h = t.get(n.dimensions[1], o);
  10704. a = n.dataToPoint([u, h])
  10705. }
  10706. } else a = [s, l];
  10707. isNaN(s) || (a[0] = s), isNaN(l) || (a[1] = l), t.setItemLayout(o, a)
  10708. })
  10709. }
  10710. function dx(t, e, i) {
  10711. var n;
  10712. n = t ? f(t && t.dimensions, function(t) {
  10713. return r({
  10714. name: t
  10715. }, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {})
  10716. }) : [{
  10717. name: "value",
  10718. type: "float"
  10719. }];
  10720. var o = new eA(n, i),
  10721. a = f(i.get("data"), v(ax, e));
  10722. return t && (a = g(a, v(lx, t))), o.initData(a, null, t ? ux : function(t) {
  10723. return t.value
  10724. }), o
  10725. }
  10726. function fx(t) {
  10727. return !isNaN(t) && !isFinite(t)
  10728. }
  10729. function px(t, e, i, n) {
  10730. var o = 1 - t,
  10731. a = n.dimensions[t];
  10732. return fx(e[o]) && fx(i[o]) && e[t] === i[t] && n.getAxis(a).containData(e[t])
  10733. }
  10734. function gx(t, e) {
  10735. if ("cartesian2d" === t.type) {
  10736. var i = e[0].coord,
  10737. n = e[1].coord;
  10738. if (i && n && (px(1, i, n, t) || px(0, i, n, t))) return !0
  10739. }
  10740. return lx(t, e[0]) && lx(t, e[1])
  10741. }
  10742. function mx(t, e, i, n, o) {
  10743. var a, r = n.coordinateSystem,
  10744. s = t.getItemModel(e),
  10745. l = Ro(s.get("x"), o.getWidth()),
  10746. u = Ro(s.get("y"), o.getHeight());
  10747. if (isNaN(l) || isNaN(u)) {
  10748. if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(t.dimensions, e));
  10749. else {
  10750. var h = r.dimensions,
  10751. c = t.get(h[0], e),
  10752. d = t.get(h[1], e);
  10753. a = r.dataToPoint([c, d])
  10754. }
  10755. if ("cartesian2d" === r.type) {
  10756. var f = r.getAxis("x"),
  10757. p = r.getAxis("y"),
  10758. h = r.dimensions;
  10759. fx(t.get(h[0], e)) ? a[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : fx(t.get(h[1], e)) && (a[1] = p.toGlobalCoord(
  10760. p.getExtent()[i ? 0 : 1]))
  10761. }
  10762. isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u)
  10763. } else a = [l, u];
  10764. t.setItemLayout(e, a)
  10765. }
  10766. function vx(t, e, i) {
  10767. var n;
  10768. n = t ? f(t && t.dimensions, function(t) {
  10769. return r({
  10770. name: t
  10771. }, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {})
  10772. }) : [{
  10773. name: "value",
  10774. type: "float"
  10775. }];
  10776. var o = new eA(n, i),
  10777. a = new eA(n, i),
  10778. s = new eA([], i),
  10779. l = f(i.get("data"), v(PO, e, t, i));
  10780. t && (l = g(l, v(gx, t)));
  10781. var u = t ? ux : function(t) {
  10782. return t.value
  10783. };
  10784. return o.initData(f(l, function(t) {
  10785. return t[0]
  10786. }), null, u), a.initData(f(l, function(t) {
  10787. return t[1]
  10788. }), null, u), s.initData(f(l, function(t) {
  10789. return t[2]
  10790. })), s.hasItemOption = !0, {
  10791. from: o,
  10792. to: a,
  10793. line: s
  10794. }
  10795. }
  10796. function yx(t) {
  10797. return !isNaN(t) && !isFinite(t)
  10798. }
  10799. function xx(t, e, i, n) {
  10800. var o = 1 - t;
  10801. return yx(e[o]) && yx(i[o])
  10802. }
  10803. function _x(t, e) {
  10804. var i = e.coord[0],
  10805. n = e.coord[1];
  10806. return !("cartesian2d" !== t.type || !i || !n || !xx(1, i, n, t) && !xx(0, i, n, t)) || (lx(t, {
  10807. coord: i,
  10808. x: e.x0,
  10809. y: e.y0
  10810. }) || lx(t, {
  10811. coord: n,
  10812. x: e.x1,
  10813. y: e.y1
  10814. }))
  10815. }
  10816. function bx(t, e, i, n, o) {
  10817. var a, r = n.coordinateSystem,
  10818. s = t.getItemModel(e),
  10819. l = Ro(s.get(i[0]), o.getWidth()),
  10820. u = Ro(s.get(i[1]), o.getHeight());
  10821. if (isNaN(l) || isNaN(u)) {
  10822. if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(i, e));
  10823. else {
  10824. var h = [f = t.get(i[0], e), p = t.get(i[1], e)];
  10825. r.clampData && r.clampData(h, h), a = r.dataToPoint(h, !0)
  10826. }
  10827. if ("cartesian2d" === r.type) {
  10828. var c = r.getAxis("x"),
  10829. d = r.getAxis("y"),
  10830. f = t.get(i[0], e),
  10831. p = t.get(i[1], e);
  10832. yx(f) ? a[0] = c.toGlobalCoord(c.getExtent()["x0" === i[0] ? 0 : 1]) : yx(p) && (a[1] = d.toGlobalCoord(d.getExtent()[
  10833. "y0" === i[1] ? 0 : 1]))
  10834. }
  10835. isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u)
  10836. } else a = [l, u];
  10837. return a
  10838. }
  10839. function Sx(t, e, i) {
  10840. var n, o, a = ["x0", "y0", "x1", "y1"];
  10841. t ? (n = f(t && t.dimensions, function(t) {
  10842. var i = e.getData();
  10843. return r({
  10844. name: t
  10845. }, i.getDimensionInfo(i.mapDimension(t)) || {})
  10846. }), o = new eA(f(a, function(t, e) {
  10847. return {
  10848. name: t,
  10849. type: n[e % 2].type
  10850. }
  10851. }), i)) : o = new eA(n = [{
  10852. name: "value",
  10853. type: "float"
  10854. }], i);
  10855. var s = f(i.get("data"), v(NO, e, t, i));
  10856. t && (s = g(s, v(_x, t)));
  10857. var l = t ? function(t, e, i, n) {
  10858. return t.coord[Math.floor(n / 2)][n % 2]
  10859. } : function(t) {
  10860. return t.value
  10861. };
  10862. return o.initData(s, null, l), o.hasItemOption = !0, o
  10863. }
  10864. function Mx(t) {
  10865. var e = t.type,
  10866. i = {
  10867. number: "value",
  10868. time: "time"
  10869. };
  10870. if (i[e] && (t.axisType = i[e], delete t.type), Ix(t), Tx(t, "controlPosition")) {
  10871. var n = t.controlStyle || (t.controlStyle = {});
  10872. Tx(n, "position") || (n.position = t.controlPosition), "none" !== n.position || Tx(n, "show") || (n.show = !1,
  10873. delete n.position), delete t.controlPosition
  10874. }
  10875. d(t.data || [], function(t) {
  10876. w(t) && !y(t) && (!Tx(t, "value") && Tx(t, "name") && (t.value = t.name), Ix(t))
  10877. })
  10878. }
  10879. function Ix(t) {
  10880. var e = t.itemStyle || (t.itemStyle = {}),
  10881. i = e.emphasis || (e.emphasis = {}),
  10882. n = t.label || t.label || {},
  10883. o = n.normal || (n.normal = {}),
  10884. a = {
  10885. normal: 1,
  10886. emphasis: 1
  10887. };
  10888. d(n, function(t, e) {
  10889. a[e] || Tx(o, e) || (o[e] = t)
  10890. }), i.label && !Tx(n, "emphasis") && (n.emphasis = i.label, delete i.label)
  10891. }
  10892. function Tx(t, e) {
  10893. return t.hasOwnProperty(e)
  10894. }
  10895. function Ax(t, e) {
  10896. return la(t.getBoxLayoutParams(), {
  10897. width: e.getWidth(),
  10898. height: e.getHeight()
  10899. }, t.get("padding"))
  10900. }
  10901. function Dx(t, e, n, o) {
  10902. return Wn(t.get(e).replace(/^path:\/\//, ""), i(o || {}), new ue(n[0], n[1], n[2], n[3]), "center")
  10903. }
  10904. function Cx(t, e, i, o, a, r) {
  10905. var s = e.get("color");
  10906. a ? (a.setColor(s), i.add(a), r && r.onUpdate(a)) : ((a = Xl(t.get("symbol"), -1, -1, 2, 2, s)).setStyle(
  10907. "strokeNoScale", !0), i.add(a), r && r.onCreate(a));
  10908. var l = e.getItemStyle(["color", "symbol", "symbolSize"]);
  10909. a.setStyle(l), o = n({
  10910. rectHover: !0,
  10911. z2: 100
  10912. }, o, !0);
  10913. var u = t.get("symbolSize");
  10914. (u = u instanceof Array ? u.slice() : [+u, +u])[0] /= 2, u[1] /= 2, o.scale = u;
  10915. var h = t.get("symbolOffset");
  10916. if (h) {
  10917. var c = o.position = o.position || [0, 0];
  10918. c[0] += Ro(h[0], u[0]), c[1] += Ro(h[1], u[1])
  10919. }
  10920. var d = t.get("symbolRotate");
  10921. return o.rotation = (d || 0) * Math.PI / 180 || 0, a.attr(o), a.updateTransform(), a
  10922. }
  10923. function Lx(t, e, i, n, o) {
  10924. if (!t.dragging) {
  10925. var a = n.getModel("checkpointStyle"),
  10926. r = i.dataToCoord(n.getData().get(["value"], e));
  10927. o || !a.get("animation", !0) ? t.attr({
  10928. position: [r, 0]
  10929. }) : (t.stopAnimation(!0), t.animateTo({
  10930. position: [r, 0]
  10931. }, a.get("animationDuration", !0), a.get("animationEasing", !0)))
  10932. }
  10933. }
  10934. function kx(t) {
  10935. return 0 === t.indexOf("my")
  10936. }
  10937. function Px(t) {
  10938. this.model = t
  10939. }
  10940. function Nx(t) {
  10941. this.model = t
  10942. }
  10943. function Ox(t) {
  10944. var e = {},
  10945. i = [],
  10946. n = [];
  10947. return t.eachRawSeries(function(t) {
  10948. var o = t.coordinateSystem;
  10949. if (!o || "cartesian2d" !== o.type && "polar" !== o.type) i.push(t);
  10950. else {
  10951. var a = o.getBaseAxis();
  10952. if ("category" === a.type) {
  10953. var r = a.dim + "_" + a.index;
  10954. e[r] || (e[r] = {
  10955. categoryAxis: a,
  10956. valueAxis: o.getOtherAxis(a),
  10957. series: []
  10958. }, n.push({
  10959. axisDim: a.dim,
  10960. axisIndex: a.index
  10961. })), e[r].series.push(t)
  10962. } else i.push(t)
  10963. }
  10964. }), {
  10965. seriesGroupByCategoryAxis: e,
  10966. other: i,
  10967. meta: n
  10968. }
  10969. }
  10970. function Ex(t) {
  10971. var e = [];
  10972. return d(t, function(t, i) {
  10973. var n = t.categoryAxis,
  10974. o = t.valueAxis.dim,
  10975. a = [" "].concat(f(t.series, function(t) {
  10976. return t.name
  10977. })),
  10978. r = [n.model.getCategories()];
  10979. d(t.series, function(t) {
  10980. r.push(t.getRawData().mapArray(o, function(t) {
  10981. return t
  10982. }))
  10983. });
  10984. for (var s = [a.join(qO)], l = 0; l < r[0].length; l++) {
  10985. for (var u = [], h = 0; h < r.length; h++) u.push(r[h][l]);
  10986. s.push(u.join(qO))
  10987. }
  10988. e.push(s.join("\n"))
  10989. }), e.join("\n\n" + YO + "\n\n")
  10990. }
  10991. function Rx(t) {
  10992. return f(t, function(t) {
  10993. var e = t.getRawData(),
  10994. i = [t.name],
  10995. n = [];
  10996. return e.each(e.dimensions, function() {
  10997. for (var t = arguments.length, o = arguments[t - 1], a = e.getName(o), r = 0; r < t - 1; r++) n[r] = arguments[
  10998. r];
  10999. i.push((a ? a + qO : "") + n.join(qO))
  11000. }), i.join("\n")
  11001. }).join("\n\n" + YO + "\n\n")
  11002. }
  11003. function zx(t) {
  11004. var e = Ox(t);
  11005. return {
  11006. value: g([Ex(e.seriesGroupByCategoryAxis), Rx(e.other)], function(t) {
  11007. return t.replace(/[\n\t\s]/g, "")
  11008. }).join("\n\n" + YO + "\n\n"),
  11009. meta: e.meta
  11010. }
  11011. }
  11012. function Bx(t) {
  11013. return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
  11014. }
  11015. function Vx(t) {
  11016. if (t.slice(0, t.indexOf("\n")).indexOf(qO) >= 0) return !0
  11017. }
  11018. function Gx(t) {
  11019. for (var e = t.split(/\n+/g), i = [], n = f(Bx(e.shift()).split(KO), function(t) {
  11020. return {
  11021. name: t,
  11022. data: []
  11023. }
  11024. }), o = 0; o < e.length; o++) {
  11025. var a = Bx(e[o]).split(KO);
  11026. i.push(a.shift());
  11027. for (var r = 0; r < a.length; r++) n[r] && (n[r].data[o] = a[r])
  11028. }
  11029. return {
  11030. series: n,
  11031. categories: i
  11032. }
  11033. }
  11034. function Fx(t) {
  11035. for (var e = t.split(/\n+/g), i = Bx(e.shift()), n = [], o = 0; o < e.length; o++) {
  11036. var a, r = Bx(e[o]).split(KO),
  11037. s = "",
  11038. l = !1;
  11039. isNaN(r[0]) ? (l = !0, s = r[0], r = r.slice(1), n[o] = {
  11040. name: s,
  11041. value: []
  11042. }, a = n[o].value) : a = n[o] = [];
  11043. for (var u = 0; u < r.length; u++) a.push(+r[u]);
  11044. 1 === a.length && (l ? n[o].value = a[0] : n[o] = a[0])
  11045. }
  11046. return {
  11047. name: i,
  11048. data: n
  11049. }
  11050. }
  11051. function Wx(t, e) {
  11052. var i = {
  11053. series: []
  11054. };
  11055. return d(t.split(new RegExp("\n*" + YO + "\n*", "g")), function(t, n) {
  11056. if (Vx(t)) {
  11057. var o = Gx(t),
  11058. a = e[n],
  11059. r = a.axisDim + "Axis";
  11060. a && (i[r] = i[r] || [], i[r][a.axisIndex] = {
  11061. data: o.categories
  11062. }, i.series = i.series.concat(o.series))
  11063. } else {
  11064. o = Fx(t);
  11065. i.series.push(o)
  11066. }
  11067. }), i
  11068. }
  11069. function Hx(t) {
  11070. this._dom = null, this.model = t
  11071. }
  11072. function Zx(t, e) {
  11073. return f(t, function(t, i) {
  11074. var n = e && e[i];
  11075. return w(n) && !y(n) ? (w(t) && !y(t) && (t = t.value), r({
  11076. value: t
  11077. }, n)) : t
  11078. })
  11079. }
  11080. function Ux(t, e) {
  11081. var i = qx(t);
  11082. $O(e, function(e, n) {
  11083. for (var o = i.length - 1; o >= 0 && !i[o][n]; o--);
  11084. if (o < 0) {
  11085. var a = t.queryComponents({
  11086. mainType: "dataZoom",
  11087. subType: "select",
  11088. id: n
  11089. })[0];
  11090. if (a) {
  11091. var r = a.getPercentRange();
  11092. i[0][n] = {
  11093. dataZoomId: n,
  11094. start: r[0],
  11095. end: r[1]
  11096. }
  11097. }
  11098. }
  11099. }), i.push(e)
  11100. }
  11101. function Xx(t) {
  11102. var e = qx(t),
  11103. i = e[e.length - 1];
  11104. e.length > 1 && e.pop();
  11105. var n = {};
  11106. return $O(i, function(t, i) {
  11107. for (var o = e.length - 1; o >= 0; o--)
  11108. if (t = e[o][i]) {
  11109. n[i] = t;
  11110. break
  11111. }
  11112. }), n
  11113. }
  11114. function jx(t) {
  11115. t[JO] = null
  11116. }
  11117. function Yx(t) {
  11118. return qx(t).length
  11119. }
  11120. function qx(t) {
  11121. var e = t[JO];
  11122. return e || (e = t[JO] = [{}]), e
  11123. }
  11124. function Kx(t, e, i) {
  11125. (this._brushController = new Cf(i.getZr())).on("brush", m(this._onBrush, this)).mount(), this._isZoomActive
  11126. }
  11127. function $x(t) {
  11128. var e = {};
  11129. return d(["xAxisIndex", "yAxisIndex"], function(i) {
  11130. e[i] = t[i], null == e[i] && (e[i] = "all"), (!1 === e[i] || "none" === e[i]) && (e[i] = [])
  11131. }), e
  11132. }
  11133. function Jx(t, e) {
  11134. t.setIconStatus("back", Yx(e) > 1 ? "emphasis" : "normal")
  11135. }
  11136. function Qx(t, e, i, n, o) {
  11137. var a = i._isZoomActive;
  11138. n && "takeGlobalCursor" === n.type && (a = "dataZoomSelect" === n.key && n.dataZoomSelectActive), i._isZoomActive =
  11139. a, t.setIconStatus("zoom", a ? "emphasis" : "normal");
  11140. var r = new iy($x(t.option), e, {
  11141. include: ["grid"]
  11142. });
  11143. i._brushController.setPanels(r.makePanelOpts(o, function(t) {
  11144. return t.xAxisDeclared && !t.yAxisDeclared ? "lineX" : !t.xAxisDeclared && t.yAxisDeclared ? "lineY" : "rect"
  11145. })).enableBrush(!!a && {
  11146. brushType: "auto",
  11147. brushStyle: {
  11148. lineWidth: 0,
  11149. fill: "rgba(0,0,0,0.2)"
  11150. }
  11151. })
  11152. }
  11153. function t_(t) {
  11154. this.model = t
  11155. }
  11156. function e_(t) {
  11157. return aE(t)
  11158. }
  11159. function i_() {
  11160. if (!lE && uE) {
  11161. lE = !0;
  11162. var t = uE.styleSheets;
  11163. t.length < 31 ? uE.createStyleSheet().addRule(".zrvml", "behavior:url(#default#VML)") : t[0].addRule(".zrvml",
  11164. "behavior:url(#default#VML)")
  11165. }
  11166. }
  11167. function n_(t) {
  11168. return parseInt(t, 10)
  11169. }
  11170. function o_(t, e) {
  11171. i_(), this.root = t, this.storage = e;
  11172. var i = document.createElement("div"),
  11173. n = document.createElement("div");
  11174. i.style.cssText = "display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;", n.style.cssText =
  11175. "position:absolute;left:0;top:0;", t.appendChild(i), this._vmlRoot = n, this._vmlViewport = i, this.resize();
  11176. var o = e.delFromStorage,
  11177. a = e.addToStorage;
  11178. e.delFromStorage = function(t) {
  11179. o.call(e, t), t && t.onRemove && t.onRemove(n)
  11180. }, e.addToStorage = function(t) {
  11181. t.onAdd && t.onAdd(n), a.call(e, t)
  11182. }, this._firstPaint = !0
  11183. }
  11184. function a_(t) {
  11185. return function() {
  11186. Bw('In IE8.0 VML mode painter not support method "' + t + '"')
  11187. }
  11188. }
  11189. function r_(t) {
  11190. return document.createElementNS(HE, t)
  11191. }
  11192. function s_(t) {
  11193. return jE(1e4 * t) / 1e4
  11194. }
  11195. function l_(t) {
  11196. return t < QE && t > -QE
  11197. }
  11198. function u_(t, e) {
  11199. var i = e ? t.textFill : t.fill;
  11200. return null != i && i !== XE
  11201. }
  11202. function h_(t, e) {
  11203. var i = e ? t.textStroke : t.stroke;
  11204. return null != i && i !== XE
  11205. }
  11206. function c_(t, e) {
  11207. e && d_(t, "transform", "matrix(" + UE.call(e, ",") + ")")
  11208. }
  11209. function d_(t, e, i) {
  11210. (!i || "linear" !== i.type && "radial" !== i.type) && ("string" == typeof i && i.indexOf("NaN") > -1 && console.log(
  11211. i), t.setAttribute(e, i))
  11212. }
  11213. function f_(t, e, i) {
  11214. t.setAttributeNS("http://www.w3.org/1999/xlink", e, i)
  11215. }
  11216. function p_(t, e, i, n) {
  11217. if (u_(e, i)) {
  11218. var o = i ? e.textFill : e.fill;
  11219. o = "transparent" === o ? XE : o, "none" !== t.getAttribute("clip-path") && o === XE && (o = "rgba(0, 0, 0, 0.002)"),
  11220. d_(t, "fill", o), d_(t, "fill-opacity", null != e.fillOpacity ? e.fillOpacity * e.opacity : e.opacity)
  11221. } else d_(t, "fill", XE);
  11222. if (h_(e, i)) {
  11223. var a = i ? e.textStroke : e.stroke;
  11224. d_(t, "stroke", a = "transparent" === a ? XE : a), d_(t, "stroke-width", (i ? e.textStrokeWidth : e.lineWidth) / (!
  11225. i && e.strokeNoScale ? n.getLineScale() : 1)), d_(t, "paint-order", i ? "stroke" : "fill"), d_(t,
  11226. "stroke-opacity", null != e.strokeOpacity ? e.strokeOpacity : e.opacity), e.lineDash ? (d_(t, "stroke-dasharray",
  11227. e.lineDash.join(",")), d_(t, "stroke-dashoffset", jE(e.lineDashOffset || 0))) : d_(t, "stroke-dasharray", ""), e.lineCap &&
  11228. d_(t, "stroke-linecap", e.lineCap), e.lineJoin && d_(t, "stroke-linejoin", e.lineJoin), e.miterLimit && d_(t,
  11229. "stroke-miterlimit", e.miterLimit)
  11230. } else d_(t, "stroke", XE)
  11231. }
  11232. function g_(t) {
  11233. for (var e = [], i = t.data, n = t.len(), o = 0; o < n;) {
  11234. var a = "",
  11235. r = 0;
  11236. switch (i[o++]) {
  11237. case ZE.M:
  11238. a = "M", r = 2;
  11239. break;
  11240. case ZE.L:
  11241. a = "L", r = 2;
  11242. break;
  11243. case ZE.Q:
  11244. a = "Q", r = 4;
  11245. break;
  11246. case ZE.C:
  11247. a = "C", r = 6;
  11248. break;
  11249. case ZE.A:
  11250. var s = i[o++],
  11251. l = i[o++],
  11252. u = i[o++],
  11253. h = i[o++],
  11254. c = i[o++],
  11255. d = i[o++],
  11256. f = i[o++],
  11257. p = i[o++],
  11258. g = Math.abs(d),
  11259. m = l_(g - $E) && !l_(g),
  11260. v = !1;
  11261. v = g >= $E || !l_(g) && (d > -KE && d < 0 || d > KE) == !!p;
  11262. var y = s_(s + u * qE(c)),
  11263. x = s_(l + h * YE(c));
  11264. m && (d = p ? $E - 1e-4 : 1e-4 - $E, v = !0, 9 === o && e.push("M", y, x));
  11265. var _ = s_(s + u * qE(c + d)),
  11266. w = s_(l + h * YE(c + d));
  11267. e.push("A", s_(u), s_(h), jE(f * JE), +v, +p, _, w);
  11268. break;
  11269. case ZE.Z:
  11270. a = "Z";
  11271. break;
  11272. case ZE.R:
  11273. var _ = s_(i[o++]),
  11274. w = s_(i[o++]),
  11275. b = s_(i[o++]),
  11276. S = s_(i[o++]);
  11277. e.push("M", _, w, "L", _ + b, w, "L", _ + b, w + S, "L", _, w + S, "L", _, w)
  11278. }
  11279. a && e.push(a);
  11280. for (var M = 0; M < r; M++) e.push(s_(i[o++]))
  11281. }
  11282. return e.join(" ")
  11283. }
  11284. function m_(t) {
  11285. return "middle" === t ? "middle" : "bottom" === t ? "after-edge" : "hanging"
  11286. }
  11287. function v_() {}
  11288. function y_(t, e, i, n) {
  11289. for (var o = 0, a = e.length, r = 0, s = 0; o < a; o++) {
  11290. var l = e[o];
  11291. if (l.removed) {
  11292. for (var u = [], h = s; h < s + l.count; h++) u.push(h);
  11293. l.indices = u, s += l.count
  11294. } else {
  11295. for (var u = [], h = r; h < r + l.count; h++) u.push(h);
  11296. l.indices = u, r += l.count, l.added || (s += l.count)
  11297. }
  11298. }
  11299. return e
  11300. }
  11301. function x_(t) {
  11302. return {
  11303. newPos: t.newPos,
  11304. components: t.components.slice(0)
  11305. }
  11306. }
  11307. function __(t, e, i, n, o) {
  11308. this._zrId = t, this._svgRoot = e, this._tagNames = "string" == typeof i ? [i] : i, this._markLabel = n, this._domName =
  11309. o || "_dom", this.nextId = 0
  11310. }
  11311. function w_(t, e) {
  11312. __.call(this, t, e, ["linearGradient", "radialGradient"], "__gradient_in_use__")
  11313. }
  11314. function b_(t, e) {
  11315. __.call(this, t, e, "clipPath", "__clippath_in_use__")
  11316. }
  11317. function S_(t, e) {
  11318. __.call(this, t, e, ["filter"], "__filter_in_use__", "_shadowDom")
  11319. }
  11320. function M_(t) {
  11321. return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY || t.textShadowBlur || t.textShadowOffsetX || t.textShadowOffsetY)
  11322. }
  11323. function I_(t) {
  11324. return parseInt(t, 10)
  11325. }
  11326. function T_(t) {
  11327. return t instanceof kn ? tR : t instanceof hi ? eR : t instanceof qS ? iR : tR
  11328. }
  11329. function A_(t, e) {
  11330. return e && t && e.parentNode !== t
  11331. }
  11332. function D_(t, e, i) {
  11333. if (A_(t, e) && i) {
  11334. var n = i.nextSibling;
  11335. n ? t.insertBefore(e, n) : t.appendChild(e)
  11336. }
  11337. }
  11338. function C_(t, e) {
  11339. if (A_(t, e)) {
  11340. var i = t.firstChild;
  11341. i ? t.insertBefore(e, i) : t.appendChild(e)
  11342. }
  11343. }
  11344. function L_(t, e) {
  11345. e && t && e.parentNode === t && t.removeChild(e)
  11346. }
  11347. function k_(t) {
  11348. return t.__textSvgEl
  11349. }
  11350. function P_(t) {
  11351. return t.__svgEl
  11352. }
  11353. function N_(t) {
  11354. return function() {
  11355. Bw('In SVG mode painter not support method "' + t + '"')
  11356. }
  11357. }
  11358. var O_ = 2311,
  11359. E_ = function() {
  11360. return O_++
  11361. },
  11362. R_ = {},
  11363. z_ = R_ = "object" == typeof wx && "function" == typeof wx.getSystemInfoSync ? {
  11364. browser: {},
  11365. os: {},
  11366. node: !1,
  11367. wxa: !0,
  11368. canvasSupported: !0,
  11369. svgSupported: !1,
  11370. touchEventsSupported: !0,
  11371. domSupported: !1
  11372. } : "undefined" == typeof document && "undefined" != typeof self ? {
  11373. browser: {},
  11374. os: {},
  11375. node: !1,
  11376. worker: !0,
  11377. canvasSupported: !0,
  11378. domSupported: !1
  11379. } : "undefined" == typeof navigator ? {
  11380. browser: {},
  11381. os: {},
  11382. node: !0,
  11383. worker: !1,
  11384. canvasSupported: !0,
  11385. svgSupported: !0,
  11386. domSupported: !1
  11387. } : function(t) {
  11388. var e = {},
  11389. i = {},
  11390. n = t.match(/Firefox\/([\d.]+)/),
  11391. o = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/),
  11392. a = t.match(/Edge\/([\d.]+)/),
  11393. r = /micromessenger/i.test(t);
  11394. return n && (i.firefox = !0, i.version = n[1]), o && (i.ie = !0, i.version = o[1]), a && (i.edge = !0, i.version =
  11395. a[1]), r && (i.weChat = !0), {
  11396. browser: i,
  11397. os: e,
  11398. node: !1,
  11399. canvasSupported: !!document.createElement("canvas").getContext,
  11400. svgSupported: "undefined" != typeof SVGRect,
  11401. touchEventsSupported: "ontouchstart" in window && !i.ie && !i.edge,
  11402. pointerEventsSupported: "onpointerdown" in window && (i.edge || i.ie && i.version >= 11),
  11403. domSupported: "undefined" != typeof document
  11404. }
  11405. }(navigator.userAgent),
  11406. B_ = {
  11407. "[object Function]": 1,
  11408. "[object RegExp]": 1,
  11409. "[object Date]": 1,
  11410. "[object Error]": 1,
  11411. "[object CanvasGradient]": 1,
  11412. "[object CanvasPattern]": 1,
  11413. "[object Image]": 1,
  11414. "[object Canvas]": 1
  11415. },
  11416. V_ = {
  11417. "[object Int8Array]": 1,
  11418. "[object Uint8Array]": 1,
  11419. "[object Uint8ClampedArray]": 1,
  11420. "[object Int16Array]": 1,
  11421. "[object Uint16Array]": 1,
  11422. "[object Int32Array]": 1,
  11423. "[object Uint32Array]": 1,
  11424. "[object Float32Array]": 1,
  11425. "[object Float64Array]": 1
  11426. },
  11427. G_ = Object.prototype.toString,
  11428. F_ = Array.prototype,
  11429. W_ = F_.forEach,
  11430. H_ = F_.filter,
  11431. Z_ = F_.slice,
  11432. U_ = F_.map,
  11433. X_ = F_.reduce,
  11434. j_ = {},
  11435. Y_ = function() {
  11436. return j_.createCanvas()
  11437. };
  11438. j_.createCanvas = function() {
  11439. return document.createElement("canvas")
  11440. };
  11441. var q_, K_ = "__ec_primitive__";
  11442. E.prototype = {
  11443. constructor: E,
  11444. get: function(t) {
  11445. return this.data.hasOwnProperty(t) ? this.data[t] : null
  11446. },
  11447. set: function(t, e) {
  11448. return this.data[t] = e
  11449. },
  11450. each: function(t, e) {
  11451. void 0 !== e && (t = m(t, e));
  11452. for (var i in this.data) this.data.hasOwnProperty(i) && t(this.data[i], i)
  11453. },
  11454. removeKey: function(t) {
  11455. delete this.data[t]
  11456. }
  11457. };
  11458. var $_ = (Object.freeze || Object)({
  11459. $override: e,
  11460. clone: i,
  11461. merge: n,
  11462. mergeAll: o,
  11463. extend: a,
  11464. defaults: r,
  11465. createCanvas: Y_,
  11466. getContext: s,
  11467. indexOf: l,
  11468. inherits: u,
  11469. mixin: h,
  11470. isArrayLike: c,
  11471. each: d,
  11472. map: f,
  11473. reduce: p,
  11474. filter: g,
  11475. find: function(t, e, i) {
  11476. if (t && e)
  11477. for (var n = 0, o = t.length; n < o; n++)
  11478. if (e.call(i, t[n], n, t)) return t[n]
  11479. },
  11480. bind: m,
  11481. curry: v,
  11482. isArray: y,
  11483. isFunction: x,
  11484. isString: _,
  11485. isObject: w,
  11486. isBuiltInObject: b,
  11487. isTypedArray: S,
  11488. isDom: M,
  11489. eqNaN: I,
  11490. retrieve: T,
  11491. retrieve2: A,
  11492. retrieve3: D,
  11493. slice: C,
  11494. normalizeCssArray: L,
  11495. assert: k,
  11496. trim: P,
  11497. setAsPrimitive: N,
  11498. isPrimitive: O,
  11499. createHashMap: R,
  11500. concatArray: z,
  11501. noop: B
  11502. }),
  11503. J_ = "undefined" == typeof Float32Array ? Array : Float32Array,
  11504. Q_ = X,
  11505. tw = j,
  11506. ew = K,
  11507. iw = $,
  11508. nw = (Object.freeze || Object)({
  11509. create: V,
  11510. copy: G,
  11511. clone: F,
  11512. set: W,
  11513. add: H,
  11514. scaleAndAdd: Z,
  11515. sub: U,
  11516. len: X,
  11517. length: Q_,
  11518. lenSquare: j,
  11519. lengthSquare: tw,
  11520. mul: function(t, e, i) {
  11521. return t[0] = e[0] * i[0], t[1] = e[1] * i[1], t
  11522. },
  11523. div: function(t, e, i) {
  11524. return t[0] = e[0] / i[0], t[1] = e[1] / i[1], t
  11525. },
  11526. dot: function(t, e) {
  11527. return t[0] * e[0] + t[1] * e[1]
  11528. },
  11529. scale: Y,
  11530. normalize: q,
  11531. distance: K,
  11532. dist: ew,
  11533. distanceSquare: $,
  11534. distSquare: iw,
  11535. negate: function(t, e) {
  11536. return t[0] = -e[0], t[1] = -e[1], t
  11537. },
  11538. lerp: J,
  11539. applyTransform: Q,
  11540. min: tt,
  11541. max: et
  11542. });
  11543. it.prototype = {
  11544. constructor: it,
  11545. _dragStart: function(t) {
  11546. var e = t.target;
  11547. e && e.draggable && (this._draggingTarget = e, e.dragging = !0, this._x = t.offsetX, this._y = t.offsetY, this.dispatchToElement(
  11548. nt(e, t), "dragstart", t.event))
  11549. },
  11550. _drag: function(t) {
  11551. var e = this._draggingTarget;
  11552. if (e) {
  11553. var i = t.offsetX,
  11554. n = t.offsetY,
  11555. o = i - this._x,
  11556. a = n - this._y;
  11557. this._x = i, this._y = n, e.drift(o, a, t), this.dispatchToElement(nt(e, t), "drag", t.event);
  11558. var r = this.findHover(i, n, e).target,
  11559. s = this._dropTarget;
  11560. this._dropTarget = r, e !== r && (s && r !== s && this.dispatchToElement(nt(s, t), "dragleave", t.event), r && r !==
  11561. s && this.dispatchToElement(nt(r, t), "dragenter", t.event))
  11562. }
  11563. },
  11564. _dragEnd: function(t) {
  11565. var e = this._draggingTarget;
  11566. e && (e.dragging = !1), this.dispatchToElement(nt(e, t), "dragend", t.event), this._dropTarget && this.dispatchToElement(
  11567. nt(this._dropTarget, t), "drop", t.event), this._draggingTarget = null, this._dropTarget = null
  11568. }
  11569. };
  11570. var ow = Array.prototype.slice,
  11571. aw = function(t) {
  11572. this._$handlers = {}, this._$eventProcessor = t
  11573. };
  11574. aw.prototype = {
  11575. constructor: aw,
  11576. one: function(t, e, i, n) {
  11577. var o = this._$handlers;
  11578. if ("function" == typeof e && (n = i, i = e, e = null), !i || !t) return this;
  11579. e = ot(this, e), o[t] || (o[t] = []);
  11580. for (var a = 0; a < o[t].length; a++)
  11581. if (o[t][a].h === i) return this;
  11582. return o[t].push({
  11583. h: i,
  11584. one: !0,
  11585. query: e,
  11586. ctx: n || this
  11587. }), this
  11588. },
  11589. on: function(t, e, i, n) {
  11590. var o = this._$handlers;
  11591. if ("function" == typeof e && (n = i, i = e, e = null), !i || !t) return this;
  11592. e = ot(this, e), o[t] || (o[t] = []);
  11593. for (var a = 0; a < o[t].length; a++)
  11594. if (o[t][a].h === i) return this;
  11595. return o[t].push({
  11596. h: i,
  11597. one: !1,
  11598. query: e,
  11599. ctx: n || this
  11600. }), this
  11601. },
  11602. isSilent: function(t) {
  11603. var e = this._$handlers;
  11604. return e[t] && e[t].length
  11605. },
  11606. off: function(t, e) {
  11607. var i = this._$handlers;
  11608. if (!t) return this._$handlers = {}, this;
  11609. if (e) {
  11610. if (i[t]) {
  11611. for (var n = [], o = 0, a = i[t].length; o < a; o++) i[t][o].h !== e && n.push(i[t][o]);
  11612. i[t] = n
  11613. }
  11614. i[t] && 0 === i[t].length && delete i[t]
  11615. } else delete i[t];
  11616. return this
  11617. },
  11618. trigger: function(t) {
  11619. var e = this._$handlers[t],
  11620. i = this._$eventProcessor;
  11621. if (e) {
  11622. var n = arguments,
  11623. o = n.length;
  11624. o > 3 && (n = ow.call(n, 1));
  11625. for (var a = e.length, r = 0; r < a;) {
  11626. var s = e[r];
  11627. if (i && i.filter && null != s.query && !i.filter(t, s.query)) r++;
  11628. else {
  11629. switch (o) {
  11630. case 1:
  11631. s.h.call(s.ctx);
  11632. break;
  11633. case 2:
  11634. s.h.call(s.ctx, n[1]);
  11635. break;
  11636. case 3:
  11637. s.h.call(s.ctx, n[1], n[2]);
  11638. break;
  11639. default:
  11640. s.h.apply(s.ctx, n)
  11641. }
  11642. s.one ? (e.splice(r, 1), a--) : r++
  11643. }
  11644. }
  11645. }
  11646. return i && i.afterTrigger && i.afterTrigger(t), this
  11647. },
  11648. triggerWithContext: function(t) {
  11649. var e = this._$handlers[t],
  11650. i = this._$eventProcessor;
  11651. if (e) {
  11652. var n = arguments,
  11653. o = n.length;
  11654. o > 4 && (n = ow.call(n, 1, n.length - 1));
  11655. for (var a = n[n.length - 1], r = e.length, s = 0; s < r;) {
  11656. var l = e[s];
  11657. if (i && i.filter && null != l.query && !i.filter(t, l.query)) s++;
  11658. else {
  11659. switch (o) {
  11660. case 1:
  11661. l.h.call(a);
  11662. break;
  11663. case 2:
  11664. l.h.call(a, n[1]);
  11665. break;
  11666. case 3:
  11667. l.h.call(a, n[1], n[2]);
  11668. break;
  11669. default:
  11670. l.h.apply(a, n)
  11671. }
  11672. l.one ? (e.splice(s, 1), r--) : s++
  11673. }
  11674. }
  11675. }
  11676. return i && i.afterTrigger && i.afterTrigger(t), this
  11677. }
  11678. };
  11679. var rw = "undefined" != typeof window && !!window.addEventListener,
  11680. sw = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
  11681. lw = rw ? function(t) {
  11682. t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0
  11683. } : function(t) {
  11684. t.returnValue = !1, t.cancelBubble = !0
  11685. },
  11686. uw = "silent";
  11687. pt.prototype.dispose = function() {};
  11688. var hw = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  11689. cw = function(t, e, i, n) {
  11690. aw.call(this), this.storage = t, this.painter = e, this.painterRoot = n, i = i || new pt, this.proxy = null, this._hovered = {},
  11691. this._lastTouchMoment, this._lastX, this._lastY, it.call(this), this.setHandlerProxy(i)
  11692. };
  11693. cw.prototype = {
  11694. constructor: cw,
  11695. setHandlerProxy: function(t) {
  11696. this.proxy && this.proxy.dispose(), t && (d(hw, function(e) {
  11697. t.on && t.on(e, this[e], this)
  11698. }, this), t.handler = this), this.proxy = t
  11699. },
  11700. mousemove: function(t) {
  11701. var e = t.zrX,
  11702. i = t.zrY,
  11703. n = this._hovered,
  11704. o = n.target;
  11705. o && !o.__zr && (o = (n = this.findHover(n.x, n.y)).target);
  11706. var a = this._hovered = this.findHover(e, i),
  11707. r = a.target,
  11708. s = this.proxy;
  11709. s.setCursor && s.setCursor(r ? r.cursor : "default"), o && r !== o && this.dispatchToElement(n, "mouseout", t),
  11710. this.dispatchToElement(a, "mousemove", t), r && r !== o && this.dispatchToElement(a, "mouseover", t)
  11711. },
  11712. mouseout: function(t) {
  11713. this.dispatchToElement(this._hovered, "mouseout", t);
  11714. var e, i = t.toElement || t.relatedTarget;
  11715. do {
  11716. i = i && i.parentNode
  11717. } while (i && 9 != i.nodeType && !(e = i === this.painterRoot));
  11718. !e && this.trigger("globalout", {
  11719. event: t
  11720. })
  11721. },
  11722. resize: function(t) {
  11723. this._hovered = {}
  11724. },
  11725. dispatch: function(t, e) {
  11726. var i = this[t];
  11727. i && i.call(this, e)
  11728. },
  11729. dispose: function() {
  11730. this.proxy.dispose(), this.storage = this.proxy = this.painter = null
  11731. },
  11732. setCursorStyle: function(t) {
  11733. var e = this.proxy;
  11734. e.setCursor && e.setCursor(t)
  11735. },
  11736. dispatchToElement: function(t, e, i) {
  11737. var n = (t = t || {}).target;
  11738. if (!n || !n.silent) {
  11739. for (var o = "on" + e, a = dt(e, t, i); n && (n[o] && (a.cancelBubble = n[o].call(n, a)), n.trigger(e, a), n = n
  11740. .parent, !a.cancelBubble););
  11741. a.cancelBubble || (this.trigger(e, a), this.painter && this.painter.eachOtherLayer(function(t) {
  11742. "function" == typeof t[o] && t[o].call(t, a), t.trigger && t.trigger(e, a)
  11743. }))
  11744. }
  11745. },
  11746. findHover: function(t, e, i) {
  11747. for (var n = this.storage.getDisplayList(), o = {
  11748. x: t,
  11749. y: e
  11750. }, a = n.length - 1; a >= 0; a--) {
  11751. var r;
  11752. if (n[a] !== i && !n[a].ignore && (r = gt(n[a], t, e)) && (!o.topTarget && (o.topTarget = n[a]), r !== uw)) {
  11753. o.target = n[a];
  11754. break
  11755. }
  11756. }
  11757. return o
  11758. }
  11759. }, d(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  11760. cw.prototype[t] = function(e) {
  11761. var i = this.findHover(e.zrX, e.zrY),
  11762. n = i.target;
  11763. if ("mousedown" === t) this._downEl = n, this._downPoint = [e.zrX, e.zrY], this._upEl = n;
  11764. else if ("mouseup" === t) this._upEl = n;
  11765. else if ("click" === t) {
  11766. if (this._downEl !== this._upEl || !this._downPoint || ew(this._downPoint, [e.zrX, e.zrY]) > 4) return;
  11767. this._downPoint = null
  11768. }
  11769. this.dispatchToElement(i, t, e)
  11770. }
  11771. }), h(cw, aw), h(cw, it);
  11772. var dw = "undefined" == typeof Float32Array ? Array : Float32Array,
  11773. fw = (Object.freeze || Object)({
  11774. create: mt,
  11775. identity: vt,
  11776. copy: yt,
  11777. mul: xt,
  11778. translate: _t,
  11779. rotate: wt,
  11780. scale: bt,
  11781. invert: St,
  11782. clone: Mt
  11783. }),
  11784. pw = vt,
  11785. gw = 5e-5,
  11786. mw = function(t) {
  11787. (t = t || {}).position || (this.position = [0, 0]), null == t.rotation && (this.rotation = 0), t.scale || (this.scale = [
  11788. 1, 1
  11789. ]), this.origin = this.origin || null
  11790. },
  11791. vw = mw.prototype;
  11792. vw.transform = null, vw.needLocalTransform = function() {
  11793. return It(this.rotation) || It(this.position[0]) || It(this.position[1]) || It(this.scale[0] - 1) || It(this.scale[
  11794. 1] - 1)
  11795. };
  11796. var yw = [];
  11797. vw.updateTransform = function() {
  11798. var t = this.parent,
  11799. e = t && t.transform,
  11800. i = this.needLocalTransform(),
  11801. n = this.transform;
  11802. if (i || e) {
  11803. n = n || mt(), i ? this.getLocalTransform(n) : pw(n), e && (i ? xt(n, t.transform, n) : yt(n, t.transform)), this.transform =
  11804. n;
  11805. var o = this.globalScaleRatio;
  11806. if (null != o && 1 !== o) {
  11807. this.getGlobalScale(yw);
  11808. var a = yw[0] < 0 ? -1 : 1,
  11809. r = yw[1] < 0 ? -1 : 1,
  11810. s = ((yw[0] - a) * o + a) / yw[0] || 0,
  11811. l = ((yw[1] - r) * o + r) / yw[1] || 0;
  11812. n[0] *= s, n[1] *= s, n[2] *= l, n[3] *= l
  11813. }
  11814. this.invTransform = this.invTransform || mt(), St(this.invTransform, n)
  11815. } else n && pw(n)
  11816. }, vw.getLocalTransform = function(t) {
  11817. return mw.getLocalTransform(this, t)
  11818. }, vw.setTransform = function(t) {
  11819. var e = this.transform,
  11820. i = t.dpr || 1;
  11821. 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)
  11822. }, vw.restoreTransform = function(t) {
  11823. var e = t.dpr || 1;
  11824. t.setTransform(e, 0, 0, e, 0, 0)
  11825. };
  11826. var xw = [],
  11827. _w = mt();
  11828. vw.setLocalTransform = function(t) {
  11829. if (t) {
  11830. var e = t[0] * t[0] + t[1] * t[1],
  11831. i = t[2] * t[2] + t[3] * t[3],
  11832. n = this.position,
  11833. o = this.scale;
  11834. It(e - 1) && (e = Math.sqrt(e)), It(i - 1) && (i = Math.sqrt(i)), t[0] < 0 && (e = -e), t[3] < 0 && (i = -i), n[0] =
  11835. t[4], n[1] = t[5], o[0] = e, o[1] = i, this.rotation = Math.atan2(-t[1] / i, t[0] / e)
  11836. }
  11837. }, vw.decomposeTransform = function() {
  11838. if (this.transform) {
  11839. var t = this.parent,
  11840. e = this.transform;
  11841. t && t.transform && (xt(xw, t.invTransform, e), e = xw);
  11842. var i = this.origin;
  11843. i && (i[0] || i[1]) && (_w[4] = i[0], _w[5] = i[1], xt(xw, e, _w), xw[4] -= i[0], xw[5] -= i[1], e = xw), this.setLocalTransform(
  11844. e)
  11845. }
  11846. }, vw.getGlobalScale = function(t) {
  11847. var e = this.transform;
  11848. return t = t || [], e ? (t[0] = Math.sqrt(e[0] * e[0] + e[1] * e[1]), t[1] = Math.sqrt(e[2] * e[2] + e[3] * e[3]),
  11849. e[0] < 0 && (t[0] = -t[0]), e[3] < 0 && (t[1] = -t[1]), t) : (t[0] = 1, t[1] = 1, t)
  11850. }, vw.transformCoordToLocal = function(t, e) {
  11851. var i = [t, e],
  11852. n = this.invTransform;
  11853. return n && Q(i, i, n), i
  11854. }, vw.transformCoordToGlobal = function(t, e) {
  11855. var i = [t, e],
  11856. n = this.transform;
  11857. return n && Q(i, i, n), i
  11858. }, mw.getLocalTransform = function(t, e) {
  11859. pw(e = e || []);
  11860. var i = t.origin,
  11861. n = t.scale || [1, 1],
  11862. o = t.rotation || 0,
  11863. a = t.position || [0, 0];
  11864. return i && (e[4] -= i[0], e[5] -= i[1]), bt(e, e, n), o && wt(e, e, o), i && (e[4] += i[0], e[5] += i[1]), e[4] +=
  11865. a[0], e[5] += a[1], e
  11866. };
  11867. var ww = {
  11868. linear: function(t) {
  11869. return t
  11870. },
  11871. quadraticIn: function(t) {
  11872. return t * t
  11873. },
  11874. quadraticOut: function(t) {
  11875. return t * (2 - t)
  11876. },
  11877. quadraticInOut: function(t) {
  11878. return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1)
  11879. },
  11880. cubicIn: function(t) {
  11881. return t * t * t
  11882. },
  11883. cubicOut: function(t) {
  11884. return --t * t * t + 1
  11885. },
  11886. cubicInOut: function(t) {
  11887. return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2)
  11888. },
  11889. quarticIn: function(t) {
  11890. return t * t * t * t
  11891. },
  11892. quarticOut: function(t) {
  11893. return 1 - --t * t * t * t
  11894. },
  11895. quarticInOut: function(t) {
  11896. return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2)
  11897. },
  11898. quinticIn: function(t) {
  11899. return t * t * t * t * t
  11900. },
  11901. quinticOut: function(t) {
  11902. return --t * t * t * t * t + 1
  11903. },
  11904. quinticInOut: function(t) {
  11905. return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2)
  11906. },
  11907. sinusoidalIn: function(t) {
  11908. return 1 - Math.cos(t * Math.PI / 2)
  11909. },
  11910. sinusoidalOut: function(t) {
  11911. return Math.sin(t * Math.PI / 2)
  11912. },
  11913. sinusoidalInOut: function(t) {
  11914. return .5 * (1 - Math.cos(Math.PI * t))
  11915. },
  11916. exponentialIn: function(t) {
  11917. return 0 === t ? 0 : Math.pow(1024, t - 1)
  11918. },
  11919. exponentialOut: function(t) {
  11920. return 1 === t ? 1 : 1 - Math.pow(2, -10 * t)
  11921. },
  11922. exponentialInOut: function(t) {
  11923. return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (2 - Math.pow(2, -10 * (t - 1)))
  11924. },
  11925. circularIn: function(t) {
  11926. return 1 - Math.sqrt(1 - t * t)
  11927. },
  11928. circularOut: function(t) {
  11929. return Math.sqrt(1 - --t * t)
  11930. },
  11931. circularInOut: function(t) {
  11932. return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1)
  11933. },
  11934. elasticIn: function(t) {
  11935. var e, i = .1;
  11936. return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1, e = .1) : e = .4 * Math.asin(1 / i) / (2 * Math.PI), -i *
  11937. Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4))
  11938. },
  11939. elasticOut: function(t) {
  11940. var e, i = .1;
  11941. return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1, e = .1) : e = .4 * Math.asin(1 / i) / (2 * Math.PI), i *
  11942. Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / .4) + 1)
  11943. },
  11944. elasticInOut: function(t) {
  11945. var e, i = .1;
  11946. return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1, e = .1) : e = .4 * Math.asin(1 / i) / (2 * Math.PI), (t *=
  11947. 2) < 1 ? i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4) * -.5 : i * Math.pow(2, -10 *
  11948. (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4) * .5 + 1)
  11949. },
  11950. backIn: function(t) {
  11951. var e = 1.70158;
  11952. return t * t * ((e + 1) * t - e)
  11953. },
  11954. backOut: function(t) {
  11955. var e = 1.70158;
  11956. return --t * t * ((e + 1) * t + e) + 1
  11957. },
  11958. backInOut: function(t) {
  11959. var e = 2.5949095;
  11960. return (t *= 2) < 1 ? t * t * ((e + 1) * t - e) * .5 : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2)
  11961. },
  11962. bounceIn: function(t) {
  11963. return 1 - ww.bounceOut(1 - t)
  11964. },
  11965. bounceOut: function(t) {
  11966. 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 ?
  11967. 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
  11968. },
  11969. bounceInOut: function(t) {
  11970. return t < .5 ? .5 * ww.bounceIn(2 * t) : .5 * ww.bounceOut(2 * t - 1) + .5
  11971. }
  11972. };
  11973. Tt.prototype = {
  11974. constructor: Tt,
  11975. step: function(t, e) {
  11976. if (this._initialized || (this._startTime = t + this._delay, this._initialized = !0), this._paused) this._pausedTime +=
  11977. e;
  11978. else {
  11979. var i = (t - this._startTime - this._pausedTime) / this._life;
  11980. if (!(i < 0)) {
  11981. i = Math.min(i, 1);
  11982. var n = this.easing,
  11983. o = "string" == typeof n ? ww[n] : n,
  11984. a = "function" == typeof o ? o(i) : i;
  11985. return this.fire("frame", a), 1 == i ? this.loop ? (this.restart(t), "restart") : (this._needsRemove = !0,
  11986. "destroy") : null
  11987. }
  11988. }
  11989. },
  11990. restart: function(t) {
  11991. var e = (t - this._startTime - this._pausedTime) % this._life;
  11992. this._startTime = t - e + this.gap, this._pausedTime = 0, this._needsRemove = !1
  11993. },
  11994. fire: function(t, e) {
  11995. this[t = "on" + t] && this[t](this._target, e)
  11996. },
  11997. pause: function() {
  11998. this._paused = !0
  11999. },
  12000. resume: function() {
  12001. this._paused = !1
  12002. }
  12003. };
  12004. var bw = function() {
  12005. this.head = null, this.tail = null, this._len = 0
  12006. },
  12007. Sw = bw.prototype;
  12008. Sw.insert = function(t) {
  12009. var e = new Mw(t);
  12010. return this.insertEntry(e), e
  12011. }, Sw.insertEntry = function(t) {
  12012. this.head ? (this.tail.next = t, t.prev = this.tail, t.next = null, this.tail = t) : this.head = this.tail = t,
  12013. this._len++
  12014. }, Sw.remove = function(t) {
  12015. var e = t.prev,
  12016. i = t.next;
  12017. e ? e.next = i : this.head = i, i ? i.prev = e : this.tail = e, t.next = t.prev = null, this._len--
  12018. }, Sw.len = function() {
  12019. return this._len
  12020. }, Sw.clear = function() {
  12021. this.head = this.tail = null, this._len = 0
  12022. };
  12023. var Mw = function(t) {
  12024. this.value = t, this.next, this.prev
  12025. },
  12026. Iw = function(t) {
  12027. this._list = new bw, this._map = {}, this._maxSize = t || 10, this._lastRemovedEntry = null
  12028. },
  12029. Tw = Iw.prototype;
  12030. Tw.put = function(t, e) {
  12031. var i = this._list,
  12032. n = this._map,
  12033. o = null;
  12034. if (null == n[t]) {
  12035. var a = i.len(),
  12036. r = this._lastRemovedEntry;
  12037. if (a >= this._maxSize && a > 0) {
  12038. var s = i.head;
  12039. i.remove(s), delete n[s.key], o = s.value, this._lastRemovedEntry = s
  12040. }
  12041. r ? r.value = e : r = new Mw(e), r.key = t, i.insertEntry(r), n[t] = r
  12042. }
  12043. return o
  12044. }, Tw.get = function(t) {
  12045. var e = this._map[t],
  12046. i = this._list;
  12047. if (null != e) return e !== i.tail && (i.remove(e), i.insertEntry(e)), e.value
  12048. }, Tw.clear = function() {
  12049. this._list.clear(), this._map = {}
  12050. };
  12051. var Aw = {
  12052. transparent: [0, 0, 0, 0],
  12053. aliceblue: [240, 248, 255, 1],
  12054. antiquewhite: [250, 235, 215, 1],
  12055. aqua: [0, 255, 255, 1],
  12056. aquamarine: [127, 255, 212, 1],
  12057. azure: [240, 255, 255, 1],
  12058. beige: [245, 245, 220, 1],
  12059. bisque: [255, 228, 196, 1],
  12060. black: [0, 0, 0, 1],
  12061. blanchedalmond: [255, 235, 205, 1],
  12062. blue: [0, 0, 255, 1],
  12063. blueviolet: [138, 43, 226, 1],
  12064. brown: [165, 42, 42, 1],
  12065. burlywood: [222, 184, 135, 1],
  12066. cadetblue: [95, 158, 160, 1],
  12067. chartreuse: [127, 255, 0, 1],
  12068. chocolate: [210, 105, 30, 1],
  12069. coral: [255, 127, 80, 1],
  12070. cornflowerblue: [100, 149, 237, 1],
  12071. cornsilk: [255, 248, 220, 1],
  12072. crimson: [220, 20, 60, 1],
  12073. cyan: [0, 255, 255, 1],
  12074. darkblue: [0, 0, 139, 1],
  12075. darkcyan: [0, 139, 139, 1],
  12076. darkgoldenrod: [184, 134, 11, 1],
  12077. darkgray: [169, 169, 169, 1],
  12078. darkgreen: [0, 100, 0, 1],
  12079. darkgrey: [169, 169, 169, 1],
  12080. darkkhaki: [189, 183, 107, 1],
  12081. darkmagenta: [139, 0, 139, 1],
  12082. darkolivegreen: [85, 107, 47, 1],
  12083. darkorange: [255, 140, 0, 1],
  12084. darkorchid: [153, 50, 204, 1],
  12085. darkred: [139, 0, 0, 1],
  12086. darksalmon: [233, 150, 122, 1],
  12087. darkseagreen: [143, 188, 143, 1],
  12088. darkslateblue: [72, 61, 139, 1],
  12089. darkslategray: [47, 79, 79, 1],
  12090. darkslategrey: [47, 79, 79, 1],
  12091. darkturquoise: [0, 206, 209, 1],
  12092. darkviolet: [148, 0, 211, 1],
  12093. deeppink: [255, 20, 147, 1],
  12094. deepskyblue: [0, 191, 255, 1],
  12095. dimgray: [105, 105, 105, 1],
  12096. dimgrey: [105, 105, 105, 1],
  12097. dodgerblue: [30, 144, 255, 1],
  12098. firebrick: [178, 34, 34, 1],
  12099. floralwhite: [255, 250, 240, 1],
  12100. forestgreen: [34, 139, 34, 1],
  12101. fuchsia: [255, 0, 255, 1],
  12102. gainsboro: [220, 220, 220, 1],
  12103. ghostwhite: [248, 248, 255, 1],
  12104. gold: [255, 215, 0, 1],
  12105. goldenrod: [218, 165, 32, 1],
  12106. gray: [128, 128, 128, 1],
  12107. green: [0, 128, 0, 1],
  12108. greenyellow: [173, 255, 47, 1],
  12109. grey: [128, 128, 128, 1],
  12110. honeydew: [240, 255, 240, 1],
  12111. hotpink: [255, 105, 180, 1],
  12112. indianred: [205, 92, 92, 1],
  12113. indigo: [75, 0, 130, 1],
  12114. ivory: [255, 255, 240, 1],
  12115. khaki: [240, 230, 140, 1],
  12116. lavender: [230, 230, 250, 1],
  12117. lavenderblush: [255, 240, 245, 1],
  12118. lawngreen: [124, 252, 0, 1],
  12119. lemonchiffon: [255, 250, 205, 1],
  12120. lightblue: [173, 216, 230, 1],
  12121. lightcoral: [240, 128, 128, 1],
  12122. lightcyan: [224, 255, 255, 1],
  12123. lightgoldenrodyellow: [250, 250, 210, 1],
  12124. lightgray: [211, 211, 211, 1],
  12125. lightgreen: [144, 238, 144, 1],
  12126. lightgrey: [211, 211, 211, 1],
  12127. lightpink: [255, 182, 193, 1],
  12128. lightsalmon: [255, 160, 122, 1],
  12129. lightseagreen: [32, 178, 170, 1],
  12130. lightskyblue: [135, 206, 250, 1],
  12131. lightslategray: [119, 136, 153, 1],
  12132. lightslategrey: [119, 136, 153, 1],
  12133. lightsteelblue: [176, 196, 222, 1],
  12134. lightyellow: [255, 255, 224, 1],
  12135. lime: [0, 255, 0, 1],
  12136. limegreen: [50, 205, 50, 1],
  12137. linen: [250, 240, 230, 1],
  12138. magenta: [255, 0, 255, 1],
  12139. maroon: [128, 0, 0, 1],
  12140. mediumaquamarine: [102, 205, 170, 1],
  12141. mediumblue: [0, 0, 205, 1],
  12142. mediumorchid: [186, 85, 211, 1],
  12143. mediumpurple: [147, 112, 219, 1],
  12144. mediumseagreen: [60, 179, 113, 1],
  12145. mediumslateblue: [123, 104, 238, 1],
  12146. mediumspringgreen: [0, 250, 154, 1],
  12147. mediumturquoise: [72, 209, 204, 1],
  12148. mediumvioletred: [199, 21, 133, 1],
  12149. midnightblue: [25, 25, 112, 1],
  12150. mintcream: [245, 255, 250, 1],
  12151. mistyrose: [255, 228, 225, 1],
  12152. moccasin: [255, 228, 181, 1],
  12153. navajowhite: [255, 222, 173, 1],
  12154. navy: [0, 0, 128, 1],
  12155. oldlace: [253, 245, 230, 1],
  12156. olive: [128, 128, 0, 1],
  12157. olivedrab: [107, 142, 35, 1],
  12158. orange: [255, 165, 0, 1],
  12159. orangered: [255, 69, 0, 1],
  12160. orchid: [218, 112, 214, 1],
  12161. palegoldenrod: [238, 232, 170, 1],
  12162. palegreen: [152, 251, 152, 1],
  12163. paleturquoise: [175, 238, 238, 1],
  12164. palevioletred: [219, 112, 147, 1],
  12165. papayawhip: [255, 239, 213, 1],
  12166. peachpuff: [255, 218, 185, 1],
  12167. peru: [205, 133, 63, 1],
  12168. pink: [255, 192, 203, 1],
  12169. plum: [221, 160, 221, 1],
  12170. powderblue: [176, 224, 230, 1],
  12171. purple: [128, 0, 128, 1],
  12172. red: [255, 0, 0, 1],
  12173. rosybrown: [188, 143, 143, 1],
  12174. royalblue: [65, 105, 225, 1],
  12175. saddlebrown: [139, 69, 19, 1],
  12176. salmon: [250, 128, 114, 1],
  12177. sandybrown: [244, 164, 96, 1],
  12178. seagreen: [46, 139, 87, 1],
  12179. seashell: [255, 245, 238, 1],
  12180. sienna: [160, 82, 45, 1],
  12181. silver: [192, 192, 192, 1],
  12182. skyblue: [135, 206, 235, 1],
  12183. slateblue: [106, 90, 205, 1],
  12184. slategray: [112, 128, 144, 1],
  12185. slategrey: [112, 128, 144, 1],
  12186. snow: [255, 250, 250, 1],
  12187. springgreen: [0, 255, 127, 1],
  12188. steelblue: [70, 130, 180, 1],
  12189. tan: [210, 180, 140, 1],
  12190. teal: [0, 128, 128, 1],
  12191. thistle: [216, 191, 216, 1],
  12192. tomato: [255, 99, 71, 1],
  12193. turquoise: [64, 224, 208, 1],
  12194. violet: [238, 130, 238, 1],
  12195. wheat: [245, 222, 179, 1],
  12196. white: [255, 255, 255, 1],
  12197. whitesmoke: [245, 245, 245, 1],
  12198. yellow: [255, 255, 0, 1],
  12199. yellowgreen: [154, 205, 50, 1]
  12200. },
  12201. Dw = new Iw(20),
  12202. Cw = null,
  12203. Lw = Wt,
  12204. kw = Ht,
  12205. Pw = (Object.freeze || Object)({
  12206. parse: zt,
  12207. lift: Gt,
  12208. toHex: Ft,
  12209. fastLerp: Wt,
  12210. fastMapToColor: Lw,
  12211. lerp: Ht,
  12212. mapToColor: kw,
  12213. modifyHSL: Zt,
  12214. modifyAlpha: Ut,
  12215. stringify: Xt
  12216. }),
  12217. Nw = Array.prototype.slice,
  12218. Ow = function(t, e, i, n) {
  12219. this._tracks = {}, this._target = t, this._loop = e || !1, this._getter = i || jt, this._setter = n || Yt, this._clipCount =
  12220. 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = []
  12221. };
  12222. Ow.prototype = {
  12223. when: function(t, e) {
  12224. var i = this._tracks;
  12225. for (var n in e)
  12226. if (e.hasOwnProperty(n)) {
  12227. if (!i[n]) {
  12228. i[n] = [];
  12229. var o = this._getter(this._target, n);
  12230. if (null == o) continue;
  12231. 0 !== t && i[n].push({
  12232. time: 0,
  12233. value: ie(o)
  12234. })
  12235. }
  12236. i[n].push({
  12237. time: t,
  12238. value: e[n]
  12239. })
  12240. } return this
  12241. },
  12242. during: function(t) {
  12243. return this._onframeList.push(t), this
  12244. },
  12245. pause: function() {
  12246. for (var t = 0; t < this._clipList.length; t++) this._clipList[t].pause();
  12247. this._paused = !0
  12248. },
  12249. resume: function() {
  12250. for (var t = 0; t < this._clipList.length; t++) this._clipList[t].resume();
  12251. this._paused = !1
  12252. },
  12253. isPaused: function() {
  12254. return !!this._paused
  12255. },
  12256. _doneCallback: function() {
  12257. this._tracks = {}, this._clipList.length = 0;
  12258. for (var t = this._doneList, e = t.length, i = 0; i < e; i++) t[i].call(this)
  12259. },
  12260. start: function(t, e) {
  12261. var i, n = this,
  12262. o = 0;
  12263. for (var a in this._tracks)
  12264. if (this._tracks.hasOwnProperty(a)) {
  12265. var r = ae(this, t, function() {
  12266. --o || n._doneCallback()
  12267. }, this._tracks[a], a, e);
  12268. r && (this._clipList.push(r), o++, this.animation && this.animation.addClip(r), i = r)
  12269. } if (i) {
  12270. var s = i.onframe;
  12271. i.onframe = function(t, e) {
  12272. s(t, e);
  12273. for (var i = 0; i < n._onframeList.length; i++) n._onframeList[i](t, e)
  12274. }
  12275. }
  12276. return o || this._doneCallback(), this
  12277. },
  12278. stop: function(t) {
  12279. for (var e = this._clipList, i = this.animation, n = 0; n < e.length; n++) {
  12280. var o = e[n];
  12281. t && o.onframe(this._target, 1), i && i.removeClip(o)
  12282. }
  12283. e.length = 0
  12284. },
  12285. delay: function(t) {
  12286. return this._delay = t, this
  12287. },
  12288. done: function(t) {
  12289. return t && this._doneList.push(t), this
  12290. },
  12291. getClips: function() {
  12292. return this._clipList
  12293. }
  12294. };
  12295. var Ew = 1;
  12296. "undefined" != typeof window && (Ew = Math.max(window.devicePixelRatio || 1, 1));
  12297. var Rw = Ew,
  12298. zw = function() {},
  12299. Bw = zw,
  12300. Vw = function() {
  12301. this.animators = []
  12302. };
  12303. Vw.prototype = {
  12304. constructor: Vw,
  12305. animate: function(t, e) {
  12306. var i, n = !1,
  12307. o = this,
  12308. a = this.__zr;
  12309. if (t) {
  12310. var r = t.split("."),
  12311. s = o;
  12312. n = "shape" === r[0];
  12313. for (var u = 0, h = r.length; u < h; u++) s && (s = s[r[u]]);
  12314. s && (i = s)
  12315. } else i = o;
  12316. if (i) {
  12317. var c = o.animators,
  12318. d = new Ow(i, e);
  12319. return d.during(function(t) {
  12320. o.dirty(n)
  12321. }).done(function() {
  12322. c.splice(l(c, d), 1)
  12323. }), c.push(d), a && a.animation.addAnimator(d), d
  12324. }
  12325. Bw('Property "' + t + '" is not existed in element ' + o.id)
  12326. },
  12327. stopAnimation: function(t) {
  12328. for (var e = this.animators, i = e.length, n = 0; n < i; n++) e[n].stop(t);
  12329. return e.length = 0, this
  12330. },
  12331. animateTo: function(t, e, i, n, o, a) {
  12332. re(this, t, e, i, n, o, a)
  12333. },
  12334. animateFrom: function(t, e, i, n, o, a) {
  12335. re(this, t, e, i, n, o, a, !0)
  12336. }
  12337. };
  12338. var Gw = function(t) {
  12339. mw.call(this, t), aw.call(this, t), Vw.call(this, t), this.id = t.id || E_()
  12340. };
  12341. Gw.prototype = {
  12342. type: "element",
  12343. name: "",
  12344. __zr: null,
  12345. ignore: !1,
  12346. clipPath: null,
  12347. isGroup: !1,
  12348. drift: function(t, e) {
  12349. switch (this.draggable) {
  12350. case "horizontal":
  12351. e = 0;
  12352. break;
  12353. case "vertical":
  12354. t = 0
  12355. }
  12356. var i = this.transform;
  12357. i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += t, i[5] += e, this.decomposeTransform(), this.dirty(!1)
  12358. },
  12359. beforeUpdate: function() {},
  12360. afterUpdate: function() {},
  12361. update: function() {
  12362. this.updateTransform()
  12363. },
  12364. traverse: function(t, e) {},
  12365. attrKV: function(t, e) {
  12366. if ("position" === t || "scale" === t || "origin" === t) {
  12367. if (e) {
  12368. var i = this[t];
  12369. i || (i = this[t] = []), i[0] = e[0], i[1] = e[1]
  12370. }
  12371. } else this[t] = e
  12372. },
  12373. hide: function() {
  12374. this.ignore = !0, this.__zr && this.__zr.refresh()
  12375. },
  12376. show: function() {
  12377. this.ignore = !1, this.__zr && this.__zr.refresh()
  12378. },
  12379. attr: function(t, e) {
  12380. if ("string" == typeof t) this.attrKV(t, e);
  12381. else if (w(t))
  12382. for (var i in t) t.hasOwnProperty(i) && this.attrKV(i, t[i]);
  12383. return this.dirty(!1), this
  12384. },
  12385. setClipPath: function(t) {
  12386. var e = this.__zr;
  12387. e && t.addSelfToZr(e), this.clipPath && this.clipPath !== t && this.removeClipPath(), this.clipPath = t, t.__zr =
  12388. e, t.__clipTarget = this, this.dirty(!1)
  12389. },
  12390. removeClipPath: function() {
  12391. var t = this.clipPath;
  12392. t && (t.__zr && t.removeSelfFromZr(t.__zr), t.__zr = null, t.__clipTarget = null, this.clipPath = null, this.dirty(
  12393. !1))
  12394. },
  12395. addSelfToZr: function(t) {
  12396. this.__zr = t;
  12397. var e = this.animators;
  12398. if (e)
  12399. for (var i = 0; i < e.length; i++) t.animation.addAnimator(e[i]);
  12400. this.clipPath && this.clipPath.addSelfToZr(t)
  12401. },
  12402. removeSelfFromZr: function(t) {
  12403. this.__zr = null;
  12404. var e = this.animators;
  12405. if (e)
  12406. for (var i = 0; i < e.length; i++) t.animation.removeAnimator(e[i]);
  12407. this.clipPath && this.clipPath.removeSelfFromZr(t)
  12408. }
  12409. }, h(Gw, Vw), h(Gw, mw), h(Gw, aw);
  12410. var Fw = Q,
  12411. Ww = Math.min,
  12412. Hw = Math.max;
  12413. ue.prototype = {
  12414. constructor: ue,
  12415. union: function(t) {
  12416. var e = Ww(t.x, this.x),
  12417. i = Ww(t.y, this.y);
  12418. this.width = Hw(t.x + t.width, this.x + this.width) - e, this.height = Hw(t.y + t.height, this.y + this.height) -
  12419. i, this.x = e, this.y = i
  12420. },
  12421. applyTransform: function() {
  12422. var t = [],
  12423. e = [],
  12424. i = [],
  12425. n = [];
  12426. return function(o) {
  12427. if (o) {
  12428. t[0] = i[0] = this.x, t[1] = n[1] = this.y, e[0] = n[0] = this.x + this.width, e[1] = i[1] = this.y + this.height,
  12429. Fw(t, t, o), Fw(e, e, o), Fw(i, i, o), Fw(n, n, o), this.x = Ww(t[0], e[0], i[0], n[0]), this.y = Ww(t[1], e[
  12430. 1], i[1], n[1]);
  12431. var a = Hw(t[0], e[0], i[0], n[0]),
  12432. r = Hw(t[1], e[1], i[1], n[1]);
  12433. this.width = a - this.x, this.height = r - this.y
  12434. }
  12435. }
  12436. }(),
  12437. calculateTransform: function(t) {
  12438. var e = this,
  12439. i = t.width / e.width,
  12440. n = t.height / e.height,
  12441. o = mt();
  12442. return _t(o, o, [-e.x, -e.y]), bt(o, o, [i, n]), _t(o, o, [t.x, t.y]), o
  12443. },
  12444. intersect: function(t) {
  12445. if (!t) return !1;
  12446. t instanceof ue || (t = ue.create(t));
  12447. var e = this,
  12448. i = e.x,
  12449. n = e.x + e.width,
  12450. o = e.y,
  12451. a = e.y + e.height,
  12452. r = t.x,
  12453. s = t.x + t.width,
  12454. l = t.y,
  12455. u = t.y + t.height;
  12456. return !(n < r || s < i || a < l || u < o)
  12457. },
  12458. contain: function(t, e) {
  12459. var i = this;
  12460. return t >= i.x && t <= i.x + i.width && e >= i.y && e <= i.y + i.height
  12461. },
  12462. clone: function() {
  12463. return new ue(this.x, this.y, this.width, this.height)
  12464. },
  12465. copy: function(t) {
  12466. this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height
  12467. },
  12468. plain: function() {
  12469. return {
  12470. x: this.x,
  12471. y: this.y,
  12472. width: this.width,
  12473. height: this.height
  12474. }
  12475. }
  12476. }, ue.create = function(t) {
  12477. return new ue(t.x, t.y, t.width, t.height)
  12478. };
  12479. var Zw = function(t) {
  12480. t = t || {}, Gw.call(this, t);
  12481. for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]);
  12482. this._children = [], this.__storage = null, this.__dirty = !0
  12483. };
  12484. Zw.prototype = {
  12485. constructor: Zw,
  12486. isGroup: !0,
  12487. type: "group",
  12488. silent: !1,
  12489. children: function() {
  12490. return this._children.slice()
  12491. },
  12492. childAt: function(t) {
  12493. return this._children[t]
  12494. },
  12495. childOfName: function(t) {
  12496. for (var e = this._children, i = 0; i < e.length; i++)
  12497. if (e[i].name === t) return e[i]
  12498. },
  12499. childCount: function() {
  12500. return this._children.length
  12501. },
  12502. add: function(t) {
  12503. return t && t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), this
  12504. },
  12505. addBefore: function(t, e) {
  12506. if (t && t !== this && t.parent !== this && e && e.parent === this) {
  12507. var i = this._children,
  12508. n = i.indexOf(e);
  12509. n >= 0 && (i.splice(n, 0, t), this._doAdd(t))
  12510. }
  12511. return this
  12512. },
  12513. _doAdd: function(t) {
  12514. t.parent && t.parent.remove(t), t.parent = this;
  12515. var e = this.__storage,
  12516. i = this.__zr;
  12517. e && e !== t.__storage && (e.addToStorage(t), t instanceof Zw && t.addChildrenToStorage(e)), i && i.refresh()
  12518. },
  12519. remove: function(t) {
  12520. var e = this.__zr,
  12521. i = this.__storage,
  12522. n = this._children,
  12523. o = l(n, t);
  12524. return o < 0 ? this : (n.splice(o, 1), t.parent = null, i && (i.delFromStorage(t), t instanceof Zw && t.delChildrenFromStorage(
  12525. i)), e && e.refresh(), this)
  12526. },
  12527. removeAll: function() {
  12528. var t, e, i = this._children,
  12529. n = this.__storage;
  12530. for (e = 0; e < i.length; e++) t = i[e], n && (n.delFromStorage(t), t instanceof Zw && t.delChildrenFromStorage(n)),
  12531. t.parent = null;
  12532. return i.length = 0, this
  12533. },
  12534. eachChild: function(t, e) {
  12535. for (var i = this._children, n = 0; n < i.length; n++) {
  12536. var o = i[n];
  12537. t.call(e, o, n)
  12538. }
  12539. return this
  12540. },
  12541. traverse: function(t, e) {
  12542. for (var i = 0; i < this._children.length; i++) {
  12543. var n = this._children[i];
  12544. t.call(e, n), "group" === n.type && n.traverse(t, e)
  12545. }
  12546. return this
  12547. },
  12548. addChildrenToStorage: function(t) {
  12549. for (var e = 0; e < this._children.length; e++) {
  12550. var i = this._children[e];
  12551. t.addToStorage(i), i instanceof Zw && i.addChildrenToStorage(t)
  12552. }
  12553. },
  12554. delChildrenFromStorage: function(t) {
  12555. for (var e = 0; e < this._children.length; e++) {
  12556. var i = this._children[e];
  12557. t.delFromStorage(i), i instanceof Zw && i.delChildrenFromStorage(t)
  12558. }
  12559. },
  12560. dirty: function() {
  12561. return this.__dirty = !0, this.__zr && this.__zr.refresh(), this
  12562. },
  12563. getBoundingRect: function(t) {
  12564. for (var e = null, i = new ue(0, 0, 0, 0), n = t || this._children, o = [], a = 0; a < n.length; a++) {
  12565. var r = n[a];
  12566. if (!r.ignore && !r.invisible) {
  12567. var s = r.getBoundingRect(),
  12568. l = r.getLocalTransform(o);
  12569. l ? (i.copy(s), i.applyTransform(l), (e = e || i.clone()).union(i)) : (e = e || s.clone()).union(s)
  12570. }
  12571. }
  12572. return e || i
  12573. }
  12574. }, u(Zw, Gw);
  12575. var Uw = 32,
  12576. Xw = 7,
  12577. jw = function() {
  12578. this._roots = [], this._displayList = [], this._displayListLen = 0
  12579. };
  12580. jw.prototype = {
  12581. constructor: jw,
  12582. traverse: function(t, e) {
  12583. for (var i = 0; i < this._roots.length; i++) this._roots[i].traverse(t, e)
  12584. },
  12585. getDisplayList: function(t, e) {
  12586. return e = e || !1, t && this.updateDisplayList(e), this._displayList
  12587. },
  12588. updateDisplayList: function(t) {
  12589. this._displayListLen = 0;
  12590. for (var e = this._roots, i = this._displayList, n = 0, o = e.length; n < o; n++) this._updateAndAddDisplayable(e[
  12591. n], null, t);
  12592. i.length = this._displayListLen, z_.canvasSupported && ve(i, ye)
  12593. },
  12594. _updateAndAddDisplayable: function(t, e, i) {
  12595. if (!t.ignore || i) {
  12596. t.beforeUpdate(), t.__dirty && t.update(), t.afterUpdate();
  12597. var n = t.clipPath;
  12598. if (n) {
  12599. e = e ? e.slice() : [];
  12600. for (var o = n, a = t; o;) o.parent = a, o.updateTransform(), e.push(o), a = o, o = o.clipPath
  12601. }
  12602. if (t.isGroup) {
  12603. for (var r = t._children, s = 0; s < r.length; s++) {
  12604. var l = r[s];
  12605. t.__dirty && (l.__dirty = !0), this._updateAndAddDisplayable(l, e, i)
  12606. }
  12607. t.__dirty = !1
  12608. } else t.__clipPaths = e, this._displayList[this._displayListLen++] = t
  12609. }
  12610. },
  12611. addRoot: function(t) {
  12612. t.__storage !== this && (t instanceof Zw && t.addChildrenToStorage(this), this.addToStorage(t), this._roots.push(
  12613. t))
  12614. },
  12615. delRoot: function(t) {
  12616. if (null == t) {
  12617. for (i = 0; i < this._roots.length; i++) {
  12618. var e = this._roots[i];
  12619. e instanceof Zw && e.delChildrenFromStorage(this)
  12620. }
  12621. return this._roots = [], this._displayList = [], void(this._displayListLen = 0)
  12622. }
  12623. if (t instanceof Array)
  12624. for (var i = 0, n = t.length; i < n; i++) this.delRoot(t[i]);
  12625. else {
  12626. var o = l(this._roots, t);
  12627. o >= 0 && (this.delFromStorage(t), this._roots.splice(o, 1), t instanceof Zw && t.delChildrenFromStorage(this))
  12628. }
  12629. },
  12630. addToStorage: function(t) {
  12631. return t && (t.__storage = this, t.dirty(!1)), this
  12632. },
  12633. delFromStorage: function(t) {
  12634. return t && (t.__storage = null), this
  12635. },
  12636. dispose: function() {
  12637. this._renderList = this._roots = null
  12638. },
  12639. displayableSortFunc: ye
  12640. };
  12641. var Yw = {
  12642. shadowBlur: 1,
  12643. shadowOffsetX: 1,
  12644. shadowOffsetY: 1,
  12645. textShadowBlur: 1,
  12646. textShadowOffsetX: 1,
  12647. textShadowOffsetY: 1,
  12648. textBoxShadowBlur: 1,
  12649. textBoxShadowOffsetX: 1,
  12650. textBoxShadowOffsetY: 1
  12651. },
  12652. qw = function(t, e, i) {
  12653. return Yw.hasOwnProperty(e) ? i *= t.dpr : i
  12654. },
  12655. Kw = [
  12656. ["shadowBlur", 0],
  12657. ["shadowOffsetX", 0],
  12658. ["shadowOffsetY", 0],
  12659. ["shadowColor", "#000"],
  12660. ["lineCap", "butt"],
  12661. ["lineJoin", "miter"],
  12662. ["miterLimit", 10]
  12663. ],
  12664. $w = function(t) {
  12665. this.extendFrom(t, !1)
  12666. };
  12667. $w.prototype = {
  12668. constructor: $w,
  12669. fill: "#000",
  12670. stroke: null,
  12671. opacity: 1,
  12672. fillOpacity: null,
  12673. strokeOpacity: null,
  12674. lineDash: null,
  12675. lineDashOffset: 0,
  12676. shadowBlur: 0,
  12677. shadowOffsetX: 0,
  12678. shadowOffsetY: 0,
  12679. lineWidth: 1,
  12680. strokeNoScale: !1,
  12681. text: null,
  12682. font: null,
  12683. textFont: null,
  12684. fontStyle: null,
  12685. fontWeight: null,
  12686. fontSize: null,
  12687. fontFamily: null,
  12688. textTag: null,
  12689. textFill: "#000",
  12690. textStroke: null,
  12691. textWidth: null,
  12692. textHeight: null,
  12693. textStrokeWidth: 0,
  12694. textLineHeight: null,
  12695. textPosition: "inside",
  12696. textRect: null,
  12697. textOffset: null,
  12698. textAlign: null,
  12699. textVerticalAlign: null,
  12700. textDistance: 5,
  12701. textShadowColor: "transparent",
  12702. textShadowBlur: 0,
  12703. textShadowOffsetX: 0,
  12704. textShadowOffsetY: 0,
  12705. textBoxShadowColor: "transparent",
  12706. textBoxShadowBlur: 0,
  12707. textBoxShadowOffsetX: 0,
  12708. textBoxShadowOffsetY: 0,
  12709. transformText: !1,
  12710. textRotation: 0,
  12711. textOrigin: null,
  12712. textBackgroundColor: null,
  12713. textBorderColor: null,
  12714. textBorderWidth: 0,
  12715. textBorderRadius: 0,
  12716. textPadding: null,
  12717. rich: null,
  12718. truncate: null,
  12719. blend: null,
  12720. bind: function(t, e, i) {
  12721. for (var n = this, o = i && i.style, a = !o, r = 0; r < Kw.length; r++) {
  12722. var s = Kw[r],
  12723. l = s[0];
  12724. (a || n[l] !== o[l]) && (t[l] = qw(t, l, n[l] || s[1]))
  12725. }
  12726. if ((a || n.fill !== o.fill) && (t.fillStyle = n.fill), (a || n.stroke !== o.stroke) && (t.strokeStyle = n.stroke),
  12727. (a || n.opacity !== o.opacity) && (t.globalAlpha = null == n.opacity ? 1 : n.opacity), (a || n.blend !== o.blend) &&
  12728. (t.globalCompositeOperation = n.blend || "source-over"), this.hasStroke()) {
  12729. var u = n.lineWidth;
  12730. t.lineWidth = u / (this.strokeNoScale && e && e.getLineScale ? e.getLineScale() : 1)
  12731. }
  12732. },
  12733. hasFill: function() {
  12734. var t = this.fill;
  12735. return null != t && "none" !== t
  12736. },
  12737. hasStroke: function() {
  12738. var t = this.stroke;
  12739. return null != t && "none" !== t && this.lineWidth > 0
  12740. },
  12741. extendFrom: function(t, e) {
  12742. if (t)
  12743. for (var i in t) !t.hasOwnProperty(i) || !0 !== e && (!1 === e ? this.hasOwnProperty(i) : null == t[i]) || (this[
  12744. i] = t[i])
  12745. },
  12746. set: function(t, e) {
  12747. "string" == typeof t ? this[t] = e : this.extendFrom(t, !0)
  12748. },
  12749. clone: function() {
  12750. var t = new this.constructor;
  12751. return t.extendFrom(this, !0), t
  12752. },
  12753. getGradient: function(t, e, i) {
  12754. for (var n = ("radial" === e.type ? _e : xe)(t, e, i), o = e.colorStops, a = 0; a < o.length; a++) n.addColorStop(
  12755. o[a].offset, o[a].color);
  12756. return n
  12757. }
  12758. };
  12759. for (var Jw = $w.prototype, Qw = 0; Qw < Kw.length; Qw++) {
  12760. var tb = Kw[Qw];
  12761. tb[0] in Jw || (Jw[tb[0]] = tb[1])
  12762. }
  12763. $w.getGradient = Jw.getGradient;
  12764. var eb = function(t, e) {
  12765. this.image = t, this.repeat = e, this.type = "pattern"
  12766. };
  12767. eb.prototype.getCanvasPattern = function(t) {
  12768. return t.createPattern(this.image, this.repeat || "repeat")
  12769. };
  12770. var ib = function(t, e, i) {
  12771. var n;
  12772. i = i || Rw, "string" == typeof t ? n = be(t, e, i) : w(t) && (t = (n = t).id), this.id = t, this.dom = n;
  12773. var o = n.style;
  12774. o && (n.onselectstart = we, o["-webkit-user-select"] = "none", o["user-select"] = "none", o["-webkit-touch-callout"] =
  12775. "none", o["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", o.padding = 0, o.margin = 0, o["border-width"] = 0),
  12776. this.domBack = null, this.ctxBack = null, this.painter = e, this.config = null, this.clearColor = 0, this.motionBlur = !
  12777. 1, this.lastFrameAlpha = .7, this.dpr = i
  12778. };
  12779. ib.prototype = {
  12780. constructor: ib,
  12781. __dirty: !0,
  12782. __used: !1,
  12783. __drawIndex: 0,
  12784. __startIndex: 0,
  12785. __endIndex: 0,
  12786. incremental: !1,
  12787. getElementCount: function() {
  12788. return this.__endIndex - this.__startIndex
  12789. },
  12790. initContext: function() {
  12791. this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr
  12792. },
  12793. createBackBuffer: function() {
  12794. var t = this.dpr;
  12795. this.domBack = be("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), 1 != t &&
  12796. this.ctxBack.scale(t, t)
  12797. },
  12798. resize: function(t, e) {
  12799. var i = this.dpr,
  12800. n = this.dom,
  12801. o = n.style,
  12802. a = this.domBack;
  12803. o && (o.width = t + "px", o.height = e + "px"), n.width = t * i, n.height = e * i, a && (a.width = t * i, a.height =
  12804. e * i, 1 != i && this.ctxBack.scale(i, i))
  12805. },
  12806. clear: function(t, e) {
  12807. var i = this.dom,
  12808. n = this.ctx,
  12809. o = i.width,
  12810. a = i.height,
  12811. e = e || this.clearColor,
  12812. r = this.motionBlur && !t,
  12813. s = this.lastFrameAlpha,
  12814. l = this.dpr;
  12815. if (r && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(
  12816. i, 0, 0, o / l, a / l)), n.clearRect(0, 0, o, a), e && "transparent" !== e) {
  12817. var u;
  12818. e.colorStops ? (u = e.__canvasGradient || $w.getGradient(n, e, {
  12819. x: 0,
  12820. y: 0,
  12821. width: o,
  12822. height: a
  12823. }), e.__canvasGradient = u) : e.image && (u = eb.prototype.getCanvasPattern.call(e, n)), n.save(), n.fillStyle =
  12824. u || e, n.fillRect(0, 0, o, a), n.restore()
  12825. }
  12826. if (r) {
  12827. var h = this.domBack;
  12828. n.save(), n.globalAlpha = s, n.drawImage(h, 0, 0, o, a), n.restore()
  12829. }
  12830. }
  12831. };
  12832. var nb = "undefined" != typeof window && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) ||
  12833. window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame ||
  12834. window.webkitRequestAnimationFrame) || function(t) {
  12835. setTimeout(t, 16)
  12836. },
  12837. ob = new Iw(50),
  12838. ab = {},
  12839. rb = 0,
  12840. sb = 5e3,
  12841. lb = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,
  12842. ub = "12px sans-serif",
  12843. hb = {};
  12844. hb.measureText = function(t, e) {
  12845. var i = s();
  12846. return i.font = e || ub, i.measureText(t)
  12847. };
  12848. var cb = {
  12849. left: 1,
  12850. right: 1,
  12851. center: 1
  12852. },
  12853. db = {
  12854. top: 1,
  12855. bottom: 1,
  12856. middle: 1
  12857. },
  12858. fb = [
  12859. ["textShadowBlur", "shadowBlur", 0],
  12860. ["textShadowOffsetX", "shadowOffsetX", 0],
  12861. ["textShadowOffsetY", "shadowOffsetY", 0],
  12862. ["textShadowColor", "shadowColor", "transparent"]
  12863. ],
  12864. pb = new ue,
  12865. gb = function() {};
  12866. gb.prototype = {
  12867. constructor: gb,
  12868. drawRectText: function(t, e) {
  12869. var i = this.style;
  12870. e = i.textRect || e, this.__dirty && Ue(i);
  12871. var n = i.text;
  12872. if (null != n && (n += ""), li(n, i)) {
  12873. t.save();
  12874. var o = this.transform;
  12875. i.transformText ? this.setTransform(t) : o && (pb.copy(e), pb.applyTransform(o), e = pb), je(this, t, n, i, e),
  12876. t.restore()
  12877. }
  12878. }
  12879. }, ui.prototype = {
  12880. constructor: ui,
  12881. type: "displayable",
  12882. __dirty: !0,
  12883. invisible: !1,
  12884. z: 0,
  12885. z2: 0,
  12886. zlevel: 0,
  12887. draggable: !1,
  12888. dragging: !1,
  12889. silent: !1,
  12890. culling: !1,
  12891. cursor: "pointer",
  12892. rectHover: !1,
  12893. progressive: !1,
  12894. incremental: !1,
  12895. globalScaleRatio: 1,
  12896. beforeBrush: function(t) {},
  12897. afterBrush: function(t) {},
  12898. brush: function(t, e) {},
  12899. getBoundingRect: function() {},
  12900. contain: function(t, e) {
  12901. return this.rectContain(t, e)
  12902. },
  12903. traverse: function(t, e) {
  12904. t.call(e, this)
  12905. },
  12906. rectContain: function(t, e) {
  12907. var i = this.transformCoordToLocal(t, e);
  12908. return this.getBoundingRect().contain(i[0], i[1])
  12909. },
  12910. dirty: function() {
  12911. this.__dirty = this.__dirtyText = !0, this._rect = null, this.__zr && this.__zr.refresh()
  12912. },
  12913. animateStyle: function(t) {
  12914. return this.animate("style", t)
  12915. },
  12916. attrKV: function(t, e) {
  12917. "style" !== t ? Gw.prototype.attrKV.call(this, t, e) : this.style.set(e)
  12918. },
  12919. setStyle: function(t, e) {
  12920. return this.style.set(t, e), this.dirty(!1), this
  12921. },
  12922. useStyle: function(t) {
  12923. return this.style = new $w(t, this), this.dirty(!1), this
  12924. }
  12925. }, u(ui, Gw), h(ui, gb), hi.prototype = {
  12926. constructor: hi,
  12927. type: "image",
  12928. brush: function(t, e) {
  12929. var i = this.style,
  12930. n = i.image;
  12931. i.bind(t, this, e);
  12932. var o = this._image = Me(n, this._image, this, this.onload);
  12933. if (o && Te(o)) {
  12934. var a = i.x || 0,
  12935. r = i.y || 0,
  12936. s = i.width,
  12937. l = i.height,
  12938. u = o.width / o.height;
  12939. if (null == s && null != l ? s = l * u : null == l && null != s ? l = s / u : null == s && null == l && (s = o.width,
  12940. l = o.height), this.setTransform(t), i.sWidth && i.sHeight) {
  12941. var h = i.sx || 0,
  12942. c = i.sy || 0;
  12943. t.drawImage(o, h, c, i.sWidth, i.sHeight, a, r, s, l)
  12944. } else if (i.sx && i.sy) {
  12945. var d = s - (h = i.sx),
  12946. f = l - (c = i.sy);
  12947. t.drawImage(o, h, c, d, f, a, r, s, l)
  12948. } else t.drawImage(o, a, r, s, l);
  12949. null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect()))
  12950. }
  12951. },
  12952. getBoundingRect: function() {
  12953. var t = this.style;
  12954. return this._rect || (this._rect = new ue(t.x || 0, t.y || 0, t.width || 0, t.height || 0)), this._rect
  12955. }
  12956. }, u(hi, ui);
  12957. var mb = new ue(0, 0, 0, 0),
  12958. vb = new ue(0, 0, 0, 0),
  12959. yb = function(t, e, i) {
  12960. this.type = "canvas";
  12961. var n = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase();
  12962. this._opts = i = a({}, i || {}), this.dpr = i.devicePixelRatio || Rw, this._singleCanvas = n, this.root = t;
  12963. var o = t.style;
  12964. o && (o["-webkit-tap-highlight-color"] = "transparent", o["-webkit-user-select"] = o["user-select"] = o[
  12965. "-webkit-touch-callout"] = "none", t.innerHTML = ""), this.storage = e;
  12966. var r = this._zlevelList = [],
  12967. s = this._layers = {};
  12968. if (this._layerConfig = {}, this._needsManuallyCompositing = !1, n) {
  12969. var l = t.width,
  12970. u = t.height;
  12971. null != i.width && (l = i.width), null != i.height && (u = i.height), this.dpr = i.devicePixelRatio || 1, t.width =
  12972. l * this.dpr, t.height = u * this.dpr, this._width = l, this._height = u;
  12973. var h = new ib(t, this, this.dpr);
  12974. h.__builtin__ = !0, h.initContext(), s[314159] = h, h.zlevel = 314159, r.push(314159), this._domRoot = t
  12975. } else {
  12976. this._width = this._getSize(0), this._height = this._getSize(1);
  12977. var c = this._domRoot = mi(this._width, this._height);
  12978. t.appendChild(c)
  12979. }
  12980. this._hoverlayer = null, this._hoverElements = []
  12981. };
  12982. yb.prototype = {
  12983. constructor: yb,
  12984. getType: function() {
  12985. return "canvas"
  12986. },
  12987. isSingleCanvas: function() {
  12988. return this._singleCanvas
  12989. },
  12990. getViewportRoot: function() {
  12991. return this._domRoot
  12992. },
  12993. getViewportRootOffset: function() {
  12994. var t = this.getViewportRoot();
  12995. if (t) return {
  12996. offsetLeft: t.offsetLeft || 0,
  12997. offsetTop: t.offsetTop || 0
  12998. }
  12999. },
  13000. refresh: function(t) {
  13001. var e = this.storage.getDisplayList(!0),
  13002. i = this._zlevelList;
  13003. this._redrawId = Math.random(), this._paintList(e, t, this._redrawId);
  13004. for (var n = 0; n < i.length; n++) {
  13005. var o = i[n],
  13006. a = this._layers[o];
  13007. if (!a.__builtin__ && a.refresh) {
  13008. var r = 0 === n ? this._backgroundColor : null;
  13009. a.refresh(r)
  13010. }
  13011. }
  13012. return this.refreshHover(), this
  13013. },
  13014. addHover: function(t, e) {
  13015. if (!t.__hoverMir) {
  13016. var i = new t.constructor({
  13017. style: t.style,
  13018. shape: t.shape,
  13019. z: t.z,
  13020. z2: t.z2,
  13021. silent: t.silent
  13022. });
  13023. return i.__from = t, t.__hoverMir = i, e && i.setStyle(e), this._hoverElements.push(i), i
  13024. }
  13025. },
  13026. removeHover: function(t) {
  13027. var e = t.__hoverMir,
  13028. i = this._hoverElements,
  13029. n = l(i, e);
  13030. n >= 0 && i.splice(n, 1), t.__hoverMir = null
  13031. },
  13032. clearHover: function(t) {
  13033. for (var e = this._hoverElements, i = 0; i < e.length; i++) {
  13034. var n = e[i].__from;
  13035. n && (n.__hoverMir = null)
  13036. }
  13037. e.length = 0
  13038. },
  13039. refreshHover: function() {
  13040. var t = this._hoverElements,
  13041. e = t.length,
  13042. i = this._hoverlayer;
  13043. if (i && i.clear(), e) {
  13044. ve(t, this.storage.displayableSortFunc), i || (i = this._hoverlayer = this.getLayer(1e5));
  13045. var n = {};
  13046. i.ctx.save();
  13047. for (var o = 0; o < e;) {
  13048. var a = t[o],
  13049. r = a.__from;
  13050. r && r.__zr ? (o++, r.invisible || (a.transform = r.transform, a.invTransform = r.invTransform, a.__clipPaths =
  13051. r.__clipPaths, this._doPaintEl(a, i, !0, n))) : (t.splice(o, 1), r.__hoverMir = null, e--)
  13052. }
  13053. i.ctx.restore()
  13054. }
  13055. },
  13056. getHoverLayer: function() {
  13057. return this.getLayer(1e5)
  13058. },
  13059. _paintList: function(t, e, i) {
  13060. if (this._redrawId === i) {
  13061. e = e || !1, this._updateLayerStatus(t);
  13062. var n = this._doPaintList(t, e);
  13063. if (this._needsManuallyCompositing && this._compositeManually(), !n) {
  13064. var o = this;
  13065. nb(function() {
  13066. o._paintList(t, e, i)
  13067. })
  13068. }
  13069. }
  13070. },
  13071. _compositeManually: function() {
  13072. var t = this.getLayer(314159).ctx,
  13073. e = this._domRoot.width,
  13074. i = this._domRoot.height;
  13075. t.clearRect(0, 0, e, i), this.eachBuiltinLayer(function(n) {
  13076. n.virtual && t.drawImage(n.dom, 0, 0, e, i)
  13077. })
  13078. },
  13079. _doPaintList: function(t, e) {
  13080. for (var i = [], n = 0; n < this._zlevelList.length; n++) {
  13081. var o = this._zlevelList[n];
  13082. (s = this._layers[o]).__builtin__ && s !== this._hoverlayer && (s.__dirty || e) && i.push(s)
  13083. }
  13084. for (var a = !0, r = 0; r < i.length; r++) {
  13085. var s = i[r],
  13086. l = s.ctx,
  13087. u = {};
  13088. l.save();
  13089. var h = e ? s.__startIndex : s.__drawIndex,
  13090. c = !e && s.incremental && Date.now,
  13091. f = c && Date.now(),
  13092. p = s.zlevel === this._zlevelList[0] ? this._backgroundColor : null;
  13093. if (s.__startIndex === s.__endIndex) s.clear(!1, p);
  13094. else if (h === s.__startIndex) {
  13095. var g = t[h];
  13096. g.incremental && g.notClear && !e || s.clear(!1, p)
  13097. } - 1 === h && (console.error("For some unknown reason. drawIndex is -1"), h = s.__startIndex);
  13098. for (var m = h; m < s.__endIndex; m++) {
  13099. var v = t[m];
  13100. if (this._doPaintEl(v, s, e, u), v.__dirty = v.__dirtyText = !1, c && Date.now() - f > 15) break
  13101. }
  13102. s.__drawIndex = m, s.__drawIndex < s.__endIndex && (a = !1), u.prevElClipPaths && l.restore(), l.restore()
  13103. }
  13104. return z_.wxa && d(this._layers, function(t) {
  13105. t && t.ctx && t.ctx.draw && t.ctx.draw()
  13106. }), a
  13107. },
  13108. _doPaintEl: function(t, e, i, n) {
  13109. var o = e.ctx,
  13110. a = t.transform;
  13111. if ((e.__dirty || i) && !t.invisible && 0 !== t.style.opacity && (!a || a[0] || a[3]) && (!t.culling || !fi(t,
  13112. this._width, this._height))) {
  13113. var r = t.__clipPaths;
  13114. n.prevElClipPaths && !pi(r, n.prevElClipPaths) || (n.prevElClipPaths && (e.ctx.restore(), n.prevElClipPaths =
  13115. null, n.prevEl = null), r && (o.save(), gi(r, o), n.prevElClipPaths = r)), t.beforeBrush && t.beforeBrush(o),
  13116. t.brush(o, n.prevEl || null), n.prevEl = t, t.afterBrush && t.afterBrush(o)
  13117. }
  13118. },
  13119. getLayer: function(t, e) {
  13120. this._singleCanvas && !this._needsManuallyCompositing && (t = 314159);
  13121. var i = this._layers[t];
  13122. return i || ((i = new ib("zr_" + t, this, this.dpr)).zlevel = t, i.__builtin__ = !0, this._layerConfig[t] && n(i,
  13123. this._layerConfig[t], !0), e && (i.virtual = e), this.insertLayer(t, i), i.initContext()), i
  13124. },
  13125. insertLayer: function(t, e) {
  13126. var i = this._layers,
  13127. n = this._zlevelList,
  13128. o = n.length,
  13129. a = null,
  13130. r = -1,
  13131. s = this._domRoot;
  13132. if (i[t]) Bw("ZLevel " + t + " has been used already");
  13133. else if (di(e)) {
  13134. if (o > 0 && t > n[0]) {
  13135. for (r = 0; r < o - 1 && !(n[r] < t && n[r + 1] > t); r++);
  13136. a = i[n[r]]
  13137. }
  13138. if (n.splice(r + 1, 0, t), i[t] = e, !e.virtual)
  13139. if (a) {
  13140. var l = a.dom;
  13141. l.nextSibling ? s.insertBefore(e.dom, l.nextSibling) : s.appendChild(e.dom)
  13142. } else s.firstChild ? s.insertBefore(e.dom, s.firstChild) : s.appendChild(e.dom)
  13143. } else Bw("Layer of zlevel " + t + " is not valid")
  13144. },
  13145. eachLayer: function(t, e) {
  13146. var i, n, o = this._zlevelList;
  13147. for (n = 0; n < o.length; n++) i = o[n], t.call(e, this._layers[i], i)
  13148. },
  13149. eachBuiltinLayer: function(t, e) {
  13150. var i, n, o, a = this._zlevelList;
  13151. for (o = 0; o < a.length; o++) n = a[o], (i = this._layers[n]).__builtin__ && t.call(e, i, n)
  13152. },
  13153. eachOtherLayer: function(t, e) {
  13154. var i, n, o, a = this._zlevelList;
  13155. for (o = 0; o < a.length; o++) n = a[o], (i = this._layers[n]).__builtin__ || t.call(e, i, n)
  13156. },
  13157. getLayers: function() {
  13158. return this._layers
  13159. },
  13160. _updateLayerStatus: function(t) {
  13161. function e(t) {
  13162. i && (i.__endIndex !== t && (i.__dirty = !0), i.__endIndex = t)
  13163. }
  13164. if (this.eachBuiltinLayer(function(t, e) {
  13165. t.__dirty = t.__used = !1
  13166. }), this._singleCanvas)
  13167. for (o = 1; o < t.length; o++)
  13168. if ((r = t[o]).zlevel !== t[o - 1].zlevel || r.incremental) {
  13169. this._needsManuallyCompositing = !0;
  13170. break
  13171. } for (var i = null, n = 0, o = 0; o < t.length; o++) {
  13172. var a, r = t[o],
  13173. s = r.zlevel;
  13174. r.incremental ? ((a = this.getLayer(s + .001, this._needsManuallyCompositing)).incremental = !0, n = 1) : a =
  13175. this.getLayer(s + (n > 0 ? .01 : 0), this._needsManuallyCompositing), a.__builtin__ || Bw("ZLevel " + s +
  13176. " has been used by unkown layer " + a.id), a !== i && (a.__used = !0, a.__startIndex !== o && (a.__dirty = !0),
  13177. a.__startIndex = o, a.incremental ? a.__drawIndex = -1 : a.__drawIndex = o, e(o), i = a), r.__dirty && (a.__dirty = !
  13178. 0, a.incremental && a.__drawIndex < 0 && (a.__drawIndex = o))
  13179. }
  13180. e(o), this.eachBuiltinLayer(function(t, e) {
  13181. !t.__used && t.getElementCount() > 0 && (t.__dirty = !0, t.__startIndex = t.__endIndex = t.__drawIndex = 0), t
  13182. .__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex)
  13183. })
  13184. },
  13185. clear: function() {
  13186. return this.eachBuiltinLayer(this._clearLayer), this
  13187. },
  13188. _clearLayer: function(t) {
  13189. t.clear()
  13190. },
  13191. setBackgroundColor: function(t) {
  13192. this._backgroundColor = t
  13193. },
  13194. configLayer: function(t, e) {
  13195. if (e) {
  13196. var i = this._layerConfig;
  13197. i[t] ? n(i[t], e, !0) : i[t] = e;
  13198. for (var o = 0; o < this._zlevelList.length; o++) {
  13199. var a = this._zlevelList[o];
  13200. a !== t && a !== t + .01 || n(this._layers[a], i[t], !0)
  13201. }
  13202. }
  13203. },
  13204. delLayer: function(t) {
  13205. var e = this._layers,
  13206. i = this._zlevelList,
  13207. n = e[t];
  13208. n && (n.dom.parentNode.removeChild(n.dom), delete e[t], i.splice(l(i, t), 1))
  13209. },
  13210. resize: function(t, e) {
  13211. if (this._domRoot.style) {
  13212. var i = this._domRoot;
  13213. i.style.display = "none";
  13214. var n = this._opts;
  13215. if (null != t && (n.width = t), null != e && (n.height = e), t = this._getSize(0), e = this._getSize(1), i.style
  13216. .display = "", this._width != t || e != this._height) {
  13217. i.style.width = t + "px", i.style.height = e + "px";
  13218. for (var o in this._layers) this._layers.hasOwnProperty(o) && this._layers[o].resize(t, e);
  13219. d(this._progressiveLayers, function(i) {
  13220. i.resize(t, e)
  13221. }), this.refresh(!0)
  13222. }
  13223. this._width = t, this._height = e
  13224. } else {
  13225. if (null == t || null == e) return;
  13226. this._width = t, this._height = e, this.getLayer(314159).resize(t, e)
  13227. }
  13228. return this
  13229. },
  13230. clearLayer: function(t) {
  13231. var e = this._layers[t];
  13232. e && e.clear()
  13233. },
  13234. dispose: function() {
  13235. this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null
  13236. },
  13237. getRenderedCanvas: function(t) {
  13238. if (t = t || {}, this._singleCanvas && !this._compositeManually) return this._layers[314159].dom;
  13239. var e = new ib("image", this, t.pixelRatio || this.dpr);
  13240. if (e.initContext(), e.clear(!1, t.backgroundColor || this._backgroundColor), t.pixelRatio <= this.dpr) {
  13241. this.refresh();
  13242. var i = e.dom.width,
  13243. n = e.dom.height,
  13244. o = e.ctx;
  13245. this.eachLayer(function(t) {
  13246. t.__builtin__ ? o.drawImage(t.dom, 0, 0, i, n) : t.renderToCanvas && (e.ctx.save(), t.renderToCanvas(e.ctx),
  13247. e.ctx.restore())
  13248. })
  13249. } else
  13250. for (var a = {}, r = this.storage.getDisplayList(!0), s = 0; s < r.length; s++) {
  13251. var l = r[s];
  13252. this._doPaintEl(l, e, !0, a)
  13253. }
  13254. return e.dom
  13255. },
  13256. getWidth: function() {
  13257. return this._width
  13258. },
  13259. getHeight: function() {
  13260. return this._height
  13261. },
  13262. _getSize: function(t) {
  13263. var e = this._opts,
  13264. i = ["width", "height"][t],
  13265. n = ["clientWidth", "clientHeight"][t],
  13266. o = ["paddingLeft", "paddingTop"][t],
  13267. a = ["paddingRight", "paddingBottom"][t];
  13268. if (null != e[i] && "auto" !== e[i]) return parseFloat(e[i]);
  13269. var r = this.root,
  13270. s = document.defaultView.getComputedStyle(r);
  13271. return (r[n] || ci(s[i]) || ci(r.style[i])) - (ci(s[o]) || 0) - (ci(s[a]) || 0) | 0
  13272. },
  13273. pathToImage: function(t, e) {
  13274. e = e || this.dpr;
  13275. var i = document.createElement("canvas"),
  13276. n = i.getContext("2d"),
  13277. o = t.getBoundingRect(),
  13278. a = t.style,
  13279. r = a.shadowBlur * e,
  13280. s = a.shadowOffsetX * e,
  13281. l = a.shadowOffsetY * e,
  13282. u = a.hasStroke() ? a.lineWidth : 0,
  13283. h = Math.max(u / 2, -s + r),
  13284. c = Math.max(u / 2, s + r),
  13285. d = Math.max(u / 2, -l + r),
  13286. f = Math.max(u / 2, l + r),
  13287. p = o.width + h + c,
  13288. g = o.height + d + f;
  13289. i.width = p * e, i.height = g * e, n.scale(e, e), n.clearRect(0, 0, p, g), n.dpr = e;
  13290. var m = {
  13291. position: t.position,
  13292. rotation: t.rotation,
  13293. scale: t.scale
  13294. };
  13295. t.position = [h - o.x, d - o.y], t.rotation = 0, t.scale = [1, 1], t.updateTransform(), t && t.brush(n);
  13296. var v = new hi({
  13297. style: {
  13298. x: 0,
  13299. y: 0,
  13300. image: i
  13301. }
  13302. });
  13303. return null != m.position && (v.position = t.position = m.position), null != m.rotation && (v.rotation = t.rotation =
  13304. m.rotation), null != m.scale && (v.scale = t.scale = m.scale), v
  13305. }
  13306. };
  13307. var xb = function(t) {
  13308. t = t || {}, this.stage = t.stage || {}, this.onframe = t.onframe || function() {}, this._clips = [], this._running = !
  13309. 1, this._time, this._pausedTime, this._pauseStart, this._paused = !1, aw.call(this)
  13310. };
  13311. xb.prototype = {
  13312. constructor: xb,
  13313. addClip: function(t) {
  13314. this._clips.push(t)
  13315. },
  13316. addAnimator: function(t) {
  13317. t.animation = this;
  13318. for (var e = t.getClips(), i = 0; i < e.length; i++) this.addClip(e[i])
  13319. },
  13320. removeClip: function(t) {
  13321. var e = l(this._clips, t);
  13322. e >= 0 && this._clips.splice(e, 1)
  13323. },
  13324. removeAnimator: function(t) {
  13325. for (var e = t.getClips(), i = 0; i < e.length; i++) this.removeClip(e[i]);
  13326. t.animation = null
  13327. },
  13328. _update: function() {
  13329. for (var t = (new Date).getTime() - this._pausedTime, e = t - this._time, i = this._clips, n = i.length, o = [],
  13330. a = [], r = 0; r < n; r++) {
  13331. var s = i[r],
  13332. l = s.step(t, e);
  13333. l && (o.push(l), a.push(s))
  13334. }
  13335. for (r = 0; r < n;) i[r]._needsRemove ? (i[r] = i[n - 1], i.pop(), n--) : r++;
  13336. n = o.length;
  13337. for (r = 0; r < n; r++) a[r].fire(o[r]);
  13338. this._time = t, this.onframe(e), this.trigger("frame", e), this.stage.update && this.stage.update()
  13339. },
  13340. _startLoop: function() {
  13341. function t() {
  13342. e._running && (nb(t), !e._paused && e._update())
  13343. }
  13344. var e = this;
  13345. this._running = !0, nb(t)
  13346. },
  13347. start: function() {
  13348. this._time = (new Date).getTime(), this._pausedTime = 0, this._startLoop()
  13349. },
  13350. stop: function() {
  13351. this._running = !1
  13352. },
  13353. pause: function() {
  13354. this._paused || (this._pauseStart = (new Date).getTime(), this._paused = !0)
  13355. },
  13356. resume: function() {
  13357. this._paused && (this._pausedTime += (new Date).getTime() - this._pauseStart, this._paused = !1)
  13358. },
  13359. clear: function() {
  13360. this._clips = []
  13361. },
  13362. isFinished: function() {
  13363. return !this._clips.length
  13364. },
  13365. animate: function(t, e) {
  13366. var i = new Ow(t, (e = e || {}).loop, e.getter, e.setter);
  13367. return this.addAnimator(i), i
  13368. }
  13369. }, h(xb, aw);
  13370. var _b = function() {
  13371. this._track = []
  13372. };
  13373. _b.prototype = {
  13374. constructor: _b,
  13375. recognize: function(t, e, i) {
  13376. return this._doTrack(t, e, i), this._recognize(t)
  13377. },
  13378. clear: function() {
  13379. return this._track.length = 0, this
  13380. },
  13381. _doTrack: function(t, e, i) {
  13382. var n = t.touches;
  13383. if (n) {
  13384. for (var o = {
  13385. points: [],
  13386. touches: [],
  13387. target: e,
  13388. event: t
  13389. }, a = 0, r = n.length; a < r; a++) {
  13390. var s = n[a],
  13391. l = rt(i, s, {});
  13392. o.points.push([l.zrX, l.zrY]), o.touches.push(s)
  13393. }
  13394. this._track.push(o)
  13395. }
  13396. },
  13397. _recognize: function(t) {
  13398. for (var e in wb)
  13399. if (wb.hasOwnProperty(e)) {
  13400. var i = wb[e](this._track, t);
  13401. if (i) return i
  13402. }
  13403. }
  13404. };
  13405. var wb = {
  13406. pinch: function(t, e) {
  13407. var i = t.length;
  13408. if (i) {
  13409. var n = (t[i - 1] || {}).points,
  13410. o = (t[i - 2] || {}).points || n;
  13411. if (o && o.length > 1 && n && n.length > 1) {
  13412. var a = vi(n) / vi(o);
  13413. !isFinite(a) && (a = 1), e.pinchScale = a;
  13414. var r = yi(n);
  13415. return e.pinchX = r[0], e.pinchY = r[1], {
  13416. type: "pinch",
  13417. target: t[0].target,
  13418. event: e
  13419. }
  13420. }
  13421. }
  13422. }
  13423. },
  13424. bb = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  13425. Sb = ["touchstart", "touchend", "touchmove"],
  13426. Mb = {
  13427. pointerdown: 1,
  13428. pointerup: 1,
  13429. pointermove: 1,
  13430. pointerout: 1
  13431. },
  13432. Ib = f(bb, function(t) {
  13433. var e = t.replace("mouse", "pointer");
  13434. return Mb[e] ? e : t
  13435. }),
  13436. Tb = {
  13437. mousemove: function(t) {
  13438. t = lt(this.dom, t), this.trigger("mousemove", t)
  13439. },
  13440. mouseout: function(t) {
  13441. var e = (t = lt(this.dom, t)).toElement || t.relatedTarget;
  13442. if (e != this.dom)
  13443. for (; e && 9 != e.nodeType;) {
  13444. if (e === this.dom) return;
  13445. e = e.parentNode
  13446. }
  13447. this.trigger("mouseout", t)
  13448. },
  13449. touchstart: function(t) {
  13450. (t = lt(this.dom, t)).zrByTouch = !0, this._lastTouchMoment = new Date, _i(this, t, "start"), Tb.mousemove.call(
  13451. this, t), Tb.mousedown.call(this, t), wi(this)
  13452. },
  13453. touchmove: function(t) {
  13454. (t = lt(this.dom, t)).zrByTouch = !0, _i(this, t, "change"), Tb.mousemove.call(this, t), wi(this)
  13455. },
  13456. touchend: function(t) {
  13457. (t = lt(this.dom, t)).zrByTouch = !0, _i(this, t, "end"), Tb.mouseup.call(this, t), +new Date - this._lastTouchMoment <
  13458. 300 && Tb.click.call(this, t), wi(this)
  13459. },
  13460. pointerdown: function(t) {
  13461. Tb.mousedown.call(this, t)
  13462. },
  13463. pointermove: function(t) {
  13464. bi(t) || Tb.mousemove.call(this, t)
  13465. },
  13466. pointerup: function(t) {
  13467. Tb.mouseup.call(this, t)
  13468. },
  13469. pointerout: function(t) {
  13470. bi(t) || Tb.mouseout.call(this, t)
  13471. }
  13472. };
  13473. d(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  13474. Tb[t] = function(e) {
  13475. e = lt(this.dom, e), this.trigger(t, e)
  13476. }
  13477. });
  13478. var Ab = Mi.prototype;
  13479. Ab.dispose = function() {
  13480. for (var t = bb.concat(Sb), e = 0; e < t.length; e++) {
  13481. var i = t[e];
  13482. ht(this.dom, xi(i), this._handlers[i])
  13483. }
  13484. }, Ab.setCursor = function(t) {
  13485. this.dom.style && (this.dom.style.cursor = t || "default")
  13486. }, h(Mi, aw);
  13487. var Db = !z_.canvasSupported,
  13488. Cb = {
  13489. canvas: yb
  13490. },
  13491. Lb = {},
  13492. kb = function(t, e, i) {
  13493. i = i || {}, this.dom = e, this.id = t;
  13494. var n = this,
  13495. o = new jw,
  13496. a = i.renderer;
  13497. if (Db) {
  13498. if (!Cb.vml) throw new Error("You need to require 'zrender/vml/vml' to support IE8");
  13499. a = "vml"
  13500. } else a && Cb[a] || (a = "canvas");
  13501. var r = new Cb[a](e, o, i, t);
  13502. this.storage = o, this.painter = r;
  13503. var s = z_.node || z_.worker ? null : new Mi(r.getViewportRoot());
  13504. this.handler = new cw(o, r, s, r.root), this.animation = new xb({
  13505. stage: {
  13506. update: m(this.flush, this)
  13507. }
  13508. }), this.animation.start(), this._needsRefresh;
  13509. var l = o.delFromStorage,
  13510. u = o.addToStorage;
  13511. o.delFromStorage = function(t) {
  13512. l.call(o, t), t && t.removeSelfFromZr(n)
  13513. }, o.addToStorage = function(t) {
  13514. u.call(o, t), t.addSelfToZr(n)
  13515. }
  13516. };
  13517. kb.prototype = {
  13518. constructor: kb,
  13519. getId: function() {
  13520. return this.id
  13521. },
  13522. add: function(t) {
  13523. this.storage.addRoot(t), this._needsRefresh = !0
  13524. },
  13525. remove: function(t) {
  13526. this.storage.delRoot(t), this._needsRefresh = !0
  13527. },
  13528. configLayer: function(t, e) {
  13529. this.painter.configLayer && this.painter.configLayer(t, e), this._needsRefresh = !0
  13530. },
  13531. setBackgroundColor: function(t) {
  13532. this.painter.setBackgroundColor && this.painter.setBackgroundColor(t), this._needsRefresh = !0
  13533. },
  13534. refreshImmediately: function() {
  13535. this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1
  13536. },
  13537. refresh: function() {
  13538. this._needsRefresh = !0
  13539. },
  13540. flush: function() {
  13541. var t;
  13542. this._needsRefresh && (t = !0, this.refreshImmediately()), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately()),
  13543. t && this.trigger("rendered")
  13544. },
  13545. addHover: function(t, e) {
  13546. if (this.painter.addHover) {
  13547. var i = this.painter.addHover(t, e);
  13548. return this.refreshHover(), i
  13549. }
  13550. },
  13551. removeHover: function(t) {
  13552. this.painter.removeHover && (this.painter.removeHover(t), this.refreshHover())
  13553. },
  13554. clearHover: function() {
  13555. this.painter.clearHover && (this.painter.clearHover(), this.refreshHover())
  13556. },
  13557. refreshHover: function() {
  13558. this._needsRefreshHover = !0
  13559. },
  13560. refreshHoverImmediately: function() {
  13561. this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.refreshHover()
  13562. },
  13563. resize: function(t) {
  13564. t = t || {}, this.painter.resize(t.width, t.height), this.handler.resize()
  13565. },
  13566. clearAnimation: function() {
  13567. this.animation.clear()
  13568. },
  13569. getWidth: function() {
  13570. return this.painter.getWidth()
  13571. },
  13572. getHeight: function() {
  13573. return this.painter.getHeight()
  13574. },
  13575. pathToImage: function(t, e) {
  13576. return this.painter.pathToImage(t, e)
  13577. },
  13578. setCursorStyle: function(t) {
  13579. this.handler.setCursorStyle(t)
  13580. },
  13581. findHover: function(t, e) {
  13582. return this.handler.findHover(t, e)
  13583. },
  13584. on: function(t, e, i) {
  13585. this.handler.on(t, e, i)
  13586. },
  13587. off: function(t, e) {
  13588. this.handler.off(t, e)
  13589. },
  13590. trigger: function(t, e) {
  13591. this.handler.trigger(t, e)
  13592. },
  13593. clear: function() {
  13594. this.storage.delRoot(), this.painter.clear()
  13595. },
  13596. dispose: function() {
  13597. this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this
  13598. .animation = this.storage = this.painter = this.handler = null, Ai(this.id)
  13599. }
  13600. };
  13601. var Pb = (Object.freeze || Object)({
  13602. version: "4.0.5",
  13603. init: Ii,
  13604. dispose: function(t) {
  13605. if (t) t.dispose();
  13606. else {
  13607. for (var e in Lb) Lb.hasOwnProperty(e) && Lb[e].dispose();
  13608. Lb = {}
  13609. }
  13610. return this
  13611. },
  13612. getInstance: function(t) {
  13613. return Lb[t]
  13614. },
  13615. registerPainter: Ti
  13616. }),
  13617. Nb = d,
  13618. Ob = w,
  13619. Eb = y,
  13620. Rb = "series\0",
  13621. zb = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor",
  13622. "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor",
  13623. "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX",
  13624. "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"
  13625. ],
  13626. Bb = 0,
  13627. Vb = ".",
  13628. Gb = "___EC__COMPONENT__CONTAINER___",
  13629. Fb = 0,
  13630. Wb = function(t) {
  13631. for (var e = 0; e < t.length; e++) t[e][1] || (t[e][1] = t[e][0]);
  13632. return function(e, i, n) {
  13633. for (var o = {}, a = 0; a < t.length; a++) {
  13634. var r = t[a][1];
  13635. if (!(i && l(i, r) >= 0 || n && l(n, r) < 0)) {
  13636. var s = e.getShallow(r);
  13637. null != s && (o[t[a][0]] = s)
  13638. }
  13639. }
  13640. return o
  13641. }
  13642. },
  13643. Hb = Wb([
  13644. ["lineWidth", "width"],
  13645. ["stroke", "color"],
  13646. ["opacity"],
  13647. ["shadowBlur"],
  13648. ["shadowOffsetX"],
  13649. ["shadowOffsetY"],
  13650. ["shadowColor"]
  13651. ]),
  13652. Zb = {
  13653. getLineStyle: function(t) {
  13654. var e = Hb(this, t),
  13655. i = this.getLineDash(e.lineWidth);
  13656. return i && (e.lineDash = i), e
  13657. },
  13658. getLineDash: function(t) {
  13659. null == t && (t = 1);
  13660. var e = this.get("type"),
  13661. i = Math.max(t, 2),
  13662. n = 4 * t;
  13663. return "solid" === e || null == e ? null : "dashed" === e ? [n, n] : [i, i]
  13664. }
  13665. },
  13666. Ub = Wb([
  13667. ["fill", "color"],
  13668. ["shadowBlur"],
  13669. ["shadowOffsetX"],
  13670. ["shadowOffsetY"],
  13671. ["opacity"],
  13672. ["shadowColor"]
  13673. ]),
  13674. Xb = {
  13675. getAreaStyle: function(t, e) {
  13676. return Ub(this, t, e)
  13677. }
  13678. },
  13679. jb = Math.pow,
  13680. Yb = Math.sqrt,
  13681. qb = 1e-8,
  13682. Kb = 1e-4,
  13683. $b = Yb(3),
  13684. Jb = 1 / 3,
  13685. Qb = V(),
  13686. tS = V(),
  13687. eS = V(),
  13688. iS = Math.min,
  13689. nS = Math.max,
  13690. oS = Math.sin,
  13691. aS = Math.cos,
  13692. rS = 2 * Math.PI,
  13693. sS = V(),
  13694. lS = V(),
  13695. uS = V(),
  13696. hS = [],
  13697. cS = [],
  13698. dS = {
  13699. M: 1,
  13700. L: 2,
  13701. C: 3,
  13702. Q: 4,
  13703. A: 5,
  13704. Z: 6,
  13705. R: 7
  13706. },
  13707. fS = [],
  13708. pS = [],
  13709. gS = [],
  13710. mS = [],
  13711. vS = Math.min,
  13712. yS = Math.max,
  13713. xS = Math.cos,
  13714. _S = Math.sin,
  13715. wS = Math.sqrt,
  13716. bS = Math.abs,
  13717. SS = "undefined" != typeof Float32Array,
  13718. MS = function(t) {
  13719. this._saveData = !t, this._saveData && (this.data = []), this._ctx = null
  13720. };
  13721. MS.prototype = {
  13722. constructor: MS,
  13723. _xi: 0,
  13724. _yi: 0,
  13725. _x0: 0,
  13726. _y0: 0,
  13727. _ux: 0,
  13728. _uy: 0,
  13729. _len: 0,
  13730. _lineDash: null,
  13731. _dashOffset: 0,
  13732. _dashIdx: 0,
  13733. _dashSum: 0,
  13734. setScale: function(t, e) {
  13735. this._ux = bS(1 / Rw / t) || 0, this._uy = bS(1 / Rw / e) || 0
  13736. },
  13737. getContext: function() {
  13738. return this._ctx
  13739. },
  13740. beginPath: function(t) {
  13741. return this._ctx = t, t && t.beginPath(), t && (this.dpr = t.dpr), this._saveData && (this._len = 0), this._lineDash &&
  13742. (this._lineDash = null, this._dashOffset = 0), this
  13743. },
  13744. moveTo: function(t, e) {
  13745. return this.addData(dS.M, t, e), this._ctx && this._ctx.moveTo(t, e), this._x0 = t, this._y0 = e, this._xi = t,
  13746. this._yi = e, this
  13747. },
  13748. lineTo: function(t, e) {
  13749. var i = bS(t - this._xi) > this._ux || bS(e - this._yi) > this._uy || this._len < 5;
  13750. return this.addData(dS.L, t, e), this._ctx && i && (this._needsDash() ? this._dashedLineTo(t, e) : this._ctx.lineTo(
  13751. t, e)), i && (this._xi = t, this._yi = e), this
  13752. },
  13753. bezierCurveTo: function(t, e, i, n, o, a) {
  13754. return this.addData(dS.C, t, e, i, n, o, a), this._ctx && (this._needsDash() ? this._dashedBezierTo(t, e, i, n, o,
  13755. a) : this._ctx.bezierCurveTo(t, e, i, n, o, a)), this._xi = o, this._yi = a, this
  13756. },
  13757. quadraticCurveTo: function(t, e, i, n) {
  13758. return this.addData(dS.Q, t, e, i, n), this._ctx && (this._needsDash() ? this._dashedQuadraticTo(t, e, i, n) :
  13759. this._ctx.quadraticCurveTo(t, e, i, n)), this._xi = i, this._yi = n, this
  13760. },
  13761. arc: function(t, e, i, n, o, a) {
  13762. return this.addData(dS.A, t, e, i, i, n, o - n, 0, a ? 0 : 1), this._ctx && this._ctx.arc(t, e, i, n, o, a), this
  13763. ._xi = xS(o) * i + t, this._yi = _S(o) * i + e, this
  13764. },
  13765. arcTo: function(t, e, i, n, o) {
  13766. return this._ctx && this._ctx.arcTo(t, e, i, n, o), this
  13767. },
  13768. rect: function(t, e, i, n) {
  13769. return this._ctx && this._ctx.rect(t, e, i, n), this.addData(dS.R, t, e, i, n), this
  13770. },
  13771. closePath: function() {
  13772. this.addData(dS.Z);
  13773. var t = this._ctx,
  13774. e = this._x0,
  13775. i = this._y0;
  13776. return t && (this._needsDash() && this._dashedLineTo(e, i), t.closePath()), this._xi = e, this._yi = i, this
  13777. },
  13778. fill: function(t) {
  13779. t && t.fill(), this.toStatic()
  13780. },
  13781. stroke: function(t) {
  13782. t && t.stroke(), this.toStatic()
  13783. },
  13784. setLineDash: function(t) {
  13785. if (t instanceof Array) {
  13786. this._lineDash = t, this._dashIdx = 0;
  13787. for (var e = 0, i = 0; i < t.length; i++) e += t[i];
  13788. this._dashSum = e
  13789. }
  13790. return this
  13791. },
  13792. setLineDashOffset: function(t) {
  13793. return this._dashOffset = t, this
  13794. },
  13795. len: function() {
  13796. return this._len
  13797. },
  13798. setData: function(t) {
  13799. var e = t.length;
  13800. this.data && this.data.length == e || !SS || (this.data = new Float32Array(e));
  13801. for (var i = 0; i < e; i++) this.data[i] = t[i];
  13802. this._len = e
  13803. },
  13804. appendPath: function(t) {
  13805. t instanceof Array || (t = [t]);
  13806. for (var e = t.length, i = 0, n = this._len, o = 0; o < e; o++) i += t[o].len();
  13807. SS && this.data instanceof Float32Array && (this.data = new Float32Array(n + i));
  13808. for (o = 0; o < e; o++)
  13809. for (var a = t[o].data, r = 0; r < a.length; r++) this.data[n++] = a[r];
  13810. this._len = n
  13811. },
  13812. addData: function(t) {
  13813. if (this._saveData) {
  13814. var e = this.data;
  13815. this._len + arguments.length > e.length && (this._expandData(), e = this.data);
  13816. for (var i = 0; i < arguments.length; i++) e[this._len++] = arguments[i];
  13817. this._prevCmd = t
  13818. }
  13819. },
  13820. _expandData: function() {
  13821. if (!(this.data instanceof Array)) {
  13822. for (var t = [], e = 0; e < this._len; e++) t[e] = this.data[e];
  13823. this.data = t
  13824. }
  13825. },
  13826. _needsDash: function() {
  13827. return this._lineDash
  13828. },
  13829. _dashedLineTo: function(t, e) {
  13830. var i, n, o = this._dashSum,
  13831. a = this._dashOffset,
  13832. r = this._lineDash,
  13833. s = this._ctx,
  13834. l = this._xi,
  13835. u = this._yi,
  13836. h = t - l,
  13837. c = e - u,
  13838. d = wS(h * h + c * c),
  13839. f = l,
  13840. p = u,
  13841. g = r.length;
  13842. for (h /= d, c /= d, a < 0 && (a = o + a), f -= (a %= o) * h, p -= a * c; h > 0 && f <= t || h < 0 && f >= t || 0 ==
  13843. h && (c > 0 && p <= e || c < 0 && p >= e);) f += h * (i = r[n = this._dashIdx]), p += c * i, this._dashIdx = (n +
  13844. 1) % g, h > 0 && f < l || h < 0 && f > l || c > 0 && p < u || c < 0 && p > u || s[n % 2 ? "moveTo" : "lineTo"](
  13845. h >= 0 ? vS(f, t) : yS(f, t), c >= 0 ? vS(p, e) : yS(p, e));
  13846. h = f - t, c = p - e, this._dashOffset = -wS(h * h + c * c)
  13847. },
  13848. _dashedBezierTo: function(t, e, i, n, o, a) {
  13849. var r, s, l, u, h, c = this._dashSum,
  13850. d = this._dashOffset,
  13851. f = this._lineDash,
  13852. p = this._ctx,
  13853. g = this._xi,
  13854. m = this._yi,
  13855. v = Qi,
  13856. y = 0,
  13857. x = this._dashIdx,
  13858. _ = f.length,
  13859. w = 0;
  13860. for (d < 0 && (d = c + d), d %= c, r = 0; r < 1; r += .1) s = v(g, t, i, o, r + .1) - v(g, t, i, o, r), l = v(m,
  13861. e, n, a, r + .1) - v(m, e, n, a, r), y += wS(s * s + l * l);
  13862. for (; x < _ && !((w += f[x]) > d); x++);
  13863. for (r = (w - d) / y; r <= 1;) u = v(g, t, i, o, r), h = v(m, e, n, a, r), x % 2 ? p.moveTo(u, h) : p.lineTo(u, h),
  13864. r += f[x] / y, x = (x + 1) % _;
  13865. x % 2 != 0 && p.lineTo(o, a), s = o - u, l = a - h, this._dashOffset = -wS(s * s + l * l)
  13866. },
  13867. _dashedQuadraticTo: function(t, e, i, n) {
  13868. var o = i,
  13869. a = n;
  13870. i = (i + 2 * t) / 3, n = (n + 2 * e) / 3, t = (this._xi + 2 * t) / 3, e = (this._yi + 2 * e) / 3, this._dashedBezierTo(
  13871. t, e, i, n, o, a)
  13872. },
  13873. toStatic: function() {
  13874. var t = this.data;
  13875. t instanceof Array && (t.length = this._len, SS && (this.data = new Float32Array(t)))
  13876. },
  13877. getBoundingRect: function() {
  13878. fS[0] = fS[1] = gS[0] = gS[1] = Number.MAX_VALUE, pS[0] = pS[1] = mS[0] = mS[1] = -Number.MAX_VALUE;
  13879. for (var t = this.data, e = 0, i = 0, n = 0, o = 0, a = 0; a < t.length;) {
  13880. var r = t[a++];
  13881. switch (1 == a && (n = e = t[a], o = i = t[a + 1]), r) {
  13882. case dS.M:
  13883. e = n = t[a++], i = o = t[a++], gS[0] = n, gS[1] = o, mS[0] = n, mS[1] = o;
  13884. break;
  13885. case dS.L:
  13886. fn(e, i, t[a], t[a + 1], gS, mS), e = t[a++], i = t[a++];
  13887. break;
  13888. case dS.C:
  13889. pn(e, i, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], gS, mS), e = t[a++], i = t[a++];
  13890. break;
  13891. case dS.Q:
  13892. gn(e, i, t[a++], t[a++], t[a], t[a + 1], gS, mS), e = t[a++], i = t[a++];
  13893. break;
  13894. case dS.A:
  13895. var s = t[a++],
  13896. l = t[a++],
  13897. u = t[a++],
  13898. h = t[a++],
  13899. c = t[a++],
  13900. d = t[a++] + c,
  13901. f = (t[a++], 1 - t[a++]);
  13902. 1 == a && (n = xS(c) * u + s, o = _S(c) * h + l), mn(s, l, u, h, c, d, f, gS, mS), e = xS(d) * u + s, i = _S(d) *
  13903. h + l;
  13904. break;
  13905. case dS.R:
  13906. fn(n = e = t[a++], o = i = t[a++], n + t[a++], o + t[a++], gS, mS);
  13907. break;
  13908. case dS.Z:
  13909. e = n, i = o
  13910. }
  13911. tt(fS, fS, gS), et(pS, pS, mS)
  13912. }
  13913. return 0 === a && (fS[0] = fS[1] = pS[0] = pS[1] = 0), new ue(fS[0], fS[1], pS[0] - fS[0], pS[1] - fS[1])
  13914. },
  13915. rebuildPath: function(t) {
  13916. for (var e, i, n, o, a, r, s = this.data, l = this._ux, u = this._uy, h = this._len, c = 0; c < h;) {
  13917. var d = s[c++];
  13918. switch (1 == c && (e = n = s[c], i = o = s[c + 1]), d) {
  13919. case dS.M:
  13920. e = n = s[c++], i = o = s[c++], t.moveTo(n, o);
  13921. break;
  13922. case dS.L:
  13923. a = s[c++], r = s[c++], (bS(a - n) > l || bS(r - o) > u || c === h - 1) && (t.lineTo(a, r), n = a, o = r);
  13924. break;
  13925. case dS.C:
  13926. t.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1];
  13927. break;
  13928. case dS.Q:
  13929. t.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1];
  13930. break;
  13931. case dS.A:
  13932. var f = s[c++],
  13933. p = s[c++],
  13934. g = s[c++],
  13935. m = s[c++],
  13936. v = s[c++],
  13937. y = s[c++],
  13938. x = s[c++],
  13939. _ = s[c++],
  13940. w = g > m ? g : m,
  13941. b = g > m ? 1 : g / m,
  13942. S = g > m ? m / g : 1,
  13943. M = v + y;
  13944. Math.abs(g - m) > .001 ? (t.translate(f, p), t.rotate(x), t.scale(b, S), t.arc(0, 0, w, v, M, 1 - _), t.scale(
  13945. 1 / b, 1 / S), t.rotate(-x), t.translate(-f, -p)) : t.arc(f, p, w, v, M, 1 - _), 1 == c && (e = xS(v) * g +
  13946. f, i = _S(v) * m + p), n = xS(M) * g + f, o = _S(M) * m + p;
  13947. break;
  13948. case dS.R:
  13949. e = n = s[c], i = o = s[c + 1], t.rect(s[c++], s[c++], s[c++], s[c++]);
  13950. break;
  13951. case dS.Z:
  13952. t.closePath(), n = e, o = i
  13953. }
  13954. }
  13955. }
  13956. }, MS.CMD = dS;
  13957. var IS = 2 * Math.PI,
  13958. TS = 2 * Math.PI,
  13959. AS = MS.CMD,
  13960. DS = 2 * Math.PI,
  13961. CS = 1e-4,
  13962. LS = [-1, -1, -1],
  13963. kS = [-1, -1],
  13964. PS = eb.prototype.getCanvasPattern,
  13965. NS = Math.abs,
  13966. OS = new MS(!0);
  13967. kn.prototype = {
  13968. constructor: kn,
  13969. type: "path",
  13970. __dirtyPath: !0,
  13971. strokeContainThreshold: 5,
  13972. brush: function(t, e) {
  13973. var i = this.style,
  13974. n = this.path || OS,
  13975. o = i.hasStroke(),
  13976. a = i.hasFill(),
  13977. r = i.fill,
  13978. s = i.stroke,
  13979. l = a && !!r.colorStops,
  13980. u = o && !!s.colorStops,
  13981. h = a && !!r.image,
  13982. c = o && !!s.image;
  13983. if (i.bind(t, this, e), this.setTransform(t), this.__dirty) {
  13984. var d;
  13985. l && (d = d || this.getBoundingRect(), this._fillGradient = i.getGradient(t, r, d)), u && (d = d || this.getBoundingRect(),
  13986. this._strokeGradient = i.getGradient(t, s, d))
  13987. }
  13988. l ? t.fillStyle = this._fillGradient : h && (t.fillStyle = PS.call(r, t)), u ? t.strokeStyle = this._strokeGradient :
  13989. c && (t.strokeStyle = PS.call(s, t));
  13990. var f = i.lineDash,
  13991. p = i.lineDashOffset,
  13992. g = !!t.setLineDash,
  13993. m = this.getGlobalScale();
  13994. if (n.setScale(m[0], m[1]), this.__dirtyPath || f && !g && o ? (n.beginPath(t), f && !g && (n.setLineDash(f), n.setLineDashOffset(
  13995. p)), this.buildPath(n, this.shape, !1), this.path && (this.__dirtyPath = !1)) : (t.beginPath(), this.path.rebuildPath(
  13996. t)), a)
  13997. if (null != i.fillOpacity) {
  13998. v = t.globalAlpha;
  13999. t.globalAlpha = i.fillOpacity * i.opacity, n.fill(t), t.globalAlpha = v
  14000. } else n.fill(t);
  14001. if (f && g && (t.setLineDash(f), t.lineDashOffset = p), o)
  14002. if (null != i.strokeOpacity) {
  14003. var v = t.globalAlpha;
  14004. t.globalAlpha = i.strokeOpacity * i.opacity, n.stroke(t), t.globalAlpha = v
  14005. } else n.stroke(t);
  14006. f && g && t.setLineDash([]), null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect()))
  14007. },
  14008. buildPath: function(t, e, i) {},
  14009. createPathProxy: function() {
  14010. this.path = new MS
  14011. },
  14012. getBoundingRect: function() {
  14013. var t = this._rect,
  14014. e = this.style,
  14015. i = !t;
  14016. if (i) {
  14017. var n = this.path;
  14018. n || (n = this.path = new MS), this.__dirtyPath && (n.beginPath(), this.buildPath(n, this.shape, !1)), t = n.getBoundingRect()
  14019. }
  14020. if (this._rect = t, e.hasStroke()) {
  14021. var o = this._rectWithStroke || (this._rectWithStroke = t.clone());
  14022. if (this.__dirty || i) {
  14023. o.copy(t);
  14024. var a = e.lineWidth,
  14025. r = e.strokeNoScale ? this.getLineScale() : 1;
  14026. e.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4)), r > 1e-10 && (o.width += a / r, o.height +=
  14027. a / r, o.x -= a / r / 2, o.y -= a / r / 2)
  14028. }
  14029. return o
  14030. }
  14031. return t
  14032. },
  14033. contain: function(t, e) {
  14034. var i = this.transformCoordToLocal(t, e),
  14035. n = this.getBoundingRect(),
  14036. o = this.style;
  14037. if (t = i[0], e = i[1], n.contain(t, e)) {
  14038. var a = this.path.data;
  14039. if (o.hasStroke()) {
  14040. var r = o.lineWidth,
  14041. s = o.strokeNoScale ? this.getLineScale() : 1;
  14042. if (s > 1e-10 && (o.hasFill() || (r = Math.max(r, this.strokeContainThreshold)), Ln(a, r / s, t, e))) return !0
  14043. }
  14044. if (o.hasFill()) return Cn(a, t, e)
  14045. }
  14046. return !1
  14047. },
  14048. dirty: function(t) {
  14049. null == t && (t = !0), t && (this.__dirtyPath = t, this._rect = null), this.__dirty = this.__dirtyText = !0, this
  14050. .__zr && this.__zr.refresh(), this.__clipTarget && this.__clipTarget.dirty()
  14051. },
  14052. animateShape: function(t) {
  14053. return this.animate("shape", t)
  14054. },
  14055. attrKV: function(t, e) {
  14056. "shape" === t ? (this.setShape(e), this.__dirtyPath = !0, this._rect = null) : ui.prototype.attrKV.call(this, t,
  14057. e)
  14058. },
  14059. setShape: function(t, e) {
  14060. var i = this.shape;
  14061. if (i) {
  14062. if (w(t))
  14063. for (var n in t) t.hasOwnProperty(n) && (i[n] = t[n]);
  14064. else i[t] = e;
  14065. this.dirty(!0)
  14066. }
  14067. return this
  14068. },
  14069. getLineScale: function() {
  14070. var t = this.transform;
  14071. return t && NS(t[0] - 1) > 1e-10 && NS(t[3] - 1) > 1e-10 ? Math.sqrt(NS(t[0] * t[3] - t[2] * t[1])) : 1
  14072. }
  14073. }, kn.extend = function(t) {
  14074. var e = function(e) {
  14075. kn.call(this, e), t.style && this.style.extendFrom(t.style, !1);
  14076. var i = t.shape;
  14077. if (i) {
  14078. this.shape = this.shape || {};
  14079. var n = this.shape;
  14080. for (var o in i) !n.hasOwnProperty(o) && i.hasOwnProperty(o) && (n[o] = i[o])
  14081. }
  14082. t.init && t.init.call(this, e)
  14083. };
  14084. u(e, kn);
  14085. for (var i in t) "style" !== i && "shape" !== i && (e.prototype[i] = t[i]);
  14086. return e
  14087. }, u(kn, ui);
  14088. var ES = MS.CMD,
  14089. RS = [
  14090. [],
  14091. [],
  14092. []
  14093. ],
  14094. zS = Math.sqrt,
  14095. BS = Math.atan2,
  14096. VS = function(t, e) {
  14097. var i, n, o, a, r, s, l = t.data,
  14098. u = ES.M,
  14099. h = ES.C,
  14100. c = ES.L,
  14101. d = ES.R,
  14102. f = ES.A,
  14103. p = ES.Q;
  14104. for (o = 0, a = 0; o < l.length;) {
  14105. switch (i = l[o++], a = o, n = 0, i) {
  14106. case u:
  14107. case c:
  14108. n = 1;
  14109. break;
  14110. case h:
  14111. n = 3;
  14112. break;
  14113. case p:
  14114. n = 2;
  14115. break;
  14116. case f:
  14117. var g = e[4],
  14118. m = e[5],
  14119. v = zS(e[0] * e[0] + e[1] * e[1]),
  14120. y = zS(e[2] * e[2] + e[3] * e[3]),
  14121. x = BS(-e[1] / y, e[0] / v);
  14122. l[o] *= v, l[o++] += g, l[o] *= y, l[o++] += m, l[o++] *= v, l[o++] *= y, l[o++] += x, l[o++] += x, a = o += 2;
  14123. break;
  14124. case d:
  14125. s[0] = l[o++], s[1] = l[o++], Q(s, s, e), l[a++] = s[0], l[a++] = s[1], s[0] += l[o++], s[1] += l[o++], Q(s, s,
  14126. e), l[a++] = s[0], l[a++] = s[1]
  14127. }
  14128. for (r = 0; r < n; r++)(s = RS[r])[0] = l[o++], s[1] = l[o++], Q(s, s, e), l[a++] = s[0], l[a++] = s[1]
  14129. }
  14130. },
  14131. GS = Math.sqrt,
  14132. FS = Math.sin,
  14133. WS = Math.cos,
  14134. HS = Math.PI,
  14135. ZS = function(t) {
  14136. return Math.sqrt(t[0] * t[0] + t[1] * t[1])
  14137. },
  14138. US = function(t, e) {
  14139. return (t[0] * e[0] + t[1] * e[1]) / (ZS(t) * ZS(e))
  14140. },
  14141. XS = function(t, e) {
  14142. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(US(t, e))
  14143. },
  14144. jS = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,
  14145. YS = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,
  14146. qS = function(t) {
  14147. ui.call(this, t)
  14148. };
  14149. qS.prototype = {
  14150. constructor: qS,
  14151. type: "text",
  14152. brush: function(t, e) {
  14153. var i = this.style;
  14154. this.__dirty && Ue(i), i.fill = i.stroke = i.shadowBlur = i.shadowColor = i.shadowOffsetX = i.shadowOffsetY =
  14155. null;
  14156. var n = i.text;
  14157. null != n && (n += ""), li(n, i) && (this.setTransform(t), je(this, t, n, i, null, e), this.restoreTransform(t))
  14158. },
  14159. getBoundingRect: function() {
  14160. var t = this.style;
  14161. if (this.__dirty && Ue(t), !this._rect) {
  14162. var e = t.text;
  14163. null != e ? e += "" : e = "";
  14164. var i = De(t.text + "", t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.rich);
  14165. if (i.x += t.x || 0, i.y += t.y || 0, oi(t.textStroke, t.textStrokeWidth)) {
  14166. var n = t.textStrokeWidth;
  14167. i.x -= n / 2, i.y -= n / 2, i.width += n, i.height += n
  14168. }
  14169. this._rect = i
  14170. }
  14171. return this._rect
  14172. }
  14173. }, u(qS, ui);
  14174. var KS = kn.extend({
  14175. type: "circle",
  14176. shape: {
  14177. cx: 0,
  14178. cy: 0,
  14179. r: 0
  14180. },
  14181. buildPath: function(t, e, i) {
  14182. i && t.moveTo(e.cx + e.r, e.cy), t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI, !0)
  14183. }
  14184. }),
  14185. $S = [
  14186. ["shadowBlur", 0],
  14187. ["shadowColor", "#000"],
  14188. ["shadowOffsetX", 0],
  14189. ["shadowOffsetY", 0]
  14190. ],
  14191. JS = function(t) {
  14192. return z_.browser.ie && z_.browser.version >= 11 ? function() {
  14193. var e, i = this.__clipPaths,
  14194. n = this.style;
  14195. if (i)
  14196. for (var o = 0; o < i.length; o++) {
  14197. var a = i[o],
  14198. r = a && a.shape,
  14199. s = a && a.type;
  14200. if (r && ("sector" === s && r.startAngle === r.endAngle || "rect" === s && (!r.width || !r.height))) {
  14201. for (l = 0; l < $S.length; l++) $S[l][2] = n[$S[l][0]], n[$S[l][0]] = $S[l][1];
  14202. e = !0;
  14203. break
  14204. }
  14205. }
  14206. if (t.apply(this, arguments), e)
  14207. for (var l = 0; l < $S.length; l++) n[$S[l][0]] = $S[l][2]
  14208. } : t
  14209. },
  14210. QS = kn.extend({
  14211. type: "sector",
  14212. shape: {
  14213. cx: 0,
  14214. cy: 0,
  14215. r0: 0,
  14216. r: 0,
  14217. startAngle: 0,
  14218. endAngle: 2 * Math.PI,
  14219. clockwise: !0
  14220. },
  14221. brush: JS(kn.prototype.brush),
  14222. buildPath: function(t, e) {
  14223. var i = e.cx,
  14224. n = e.cy,
  14225. o = Math.max(e.r0 || 0, 0),
  14226. a = Math.max(e.r, 0),
  14227. r = e.startAngle,
  14228. s = e.endAngle,
  14229. l = e.clockwise,
  14230. u = Math.cos(r),
  14231. h = Math.sin(r);
  14232. t.moveTo(u * o + i, h * o + n), t.lineTo(u * a + i, h * a + n), t.arc(i, n, a, r, s, !l), t.lineTo(Math.cos(s) *
  14233. o + i, Math.sin(s) * o + n), 0 !== o && t.arc(i, n, o, s, r, l), t.closePath()
  14234. }
  14235. }),
  14236. tM = kn.extend({
  14237. type: "ring",
  14238. shape: {
  14239. cx: 0,
  14240. cy: 0,
  14241. r: 0,
  14242. r0: 0
  14243. },
  14244. buildPath: function(t, e) {
  14245. var i = e.cx,
  14246. n = e.cy,
  14247. o = 2 * Math.PI;
  14248. t.moveTo(i + e.r, n), t.arc(i, n, e.r, 0, o, !1), t.moveTo(i + e.r0, n), t.arc(i, n, e.r0, 0, o, !0)
  14249. }
  14250. }),
  14251. eM = function(t, e) {
  14252. for (var i = t.length, n = [], o = 0, a = 1; a < i; a++) o += K(t[a - 1], t[a]);
  14253. var r = o / 2;
  14254. r = r < i ? i : r;
  14255. for (a = 0; a < r; a++) {
  14256. var s, l, u, h = a / (r - 1) * (e ? i : i - 1),
  14257. c = Math.floor(h),
  14258. d = h - c,
  14259. f = t[c % i];
  14260. e ? (s = t[(c - 1 + i) % i], l = t[(c + 1) % i], u = t[(c + 2) % i]) : (s = t[0 === c ? c : c - 1], l = t[c > i -
  14261. 2 ? i - 1 : c + 1], u = t[c > i - 3 ? i - 1 : c + 2]);
  14262. var p = d * d,
  14263. g = d * p;
  14264. n.push([zn(s[0], f[0], l[0], u[0], d, p, g), zn(s[1], f[1], l[1], u[1], d, p, g)])
  14265. }
  14266. return n
  14267. },
  14268. iM = function(t, e, i, n) {
  14269. var o, a, r, s, l = [],
  14270. u = [],
  14271. h = [],
  14272. c = [];
  14273. if (n) {
  14274. r = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0];
  14275. for (var d = 0, f = t.length; d < f; d++) tt(r, r, t[d]), et(s, s, t[d]);
  14276. tt(r, r, n[0]), et(s, s, n[1])
  14277. }
  14278. for (var d = 0, f = t.length; d < f; d++) {
  14279. var p = t[d];
  14280. if (i) o = t[d ? d - 1 : f - 1], a = t[(d + 1) % f];
  14281. else {
  14282. if (0 === d || d === f - 1) {
  14283. l.push(F(t[d]));
  14284. continue
  14285. }
  14286. o = t[d - 1], a = t[d + 1]
  14287. }
  14288. U(u, a, o), Y(u, u, e);
  14289. var g = K(p, o),
  14290. m = K(p, a),
  14291. v = g + m;
  14292. 0 !== v && (g /= v, m /= v), Y(h, u, -g), Y(c, u, m);
  14293. var y = H([], p, h),
  14294. x = H([], p, c);
  14295. n && (et(y, y, r), tt(y, y, s), et(x, x, r), tt(x, x, s)), l.push(y), l.push(x)
  14296. }
  14297. return i && l.push(l.shift()), l
  14298. },
  14299. nM = kn.extend({
  14300. type: "polygon",
  14301. shape: {
  14302. points: null,
  14303. smooth: !1,
  14304. smoothConstraint: null
  14305. },
  14306. buildPath: function(t, e) {
  14307. Bn(t, e, !0)
  14308. }
  14309. }),
  14310. oM = kn.extend({
  14311. type: "polyline",
  14312. shape: {
  14313. points: null,
  14314. smooth: !1,
  14315. smoothConstraint: null
  14316. },
  14317. style: {
  14318. stroke: "#000",
  14319. fill: null
  14320. },
  14321. buildPath: function(t, e) {
  14322. Bn(t, e, !1)
  14323. }
  14324. }),
  14325. aM = kn.extend({
  14326. type: "rect",
  14327. shape: {
  14328. r: 0,
  14329. x: 0,
  14330. y: 0,
  14331. width: 0,
  14332. height: 0
  14333. },
  14334. buildPath: function(t, e) {
  14335. var i = e.x,
  14336. n = e.y,
  14337. o = e.width,
  14338. a = e.height;
  14339. e.r ? Ze(t, e) : t.rect(i, n, o, a), t.closePath()
  14340. }
  14341. }),
  14342. rM = kn.extend({
  14343. type: "line",
  14344. shape: {
  14345. x1: 0,
  14346. y1: 0,
  14347. x2: 0,
  14348. y2: 0,
  14349. percent: 1
  14350. },
  14351. style: {
  14352. stroke: "#000",
  14353. fill: null
  14354. },
  14355. buildPath: function(t, e) {
  14356. var i = e.x1,
  14357. n = e.y1,
  14358. o = e.x2,
  14359. a = e.y2,
  14360. r = e.percent;
  14361. 0 !== r && (t.moveTo(i, n), r < 1 && (o = i * (1 - r) + o * r, a = n * (1 - r) + a * r), t.lineTo(o, a))
  14362. },
  14363. pointAt: function(t) {
  14364. var e = this.shape;
  14365. return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t]
  14366. }
  14367. }),
  14368. sM = [],
  14369. lM = kn.extend({
  14370. type: "bezier-curve",
  14371. shape: {
  14372. x1: 0,
  14373. y1: 0,
  14374. x2: 0,
  14375. y2: 0,
  14376. cpx1: 0,
  14377. cpy1: 0,
  14378. percent: 1
  14379. },
  14380. style: {
  14381. stroke: "#000",
  14382. fill: null
  14383. },
  14384. buildPath: function(t, e) {
  14385. var i = e.x1,
  14386. n = e.y1,
  14387. o = e.x2,
  14388. a = e.y2,
  14389. r = e.cpx1,
  14390. s = e.cpy1,
  14391. l = e.cpx2,
  14392. u = e.cpy2,
  14393. h = e.percent;
  14394. 0 !== h && (t.moveTo(i, n), null == l || null == u ? (h < 1 && (hn(i, r, o, h, sM), r = sM[1], o = sM[2], hn(n,
  14395. s, a, h, sM), s = sM[1], a = sM[2]), t.quadraticCurveTo(r, s, o, a)) : (h < 1 && (on(i, r, l, o, h, sM), r =
  14396. sM[1], l = sM[2], o = sM[3], on(n, s, u, a, h, sM), s = sM[1], u = sM[2], a = sM[3]), t.bezierCurveTo(r, s,
  14397. l, u, o, a)))
  14398. },
  14399. pointAt: function(t) {
  14400. return Vn(this.shape, t, !1)
  14401. },
  14402. tangentAt: function(t) {
  14403. var e = Vn(this.shape, t, !0);
  14404. return q(e, e)
  14405. }
  14406. }),
  14407. uM = kn.extend({
  14408. type: "arc",
  14409. shape: {
  14410. cx: 0,
  14411. cy: 0,
  14412. r: 0,
  14413. startAngle: 0,
  14414. endAngle: 2 * Math.PI,
  14415. clockwise: !0
  14416. },
  14417. style: {
  14418. stroke: "#000",
  14419. fill: null
  14420. },
  14421. buildPath: function(t, e) {
  14422. var i = e.cx,
  14423. n = e.cy,
  14424. o = Math.max(e.r, 0),
  14425. a = e.startAngle,
  14426. r = e.endAngle,
  14427. s = e.clockwise,
  14428. l = Math.cos(a),
  14429. u = Math.sin(a);
  14430. t.moveTo(l * o + i, u * o + n), t.arc(i, n, o, a, r, !s)
  14431. }
  14432. }),
  14433. hM = kn.extend({
  14434. type: "compound",
  14435. shape: {
  14436. paths: null
  14437. },
  14438. _updatePathDirty: function() {
  14439. for (var t = this.__dirtyPath, e = this.shape.paths, i = 0; i < e.length; i++) t = t || e[i].__dirtyPath;
  14440. this.__dirtyPath = t, this.__dirty = this.__dirty || t
  14441. },
  14442. beforeBrush: function() {
  14443. this._updatePathDirty();
  14444. for (var t = this.shape.paths || [], e = this.getGlobalScale(), i = 0; i < t.length; i++) t[i].path || t[i].createPathProxy(),
  14445. t[i].path.setScale(e[0], e[1])
  14446. },
  14447. buildPath: function(t, e) {
  14448. for (var i = e.paths || [], n = 0; n < i.length; n++) i[n].buildPath(t, i[n].shape, !0)
  14449. },
  14450. afterBrush: function() {
  14451. for (var t = this.shape.paths || [], e = 0; e < t.length; e++) t[e].__dirtyPath = !1
  14452. },
  14453. getBoundingRect: function() {
  14454. return this._updatePathDirty(), kn.prototype.getBoundingRect.call(this)
  14455. }
  14456. }),
  14457. cM = function(t) {
  14458. this.colorStops = t || []
  14459. };
  14460. cM.prototype = {
  14461. constructor: cM,
  14462. addColorStop: function(t, e) {
  14463. this.colorStops.push({
  14464. offset: t,
  14465. color: e
  14466. })
  14467. }
  14468. };
  14469. var dM = function(t, e, i, n, o, a) {
  14470. this.x = null == t ? 0 : t, this.y = null == e ? 0 : e, this.x2 = null == i ? 1 : i, this.y2 = null == n ? 0 : n,
  14471. this.type = "linear", this.global = a || !1, cM.call(this, o)
  14472. };
  14473. dM.prototype = {
  14474. constructor: dM
  14475. }, u(dM, cM);
  14476. var fM = function(t, e, i, n, o) {
  14477. this.x = null == t ? .5 : t, this.y = null == e ? .5 : e, this.r = null == i ? .5 : i, this.type = "radial", this.global =
  14478. o || !1, cM.call(this, n)
  14479. };
  14480. fM.prototype = {
  14481. constructor: fM
  14482. }, u(fM, cM), Gn.prototype.incremental = !0, Gn.prototype.clearDisplaybles = function() {
  14483. this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.dirty(), this.notClear = !1
  14484. }, Gn.prototype.addDisplayable = function(t, e) {
  14485. e ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.dirty()
  14486. }, Gn.prototype.addDisplayables = function(t, e) {
  14487. e = e || !1;
  14488. for (var i = 0; i < t.length; i++) this.addDisplayable(t[i], e)
  14489. }, Gn.prototype.eachPendingDisplayable = function(t) {
  14490. for (e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]);
  14491. for (var e = 0; e < this._temporaryDisplayables.length; e++) t && t(this._temporaryDisplayables[e])
  14492. }, Gn.prototype.update = function() {
  14493. this.updateTransform();
  14494. for (t = this._cursor; t < this._displayables.length; t++)(e = this._displayables[t]).parent = this, e.update(), e.parent =
  14495. null;
  14496. for (var t = 0; t < this._temporaryDisplayables.length; t++) {
  14497. var e = this._temporaryDisplayables[t];
  14498. e.parent = this, e.update(), e.parent = null
  14499. }
  14500. }, Gn.prototype.brush = function(t, e) {
  14501. for (i = this._cursor; i < this._displayables.length; i++)(n = this._displayables[i]).beforeBrush && n.beforeBrush(
  14502. t), n.brush(t, i === this._cursor ? null : this._displayables[i - 1]), n.afterBrush && n.afterBrush(t);
  14503. this._cursor = i;
  14504. for (var i = 0; i < this._temporaryDisplayables.length; i++) {
  14505. var n = this._temporaryDisplayables[i];
  14506. n.beforeBrush && n.beforeBrush(t), n.brush(t, 0 === i ? null : this._temporaryDisplayables[i - 1]), n.afterBrush &&
  14507. n.afterBrush(t)
  14508. }
  14509. this._temporaryDisplayables = [], this.notClear = !0
  14510. };
  14511. var pM = [];
  14512. Gn.prototype.getBoundingRect = function() {
  14513. if (!this._rect) {
  14514. for (var t = new ue(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) {
  14515. var i = this._displayables[e],
  14516. n = i.getBoundingRect().clone();
  14517. i.needLocalTransform() && n.applyTransform(i.getLocalTransform(pM)), t.union(n)
  14518. }
  14519. this._rect = t
  14520. }
  14521. return this._rect
  14522. }, Gn.prototype.contain = function(t, e) {
  14523. var i = this.transformCoordToLocal(t, e);
  14524. if (this.getBoundingRect().contain(i[0], i[1]))
  14525. for (var n = 0; n < this._displayables.length; n++)
  14526. if (this._displayables[n].contain(t, e)) return !0;
  14527. return !1
  14528. }, u(Gn, ui);
  14529. var gM = Math.round,
  14530. mM = Math.max,
  14531. vM = Math.min,
  14532. yM = {},
  14533. xM = function(t, e) {
  14534. for (var i = [], n = t.length, o = 0; o < n; o++) {
  14535. var a = t[o];
  14536. a.path || a.createPathProxy(), a.__dirtyPath && a.buildPath(a.path, a.shape, !0), i.push(a.path)
  14537. }
  14538. var r = new kn(e);
  14539. return r.createPathProxy(), r.buildPath = function(t) {
  14540. t.appendPath(i);
  14541. var e = t.getContext();
  14542. e && t.rebuildPath(e)
  14543. }, r
  14544. },
  14545. _M = R(),
  14546. wM = 0,
  14547. bM = (Object.freeze || Object)({
  14548. extendShape: Fn,
  14549. extendPath: function(t, e) {
  14550. return Rn(t, e)
  14551. },
  14552. makePath: Wn,
  14553. makeImage: Hn,
  14554. mergePath: xM,
  14555. resizePath: Un,
  14556. subPixelOptimizeLine: Xn,
  14557. subPixelOptimizeRect: jn,
  14558. subPixelOptimize: Yn,
  14559. setElementHoverStyle: no,
  14560. isInEmphasis: oo,
  14561. setHoverStyle: uo,
  14562. setAsHoverStyleTrigger: ho,
  14563. setLabelStyle: co,
  14564. setTextStyle: fo,
  14565. setText: function(t, e, i) {
  14566. var n, o = {
  14567. isRectText: !0
  14568. };
  14569. !1 === i ? n = !0 : o.autoColor = i, po(t, e, o, n)
  14570. },
  14571. getFont: _o,
  14572. updateProps: bo,
  14573. initProps: So,
  14574. getTransform: Mo,
  14575. applyTransform: Io,
  14576. transformDirection: To,
  14577. groupTransition: Ao,
  14578. clipPointsByRect: Do,
  14579. clipRectByRect: function(t, e) {
  14580. var i = mM(t.x, e.x),
  14581. n = vM(t.x + t.width, e.x + e.width),
  14582. o = mM(t.y, e.y),
  14583. a = vM(t.y + t.height, e.y + e.height);
  14584. if (n >= i && a >= o) return {
  14585. x: i,
  14586. y: o,
  14587. width: n - i,
  14588. height: a - o
  14589. }
  14590. },
  14591. createIcon: Co,
  14592. Group: Zw,
  14593. Image: hi,
  14594. Text: qS,
  14595. Circle: KS,
  14596. Sector: QS,
  14597. Ring: tM,
  14598. Polygon: nM,
  14599. Polyline: oM,
  14600. Rect: aM,
  14601. Line: rM,
  14602. BezierCurve: lM,
  14603. Arc: uM,
  14604. IncrementalDisplayable: Gn,
  14605. CompoundPath: hM,
  14606. LinearGradient: dM,
  14607. RadialGradient: fM,
  14608. BoundingRect: ue
  14609. }),
  14610. SM = ["textStyle", "color"],
  14611. MM = {
  14612. getTextColor: function(t) {
  14613. var e = this.ecModel;
  14614. return this.getShallow("color") || (!t && e ? e.get(SM) : null)
  14615. },
  14616. getFont: function() {
  14617. return _o({
  14618. fontStyle: this.getShallow("fontStyle"),
  14619. fontWeight: this.getShallow("fontWeight"),
  14620. fontSize: this.getShallow("fontSize"),
  14621. fontFamily: this.getShallow("fontFamily")
  14622. }, this.ecModel)
  14623. },
  14624. getTextRect: function(t) {
  14625. return De(t, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow(
  14626. "baseline"), this.getShallow("padding"), this.getShallow("rich"), this.getShallow("truncateText"))
  14627. }
  14628. },
  14629. IM = Wb([
  14630. ["fill", "color"],
  14631. ["stroke", "borderColor"],
  14632. ["lineWidth", "borderWidth"],
  14633. ["opacity"],
  14634. ["shadowBlur"],
  14635. ["shadowOffsetX"],
  14636. ["shadowOffsetY"],
  14637. ["shadowColor"],
  14638. ["textPosition"],
  14639. ["textAlign"]
  14640. ]),
  14641. TM = {
  14642. getItemStyle: function(t, e) {
  14643. var i = IM(this, t, e),
  14644. n = this.getBorderLineDash();
  14645. return n && (i.lineDash = n), i
  14646. },
  14647. getBorderLineDash: function() {
  14648. var t = this.get("borderType");
  14649. return "solid" === t || null == t ? null : "dashed" === t ? [5, 5] : [1, 1]
  14650. }
  14651. },
  14652. AM = h,
  14653. DM = Bi();
  14654. Lo.prototype = {
  14655. constructor: Lo,
  14656. init: null,
  14657. mergeOption: function(t) {
  14658. n(this.option, t, !0)
  14659. },
  14660. get: function(t, e) {
  14661. return null == t ? this.option : ko(this.option, this.parsePath(t), !e && Po(this, t))
  14662. },
  14663. getShallow: function(t, e) {
  14664. var i = this.option,
  14665. n = null == i ? i : i[t],
  14666. o = !e && Po(this, t);
  14667. return null == n && o && (n = o.getShallow(t)), n
  14668. },
  14669. getModel: function(t, e) {
  14670. var i, n = null == t ? this.option : ko(this.option, t = this.parsePath(t));
  14671. return e = e || (i = Po(this, t)) && i.getModel(t), new Lo(n, e, this.ecModel)
  14672. },
  14673. isEmpty: function() {
  14674. return null == this.option
  14675. },
  14676. restoreData: function() {},
  14677. clone: function() {
  14678. return new(0, this.constructor)(i(this.option))
  14679. },
  14680. setReadOnly: function(t) {},
  14681. parsePath: function(t) {
  14682. return "string" == typeof t && (t = t.split(".")), t
  14683. },
  14684. customizeGetParent: function(t) {
  14685. DM(this).getParent = t
  14686. },
  14687. isAnimationEnabled: function() {
  14688. if (!z_.node) {
  14689. if (null != this.option.animation) return !!this.option.animation;
  14690. if (this.parentModel) return this.parentModel.isAnimationEnabled()
  14691. }
  14692. }
  14693. }, Xi(Lo), ji(Lo), AM(Lo, Zb), AM(Lo, Xb), AM(Lo, MM), AM(Lo, TM);
  14694. var CM = 0,
  14695. LM = 1e-4,
  14696. kM = 9007199254740991,
  14697. PM =
  14698. /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,
  14699. NM = (Object.freeze || Object)({
  14700. linearMap: Eo,
  14701. parsePercent: Ro,
  14702. round: zo,
  14703. asc: Bo,
  14704. getPrecision: Vo,
  14705. getPrecisionSafe: Go,
  14706. getPixelPrecision: Fo,
  14707. getPercentWithPrecision: Wo,
  14708. MAX_SAFE_INTEGER: kM,
  14709. remRadian: Ho,
  14710. isRadianAroundZero: Zo,
  14711. parseDate: Uo,
  14712. quantity: Xo,
  14713. nice: Yo,
  14714. quantile: function(t, e) {
  14715. var i = (t.length - 1) * e + 1,
  14716. n = Math.floor(i),
  14717. o = +t[n - 1],
  14718. a = i - n;
  14719. return a ? o + a * (t[n] - o) : o
  14720. },
  14721. reformIntervals: qo,
  14722. isNumeric: Ko
  14723. }),
  14724. OM = L,
  14725. EM = /([&<>"'])/g,
  14726. RM = {
  14727. "&": "&amp;",
  14728. "<": "&lt;",
  14729. ">": "&gt;",
  14730. '"': "&quot;",
  14731. "'": "&#39;"
  14732. },
  14733. zM = ["a", "b", "c", "d", "e", "f", "g"],
  14734. BM = function(t, e) {
  14735. return "{" + t + (null == e ? "" : e) + "}"
  14736. },
  14737. VM = Oe,
  14738. GM = De,
  14739. FM = (Object.freeze || Object)({
  14740. addCommas: $o,
  14741. toCamelCase: Jo,
  14742. normalizeCssArray: OM,
  14743. encodeHTML: Qo,
  14744. formatTpl: ta,
  14745. formatTplSimple: ea,
  14746. getTooltipMarker: ia,
  14747. formatTime: oa,
  14748. capitalFirst: aa,
  14749. truncateText: VM,
  14750. getTextRect: GM
  14751. }),
  14752. WM = d,
  14753. HM = ["left", "right", "top", "bottom", "width", "height"],
  14754. ZM = [
  14755. ["width", "left", "right"],
  14756. ["height", "top", "bottom"]
  14757. ],
  14758. UM = ra,
  14759. XM = (v(ra, "vertical"), v(ra, "horizontal"), {
  14760. getBoxLayoutParams: function() {
  14761. return {
  14762. left: this.get("left"),
  14763. top: this.get("top"),
  14764. right: this.get("right"),
  14765. bottom: this.get("bottom"),
  14766. width: this.get("width"),
  14767. height: this.get("height")
  14768. }
  14769. }
  14770. }),
  14771. jM = Bi(),
  14772. YM = Lo.extend({
  14773. type: "component",
  14774. id: "",
  14775. name: "",
  14776. mainType: "",
  14777. subType: "",
  14778. componentIndex: 0,
  14779. defaultOption: null,
  14780. ecModel: null,
  14781. dependentModels: [],
  14782. uid: null,
  14783. layoutMode: null,
  14784. $constructor: function(t, e, i, n) {
  14785. Lo.call(this, t, e, i, n), this.uid = No("ec_cpt_model")
  14786. },
  14787. init: function(t, e, i, n) {
  14788. this.mergeDefaultAndTheme(t, i)
  14789. },
  14790. mergeDefaultAndTheme: function(t, e) {
  14791. var i = this.layoutMode,
  14792. o = i ? da(t) : {};
  14793. n(t, e.getTheme().get(this.mainType)), n(t, this.getDefaultOption()), i && ca(t, o, i)
  14794. },
  14795. mergeOption: function(t, e) {
  14796. n(this.option, t, !0);
  14797. var i = this.layoutMode;
  14798. i && ca(this.option, t, i)
  14799. },
  14800. optionUpdated: function(t, e) {},
  14801. getDefaultOption: function() {
  14802. var t = jM(this);
  14803. if (!t.defaultOption) {
  14804. for (var e = [], i = this.constructor; i;) {
  14805. var o = i.prototype.defaultOption;
  14806. o && e.push(o), i = i.superClass
  14807. }
  14808. for (var a = {}, r = e.length - 1; r >= 0; r--) a = n(a, e[r], !0);
  14809. t.defaultOption = a
  14810. }
  14811. return t.defaultOption
  14812. },
  14813. getReferringComponents: function(t) {
  14814. return this.ecModel.queryComponents({
  14815. mainType: t,
  14816. index: this.get(t + "Index", !0),
  14817. id: this.get(t + "Id", !0)
  14818. })
  14819. }
  14820. });
  14821. Ki(YM, {
  14822. registerWhenExtend: !0
  14823. }),
  14824. function(t) {
  14825. var e = {};
  14826. t.registerSubTypeDefaulter = function(t, i) {
  14827. t = Zi(t), e[t.main] = i
  14828. }, t.determineSubType = function(i, n) {
  14829. var o = n.type;
  14830. if (!o) {
  14831. var a = Zi(i).main;
  14832. t.hasSubTypes(i) && e[a] && (o = e[a](n))
  14833. }
  14834. return o
  14835. }
  14836. }(YM),
  14837. function(t, e) {
  14838. function i(t) {
  14839. var i = {},
  14840. a = [];
  14841. return d(t, function(r) {
  14842. var s = n(i, r),
  14843. u = o(s.originalDeps = e(r), t);
  14844. s.entryCount = u.length, 0 === s.entryCount && a.push(r), d(u, function(t) {
  14845. l(s.predecessor, t) < 0 && s.predecessor.push(t);
  14846. var e = n(i, t);
  14847. l(e.successor, t) < 0 && e.successor.push(r)
  14848. })
  14849. }), {
  14850. graph: i,
  14851. noEntryList: a
  14852. }
  14853. }
  14854. function n(t, e) {
  14855. return t[e] || (t[e] = {
  14856. predecessor: [],
  14857. successor: []
  14858. }), t[e]
  14859. }
  14860. function o(t, e) {
  14861. var i = [];
  14862. return d(t, function(t) {
  14863. l(e, t) >= 0 && i.push(t)
  14864. }), i
  14865. }
  14866. t.topologicalTravel = function(t, e, n, o) {
  14867. function a(t) {
  14868. s[t].entryCount--, 0 === s[t].entryCount && l.push(t)
  14869. }
  14870. if (t.length) {
  14871. var r = i(e),
  14872. s = r.graph,
  14873. l = r.noEntryList,
  14874. u = {};
  14875. for (d(t, function(t) {
  14876. u[t] = !0
  14877. }); l.length;) {
  14878. var h = l.pop(),
  14879. c = s[h],
  14880. f = !!u[h];
  14881. f && (n.call(o, h, c.originalDeps.slice()), delete u[h]), d(c.successor, f ? function(t) {
  14882. u[t] = !0, a(t)
  14883. } : a)
  14884. }
  14885. d(u, function() {
  14886. throw new Error("Circle dependency may exists")
  14887. })
  14888. }
  14889. }
  14890. }(YM, function(t) {
  14891. var e = [];
  14892. return d(YM.getClassesByMainType(t), function(t) {
  14893. e = e.concat(t.prototype.dependencies || [])
  14894. }), e = f(e, function(t) {
  14895. return Zi(t).main
  14896. }), "dataset" !== t && l(e, "dataset") <= 0 && e.unshift("dataset"), e
  14897. }), h(YM, XM);
  14898. var qM = "";
  14899. "undefined" != typeof navigator && (qM = navigator.platform || "");
  14900. var KM = {
  14901. color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074",
  14902. "#546570", "#c4ccd3"
  14903. ],
  14904. gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  14905. textStyle: {
  14906. fontFamily: qM.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  14907. fontSize: 12,
  14908. fontStyle: "normal",
  14909. fontWeight: "normal"
  14910. },
  14911. blendMode: null,
  14912. animation: "auto",
  14913. animationDuration: 1e3,
  14914. animationDurationUpdate: 300,
  14915. animationEasing: "exponentialOut",
  14916. animationEasingUpdate: "cubicOut",
  14917. animationThreshold: 2e3,
  14918. progressiveThreshold: 3e3,
  14919. progressive: 400,
  14920. hoverLayerThreshold: 3e3,
  14921. useUTC: !1
  14922. },
  14923. $M = Bi(),
  14924. JM = {
  14925. clearColorPalette: function() {
  14926. $M(this).colorIdx = 0, $M(this).colorNameMap = {}
  14927. },
  14928. getColorFromPalette: function(t, e, i) {
  14929. var n = $M(e = e || this),
  14930. o = n.colorIdx || 0,
  14931. a = n.colorNameMap = n.colorNameMap || {};
  14932. if (a.hasOwnProperty(t)) return a[t];
  14933. var r = Di(this.get("color", !0)),
  14934. s = this.get("colorLayer", !0),
  14935. l = null != i && s ? pa(s, i) : r;
  14936. if ((l = l || r) && l.length) {
  14937. var u = l[o];
  14938. return t && (a[t] = u), n.colorIdx = (o + 1) % l.length, u
  14939. }
  14940. }
  14941. },
  14942. QM = {
  14943. cartesian2d: function(t, e, i, n) {
  14944. var o = t.getReferringComponents("xAxis")[0],
  14945. a = t.getReferringComponents("yAxis")[0];
  14946. e.coordSysDims = ["x", "y"], i.set("x", o), i.set("y", a), ma(o) && (n.set("x", o), e.firstCategoryDimIndex = 0),
  14947. ma(a) && (n.set("y", a), e.firstCategoryDimIndex = 1)
  14948. },
  14949. singleAxis: function(t, e, i, n) {
  14950. var o = t.getReferringComponents("singleAxis")[0];
  14951. e.coordSysDims = ["single"], i.set("single", o), ma(o) && (n.set("single", o), e.firstCategoryDimIndex = 0)
  14952. },
  14953. polar: function(t, e, i, n) {
  14954. var o = t.getReferringComponents("polar")[0],
  14955. a = o.findAxisModel("radiusAxis"),
  14956. r = o.findAxisModel("angleAxis");
  14957. e.coordSysDims = ["radius", "angle"], i.set("radius", a), i.set("angle", r), ma(a) && (n.set("radius", a), e.firstCategoryDimIndex =
  14958. 0), ma(r) && (n.set("angle", r), e.firstCategoryDimIndex = 1)
  14959. },
  14960. geo: function(t, e, i, n) {
  14961. e.coordSysDims = ["lng", "lat"]
  14962. },
  14963. parallel: function(t, e, i, n) {
  14964. var o = t.ecModel,
  14965. a = o.getComponent("parallel", t.get("parallelIndex")),
  14966. r = e.coordSysDims = a.dimensions.slice();
  14967. d(a.parallelAxisIndex, function(t, a) {
  14968. var s = o.getComponent("parallelAxis", t),
  14969. l = r[a];
  14970. i.set(l, s), ma(s) && null == e.firstCategoryDimIndex && (n.set(l, s), e.firstCategoryDimIndex = a)
  14971. })
  14972. }
  14973. },
  14974. tI = "original",
  14975. eI = "arrayRows",
  14976. iI = "objectRows",
  14977. nI = "keyedColumns",
  14978. oI = "unknown",
  14979. aI = "typedArray",
  14980. rI = "column",
  14981. sI = "row";
  14982. va.seriesDataToSource = function(t) {
  14983. return new va({
  14984. data: t,
  14985. sourceFormat: S(t) ? aI : tI,
  14986. fromDataset: !1
  14987. })
  14988. }, ji(va);
  14989. var lI = Bi(),
  14990. uI = "\0_ec_inner",
  14991. hI = Lo.extend({
  14992. init: function(t, e, i, n) {
  14993. i = i || {}, this.option = null, this._theme = new Lo(i), this._optionManager = n
  14994. },
  14995. setOption: function(t, e) {
  14996. k(!(uI in t), "please use chart.getOption()"), this._optionManager.setOption(t, e), this.resetOption(null)
  14997. },
  14998. resetOption: function(t) {
  14999. var e = !1,
  15000. i = this._optionManager;
  15001. if (!t || "recreate" === t) {
  15002. var n = i.mountOption("recreate" === t);
  15003. this.option && "recreate" !== t ? (this.restoreData(), this.mergeOption(n)) : Pa.call(this, n), e = !0
  15004. }
  15005. if ("timeline" !== t && "media" !== t || this.restoreData(), !t || "recreate" === t || "timeline" === t) {
  15006. var o = i.getTimelineOption(this);
  15007. o && (this.mergeOption(o), e = !0)
  15008. }
  15009. if (!t || "recreate" === t || "media" === t) {
  15010. var a = i.getMediaOption(this, this._api);
  15011. a.length && d(a, function(t) {
  15012. this.mergeOption(t, e = !0)
  15013. }, this)
  15014. }
  15015. return e
  15016. },
  15017. mergeOption: function(t) {
  15018. var e = this.option,
  15019. o = this._componentsMap,
  15020. r = [];
  15021. _a(this), d(t, function(t, o) {
  15022. null != t && (YM.hasClass(o) ? o && r.push(o) : e[o] = null == e[o] ? i(t) : n(e[o], t, !0))
  15023. }), YM.topologicalTravel(r, YM.getAllClassMainTypes(), function(i, n) {
  15024. var r = Di(t[i]),
  15025. s = Pi(o.get(i), r);
  15026. Ni(s), d(s, function(t, e) {
  15027. var n = t.option;
  15028. w(n) && (t.keyInfo.mainType = i, t.keyInfo.subType = Oa(i, n, t.exist))
  15029. });
  15030. var l = Na(o, n);
  15031. e[i] = [], o.set(i, []), d(s, function(t, n) {
  15032. var r = t.exist,
  15033. s = t.option;
  15034. if (k(w(s) || r, "Empty component definition"), s) {
  15035. var u = YM.getClass(i, t.keyInfo.subType, !0);
  15036. if (r && r instanceof u) r.name = t.keyInfo.name, r.mergeOption(s, this), r.optionUpdated(s, !1);
  15037. else {
  15038. var h = a({
  15039. dependentModels: l,
  15040. componentIndex: n
  15041. }, t.keyInfo);
  15042. a(r = new u(s, this, this, h), h), r.init(s, this, this, h), r.optionUpdated(null, !0)
  15043. }
  15044. } else r.mergeOption({}, this), r.optionUpdated({}, !1);
  15045. o.get(i)[n] = r, e[i][n] = r.option
  15046. }, this), "series" === i && Ea(this, o.get("series"))
  15047. }, this), this._seriesIndicesMap = R(this._seriesIndices = this._seriesIndices || [])
  15048. },
  15049. getOption: function() {
  15050. var t = i(this.option);
  15051. return d(t, function(e, i) {
  15052. if (YM.hasClass(i)) {
  15053. for (var n = (e = Di(e)).length - 1; n >= 0; n--) Ei(e[n]) && e.splice(n, 1);
  15054. t[i] = e
  15055. }
  15056. }), delete t[uI], t
  15057. },
  15058. getTheme: function() {
  15059. return this._theme
  15060. },
  15061. getComponent: function(t, e) {
  15062. var i = this._componentsMap.get(t);
  15063. if (i) return i[e || 0]
  15064. },
  15065. queryComponents: function(t) {
  15066. var e = t.mainType;
  15067. if (!e) return [];
  15068. var i = t.index,
  15069. n = t.id,
  15070. o = t.name,
  15071. a = this._componentsMap.get(e);
  15072. if (!a || !a.length) return [];
  15073. var r;
  15074. if (null != i) y(i) || (i = [i]), r = g(f(i, function(t) {
  15075. return a[t]
  15076. }), function(t) {
  15077. return !!t
  15078. });
  15079. else if (null != n) {
  15080. var s = y(n);
  15081. r = g(a, function(t) {
  15082. return s && l(n, t.id) >= 0 || !s && t.id === n
  15083. })
  15084. } else if (null != o) {
  15085. var u = y(o);
  15086. r = g(a, function(t) {
  15087. return u && l(o, t.name) >= 0 || !u && t.name === o
  15088. })
  15089. } else r = a.slice();
  15090. return Ra(r, t)
  15091. },
  15092. findComponents: function(t) {
  15093. var e = t.query,
  15094. i = t.mainType,
  15095. n = function(t) {
  15096. var e = i + "Index",
  15097. n = i + "Id",
  15098. o = i + "Name";
  15099. return !t || null == t[e] && null == t[n] && null == t[o] ? null : {
  15100. mainType: i,
  15101. index: t[e],
  15102. id: t[n],
  15103. name: t[o]
  15104. }
  15105. }(e);
  15106. return function(e) {
  15107. return t.filter ? g(e, t.filter) : e
  15108. }(Ra(n ? this.queryComponents(n) : this._componentsMap.get(i), t))
  15109. },
  15110. eachComponent: function(t, e, i) {
  15111. var n = this._componentsMap;
  15112. "function" == typeof t ? (i = e, e = t, n.each(function(t, n) {
  15113. d(t, function(t, o) {
  15114. e.call(i, n, t, o)
  15115. })
  15116. })) : _(t) ? d(n.get(t), e, i) : w(t) && d(this.findComponents(t), e, i)
  15117. },
  15118. getSeriesByName: function(t) {
  15119. return g(this._componentsMap.get("series"), function(e) {
  15120. return e.name === t
  15121. })
  15122. },
  15123. getSeriesByIndex: function(t) {
  15124. return this._componentsMap.get("series")[t]
  15125. },
  15126. getSeriesByType: function(t) {
  15127. return g(this._componentsMap.get("series"), function(e) {
  15128. return e.subType === t
  15129. })
  15130. },
  15131. getSeries: function() {
  15132. return this._componentsMap.get("series").slice()
  15133. },
  15134. getSeriesCount: function() {
  15135. return this._componentsMap.get("series").length
  15136. },
  15137. eachSeries: function(t, e) {
  15138. d(this._seriesIndices, function(i) {
  15139. var n = this._componentsMap.get("series")[i];
  15140. t.call(e, n, i)
  15141. }, this)
  15142. },
  15143. eachRawSeries: function(t, e) {
  15144. d(this._componentsMap.get("series"), t, e)
  15145. },
  15146. eachSeriesByType: function(t, e, i) {
  15147. d(this._seriesIndices, function(n) {
  15148. var o = this._componentsMap.get("series")[n];
  15149. o.subType === t && e.call(i, o, n)
  15150. }, this)
  15151. },
  15152. eachRawSeriesByType: function(t, e, i) {
  15153. return d(this.getSeriesByType(t), e, i)
  15154. },
  15155. isSeriesFiltered: function(t) {
  15156. return null == this._seriesIndicesMap.get(t.componentIndex)
  15157. },
  15158. getCurrentSeriesIndices: function() {
  15159. return (this._seriesIndices || []).slice()
  15160. },
  15161. filterSeries: function(t, e) {
  15162. Ea(this, g(this._componentsMap.get("series"), t, e))
  15163. },
  15164. restoreData: function(t) {
  15165. var e = this._componentsMap;
  15166. Ea(this, e.get("series"));
  15167. var i = [];
  15168. e.each(function(t, e) {
  15169. i.push(e)
  15170. }), YM.topologicalTravel(i, YM.getAllClassMainTypes(), function(i, n) {
  15171. d(e.get(i), function(e) {
  15172. ("series" !== i || !La(e, t)) && e.restoreData()
  15173. })
  15174. })
  15175. }
  15176. });
  15177. h(hI, JM);
  15178. var cI = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on",
  15179. "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel",
  15180. "getViewOfSeriesModel"
  15181. ],
  15182. dI = {};
  15183. Ba.prototype = {
  15184. constructor: Ba,
  15185. create: function(t, e) {
  15186. var i = [];
  15187. d(dI, function(n, o) {
  15188. var a = n.create(t, e);
  15189. i = i.concat(a || [])
  15190. }), this._coordinateSystems = i
  15191. },
  15192. update: function(t, e) {
  15193. d(this._coordinateSystems, function(i) {
  15194. i.update && i.update(t, e)
  15195. })
  15196. },
  15197. getCoordinateSystems: function() {
  15198. return this._coordinateSystems.slice()
  15199. }
  15200. }, Ba.register = function(t, e) {
  15201. dI[t] = e
  15202. }, Ba.get = function(t) {
  15203. return dI[t]
  15204. };
  15205. var fI = d,
  15206. pI = i,
  15207. gI = f,
  15208. mI = n,
  15209. vI = /^(min|max)?(.+)$/;
  15210. Va.prototype = {
  15211. constructor: Va,
  15212. setOption: function(t, e) {
  15213. t && d(Di(t.series), function(t) {
  15214. t && t.data && S(t.data) && N(t.data)
  15215. }), t = pI(t, !0);
  15216. var i = this._optionBackup,
  15217. n = Ga.call(this, t, e, !i);
  15218. this._newBaseOption = n.baseOption, i ? (Za(i.baseOption, n.baseOption), n.timelineOptions.length && (i.timelineOptions =
  15219. n.timelineOptions), n.mediaList.length && (i.mediaList = n.mediaList), n.mediaDefault && (i.mediaDefault = n.mediaDefault)) :
  15220. this._optionBackup = n
  15221. },
  15222. mountOption: function(t) {
  15223. var e = this._optionBackup;
  15224. return this._timelineOptions = gI(e.timelineOptions, pI), this._mediaList = gI(e.mediaList, pI), this._mediaDefault =
  15225. pI(e.mediaDefault), this._currentMediaIndices = [], pI(t ? e.baseOption : this._newBaseOption)
  15226. },
  15227. getTimelineOption: function(t) {
  15228. var e, i = this._timelineOptions;
  15229. if (i.length) {
  15230. var n = t.getComponent("timeline");
  15231. n && (e = pI(i[n.getCurrentIndex()], !0))
  15232. }
  15233. return e
  15234. },
  15235. getMediaOption: function(t) {
  15236. var e = this._api.getWidth(),
  15237. i = this._api.getHeight(),
  15238. n = this._mediaList,
  15239. o = this._mediaDefault,
  15240. a = [],
  15241. r = [];
  15242. if (!n.length && !o) return r;
  15243. for (var s = 0, l = n.length; s < l; s++) Fa(n[s].query, e, i) && a.push(s);
  15244. return !a.length && o && (a = [-1]), a.length && !Ha(a, this._currentMediaIndices) && (r = gI(a, function(t) {
  15245. return pI(-1 === t ? o.option : n[t].option)
  15246. })), this._currentMediaIndices = a, r
  15247. }
  15248. };
  15249. var yI = d,
  15250. xI = w,
  15251. _I = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"],
  15252. wI = function(t, e) {
  15253. yI($a(t.series), function(t) {
  15254. xI(t) && Ka(t)
  15255. });
  15256. var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  15257. e && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), yI(i, function(e) {
  15258. yI($a(t[e]), function(t) {
  15259. t && (Ya(t, "axisLabel"), Ya(t.axisPointer, "label"))
  15260. })
  15261. }), yI($a(t.parallel), function(t) {
  15262. var e = t && t.parallelAxisDefault;
  15263. Ya(e, "axisLabel"), Ya(e && e.axisPointer, "label")
  15264. }), yI($a(t.calendar), function(t) {
  15265. Xa(t, "itemStyle"), Ya(t, "dayLabel"), Ya(t, "monthLabel"), Ya(t, "yearLabel")
  15266. }), yI($a(t.radar), function(t) {
  15267. Ya(t, "name")
  15268. }), yI($a(t.geo), function(t) {
  15269. xI(t) && (qa(t), yI($a(t.regions), function(t) {
  15270. qa(t)
  15271. }))
  15272. }), yI($a(t.timeline), function(t) {
  15273. qa(t), Xa(t, "label"), Xa(t, "itemStyle"), Xa(t, "controlStyle", !0);
  15274. var e = t.data;
  15275. y(e) && d(e, function(t) {
  15276. w(t) && (Xa(t, "label"), Xa(t, "itemStyle"))
  15277. })
  15278. }), yI($a(t.toolbox), function(t) {
  15279. Xa(t, "iconStyle"), yI(t.feature, function(t) {
  15280. Xa(t, "iconStyle")
  15281. })
  15282. }), Ya(Ja(t.axisPointer), "label"), Ya(Ja(t.tooltip).axisPointer, "label")
  15283. },
  15284. bI = [
  15285. ["x", "left"],
  15286. ["y", "top"],
  15287. ["x2", "right"],
  15288. ["y2", "bottom"]
  15289. ],
  15290. SI = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"],
  15291. MI = function(t, e) {
  15292. wI(t, e), t.series = Di(t.series), d(t.series, function(t) {
  15293. if (w(t)) {
  15294. var e = t.type;
  15295. if ("pie" !== e && "gauge" !== e || null != t.clockWise && (t.clockwise = t.clockWise), "gauge" === e) {
  15296. var i = Qa(t, "pointer.color");
  15297. null != i && tr(t, "itemStyle.normal.color", i)
  15298. }
  15299. er(t)
  15300. }
  15301. }), t.dataRange && (t.visualMap = t.dataRange), d(SI, function(e) {
  15302. var i = t[e];
  15303. i && (y(i) || (i = [i]), d(i, function(t) {
  15304. er(t)
  15305. }))
  15306. })
  15307. },
  15308. II = nr.prototype;
  15309. II.pure = !1, II.persistent = !0, II.getSource = function() {
  15310. return this._source
  15311. };
  15312. var TI = {
  15313. arrayRows_column: {
  15314. pure: !0,
  15315. count: function() {
  15316. return Math.max(0, this._data.length - this._source.startIndex)
  15317. },
  15318. getItem: function(t) {
  15319. return this._data[t + this._source.startIndex]
  15320. },
  15321. appendData: rr
  15322. },
  15323. arrayRows_row: {
  15324. pure: !0,
  15325. count: function() {
  15326. var t = this._data[0];
  15327. return t ? Math.max(0, t.length - this._source.startIndex) : 0
  15328. },
  15329. getItem: function(t) {
  15330. t += this._source.startIndex;
  15331. for (var e = [], i = this._data, n = 0; n < i.length; n++) {
  15332. var o = i[n];
  15333. e.push(o ? o[t] : null)
  15334. }
  15335. return e
  15336. },
  15337. appendData: function() {
  15338. throw new Error('Do not support appendData when set seriesLayoutBy: "row".')
  15339. }
  15340. },
  15341. objectRows: {
  15342. pure: !0,
  15343. count: or,
  15344. getItem: ar,
  15345. appendData: rr
  15346. },
  15347. keyedColumns: {
  15348. pure: !0,
  15349. count: function() {
  15350. var t = this._source.dimensionsDefine[0].name,
  15351. e = this._data[t];
  15352. return e ? e.length : 0
  15353. },
  15354. getItem: function(t) {
  15355. for (var e = [], i = this._source.dimensionsDefine, n = 0; n < i.length; n++) {
  15356. var o = this._data[i[n].name];
  15357. e.push(o ? o[t] : null)
  15358. }
  15359. return e
  15360. },
  15361. appendData: function(t) {
  15362. var e = this._data;
  15363. d(t, function(t, i) {
  15364. for (var n = e[i] || (e[i] = []), o = 0; o < (t || []).length; o++) n.push(t[o])
  15365. })
  15366. }
  15367. },
  15368. original: {
  15369. count: or,
  15370. getItem: ar,
  15371. appendData: rr
  15372. },
  15373. typedArray: {
  15374. persistent: !1,
  15375. pure: !0,
  15376. count: function() {
  15377. return this._data ? this._data.length / this._dimSize : 0
  15378. },
  15379. getItem: function(t, e) {
  15380. t -= this._offset, e = e || [];
  15381. for (var i = this._dimSize * t, n = 0; n < this._dimSize; n++) e[n] = this._data[i + n];
  15382. return e
  15383. },
  15384. appendData: function(t) {
  15385. this._data = t
  15386. },
  15387. clean: function() {
  15388. this._offset += this.count(), this._data = null
  15389. }
  15390. }
  15391. },
  15392. AI = {
  15393. arrayRows: sr,
  15394. objectRows: function(t, e, i, n) {
  15395. return null != i ? t[n] : t
  15396. },
  15397. keyedColumns: sr,
  15398. original: function(t, e, i, n) {
  15399. var o = Li(t);
  15400. return null != i && o instanceof Array ? o[i] : o
  15401. },
  15402. typedArray: sr
  15403. },
  15404. DI = {
  15405. arrayRows: lr,
  15406. objectRows: function(t, e, i, n) {
  15407. return ur(t[e], this._dimensionInfos[e])
  15408. },
  15409. keyedColumns: lr,
  15410. original: function(t, e, i, n) {
  15411. var o = t && (null == t.value ? t : t.value);
  15412. return !this._rawData.pure && ki(t) && (this.hasItemOption = !0), ur(o instanceof Array ? o[n] : o, this._dimensionInfos[
  15413. e])
  15414. },
  15415. typedArray: function(t, e, i, n) {
  15416. return t[n]
  15417. }
  15418. },
  15419. CI = /\{@(.+?)\}/g,
  15420. LI = {
  15421. getDataParams: function(t, e) {
  15422. var i = this.getData(e),
  15423. n = this.getRawValue(t, e),
  15424. o = i.getRawIndex(t),
  15425. a = i.getName(t),
  15426. r = i.getRawDataItem(t),
  15427. s = i.getItemVisual(t, "color"),
  15428. l = this.ecModel.getComponent("tooltip"),
  15429. u = Hi(l && l.get("renderMode")),
  15430. h = this.mainType,
  15431. c = "series" === h;
  15432. return {
  15433. componentType: h,
  15434. componentSubType: this.subType,
  15435. componentIndex: this.componentIndex,
  15436. seriesType: c ? this.subType : null,
  15437. seriesIndex: this.seriesIndex,
  15438. seriesId: c ? this.id : null,
  15439. seriesName: c ? this.name : null,
  15440. name: a,
  15441. dataIndex: o,
  15442. data: r,
  15443. dataType: e,
  15444. value: n,
  15445. color: s,
  15446. marker: ia({
  15447. color: s,
  15448. renderMode: u
  15449. }),
  15450. $vars: ["seriesName", "name", "value"]
  15451. }
  15452. },
  15453. getFormattedLabel: function(t, e, i, n, o) {
  15454. e = e || "normal";
  15455. var a = this.getData(i),
  15456. r = a.getItemModel(t),
  15457. s = this.getDataParams(t, i);
  15458. null != n && s.value instanceof Array && (s.value = s.value[n]);
  15459. var l = r.get("normal" === e ? [o || "label", "formatter"] : [e, o || "label", "formatter"]);
  15460. return "function" == typeof l ? (s.status = e, l(s)) : "string" == typeof l ? ta(l, s).replace(CI, function(e, i) {
  15461. var n = i.length;
  15462. return "[" === i.charAt(0) && "]" === i.charAt(n - 1) && (i = +i.slice(1, n - 1)), hr(a, t, i)
  15463. }) : void 0
  15464. },
  15465. getRawValue: function(t, e) {
  15466. return hr(this.getData(e), t)
  15467. },
  15468. formatTooltip: function() {}
  15469. },
  15470. kI = fr.prototype;
  15471. kI.perform = function(t) {
  15472. function e(t) {
  15473. return !(t >= 1) && (t = 1), t
  15474. }
  15475. var i = this._upstream,
  15476. n = t && t.skip;
  15477. if (this._dirty && i) {
  15478. var o = this.context;
  15479. o.data = o.outputData = i.context.outputData
  15480. }
  15481. this.__pipeline && (this.__pipeline.currentTask = this);
  15482. var a;
  15483. this._plan && !n && (a = this._plan(this.context));
  15484. var r = e(this._modBy),
  15485. s = this._modDataCount || 0,
  15486. l = e(t && t.modBy),
  15487. u = t && t.modDataCount || 0;
  15488. r === l && s === u || (a = "reset");
  15489. var h;
  15490. (this._dirty || "reset" === a) && (this._dirty = !1, h = gr(this, n)), this._modBy = l, this._modDataCount = u;
  15491. var c = t && t.step;
  15492. if (this._dueEnd = i ? i._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) {
  15493. var d = this._dueIndex,
  15494. f = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
  15495. if (!n && (h || d < f)) {
  15496. var p = this._progress;
  15497. if (y(p))
  15498. for (var g = 0; g < p.length; g++) pr(this, p[g], d, f, l, u);
  15499. else pr(this, p, d, f, l, u)
  15500. }
  15501. this._dueIndex = f;
  15502. var m = null != this._settedOutputEnd ? this._settedOutputEnd : f;
  15503. this._outputDueEnd = m
  15504. } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
  15505. return this.unfinished()
  15506. };
  15507. var PI = function() {
  15508. function t() {
  15509. return n < i ? n++ : null
  15510. }
  15511. function e() {
  15512. var t = n % r * o + Math.ceil(n / r),
  15513. e = n >= i ? null : t < a ? t : n;
  15514. return n++, e
  15515. }
  15516. var i, n, o, a, r, s = {
  15517. reset: function(l, u, h, c) {
  15518. n = l, i = u, o = h, a = c, r = Math.ceil(a / o), s.next = o > 1 && a > 0 ? e : t
  15519. }
  15520. };
  15521. return s
  15522. }();
  15523. kI.dirty = function() {
  15524. this._dirty = !0, this._onDirty && this._onDirty(this.context)
  15525. }, kI.unfinished = function() {
  15526. return this._progress && this._dueIndex < this._dueEnd
  15527. }, kI.pipe = function(t) {
  15528. (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty())
  15529. }, kI.dispose = function() {
  15530. this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream =
  15531. null), this._dirty = !1, this._disposed = !0)
  15532. }, kI.getUpstream = function() {
  15533. return this._upstream
  15534. }, kI.getDownstream = function() {
  15535. return this._downstream
  15536. }, kI.setOutputEnd = function(t) {
  15537. this._outputDueEnd = this._settedOutputEnd = t
  15538. };
  15539. var NI = Bi(),
  15540. OI = YM.extend({
  15541. type: "series.__base__",
  15542. seriesIndex: 0,
  15543. coordinateSystem: null,
  15544. defaultOption: null,
  15545. legendDataProvider: null,
  15546. visualColorAccessPath: "itemStyle.color",
  15547. layoutMode: null,
  15548. init: function(t, e, i, n) {
  15549. this.seriesIndex = this.componentIndex, this.dataTask = dr({
  15550. count: yr,
  15551. reset: xr
  15552. }), this.dataTask.context = {
  15553. model: this
  15554. }, this.mergeDefaultAndTheme(t, i), wa(this);
  15555. var o = this.getInitialData(t, i);
  15556. wr(o, this), this.dataTask.context.data = o, NI(this).dataBeforeProcessed = o, mr(this)
  15557. },
  15558. mergeDefaultAndTheme: function(t, e) {
  15559. var i = this.layoutMode,
  15560. o = i ? da(t) : {},
  15561. a = this.subType;
  15562. YM.hasClass(a) && (a += "Series"), n(t, e.getTheme().get(this.subType)), n(t, this.getDefaultOption()), Ci(t,
  15563. "label", ["show"]), this.fillDataTextStyle(t.data), i && ca(t, o, i)
  15564. },
  15565. mergeOption: function(t, e) {
  15566. t = n(this.option, t, !0), this.fillDataTextStyle(t.data);
  15567. var i = this.layoutMode;
  15568. i && ca(this.option, t, i), wa(this);
  15569. var o = this.getInitialData(t, e);
  15570. wr(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, NI(this).dataBeforeProcessed = o, mr(this)
  15571. },
  15572. fillDataTextStyle: function(t) {
  15573. if (t && !S(t))
  15574. for (var e = ["show"], i = 0; i < t.length; i++) t[i] && t[i].label && Ci(t[i], "label", e)
  15575. },
  15576. getInitialData: function() {},
  15577. appendData: function(t) {
  15578. this.getRawData().appendData(t.data)
  15579. },
  15580. getData: function(t) {
  15581. var e = Sr(this);
  15582. if (e) {
  15583. var i = e.context.data;
  15584. return null == t ? i : i.getLinkedData(t)
  15585. }
  15586. return NI(this).data
  15587. },
  15588. setData: function(t) {
  15589. var e = Sr(this);
  15590. if (e) {
  15591. var i = e.context;
  15592. i.data !== t && e.modifyOutputEnd && e.setOutputEnd(t.count()), i.outputData = t, e !== this.dataTask && (i.data =
  15593. t)
  15594. }
  15595. NI(this).data = t
  15596. },
  15597. getSource: function() {
  15598. return xa(this)
  15599. },
  15600. getRawData: function() {
  15601. return NI(this).dataBeforeProcessed
  15602. },
  15603. getBaseAxis: function() {
  15604. var t = this.coordinateSystem;
  15605. return t && t.getBaseAxis && t.getBaseAxis()
  15606. },
  15607. formatTooltip: function(t, e, i, n) {
  15608. function o(t) {
  15609. return {
  15610. renderMode: n,
  15611. content: Qo($o(t)),
  15612. style: l
  15613. }
  15614. }
  15615. var a = this,
  15616. r = "html" === (n = n || "html") ? "<br/>" : "\n",
  15617. s = "richText" === n,
  15618. l = {},
  15619. u = 0,
  15620. h = this.getData(),
  15621. c = h.mapDimension("defaultedTooltip", !0),
  15622. f = c.length,
  15623. g = this.getRawValue(t),
  15624. m = y(g),
  15625. v = h.getItemVisual(t, "color");
  15626. w(v) && v.colorStops && (v = (v.colorStops[0] || {}).color), v = v || "transparent";
  15627. var x = (f > 1 || m && !f ? function(i) {
  15628. function o(t, i) {
  15629. var o = h.getDimensionInfo(i);
  15630. if (o && !1 !== o.otherDims.tooltip) {
  15631. var c = o.type,
  15632. d = "sub" + a.seriesIndex + "at" + u,
  15633. p = ia({
  15634. color: v,
  15635. type: "subItem",
  15636. renderMode: n,
  15637. markerId: d
  15638. }),
  15639. g = "string" == typeof p ? p : p.content,
  15640. m = (r ? g + Qo(o.displayName || "-") + ": " : "") + Qo("ordinal" === c ? t + "" : "time" === c ? e ? "" :
  15641. oa("yyyy/MM/dd hh:mm:ss", t) : $o(t));
  15642. m && f.push(m), s && (l[d] = v, ++u)
  15643. }
  15644. }
  15645. var r = p(i, function(t, e, i) {
  15646. var n = h.getDimensionInfo(i);
  15647. return t |= n && !1 !== n.tooltip && null != n.displayName
  15648. }, 0),
  15649. f = [];
  15650. c.length ? d(c, function(e) {
  15651. o(hr(h, t, e), e)
  15652. }) : d(i, o);
  15653. var g = r ? s ? "\n" : "<br/>" : "",
  15654. m = g + f.join(g || ", ");
  15655. return {
  15656. renderMode: n,
  15657. content: m,
  15658. style: l
  15659. }
  15660. }(g) : o(f ? hr(h, t, c[0]) : m ? g[0] : g)).content,
  15661. _ = a.seriesIndex + "at" + u,
  15662. b = ia({
  15663. color: v,
  15664. type: "item",
  15665. renderMode: n,
  15666. markerId: _
  15667. });
  15668. l[_] = v, ++u;
  15669. var S = h.getName(t),
  15670. M = this.name;
  15671. Oi(this) || (M = ""), M = M ? Qo(M) + (e ? ": " : r) : "";
  15672. var I = "string" == typeof b ? b : b.content;
  15673. return {
  15674. html: e ? I + M + x : M + I + (S ? Qo(S) + ": " + x : x),
  15675. markers: l
  15676. }
  15677. },
  15678. isAnimationEnabled: function() {
  15679. if (z_.node) return !1;
  15680. var t = this.getShallow("animation");
  15681. return t && this.getData().count() > this.getShallow("animationThreshold") && (t = !1), t
  15682. },
  15683. restoreData: function() {
  15684. this.dataTask.dirty()
  15685. },
  15686. getColorFromPalette: function(t, e, i) {
  15687. var n = this.ecModel,
  15688. o = JM.getColorFromPalette.call(this, t, e, i);
  15689. return o || (o = n.getColorFromPalette(t, e, i)), o
  15690. },
  15691. coordDimToDataDim: function(t) {
  15692. return this.getRawData().mapDimension(t, !0)
  15693. },
  15694. getProgressive: function() {
  15695. return this.get("progressive")
  15696. },
  15697. getProgressiveThreshold: function() {
  15698. return this.get("progressiveThreshold")
  15699. },
  15700. getAxisTooltipData: null,
  15701. getTooltipPosition: null,
  15702. pipeTask: null,
  15703. preventIncremental: null,
  15704. pipelineContext: null
  15705. });
  15706. h(OI, LI), h(OI, JM);
  15707. var EI = function() {
  15708. this.group = new Zw, this.uid = No("viewComponent")
  15709. };
  15710. EI.prototype = {
  15711. constructor: EI,
  15712. init: function(t, e) {},
  15713. render: function(t, e, i, n) {},
  15714. dispose: function() {},
  15715. filterForExposedEvent: null
  15716. };
  15717. var RI = EI.prototype;
  15718. RI.updateView = RI.updateLayout = RI.updateVisual = function(t, e, i, n) {}, Xi(EI), Ki(EI, {
  15719. registerWhenExtend: !0
  15720. });
  15721. var zI = function() {
  15722. var t = Bi();
  15723. return function(e) {
  15724. var i = t(e),
  15725. n = e.pipelineContext,
  15726. o = i.large,
  15727. a = i.progressiveRender,
  15728. r = i.large = n.large,
  15729. s = i.progressiveRender = n.progressiveRender;
  15730. return !!(o ^ r || a ^ s) && "reset"
  15731. }
  15732. },
  15733. BI = Bi(),
  15734. VI = zI();
  15735. Mr.prototype = {
  15736. type: "chart",
  15737. init: function(t, e) {},
  15738. render: function(t, e, i, n) {},
  15739. highlight: function(t, e, i, n) {
  15740. Tr(t.getData(), n, "emphasis")
  15741. },
  15742. downplay: function(t, e, i, n) {
  15743. Tr(t.getData(), n, "normal")
  15744. },
  15745. remove: function(t, e) {
  15746. this.group.removeAll()
  15747. },
  15748. dispose: function() {},
  15749. incrementalPrepareRender: null,
  15750. incrementalRender: null,
  15751. updateTransform: null,
  15752. filterForExposedEvent: null
  15753. };
  15754. var GI = Mr.prototype;
  15755. GI.updateView = GI.updateLayout = GI.updateVisual = function(t, e, i, n) {
  15756. this.render(t, e, i, n)
  15757. }, Xi(Mr), Ki(Mr, {
  15758. registerWhenExtend: !0
  15759. }), Mr.markUpdateMethod = function(t, e) {
  15760. BI(t).updateMethod = e
  15761. };
  15762. var FI = {
  15763. incrementalPrepareRender: {
  15764. progress: function(t, e) {
  15765. e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload)
  15766. }
  15767. },
  15768. render: {
  15769. forceFirstProgress: !0,
  15770. progress: function(t, e) {
  15771. e.view.render(e.model, e.ecModel, e.api, e.payload)
  15772. }
  15773. }
  15774. },
  15775. WI = "\0__throttleOriginMethod",
  15776. HI = "\0__throttleRate",
  15777. ZI = "\0__throttleType",
  15778. UI = {
  15779. createOnAllSeries: !0,
  15780. performRawSeries: !0,
  15781. reset: function(t, e) {
  15782. var i = t.getData(),
  15783. n = (t.visualColorAccessPath || "itemStyle.color").split("."),
  15784. o = t.get(n) || t.getColorFromPalette(t.name, null, e.getSeriesCount());
  15785. if (i.setVisual("color", o), !e.isSeriesFiltered(t)) {
  15786. "function" != typeof o || o instanceof cM || i.each(function(e) {
  15787. i.setItemVisual(e, "color", o(t.getDataParams(e)))
  15788. });
  15789. return {
  15790. dataEach: i.hasItemOption ? function(t, e) {
  15791. var i = t.getItemModel(e).get(n, !0);
  15792. null != i && t.setItemVisual(e, "color", i)
  15793. } : null
  15794. }
  15795. }
  15796. }
  15797. },
  15798. XI = {
  15799. toolbox: {
  15800. brush: {
  15801. title: {
  15802. rect: "矩形选择",
  15803. polygon: "圈选",
  15804. lineX: "横向选择",
  15805. lineY: "纵向选择",
  15806. keep: "保持选择",
  15807. clear: "清除选择"
  15808. }
  15809. },
  15810. dataView: {
  15811. title: "数据视图",
  15812. lang: ["数据视图", "关闭", "刷新"]
  15813. },
  15814. dataZoom: {
  15815. title: {
  15816. zoom: "区域缩放",
  15817. back: "区域缩放还原"
  15818. }
  15819. },
  15820. magicType: {
  15821. title: {
  15822. line: "切换为折线图",
  15823. bar: "切换为柱状图",
  15824. stack: "切换为堆叠",
  15825. tiled: "切换为平铺"
  15826. }
  15827. },
  15828. restore: {
  15829. title: "还原"
  15830. },
  15831. saveAsImage: {
  15832. title: "保存为图片",
  15833. lang: ["右键另存为图片"]
  15834. }
  15835. },
  15836. series: {
  15837. typeNames: {
  15838. pie: "饼图",
  15839. bar: "柱状图",
  15840. line: "折线图",
  15841. scatter: "散点图",
  15842. effectScatter: "涟漪散点图",
  15843. radar: "雷达图",
  15844. tree: "树图",
  15845. treemap: "矩形树图",
  15846. boxplot: "箱型图",
  15847. candlestick: "K线图",
  15848. k: "K线图",
  15849. heatmap: "热力图",
  15850. map: "地图",
  15851. parallel: "平行坐标图",
  15852. lines: "线图",
  15853. graph: "关系图",
  15854. sankey: "桑基图",
  15855. funnel: "漏斗图",
  15856. gauge: "仪表盘图",
  15857. pictorialBar: "象形柱图",
  15858. themeRiver: "主题河流图",
  15859. sunburst: "旭日图"
  15860. }
  15861. },
  15862. aria: {
  15863. general: {
  15864. withTitle: "这是一个关于“{title}”的图表。",
  15865. withoutTitle: "这是一个图表,"
  15866. },
  15867. series: {
  15868. single: {
  15869. prefix: "",
  15870. withName: "图表类型是{seriesType},表示{seriesName}。",
  15871. withoutName: "图表类型是{seriesType}。"
  15872. },
  15873. multiple: {
  15874. prefix: "它由{seriesCount}个图表系列组成。",
  15875. withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
  15876. withoutName: "第{seriesId}个系列是一个{seriesType},",
  15877. separator: {
  15878. middle: ";",
  15879. end: "。"
  15880. }
  15881. }
  15882. },
  15883. data: {
  15884. allData: "其数据是——",
  15885. partialData: "其中,前{displayCnt}项是——",
  15886. withName: "{name}的数据是{value}",
  15887. withoutName: "{value}",
  15888. separator: {
  15889. middle: ",",
  15890. end: ""
  15891. }
  15892. }
  15893. }
  15894. },
  15895. jI = function(t, e) {
  15896. function i(t, e) {
  15897. if ("string" != typeof t) return t;
  15898. var i = t;
  15899. return d(e, function(t, e) {
  15900. i = i.replace(new RegExp("\\{\\s*" + e + "\\s*\\}", "g"), t)
  15901. }), i
  15902. }
  15903. function n(t) {
  15904. var e = a.get(t);
  15905. if (null == e) {
  15906. for (var i = t.split("."), n = XI.aria, o = 0; o < i.length; ++o) n = n[i[o]];
  15907. return n
  15908. }
  15909. return e
  15910. }
  15911. function o(t) {
  15912. return XI.series.typeNames[t] || "自定义图"
  15913. }
  15914. var a = e.getModel("aria");
  15915. if (a.get("show"))
  15916. if (a.get("description")) t.setAttribute("aria-label", a.get("description"));
  15917. else {
  15918. var r = 0;
  15919. e.eachSeries(function(t, e) {
  15920. ++r
  15921. }, this);
  15922. var s, l = a.get("data.maxCount") || 10,
  15923. u = a.get("series.maxCount") || 10,
  15924. h = Math.min(r, u);
  15925. if (!(r < 1)) {
  15926. var c = function() {
  15927. var t = e.getModel("title").option;
  15928. return t && t.length && (t = t[0]), t && t.text
  15929. }();
  15930. s = c ? i(n("general.withTitle"), {
  15931. title: c
  15932. }) : n("general.withoutTitle");
  15933. var f = [];
  15934. s += i(n(r > 1 ? "series.multiple.prefix" : "series.single.prefix"), {
  15935. seriesCount: r
  15936. }), e.eachSeries(function(t, e) {
  15937. if (e < h) {
  15938. var a, s = t.get("name"),
  15939. u = "series." + (r > 1 ? "multiple" : "single") + ".";
  15940. a = i(a = n(s ? u + "withName" : u + "withoutName"), {
  15941. seriesId: t.seriesIndex,
  15942. seriesName: t.get("name"),
  15943. seriesType: o(t.subType)
  15944. });
  15945. var c = t.getData();
  15946. window.data = c, c.count() > l ? a += i(n("data.partialData"), {
  15947. displayCnt: l
  15948. }) : a += n("data.allData");
  15949. for (var d = [], p = 0; p < c.count(); p++)
  15950. if (p < l) {
  15951. var g = c.getName(p),
  15952. m = hr(c, p);
  15953. d.push(i(n(g ? "data.withName" : "data.withoutName"), {
  15954. name: g,
  15955. value: m
  15956. }))
  15957. } a += d.join(n("data.separator.middle")) + n("data.separator.end"), f.push(a)
  15958. }
  15959. }), s += f.join(n("series.multiple.separator.middle")) + n("series.multiple.separator.end"), t.setAttribute(
  15960. "aria-label", s)
  15961. }
  15962. }
  15963. },
  15964. YI = Math.PI,
  15965. qI = Pr.prototype;
  15966. qI.restoreData = function(t, e) {
  15967. t.restoreData(e), this._stageTaskMap.each(function(t) {
  15968. var e = t.overallTask;
  15969. e && e.dirty()
  15970. })
  15971. }, qI.getPerformArgs = function(t, e) {
  15972. if (t.__pipeline) {
  15973. var i = this._pipelineMap.get(t.__pipeline.id),
  15974. n = i.context,
  15975. o = !e && i.progressiveEnabled && (!n || n.progressiveRender) && t.__idxInPipeline > i.blockIndex ? i.step : null,
  15976. a = n && n.modDataCount;
  15977. return {
  15978. step: o,
  15979. modBy: null != a ? Math.ceil(a / o) : null,
  15980. modDataCount: a
  15981. }
  15982. }
  15983. }, qI.getPipeline = function(t) {
  15984. return this._pipelineMap.get(t)
  15985. }, qI.updateStreamModes = function(t, e) {
  15986. var i = this._pipelineMap.get(t.uid),
  15987. n = t.getData().count(),
  15988. o = i.progressiveEnabled && e.incrementalPrepareRender && n >= i.threshold,
  15989. a = t.get("large") && n >= t.get("largeThreshold"),
  15990. r = "mod" === t.get("progressiveChunkMode") ? n : null;
  15991. t.pipelineContext = i.context = {
  15992. progressiveRender: o,
  15993. modDataCount: r,
  15994. large: a
  15995. }
  15996. }, qI.restorePipelines = function(t) {
  15997. var e = this,
  15998. i = e._pipelineMap = R();
  15999. t.eachSeries(function(t) {
  16000. var n = t.getProgressive(),
  16001. o = t.uid;
  16002. i.set(o, {
  16003. id: o,
  16004. head: null,
  16005. tail: null,
  16006. threshold: t.getProgressiveThreshold(),
  16007. progressiveEnabled: n && !(t.preventIncremental && t.preventIncremental()),
  16008. blockIndex: -1,
  16009. step: Math.round(n || 700),
  16010. count: 0
  16011. }), Zr(e, t, t.dataTask)
  16012. })
  16013. }, qI.prepareStageTasks = function() {
  16014. var t = this._stageTaskMap,
  16015. e = this.ecInstance.getModel(),
  16016. i = this.api;
  16017. d(this._allHandlers, function(n) {
  16018. var o = t.get(n.uid) || t.set(n.uid, []);
  16019. n.reset && Or(this, n, o, e, i), n.overallReset && Er(this, n, o, e, i)
  16020. }, this)
  16021. }, qI.prepareView = function(t, e, i, n) {
  16022. var o = t.renderTask,
  16023. a = o.context;
  16024. a.model = e, a.ecModel = i, a.api = n, o.__block = !t.incrementalPrepareRender, Zr(this, e, o)
  16025. }, qI.performDataProcessorTasks = function(t, e) {
  16026. Nr(this, this._dataProcessorHandlers, t, e, {
  16027. block: !0
  16028. })
  16029. }, qI.performVisualTasks = function(t, e, i) {
  16030. Nr(this, this._visualHandlers, t, e, i)
  16031. }, qI.performSeriesTasks = function(t) {
  16032. var e;
  16033. t.eachSeries(function(t) {
  16034. e |= t.dataTask.perform()
  16035. }), this.unfinished |= e
  16036. }, qI.plan = function() {
  16037. this._pipelineMap.each(function(t) {
  16038. var e = t.tail;
  16039. do {
  16040. if (e.__block) {
  16041. t.blockIndex = e.__idxInPipeline;
  16042. break
  16043. }
  16044. e = e.getUpstream()
  16045. } while (e)
  16046. })
  16047. };
  16048. var KI = qI.updatePayload = function(t, e) {
  16049. "remain" !== e && (t.context.payload = e)
  16050. },
  16051. $I = Wr(0);
  16052. Pr.wrapStageHandler = function(t, e) {
  16053. return x(t) && (t = {
  16054. overallReset: t,
  16055. seriesType: Ur(t)
  16056. }), t.uid = No("stageHandler"), e && (t.visualType = e), t
  16057. };
  16058. var JI, QI = {},
  16059. tT = {};
  16060. Xr(QI, hI), Xr(tT, za), QI.eachSeriesByType = QI.eachRawSeriesByType = function(t) {
  16061. JI = t
  16062. }, QI.eachComponent = function(t) {
  16063. "series" === t.mainType && t.subType && (JI = t.subType)
  16064. };
  16065. var eT = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1",
  16066. "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"
  16067. ],
  16068. iT = {
  16069. color: eT,
  16070. colorLayer: [
  16071. ["#37A2DA", "#ffd85c", "#fd7b5f"],
  16072. ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"],
  16073. ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], eT
  16074. ]
  16075. },
  16076. nT = ["#dd6b66", "#759aa0", "#e69d87", "#8dc1a9", "#ea7e53", "#eedd78", "#73a373", "#73b9bc", "#7289ab", "#91ca8c",
  16077. "#f49f42"
  16078. ],
  16079. oT = {
  16080. color: nT,
  16081. backgroundColor: "#333",
  16082. tooltip: {
  16083. axisPointer: {
  16084. lineStyle: {
  16085. color: "#eee"
  16086. },
  16087. crossStyle: {
  16088. color: "#eee"
  16089. }
  16090. }
  16091. },
  16092. legend: {
  16093. textStyle: {
  16094. color: "#eee"
  16095. }
  16096. },
  16097. textStyle: {
  16098. color: "#eee"
  16099. },
  16100. title: {
  16101. textStyle: {
  16102. color: "#eee"
  16103. }
  16104. },
  16105. toolbox: {
  16106. iconStyle: {
  16107. normal: {
  16108. borderColor: "#eee"
  16109. }
  16110. }
  16111. },
  16112. dataZoom: {
  16113. textStyle: {
  16114. color: "#eee"
  16115. }
  16116. },
  16117. visualMap: {
  16118. textStyle: {
  16119. color: "#eee"
  16120. }
  16121. },
  16122. timeline: {
  16123. lineStyle: {
  16124. color: "#eee"
  16125. },
  16126. itemStyle: {
  16127. normal: {
  16128. color: nT[1]
  16129. }
  16130. },
  16131. label: {
  16132. normal: {
  16133. textStyle: {
  16134. color: "#eee"
  16135. }
  16136. }
  16137. },
  16138. controlStyle: {
  16139. normal: {
  16140. color: "#eee",
  16141. borderColor: "#eee"
  16142. }
  16143. }
  16144. },
  16145. timeAxis: {
  16146. axisLine: {
  16147. lineStyle: {
  16148. color: "#eee"
  16149. }
  16150. },
  16151. axisTick: {
  16152. lineStyle: {
  16153. color: "#eee"
  16154. }
  16155. },
  16156. axisLabel: {
  16157. textStyle: {
  16158. color: "#eee"
  16159. }
  16160. },
  16161. splitLine: {
  16162. lineStyle: {
  16163. type: "dashed",
  16164. color: "#aaa"
  16165. }
  16166. },
  16167. splitArea: {
  16168. areaStyle: {
  16169. color: "#eee"
  16170. }
  16171. }
  16172. },
  16173. logAxis: {
  16174. axisLine: {
  16175. lineStyle: {
  16176. color: "#eee"
  16177. }
  16178. },
  16179. axisTick: {
  16180. lineStyle: {
  16181. color: "#eee"
  16182. }
  16183. },
  16184. axisLabel: {
  16185. textStyle: {
  16186. color: "#eee"
  16187. }
  16188. },
  16189. splitLine: {
  16190. lineStyle: {
  16191. type: "dashed",
  16192. color: "#aaa"
  16193. }
  16194. },
  16195. splitArea: {
  16196. areaStyle: {
  16197. color: "#eee"
  16198. }
  16199. }
  16200. },
  16201. valueAxis: {
  16202. axisLine: {
  16203. lineStyle: {
  16204. color: "#eee"
  16205. }
  16206. },
  16207. axisTick: {
  16208. lineStyle: {
  16209. color: "#eee"
  16210. }
  16211. },
  16212. axisLabel: {
  16213. textStyle: {
  16214. color: "#eee"
  16215. }
  16216. },
  16217. splitLine: {
  16218. lineStyle: {
  16219. type: "dashed",
  16220. color: "#aaa"
  16221. }
  16222. },
  16223. splitArea: {
  16224. areaStyle: {
  16225. color: "#eee"
  16226. }
  16227. }
  16228. },
  16229. categoryAxis: {
  16230. axisLine: {
  16231. lineStyle: {
  16232. color: "#eee"
  16233. }
  16234. },
  16235. axisTick: {
  16236. lineStyle: {
  16237. color: "#eee"
  16238. }
  16239. },
  16240. axisLabel: {
  16241. textStyle: {
  16242. color: "#eee"
  16243. }
  16244. },
  16245. splitLine: {
  16246. lineStyle: {
  16247. type: "dashed",
  16248. color: "#aaa"
  16249. }
  16250. },
  16251. splitArea: {
  16252. areaStyle: {
  16253. color: "#eee"
  16254. }
  16255. }
  16256. },
  16257. line: {
  16258. symbol: "circle"
  16259. },
  16260. graph: {
  16261. color: nT
  16262. },
  16263. gauge: {
  16264. title: {
  16265. textStyle: {
  16266. color: "#eee"
  16267. }
  16268. }
  16269. },
  16270. candlestick: {
  16271. itemStyle: {
  16272. normal: {
  16273. color: "#FD1050",
  16274. color0: "#0CF49B",
  16275. borderColor: "#FD1050",
  16276. borderColor0: "#0CF49B"
  16277. }
  16278. }
  16279. }
  16280. };
  16281. oT.categoryAxis.splitLine.show = !1, YM.extend({
  16282. type: "dataset",
  16283. defaultOption: {
  16284. seriesLayoutBy: rI,
  16285. sourceHeader: null,
  16286. dimensions: null,
  16287. source: null
  16288. },
  16289. optionUpdated: function() {
  16290. ya(this)
  16291. }
  16292. }), EI.extend({
  16293. type: "dataset"
  16294. });
  16295. var aT = kn.extend({
  16296. type: "ellipse",
  16297. shape: {
  16298. cx: 0,
  16299. cy: 0,
  16300. rx: 0,
  16301. ry: 0
  16302. },
  16303. buildPath: function(t, e) {
  16304. var i = .5522848,
  16305. n = e.cx,
  16306. o = e.cy,
  16307. a = e.rx,
  16308. r = e.ry,
  16309. s = a * i,
  16310. l = r * i;
  16311. t.moveTo(n - a, o), t.bezierCurveTo(n - a, o - l, n - s, o - r, n, o - r), t.bezierCurveTo(n + s, o - r, n + a,
  16312. o - l, n + a, o), t.bezierCurveTo(n + a, o + l, n + s, o + r, n, o + r), t.bezierCurveTo(n - s, o + r, n - a,
  16313. o + l, n - a, o), t.closePath()
  16314. }
  16315. }),
  16316. rT = /[\s,]+/;
  16317. Yr.prototype.parse = function(t, e) {
  16318. e = e || {};
  16319. var i = jr(t);
  16320. if (!i) throw new Error("Illegal svg");
  16321. var n = new Zw;
  16322. this._root = n;
  16323. var o = i.getAttribute("viewBox") || "",
  16324. a = parseFloat(i.getAttribute("width") || e.width),
  16325. r = parseFloat(i.getAttribute("height") || e.height);
  16326. isNaN(a) && (a = null), isNaN(r) && (r = null), Jr(i, n, null, !0);
  16327. for (var s = i.firstChild; s;) this._parseNode(s, n), s = s.nextSibling;
  16328. var l, u;
  16329. if (o) {
  16330. var h = P(o).split(rT);
  16331. h.length >= 4 && (l = {
  16332. x: parseFloat(h[0] || 0),
  16333. y: parseFloat(h[1] || 0),
  16334. width: parseFloat(h[2]),
  16335. height: parseFloat(h[3])
  16336. })
  16337. }
  16338. if (l && null != a && null != r && (u = is(l, a, r), !e.ignoreViewBox)) {
  16339. var c = n;
  16340. (n = new Zw).add(c), c.scale = u.scale.slice(), c.position = u.position.slice()
  16341. }
  16342. return e.ignoreRootClip || null == a || null == r || n.setClipPath(new aM({
  16343. shape: {
  16344. x: 0,
  16345. y: 0,
  16346. width: a,
  16347. height: r
  16348. }
  16349. })), {
  16350. root: n,
  16351. width: a,
  16352. height: r,
  16353. viewBoxRect: l,
  16354. viewBoxTransform: u
  16355. }
  16356. }, Yr.prototype._parseNode = function(t, e) {
  16357. var i = t.nodeName.toLowerCase();
  16358. "defs" === i ? this._isDefine = !0 : "text" === i && (this._isText = !0);
  16359. var n;
  16360. if (this._isDefine) {
  16361. if (r = lT[i]) {
  16362. var o = r.call(this, t),
  16363. a = t.getAttribute("id");
  16364. a && (this._defs[a] = o)
  16365. }
  16366. } else {
  16367. var r = sT[i];
  16368. r && (n = r.call(this, t, e), e.add(n))
  16369. }
  16370. for (var s = t.firstChild; s;) 1 === s.nodeType && this._parseNode(s, n), 3 === s.nodeType && this._isText && this._parseText(
  16371. s, n), s = s.nextSibling;
  16372. "defs" === i ? this._isDefine = !1 : "text" === i && (this._isText = !1)
  16373. }, Yr.prototype._parseText = function(t, e) {
  16374. if (1 === t.nodeType) {
  16375. var i = t.getAttribute("dx") || 0,
  16376. n = t.getAttribute("dy") || 0;
  16377. this._textX += parseFloat(i), this._textY += parseFloat(n)
  16378. }
  16379. var o = new qS({
  16380. style: {
  16381. text: t.textContent,
  16382. transformText: !0
  16383. },
  16384. position: [this._textX || 0, this._textY || 0]
  16385. });
  16386. Kr(e, o), Jr(t, o, this._defs);
  16387. var a = o.style.fontSize;
  16388. a && a < 9 && (o.style.fontSize = 9, o.scale = o.scale || [1, 1], o.scale[0] *= a / 9, o.scale[1] *= a / 9);
  16389. var r = o.getBoundingRect();
  16390. return this._textX += r.width, e.add(o), o
  16391. };
  16392. var sT = {
  16393. g: function(t, e) {
  16394. var i = new Zw;
  16395. return Kr(e, i), Jr(t, i, this._defs), i
  16396. },
  16397. rect: function(t, e) {
  16398. var i = new aM;
  16399. return Kr(e, i), Jr(t, i, this._defs), i.setShape({
  16400. x: parseFloat(t.getAttribute("x") || 0),
  16401. y: parseFloat(t.getAttribute("y") || 0),
  16402. width: parseFloat(t.getAttribute("width") || 0),
  16403. height: parseFloat(t.getAttribute("height") || 0)
  16404. }), i
  16405. },
  16406. circle: function(t, e) {
  16407. var i = new KS;
  16408. return Kr(e, i), Jr(t, i, this._defs), i.setShape({
  16409. cx: parseFloat(t.getAttribute("cx") || 0),
  16410. cy: parseFloat(t.getAttribute("cy") || 0),
  16411. r: parseFloat(t.getAttribute("r") || 0)
  16412. }), i
  16413. },
  16414. line: function(t, e) {
  16415. var i = new rM;
  16416. return Kr(e, i), Jr(t, i, this._defs), i.setShape({
  16417. x1: parseFloat(t.getAttribute("x1") || 0),
  16418. y1: parseFloat(t.getAttribute("y1") || 0),
  16419. x2: parseFloat(t.getAttribute("x2") || 0),
  16420. y2: parseFloat(t.getAttribute("y2") || 0)
  16421. }), i
  16422. },
  16423. ellipse: function(t, e) {
  16424. var i = new aT;
  16425. return Kr(e, i), Jr(t, i, this._defs), i.setShape({
  16426. cx: parseFloat(t.getAttribute("cx") || 0),
  16427. cy: parseFloat(t.getAttribute("cy") || 0),
  16428. rx: parseFloat(t.getAttribute("rx") || 0),
  16429. ry: parseFloat(t.getAttribute("ry") || 0)
  16430. }), i
  16431. },
  16432. polygon: function(t, e) {
  16433. var i = t.getAttribute("points");
  16434. i && (i = $r(i));
  16435. var n = new nM({
  16436. shape: {
  16437. points: i || []
  16438. }
  16439. });
  16440. return Kr(e, n), Jr(t, n, this._defs), n
  16441. },
  16442. polyline: function(t, e) {
  16443. var i = new kn;
  16444. Kr(e, i), Jr(t, i, this._defs);
  16445. var n = t.getAttribute("points");
  16446. return n && (n = $r(n)), new oM({
  16447. shape: {
  16448. points: n || []
  16449. }
  16450. })
  16451. },
  16452. image: function(t, e) {
  16453. var i = new hi;
  16454. return Kr(e, i), Jr(t, i, this._defs), i.setStyle({
  16455. image: t.getAttribute("xlink:href"),
  16456. x: t.getAttribute("x"),
  16457. y: t.getAttribute("y"),
  16458. width: t.getAttribute("width"),
  16459. height: t.getAttribute("height")
  16460. }), i
  16461. },
  16462. text: function(t, e) {
  16463. var i = t.getAttribute("x") || 0,
  16464. n = t.getAttribute("y") || 0,
  16465. o = t.getAttribute("dx") || 0,
  16466. a = t.getAttribute("dy") || 0;
  16467. this._textX = parseFloat(i) + parseFloat(o), this._textY = parseFloat(n) + parseFloat(a);
  16468. var r = new Zw;
  16469. return Kr(e, r), Jr(t, r, this._defs), r
  16470. },
  16471. tspan: function(t, e) {
  16472. var i = t.getAttribute("x"),
  16473. n = t.getAttribute("y");
  16474. null != i && (this._textX = parseFloat(i)), null != n && (this._textY = parseFloat(n));
  16475. var o = t.getAttribute("dx") || 0,
  16476. a = t.getAttribute("dy") || 0,
  16477. r = new Zw;
  16478. return Kr(e, r), Jr(t, r, this._defs), this._textX += o, this._textY += a, r
  16479. },
  16480. path: function(t, e) {
  16481. var i = En(t.getAttribute("d") || "");
  16482. return Kr(e, i), Jr(t, i, this._defs), i
  16483. }
  16484. },
  16485. lT = {
  16486. lineargradient: function(t) {
  16487. var e = parseInt(t.getAttribute("x1") || 0, 10),
  16488. i = parseInt(t.getAttribute("y1") || 0, 10),
  16489. n = parseInt(t.getAttribute("x2") || 10, 10),
  16490. o = parseInt(t.getAttribute("y2") || 0, 10),
  16491. a = new dM(e, i, n, o);
  16492. return qr(t, a), a
  16493. },
  16494. radialgradient: function(t) {}
  16495. },
  16496. uT = {
  16497. fill: "fill",
  16498. stroke: "stroke",
  16499. "stroke-width": "lineWidth",
  16500. opacity: "opacity",
  16501. "fill-opacity": "fillOpacity",
  16502. "stroke-opacity": "strokeOpacity",
  16503. "stroke-dasharray": "lineDash",
  16504. "stroke-dashoffset": "lineDashOffset",
  16505. "stroke-linecap": "lineCap",
  16506. "stroke-linejoin": "lineJoin",
  16507. "stroke-miterlimit": "miterLimit",
  16508. "font-family": "fontFamily",
  16509. "font-size": "fontSize",
  16510. "font-style": "fontStyle",
  16511. "font-weight": "fontWeight",
  16512. "text-align": "textAlign",
  16513. "alignment-baseline": "textBaseline"
  16514. },
  16515. hT = /url\(\s*#(.*?)\)/,
  16516. cT = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,
  16517. dT = /([^\s:;]+)\s*:\s*([^:;]+)/g,
  16518. fT = R(),
  16519. pT = {
  16520. registerMap: function(t, e, i) {
  16521. var n;
  16522. return y(e) ? n = e : e.svg ? n = [{
  16523. type: "svg",
  16524. source: e.svg,
  16525. specialAreas: e.specialAreas
  16526. }] : (e.geoJson && !e.features && (i = e.specialAreas, e = e.geoJson), n = [{
  16527. type: "geoJSON",
  16528. source: e,
  16529. specialAreas: i
  16530. }]), d(n, function(t) {
  16531. var e = t.type;
  16532. "geoJson" === e && (e = t.type = "geoJSON"), (0, gT[e])(t)
  16533. }), fT.set(t, n)
  16534. },
  16535. retrieveMap: function(t) {
  16536. return fT.get(t)
  16537. }
  16538. },
  16539. gT = {
  16540. geoJSON: function(t) {
  16541. var e = t.source;
  16542. t.geoJSON = _(e) ? "undefined" != typeof JSON && JSON.parse ? JSON.parse(e) : new Function("return (" + e + ");")
  16543. () : e
  16544. },
  16545. svg: function(t) {
  16546. t.svgXML = jr(t.source)
  16547. }
  16548. },
  16549. mT = k,
  16550. vT = d,
  16551. yT = x,
  16552. xT = w,
  16553. _T = YM.parseClassType,
  16554. wT = {
  16555. zrender: "4.0.5"
  16556. },
  16557. bT = 1e3,
  16558. ST = 1e3,
  16559. MT = 3e3,
  16560. IT = {
  16561. PROCESSOR: {
  16562. FILTER: bT,
  16563. STATISTIC: 5e3
  16564. },
  16565. VISUAL: {
  16566. LAYOUT: ST,
  16567. GLOBAL: 2e3,
  16568. CHART: MT,
  16569. COMPONENT: 4e3,
  16570. BRUSH: 5e3
  16571. }
  16572. },
  16573. TT = "__flagInMainProcess",
  16574. AT = "__optionUpdated",
  16575. DT = /^[a-zA-Z0-9_]+$/;
  16576. as.prototype.on = os("on"), as.prototype.off = os("off"), as.prototype.one = os("one"), h(as, aw);
  16577. var CT = rs.prototype;
  16578. CT._onframe = function() {
  16579. if (!this._disposed) {
  16580. var t = this._scheduler;
  16581. if (this[AT]) {
  16582. var e = this[AT].silent;
  16583. this[TT] = !0, ls(this), LT.update.call(this), this[TT] = !1, this[AT] = !1, ds.call(this, e), fs.call(this, e)
  16584. } else if (t.unfinished) {
  16585. var i = 1,
  16586. n = this._model;
  16587. this._api;
  16588. t.unfinished = !1;
  16589. do {
  16590. var o = +new Date;
  16591. t.performSeriesTasks(n), t.performDataProcessorTasks(n), hs(this, n), t.performVisualTasks(n), xs(this, this._model,
  16592. 0, "remain"), i -= +new Date - o
  16593. } while (i > 0 && t.unfinished);
  16594. t.unfinished || this._zr.flush()
  16595. }
  16596. }
  16597. }, CT.getDom = function() {
  16598. return this._dom
  16599. }, CT.getZr = function() {
  16600. return this._zr
  16601. }, CT.setOption = function(t, e, i) {
  16602. var n;
  16603. if (xT(e) && (i = e.lazyUpdate, n = e.silent, e = e.notMerge), this[TT] = !0, !this._model || e) {
  16604. var o = new Va(this._api),
  16605. a = this._theme,
  16606. r = this._model = new hI(null, null, a, o);
  16607. r.scheduler = this._scheduler, r.init(null, null, a, o)
  16608. }
  16609. this._model.setOption(t, ET), i ? (this[AT] = {
  16610. silent: n
  16611. }, this[TT] = !1) : (ls(this), LT.update.call(this), this._zr.flush(), this[AT] = !1, this[TT] = !1, ds.call(this,
  16612. n), fs.call(this, n))
  16613. }, CT.setTheme = function() {
  16614. console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")
  16615. }, CT.getModel = function() {
  16616. return this._model
  16617. }, CT.getOption = function() {
  16618. return this._model && this._model.getOption()
  16619. }, CT.getWidth = function() {
  16620. return this._zr.getWidth()
  16621. }, CT.getHeight = function() {
  16622. return this._zr.getHeight()
  16623. }, CT.getDevicePixelRatio = function() {
  16624. return this._zr.painter.dpr || window.devicePixelRatio || 1
  16625. }, CT.getRenderedCanvas = function(t) {
  16626. if (z_.canvasSupported) return (t = t || {}).pixelRatio = t.pixelRatio || 1, t.backgroundColor = t.backgroundColor ||
  16627. this._model.get("backgroundColor"), this._zr.painter.getRenderedCanvas(t)
  16628. }, CT.getSvgDataUrl = function() {
  16629. if (z_.svgSupported) {
  16630. var t = this._zr;
  16631. return d(t.storage.getDisplayList(), function(t) {
  16632. t.stopAnimation(!0)
  16633. }), t.painter.pathToDataUrl()
  16634. }
  16635. }, CT.getDataURL = function(t) {
  16636. var e = (t = t || {}).excludeComponents,
  16637. i = this._model,
  16638. n = [],
  16639. o = this;
  16640. vT(e, function(t) {
  16641. i.eachComponent({
  16642. mainType: t
  16643. }, function(t) {
  16644. var e = o._componentsMap[t.__viewId];
  16645. e.group.ignore || (n.push(e), e.group.ignore = !0)
  16646. })
  16647. });
  16648. var a = "svg" === this._zr.painter.getType() ? this.getSvgDataUrl() : this.getRenderedCanvas(t).toDataURL("image/" +
  16649. (t && t.type || "png"));
  16650. return vT(n, function(t) {
  16651. t.group.ignore = !1
  16652. }), a
  16653. }, CT.getConnectedDataURL = function(t) {
  16654. if (z_.canvasSupported) {
  16655. var e = this.group,
  16656. n = Math.min,
  16657. o = Math.max;
  16658. if (FT[e]) {
  16659. var a = 1 / 0,
  16660. r = 1 / 0,
  16661. s = -1 / 0,
  16662. l = -1 / 0,
  16663. u = [],
  16664. h = t && t.pixelRatio || 1;
  16665. d(GT, function(h, c) {
  16666. if (h.group === e) {
  16667. var d = h.getRenderedCanvas(i(t)),
  16668. f = h.getDom().getBoundingClientRect();
  16669. a = n(f.left, a), r = n(f.top, r), s = o(f.right, s), l = o(f.bottom, l), u.push({
  16670. dom: d,
  16671. left: f.left,
  16672. top: f.top
  16673. })
  16674. }
  16675. });
  16676. var c = (s *= h) - (a *= h),
  16677. f = (l *= h) - (r *= h),
  16678. p = Y_();
  16679. p.width = c, p.height = f;
  16680. var g = Ii(p);
  16681. return vT(u, function(t) {
  16682. var e = new hi({
  16683. style: {
  16684. x: t.left * h - a,
  16685. y: t.top * h - r,
  16686. image: t.dom
  16687. }
  16688. });
  16689. g.add(e)
  16690. }), g.refreshImmediately(), p.toDataURL("image/" + (t && t.type || "png"))
  16691. }
  16692. return this.getDataURL(t)
  16693. }
  16694. }, CT.convertToPixel = v(ss, "convertToPixel"), CT.convertFromPixel = v(ss, "convertFromPixel"), CT.containPixel =
  16695. function(t, e) {
  16696. var i;
  16697. return t = Vi(this._model, t), d(t, function(t, n) {
  16698. n.indexOf("Models") >= 0 && d(t, function(t) {
  16699. var o = t.coordinateSystem;
  16700. if (o && o.containPoint) i |= !!o.containPoint(e);
  16701. else if ("seriesModels" === n) {
  16702. var a = this._chartsMap[t.__viewId];
  16703. a && a.containPoint && (i |= a.containPoint(e, t))
  16704. }
  16705. }, this)
  16706. }, this), !!i
  16707. }, CT.getVisual = function(t, e) {
  16708. var i = (t = Vi(this._model, t, {
  16709. defaultMainType: "series"
  16710. })).seriesModel.getData(),
  16711. n = t.hasOwnProperty("dataIndexInside") ? t.dataIndexInside : t.hasOwnProperty("dataIndex") ? i.indexOfRawIndex(t.dataIndex) :
  16712. null;
  16713. return null != n ? i.getItemVisual(n, e) : i.getVisual(e)
  16714. }, CT.getViewOfComponentModel = function(t) {
  16715. return this._componentsMap[t.__viewId]
  16716. }, CT.getViewOfSeriesModel = function(t) {
  16717. return this._chartsMap[t.__viewId]
  16718. };
  16719. var LT = {
  16720. prepareAndUpdate: function(t) {
  16721. ls(this), LT.update.call(this, t)
  16722. },
  16723. update: function(t) {
  16724. var e = this._model,
  16725. i = this._api,
  16726. n = this._zr,
  16727. o = this._coordSysMgr,
  16728. a = this._scheduler;
  16729. if (e) {
  16730. a.restoreData(e, t), a.performSeriesTasks(e), o.create(e, i), a.performDataProcessorTasks(e, t), hs(this, e), o.update(
  16731. e, i), ms(e), a.performVisualTasks(e, t), vs(this, e, i, t);
  16732. var r = e.get("backgroundColor") || "transparent";
  16733. if (z_.canvasSupported) n.setBackgroundColor(r);
  16734. else {
  16735. var s = zt(r);
  16736. r = Xt(s, "rgb"), 0 === s[3] && (r = "transparent")
  16737. }
  16738. _s(e, i)
  16739. }
  16740. },
  16741. updateTransform: function(t) {
  16742. var e = this._model,
  16743. i = this,
  16744. n = this._api;
  16745. if (e) {
  16746. var o = [];
  16747. e.eachComponent(function(a, r) {
  16748. var s = i.getViewOfComponentModel(r);
  16749. if (s && s.__alive)
  16750. if (s.updateTransform) {
  16751. var l = s.updateTransform(r, e, n, t);
  16752. l && l.update && o.push(s)
  16753. } else o.push(s)
  16754. });
  16755. var a = R();
  16756. e.eachSeries(function(o) {
  16757. var r = i._chartsMap[o.__viewId];
  16758. if (r.updateTransform) {
  16759. var s = r.updateTransform(o, e, n, t);
  16760. s && s.update && a.set(o.uid, 1)
  16761. } else a.set(o.uid, 1)
  16762. }), ms(e), this._scheduler.performVisualTasks(e, t, {
  16763. setDirty: !0,
  16764. dirtyMap: a
  16765. }), xs(i, e, 0, t, a), _s(e, this._api)
  16766. }
  16767. },
  16768. updateView: function(t) {
  16769. var e = this._model;
  16770. e && (Mr.markUpdateMethod(t, "updateView"), ms(e), this._scheduler.performVisualTasks(e, t, {
  16771. setDirty: !0
  16772. }), vs(this, this._model, this._api, t), _s(e, this._api))
  16773. },
  16774. updateVisual: function(t) {
  16775. LT.update.call(this, t)
  16776. },
  16777. updateLayout: function(t) {
  16778. LT.update.call(this, t)
  16779. }
  16780. };
  16781. CT.resize = function(t) {
  16782. this._zr.resize(t);
  16783. var e = this._model;
  16784. if (this._loadingFX && this._loadingFX.resize(), e) {
  16785. var i = e.resetOption("media"),
  16786. n = t && t.silent;
  16787. this[TT] = !0, i && ls(this), LT.update.call(this), this[TT] = !1, ds.call(this, n), fs.call(this, n)
  16788. }
  16789. }, CT.showLoading = function(t, e) {
  16790. if (xT(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), VT[t]) {
  16791. var i = VT[t](this._api, e),
  16792. n = this._zr;
  16793. this._loadingFX = i, n.add(i)
  16794. }
  16795. }, CT.hideLoading = function() {
  16796. this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null
  16797. }, CT.makeActionFromEvent = function(t) {
  16798. var e = a({}, t);
  16799. return e.type = NT[t.type], e
  16800. }, CT.dispatchAction = function(t, e) {
  16801. xT(e) || (e = {
  16802. silent: !!e
  16803. }), PT[t.type] && this._model && (this[TT] ? this._pendingActions.push(t) : (cs.call(this, t, e.silent), e.flush ?
  16804. this._zr.flush(!0) : !1 !== e.flush && z_.browser.weChat && this._throttledZrFlush(), ds.call(this, e.silent),
  16805. fs.call(this, e.silent)))
  16806. }, CT.appendData = function(t) {
  16807. var e = t.seriesIndex;
  16808. this.getModel().getSeriesByIndex(e).appendData(t), this._scheduler.unfinished = !0
  16809. }, CT.on = os("on"), CT.off = os("off"), CT.one = os("one");
  16810. var kT = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout",
  16811. "contextmenu"
  16812. ];
  16813. CT._initEvents = function() {
  16814. vT(kT, function(t) {
  16815. this._zr.on(t, function(e) {
  16816. var i, n = this.getModel(),
  16817. o = e.target;
  16818. if ("globalout" === t) i = {};
  16819. else if (o && null != o.dataIndex) {
  16820. var r = o.dataModel || n.getSeriesByIndex(o.seriesIndex);
  16821. i = r && r.getDataParams(o.dataIndex, o.dataType, o) || {}
  16822. } else o && o.eventData && (i = a({}, o.eventData));
  16823. if (i) {
  16824. var s = i.componentType,
  16825. l = i.componentIndex;
  16826. "markLine" !== s && "markPoint" !== s && "markArea" !== s || (s = "series", l = i.seriesIndex);
  16827. var u = s && null != l && n.getComponent(s, l),
  16828. h = u && this["series" === u.mainType ? "_chartsMap" : "_componentsMap"][u.__viewId];
  16829. i.event = e, i.type = t, this._ecEventProcessor.eventInfo = {
  16830. targetEl: o,
  16831. packedEvent: i,
  16832. model: u,
  16833. view: h
  16834. }, this.trigger(t, i)
  16835. }
  16836. }, this)
  16837. }, this), vT(NT, function(t, e) {
  16838. this._messageCenter.on(e, function(t) {
  16839. this.trigger(e, t)
  16840. }, this)
  16841. }, this)
  16842. }, CT.isDisposed = function() {
  16843. return this._disposed
  16844. }, CT.clear = function() {
  16845. this.setOption({
  16846. series: []
  16847. }, !0)
  16848. }, CT.dispose = function() {
  16849. if (!this._disposed) {
  16850. this._disposed = !0, Fi(this.getDom(), ZT, "");
  16851. var t = this._api,
  16852. e = this._model;
  16853. vT(this._componentsViews, function(i) {
  16854. i.dispose(e, t)
  16855. }), vT(this._chartsViews, function(i) {
  16856. i.dispose(e, t)
  16857. }), this._zr.dispose(), delete GT[this.id]
  16858. }
  16859. }, h(rs, aw), Is.prototype = {
  16860. constructor: Is,
  16861. normalizeQuery: function(t) {
  16862. var e = {},
  16863. i = {},
  16864. n = {};
  16865. if (_(t)) {
  16866. var o = _T(t);
  16867. e.mainType = o.main || null, e.subType = o.sub || null
  16868. } else {
  16869. var a = ["Index", "Name", "Id"],
  16870. r = {
  16871. name: 1,
  16872. dataIndex: 1,
  16873. dataType: 1
  16874. };
  16875. d(t, function(t, o) {
  16876. for (var s = !1, l = 0; l < a.length; l++) {
  16877. var u = a[l],
  16878. h = o.lastIndexOf(u);
  16879. if (h > 0 && h === o.length - u.length) {
  16880. var c = o.slice(0, h);
  16881. "data" !== c && (e.mainType = c, e[u.toLowerCase()] = t, s = !0)
  16882. }
  16883. }
  16884. r.hasOwnProperty(o) && (i[o] = t, s = !0), s || (n[o] = t)
  16885. })
  16886. }
  16887. return {
  16888. cptQuery: e,
  16889. dataQuery: i,
  16890. otherQuery: n
  16891. }
  16892. },
  16893. filter: function(t, e, i) {
  16894. function n(t, e, i, n) {
  16895. return null == t[i] || e[n || i] === t[i]
  16896. }
  16897. var o = this.eventInfo;
  16898. if (!o) return !0;
  16899. var a = o.targetEl,
  16900. r = o.packedEvent,
  16901. s = o.model,
  16902. l = o.view;
  16903. if (!s || !l) return !0;
  16904. var u = e.cptQuery,
  16905. h = e.dataQuery;
  16906. return n(u, s, "mainType") && n(u, s, "subType") && n(u, s, "index", "componentIndex") && n(u, s, "name") && n(u,
  16907. s, "id") && n(h, r, "name") && n(h, r, "dataIndex") && n(h, r, "dataType") && (!l.filterForExposedEvent || l.filterForExposedEvent(
  16908. t, e.otherQuery, a, r))
  16909. },
  16910. afterTrigger: function() {
  16911. this.eventInfo = null
  16912. }
  16913. };
  16914. var PT = {},
  16915. NT = {},
  16916. OT = [],
  16917. ET = [],
  16918. RT = [],
  16919. zT = [],
  16920. BT = {},
  16921. VT = {},
  16922. GT = {},
  16923. FT = {},
  16924. WT = new Date - 0,
  16925. HT = new Date - 0,
  16926. ZT = "_echarts_instance_",
  16927. UT = As;
  16928. Es(2e3, UI), Ls(MI), ks(5e3, function(t) {
  16929. var e = R();
  16930. t.eachSeries(function(t) {
  16931. var i = t.get("stack");
  16932. if (i) {
  16933. var n = e.get(i) || e.set(i, []),
  16934. o = t.getData(),
  16935. a = {
  16936. stackResultDimension: o.getCalculationInfo("stackResultDimension"),
  16937. stackedOverDimension: o.getCalculationInfo("stackedOverDimension"),
  16938. stackedDimension: o.getCalculationInfo("stackedDimension"),
  16939. stackedByDimension: o.getCalculationInfo("stackedByDimension"),
  16940. isStackedByIndex: o.getCalculationInfo("isStackedByIndex"),
  16941. data: o,
  16942. seriesModel: t
  16943. };
  16944. if (!a.stackedDimension || !a.isStackedByIndex && !a.stackedByDimension) return;
  16945. n.length && o.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(a)
  16946. }
  16947. }), e.each(ir)
  16948. }), zs("default", function(t, e) {
  16949. r(e = e || {}, {
  16950. text: "loading",
  16951. color: "#c23531",
  16952. textColor: "#000",
  16953. maskColor: "rgba(255, 255, 255, 0.8)",
  16954. zlevel: 0
  16955. });
  16956. var i = new aM({
  16957. style: {
  16958. fill: e.maskColor
  16959. },
  16960. zlevel: e.zlevel,
  16961. z: 1e4
  16962. }),
  16963. n = new uM({
  16964. shape: {
  16965. startAngle: -YI / 2,
  16966. endAngle: -YI / 2 + .1,
  16967. r: 10
  16968. },
  16969. style: {
  16970. stroke: e.color,
  16971. lineCap: "round",
  16972. lineWidth: 5
  16973. },
  16974. zlevel: e.zlevel,
  16975. z: 10001
  16976. }),
  16977. o = new aM({
  16978. style: {
  16979. fill: "none",
  16980. text: e.text,
  16981. textPosition: "right",
  16982. textDistance: 10,
  16983. textFill: e.textColor
  16984. },
  16985. zlevel: e.zlevel,
  16986. z: 10001
  16987. });
  16988. n.animateShape(!0).when(1e3, {
  16989. endAngle: 3 * YI / 2
  16990. }).start("circularInOut"), n.animateShape(!0).when(1e3, {
  16991. startAngle: 3 * YI / 2
  16992. }).delay(300).start("circularInOut");
  16993. var a = new Zw;
  16994. return a.add(n), a.add(o), a.add(i), a.resize = function() {
  16995. var e = t.getWidth() / 2,
  16996. a = t.getHeight() / 2;
  16997. n.setShape({
  16998. cx: e,
  16999. cy: a
  17000. });
  17001. var r = n.shape.r;
  17002. o.setShape({
  17003. x: e - r,
  17004. y: a - r,
  17005. width: 2 * r,
  17006. height: 2 * r
  17007. }), i.setShape({
  17008. x: 0,
  17009. y: 0,
  17010. width: t.getWidth(),
  17011. height: t.getHeight()
  17012. })
  17013. }, a.resize(), a
  17014. }), Ps({
  17015. type: "highlight",
  17016. event: "highlight",
  17017. update: "highlight"
  17018. }, B), Ps({
  17019. type: "downplay",
  17020. event: "downplay",
  17021. update: "downplay"
  17022. }, B), Cs("light", iT), Cs("dark", oT);
  17023. var XT = {};
  17024. Hs.prototype = {
  17025. constructor: Hs,
  17026. add: function(t) {
  17027. return this._add = t, this
  17028. },
  17029. update: function(t) {
  17030. return this._update = t, this
  17031. },
  17032. remove: function(t) {
  17033. return this._remove = t, this
  17034. },
  17035. execute: function() {
  17036. var t = this._old,
  17037. e = this._new,
  17038. i = {},
  17039. n = [],
  17040. o = [];
  17041. for (Zs(t, {}, n, "_oldKeyGetter", this), Zs(e, i, o, "_newKeyGetter", this), a = 0; a < t.length; a++) null != (
  17042. s = i[r = n[a]]) ? ((u = s.length) ? (1 === u && (i[r] = null), s = s.unshift()) : i[r] = null, this._update &&
  17043. this._update(s, a)) : this._remove && this._remove(a);
  17044. for (var a = 0; a < o.length; a++) {
  17045. var r = o[a];
  17046. if (i.hasOwnProperty(r)) {
  17047. var s = i[r];
  17048. if (null == s) continue;
  17049. if (s.length)
  17050. for (var l = 0, u = s.length; l < u; l++) this._add && this._add(s[l]);
  17051. else this._add && this._add(s)
  17052. }
  17053. }
  17054. }
  17055. };
  17056. var jT = R(["tooltip", "label", "itemName", "itemId", "seriesName"]),
  17057. YT = w,
  17058. qT = "e\0\0",
  17059. KT = {
  17060. float: "undefined" == typeof Float64Array ? Array : Float64Array,
  17061. int: "undefined" == typeof Int32Array ? Array : Int32Array,
  17062. ordinal: Array,
  17063. number: Array,
  17064. time: Array
  17065. },
  17066. $T = "undefined" == typeof Uint32Array ? Array : Uint32Array,
  17067. JT = "undefined" == typeof Uint16Array ? Array : Uint16Array,
  17068. QT = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_rawData", "_chunkSize", "_chunkCount",
  17069. "_dimValueGetter", "_count", "_rawCount", "_nameDimIdx", "_idDimIdx"
  17070. ],
  17071. tA = ["_extent", "_approximateExtent", "_rawExtent"],
  17072. eA = function(t, e) {
  17073. t = t || ["x", "y"];
  17074. for (var i = {}, n = [], o = {}, a = 0; a < t.length; a++) {
  17075. var r = t[a];
  17076. _(r) && (r = {
  17077. name: r
  17078. });
  17079. var s = r.name;
  17080. r.type = r.type || "float", r.coordDim || (r.coordDim = s, r.coordDimIndex = 0), r.otherDims = r.otherDims || {},
  17081. n.push(s), i[s] = r, r.index = a, r.createInvertedIndices && (o[s] = [])
  17082. }
  17083. this.dimensions = n, this._dimensionInfos = i, this.hostModel = e, this.dataType, this._indices = null, this._count =
  17084. 0, this._rawCount = 0, this._storage = {}, this._nameList = [], this._idList = [], this._optionModels = [], this._visual = {},
  17085. this._layout = {}, this._itemVisuals = [], this.hasItemVisual = {}, this._itemLayouts = [], this._graphicEls = [],
  17086. this._chunkSize = 1e5, this._chunkCount = 0, this._rawData, this._rawExtent = {}, this._extent = {}, this._approximateExtent = {},
  17087. this._dimensionsSummary = Us(this), this._invertedIndicesMap = o, this._calculationInfo = {}
  17088. },
  17089. iA = eA.prototype;
  17090. iA.type = "list", iA.hasItemOption = !0, iA.getDimension = function(t) {
  17091. return isNaN(t) || (t = this.dimensions[t] || t), t
  17092. }, iA.getDimensionInfo = function(t) {
  17093. return this._dimensionInfos[this.getDimension(t)]
  17094. }, iA.getDimensionsOnCoord = function() {
  17095. return this._dimensionsSummary.dataDimsOnCoord.slice()
  17096. }, iA.mapDimension = function(t, e) {
  17097. var i = this._dimensionsSummary;
  17098. if (null == e) return i.encodeFirstDimNotExtra[t];
  17099. var n = i.encode[t];
  17100. return !0 === e ? (n || []).slice() : n && n[e]
  17101. }, iA.initData = function(t, e, i) {
  17102. (va.isInstance(t) || c(t)) && (t = new nr(t, this.dimensions.length)), this._rawData = t, this._storage = {}, this._indices =
  17103. null, this._nameList = e || [], this._idList = [], this._nameRepeatCount = {}, i || (this.hasItemOption = !1),
  17104. this.defaultDimValueGetter = DI[this._rawData.getSource().sourceFormat], this._dimValueGetter = i = i || this.defaultDimValueGetter,
  17105. this._rawExtent = {}, this._initDataFromProvider(0, t.count()), t.pure && (this.hasItemOption = !1)
  17106. }, iA.getProvider = function() {
  17107. return this._rawData
  17108. }, iA.appendData = function(t) {
  17109. var e = this._rawData,
  17110. i = this.count();
  17111. e.appendData(t);
  17112. var n = e.count();
  17113. e.persistent || (n += i), this._initDataFromProvider(i, n)
  17114. }, iA._initDataFromProvider = function(t, e) {
  17115. if (!(t >= e)) {
  17116. for (var i, n = this._chunkSize, o = this._rawData, a = this._storage, r = this.dimensions, s = r.length, l = this
  17117. ._dimensionInfos, u = this._nameList, h = this._idList, c = this._rawExtent, d = this._nameRepeatCount = {}, f =
  17118. this._chunkCount, p = f - 1, g = 0; g < s; g++) {
  17119. c[T = r[g]] || (c[T] = [1 / 0, -1 / 0]);
  17120. var m = l[T];
  17121. 0 === m.otherDims.itemName && (i = this._nameDimIdx = g), 0 === m.otherDims.itemId && (this._idDimIdx = g);
  17122. var v = KT[m.type];
  17123. a[T] || (a[T] = []);
  17124. var y = a[T][p];
  17125. if (y && y.length < n) {
  17126. for (var x = new v(Math.min(e - p * n, n)), _ = 0; _ < y.length; _++) x[_] = y[_];
  17127. a[T][p] = x
  17128. }
  17129. for (I = f * n; I < e; I += n) a[T].push(new v(Math.min(e - I, n)));
  17130. this._chunkCount = a[T].length
  17131. }
  17132. for (var w = new Array(s), b = t; b < e; b++) {
  17133. w = o.getItem(b, w);
  17134. for (var S = Math.floor(b / n), M = b % n, I = 0; I < s; I++) {
  17135. var T = r[I],
  17136. A = a[T][S],
  17137. D = this._dimValueGetter(w, T, b, I);
  17138. A[M] = D;
  17139. var C = c[T];
  17140. D < C[0] && (C[0] = D), D > C[1] && (C[1] = D)
  17141. }
  17142. if (!o.pure) {
  17143. var L = u[b];
  17144. if (w && null == L)
  17145. if (null != w.name) u[b] = L = w.name;
  17146. else if (null != i) {
  17147. var k = r[i],
  17148. P = a[k][S];
  17149. if (P) {
  17150. L = P[M];
  17151. var N = l[k].ordinalMeta;
  17152. N && N.categories.length && (L = N.categories[L])
  17153. }
  17154. }
  17155. var O = null == w ? null : w.id;
  17156. null == O && null != L && (d[L] = d[L] || 0, O = L, d[L] > 0 && (O += "__ec__" + d[L]), d[L]++), null != O && (h[
  17157. b] = O)
  17158. }
  17159. }!o.persistent && o.clean && o.clean(), this._rawCount = this._count = e, this._extent = {}, $s(this)
  17160. }
  17161. }, iA.count = function() {
  17162. return this._count
  17163. }, iA.getIndices = function() {
  17164. var t = this._indices;
  17165. if (t) {
  17166. var e = t.constructor,
  17167. i = this._count;
  17168. if (e === Array) {
  17169. n = new e(i);
  17170. for (o = 0; o < i; o++) n[o] = t[o]
  17171. } else n = new e(t.buffer, 0, i)
  17172. } else
  17173. for (var n = new(e = Ys(this))(this.count()), o = 0; o < n.length; o++) n[o] = o;
  17174. return n
  17175. }, iA.get = function(t, e) {
  17176. if (!(e >= 0 && e < this._count)) return NaN;
  17177. var i = this._storage;
  17178. if (!i[t]) return NaN;
  17179. e = this.getRawIndex(e);
  17180. var n = Math.floor(e / this._chunkSize),
  17181. o = e % this._chunkSize;
  17182. return i[t][n][o]
  17183. }, iA.getByRawIndex = function(t, e) {
  17184. if (!(e >= 0 && e < this._rawCount)) return NaN;
  17185. var i = this._storage[t];
  17186. if (!i) return NaN;
  17187. var n = Math.floor(e / this._chunkSize),
  17188. o = e % this._chunkSize;
  17189. return i[n][o]
  17190. }, iA._getFast = function(t, e) {
  17191. var i = Math.floor(e / this._chunkSize),
  17192. n = e % this._chunkSize;
  17193. return this._storage[t][i][n]
  17194. }, iA.getValues = function(t, e) {
  17195. var i = [];
  17196. y(t) || (e = t, t = this.dimensions);
  17197. for (var n = 0, o = t.length; n < o; n++) i.push(this.get(t[n], e));
  17198. return i
  17199. }, iA.hasValue = function(t) {
  17200. for (var e = this._dimensionsSummary.dataDimsOnCoord, i = this._dimensionInfos, n = 0, o = e.length; n < o; n++)
  17201. if ("ordinal" !== i[e[n]].type && isNaN(this.get(e[n], t))) return !1;
  17202. return !0
  17203. }, iA.getDataExtent = function(t) {
  17204. t = this.getDimension(t);
  17205. var e = [1 / 0, -1 / 0];
  17206. if (!this._storage[t]) return e;
  17207. var i, n = this.count();
  17208. if (!this._indices) return this._rawExtent[t].slice();
  17209. if (i = this._extent[t]) return i.slice();
  17210. for (var o = (i = e)[0], a = i[1], r = 0; r < n; r++) {
  17211. var s = this._getFast(t, this.getRawIndex(r));
  17212. s < o && (o = s), s > a && (a = s)
  17213. }
  17214. return i = [o, a], this._extent[t] = i, i
  17215. }, iA.getApproximateExtent = function(t) {
  17216. return t = this.getDimension(t), this._approximateExtent[t] || this.getDataExtent(t)
  17217. }, iA.setApproximateExtent = function(t, e) {
  17218. e = this.getDimension(e), this._approximateExtent[e] = t.slice()
  17219. }, iA.getCalculationInfo = function(t) {
  17220. return this._calculationInfo[t]
  17221. }, iA.setCalculationInfo = function(t, e) {
  17222. YT(t) ? a(this._calculationInfo, t) : this._calculationInfo[t] = e
  17223. }, iA.getSum = function(t) {
  17224. var e = 0;
  17225. if (this._storage[t])
  17226. for (var i = 0, n = this.count(); i < n; i++) {
  17227. var o = this.get(t, i);
  17228. isNaN(o) || (e += o)
  17229. }
  17230. return e
  17231. }, iA.getMedian = function(t) {
  17232. var e = [];
  17233. this.each(t, function(t, i) {
  17234. isNaN(t) || e.push(t)
  17235. });
  17236. var i = [].concat(e).sort(function(t, e) {
  17237. return t - e
  17238. }),
  17239. n = this.count();
  17240. return 0 === n ? 0 : n % 2 == 1 ? i[(n - 1) / 2] : (i[n / 2] + i[n / 2 - 1]) / 2
  17241. }, iA.rawIndexOf = function(t, e) {
  17242. var i = (t && this._invertedIndicesMap[t])[e];
  17243. return null == i || isNaN(i) ? -1 : i
  17244. }, iA.indexOfName = function(t) {
  17245. for (var e = 0, i = this.count(); e < i; e++)
  17246. if (this.getName(e) === t) return e;
  17247. return -1
  17248. }, iA.indexOfRawIndex = function(t) {
  17249. if (!this._indices) return t;
  17250. if (t >= this._rawCount || t < 0) return -1;
  17251. var e = this._indices,
  17252. i = e[t];
  17253. if (null != i && i < this._count && i === t) return t;
  17254. for (var n = 0, o = this._count - 1; n <= o;) {
  17255. var a = (n + o) / 2 | 0;
  17256. if (e[a] < t) n = a + 1;
  17257. else {
  17258. if (!(e[a] > t)) return a;
  17259. o = a - 1
  17260. }
  17261. }
  17262. return -1
  17263. }, iA.indicesOfNearest = function(t, e, i) {
  17264. var n = [];
  17265. if (!this._storage[t]) return n;
  17266. null == i && (i = 1 / 0);
  17267. for (var o = Number.MAX_VALUE, a = -1, r = 0, s = this.count(); r < s; r++) {
  17268. var l = e - this.get(t, r),
  17269. u = Math.abs(l);
  17270. l <= i && u <= o && ((u < o || l >= 0 && a < 0) && (o = u, a = l, n.length = 0), n.push(r))
  17271. }
  17272. return n
  17273. }, iA.getRawIndex = Qs, iA.getRawDataItem = function(t) {
  17274. if (this._rawData.persistent) return this._rawData.getItem(this.getRawIndex(t));
  17275. for (var e = [], i = 0; i < this.dimensions.length; i++) {
  17276. var n = this.dimensions[i];
  17277. e.push(this.get(n, t))
  17278. }
  17279. return e
  17280. }, iA.getName = function(t) {
  17281. var e = this.getRawIndex(t);
  17282. return this._nameList[e] || Js(this, this._nameDimIdx, e) || ""
  17283. }, iA.getId = function(t) {
  17284. return el(this, this.getRawIndex(t))
  17285. }, iA.each = function(t, e, i, n) {
  17286. if (this._count) {
  17287. "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this;
  17288. for (var o = (t = f(il(t), this.getDimension, this)).length, a = 0; a < this.count(); a++) switch (o) {
  17289. case 0:
  17290. e.call(i, a);
  17291. break;
  17292. case 1:
  17293. e.call(i, this.get(t[0], a), a);
  17294. break;
  17295. case 2:
  17296. e.call(i, this.get(t[0], a), this.get(t[1], a), a);
  17297. break;
  17298. default:
  17299. for (var r = 0, s = []; r < o; r++) s[r] = this.get(t[r], a);
  17300. s[r] = a, e.apply(i, s)
  17301. }
  17302. }
  17303. }, iA.filterSelf = function(t, e, i, n) {
  17304. if (this._count) {
  17305. "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = f(il(t), this.getDimension, this);
  17306. for (var o = this.count(), a = new(Ys(this))(o), r = [], s = t.length, l = 0, u = t[0], h = 0; h < o; h++) {
  17307. var c, d = this.getRawIndex(h);
  17308. if (0 === s) c = e.call(i, h);
  17309. else if (1 === s) {
  17310. var p = this._getFast(u, d);
  17311. c = e.call(i, p, h)
  17312. } else {
  17313. for (var g = 0; g < s; g++) r[g] = this._getFast(u, d);
  17314. r[g] = h, c = e.apply(i, r)
  17315. }
  17316. c && (a[l++] = d)
  17317. }
  17318. return l < o && (this._indices = a), this._count = l, this._extent = {}, this.getRawIndex = this._indices ? tl :
  17319. Qs, this
  17320. }
  17321. }, iA.selectRange = function(t) {
  17322. if (this._count) {
  17323. var e = [];
  17324. for (var i in t) t.hasOwnProperty(i) && e.push(i);
  17325. var n = e.length;
  17326. if (n) {
  17327. var o = this.count(),
  17328. a = new(Ys(this))(o),
  17329. r = 0,
  17330. s = e[0],
  17331. l = t[s][0],
  17332. u = t[s][1],
  17333. h = !1;
  17334. if (!this._indices) {
  17335. var c = 0;
  17336. if (1 === n) {
  17337. for (var d = this._storage[e[0]], f = 0; f < this._chunkCount; f++)
  17338. for (var p = d[f], g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++)((w = p[
  17339. m]) >= l && w <= u || isNaN(w)) && (a[r++] = c), c++;
  17340. h = !0
  17341. } else if (2 === n) {
  17342. for (var d = this._storage[s], v = this._storage[e[1]], y = t[e[1]][0], x = t[e[1]][1], f = 0; f < this._chunkCount; f++)
  17343. for (var p = d[f], _ = v[f], g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++) {
  17344. var w = p[m],
  17345. b = _[m];
  17346. (w >= l && w <= u || isNaN(w)) && (b >= y && b <= x || isNaN(b)) && (a[r++] = c), c++
  17347. }
  17348. h = !0
  17349. }
  17350. }
  17351. if (!h)
  17352. if (1 === n)
  17353. for (m = 0; m < o; m++) {
  17354. M = this.getRawIndex(m);
  17355. ((w = this._getFast(s, M)) >= l && w <= u || isNaN(w)) && (a[r++] = M)
  17356. } else
  17357. for (m = 0; m < o; m++) {
  17358. for (var S = !0, M = this.getRawIndex(m), f = 0; f < n; f++) {
  17359. var I = e[f];
  17360. ((w = this._getFast(i, M)) < t[I][0] || w > t[I][1]) && (S = !1)
  17361. }
  17362. S && (a[r++] = this.getRawIndex(m))
  17363. }
  17364. return r < o && (this._indices = a), this._count = r, this._extent = {}, this.getRawIndex = this._indices ? tl :
  17365. Qs, this
  17366. }
  17367. }
  17368. }, iA.mapArray = function(t, e, i, n) {
  17369. "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this;
  17370. var o = [];
  17371. return this.each(t, function() {
  17372. o.push(e && e.apply(this, arguments))
  17373. }, i), o
  17374. }, iA.map = function(t, e, i, n) {
  17375. i = i || n || this;
  17376. var o = nl(this, t = f(il(t), this.getDimension, this));
  17377. o._indices = this._indices, o.getRawIndex = o._indices ? tl : Qs;
  17378. for (var a = o._storage, r = [], s = this._chunkSize, l = t.length, u = this.count(), h = [], c = o._rawExtent, d =
  17379. 0; d < u; d++) {
  17380. for (var p = 0; p < l; p++) h[p] = this.get(t[p], d);
  17381. h[l] = d;
  17382. var g = e && e.apply(i, h);
  17383. if (null != g) {
  17384. "object" != typeof g && (r[0] = g, g = r);
  17385. for (var m = this.getRawIndex(d), v = Math.floor(m / s), y = m % s, x = 0; x < g.length; x++) {
  17386. var _ = t[x],
  17387. w = g[x],
  17388. b = c[_],
  17389. S = a[_];
  17390. S && (S[v][y] = w), w < b[0] && (b[0] = w), w > b[1] && (b[1] = w)
  17391. }
  17392. }
  17393. }
  17394. return o
  17395. }, iA.downSample = function(t, e, i, n) {
  17396. for (var o = nl(this, [t]), a = o._storage, r = [], s = Math.floor(1 / e), l = a[t], u = this.count(), h = this._chunkSize,
  17397. c = o._rawExtent[t], d = new(Ys(this))(u), f = 0, p = 0; p < u; p += s) {
  17398. s > u - p && (s = u - p, r.length = s);
  17399. for (var g = 0; g < s; g++) {
  17400. var m = this.getRawIndex(p + g),
  17401. v = Math.floor(m / h),
  17402. y = m % h;
  17403. r[g] = l[v][y]
  17404. }
  17405. var x = i(r),
  17406. _ = this.getRawIndex(Math.min(p + n(r, x) || 0, u - 1)),
  17407. w = _ % h;
  17408. l[Math.floor(_ / h)][w] = x, x < c[0] && (c[0] = x), x > c[1] && (c[1] = x), d[f++] = _
  17409. }
  17410. return o._count = f, o._indices = d, o.getRawIndex = tl, o
  17411. }, iA.getItemModel = function(t) {
  17412. var e = this.hostModel;
  17413. return new Lo(this.getRawDataItem(t), e, e && e.ecModel)
  17414. }, iA.diff = function(t) {
  17415. var e = this;
  17416. return new Hs(t ? t.getIndices() : [], this.getIndices(), function(e) {
  17417. return el(t, e)
  17418. }, function(t) {
  17419. return el(e, t)
  17420. })
  17421. }, iA.getVisual = function(t) {
  17422. var e = this._visual;
  17423. return e && e[t]
  17424. }, iA.setVisual = function(t, e) {
  17425. if (YT(t))
  17426. for (var i in t) t.hasOwnProperty(i) && this.setVisual(i, t[i]);
  17427. else this._visual = this._visual || {}, this._visual[t] = e
  17428. }, iA.setLayout = function(t, e) {
  17429. if (YT(t))
  17430. for (var i in t) t.hasOwnProperty(i) && this.setLayout(i, t[i]);
  17431. else this._layout[t] = e
  17432. }, iA.getLayout = function(t) {
  17433. return this._layout[t]
  17434. }, iA.getItemLayout = function(t) {
  17435. return this._itemLayouts[t]
  17436. }, iA.setItemLayout = function(t, e, i) {
  17437. this._itemLayouts[t] = i ? a(this._itemLayouts[t] || {}, e) : e
  17438. }, iA.clearItemLayouts = function() {
  17439. this._itemLayouts.length = 0
  17440. }, iA.getItemVisual = function(t, e, i) {
  17441. var n = this._itemVisuals[t],
  17442. o = n && n[e];
  17443. return null != o || i ? o : this.getVisual(e)
  17444. }, iA.setItemVisual = function(t, e, i) {
  17445. var n = this._itemVisuals[t] || {},
  17446. o = this.hasItemVisual;
  17447. if (this._itemVisuals[t] = n, YT(e))
  17448. for (var a in e) e.hasOwnProperty(a) && (n[a] = e[a], o[a] = !0);
  17449. else n[e] = i, o[e] = !0
  17450. }, iA.clearAllVisual = function() {
  17451. this._visual = {}, this._itemVisuals = [], this.hasItemVisual = {}
  17452. };
  17453. var nA = function(t) {
  17454. t.seriesIndex = this.seriesIndex, t.dataIndex = this.dataIndex, t.dataType = this.dataType
  17455. };
  17456. iA.setItemGraphicEl = function(t, e) {
  17457. var i = this.hostModel;
  17458. e && (e.dataIndex = t, e.dataType = this.dataType, e.seriesIndex = i && i.seriesIndex, "group" === e.type && e.traverse(
  17459. nA, e)), this._graphicEls[t] = e
  17460. }, iA.getItemGraphicEl = function(t) {
  17461. return this._graphicEls[t]
  17462. }, iA.eachItemGraphicEl = function(t, e) {
  17463. d(this._graphicEls, function(i, n) {
  17464. i && t && t.call(e, i, n)
  17465. })
  17466. }, iA.cloneShallow = function(t) {
  17467. if (!t) {
  17468. var e = f(this.dimensions, this.getDimensionInfo, this);
  17469. t = new eA(e, this.hostModel)
  17470. }
  17471. if (t._storage = this._storage, Ks(t, this), this._indices) {
  17472. var i = this._indices.constructor;
  17473. t._indices = new i(this._indices)
  17474. } else t._indices = null;
  17475. return t.getRawIndex = t._indices ? tl : Qs, t
  17476. }, iA.wrapMethod = function(t, e) {
  17477. var i = this[t];
  17478. "function" == typeof i && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(t), this[
  17479. t] = function() {
  17480. var t = i.apply(this, arguments);
  17481. return e.apply(this, [t].concat(C(arguments)))
  17482. })
  17483. }, iA.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "map"], iA.CHANGABLE_METHODS = ["filterSelf",
  17484. "selectRange"
  17485. ];
  17486. var oA = function(t, e) {
  17487. return e = e || {}, rl(e.coordDimensions || [], t, {
  17488. dimsDef: e.dimensionsDefine || t.dimensionsDefine,
  17489. encodeDef: e.encodeDefine || t.encodeDefine,
  17490. dimCount: e.dimensionsCount,
  17491. generateCoord: e.generateCoord,
  17492. generateCoordCount: e.generateCoordCount
  17493. })
  17494. };
  17495. gl.prototype.parse = function(t) {
  17496. return t
  17497. }, gl.prototype.getSetting = function(t) {
  17498. return this._setting[t]
  17499. }, gl.prototype.contain = function(t) {
  17500. var e = this._extent;
  17501. return t >= e[0] && t <= e[1]
  17502. }, gl.prototype.normalize = function(t) {
  17503. var e = this._extent;
  17504. return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0])
  17505. }, gl.prototype.scale = function(t) {
  17506. var e = this._extent;
  17507. return t * (e[1] - e[0]) + e[0]
  17508. }, gl.prototype.unionExtent = function(t) {
  17509. var e = this._extent;
  17510. t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1])
  17511. }, gl.prototype.unionExtentFromData = function(t, e) {
  17512. this.unionExtent(t.getApproximateExtent(e))
  17513. }, gl.prototype.getExtent = function() {
  17514. return this._extent.slice()
  17515. }, gl.prototype.setExtent = function(t, e) {
  17516. var i = this._extent;
  17517. isNaN(t) || (i[0] = t), isNaN(e) || (i[1] = e)
  17518. }, gl.prototype.isBlank = function() {
  17519. return this._isBlank
  17520. }, gl.prototype.setBlank = function(t) {
  17521. this._isBlank = t
  17522. }, gl.prototype.getLabel = null, Xi(gl), Ki(gl, {
  17523. registerWhenExtend: !0
  17524. }), ml.createByAxisModel = function(t) {
  17525. var e = t.option,
  17526. i = e.data,
  17527. n = i && f(i, yl);
  17528. return new ml({
  17529. categories: n,
  17530. needCollect: !n,
  17531. deduplication: !1 !== e.dedplication
  17532. })
  17533. };
  17534. var aA = ml.prototype;
  17535. aA.getOrdinal = function(t) {
  17536. return vl(this).get(t)
  17537. }, aA.parseAndCollect = function(t) {
  17538. var e, i = this._needCollect;
  17539. if ("string" != typeof t && !i) return t;
  17540. if (i && !this._deduplication) return e = this.categories.length, this.categories[e] = t, e;
  17541. var n = vl(this);
  17542. return null == (e = n.get(t)) && (i ? (e = this.categories.length, this.categories[e] = t, n.set(t, e)) : e = NaN),
  17543. e
  17544. };
  17545. var rA = gl.prototype,
  17546. sA = gl.extend({
  17547. type: "ordinal",
  17548. init: function(t, e) {
  17549. t && !y(t) || (t = new ml({
  17550. categories: t
  17551. })), this._ordinalMeta = t, this._extent = e || [0, t.categories.length - 1]
  17552. },
  17553. parse: function(t) {
  17554. return "string" == typeof t ? this._ordinalMeta.getOrdinal(t) : Math.round(t)
  17555. },
  17556. contain: function(t) {
  17557. return t = this.parse(t), rA.contain.call(this, t) && null != this._ordinalMeta.categories[t]
  17558. },
  17559. normalize: function(t) {
  17560. return rA.normalize.call(this, this.parse(t))
  17561. },
  17562. scale: function(t) {
  17563. return Math.round(rA.scale.call(this, t))
  17564. },
  17565. getTicks: function() {
  17566. for (var t = [], e = this._extent, i = e[0]; i <= e[1];) t.push(i), i++;
  17567. return t
  17568. },
  17569. getLabel: function(t) {
  17570. if (!this.isBlank()) return this._ordinalMeta.categories[t]
  17571. },
  17572. count: function() {
  17573. return this._extent[1] - this._extent[0] + 1
  17574. },
  17575. unionExtentFromData: function(t, e) {
  17576. this.unionExtent(t.getApproximateExtent(e))
  17577. },
  17578. getOrdinalMeta: function() {
  17579. return this._ordinalMeta
  17580. },
  17581. niceTicks: B,
  17582. niceExtent: B
  17583. });
  17584. sA.create = function() {
  17585. return new sA
  17586. };
  17587. var lA = zo,
  17588. uA = zo,
  17589. hA = gl.extend({
  17590. type: "interval",
  17591. _interval: 0,
  17592. _intervalPrecision: 2,
  17593. setExtent: function(t, e) {
  17594. var i = this._extent;
  17595. isNaN(t) || (i[0] = parseFloat(t)), isNaN(e) || (i[1] = parseFloat(e))
  17596. },
  17597. unionExtent: function(t) {
  17598. var e = this._extent;
  17599. t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]), hA.prototype.setExtent.call(this, e[0], e[1])
  17600. },
  17601. getInterval: function() {
  17602. return this._interval
  17603. },
  17604. setInterval: function(t) {
  17605. this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = _l(t)
  17606. },
  17607. getTicks: function() {
  17608. return Sl(this._interval, this._extent, this._niceExtent, this._intervalPrecision)
  17609. },
  17610. getLabel: function(t, e) {
  17611. if (null == t) return "";
  17612. var i = e && e.precision;
  17613. return null == i ? i = Go(t) || 0 : "auto" === i && (i = this._intervalPrecision), t = uA(t, i, !0), $o(t)
  17614. },
  17615. niceTicks: function(t, e, i) {
  17616. t = t || 5;
  17617. var n = this._extent,
  17618. o = n[1] - n[0];
  17619. if (isFinite(o)) {
  17620. o < 0 && (o = -o, n.reverse());
  17621. var a = xl(n, t, e, i);
  17622. this._intervalPrecision = a.intervalPrecision, this._interval = a.interval, this._niceExtent = a.niceTickExtent
  17623. }
  17624. },
  17625. niceExtent: function(t) {
  17626. var e = this._extent;
  17627. if (e[0] === e[1])
  17628. if (0 !== e[0]) {
  17629. var i = e[0];
  17630. t.fixMax ? e[0] -= i / 2 : (e[1] += i / 2, e[0] -= i / 2)
  17631. } else e[1] = 1;
  17632. var n = e[1] - e[0];
  17633. isFinite(n) || (e[0] = 0, e[1] = 1), this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  17634. var o = this._interval;
  17635. t.fixMin || (e[0] = uA(Math.floor(e[0] / o) * o)), t.fixMax || (e[1] = uA(Math.ceil(e[1] / o) * o))
  17636. }
  17637. });
  17638. hA.create = function() {
  17639. return new hA
  17640. };
  17641. var cA = "__ec_stack_",
  17642. dA = "undefined" != typeof Float32Array ? Float32Array : Array,
  17643. fA = {
  17644. seriesType: "bar",
  17645. plan: zI(),
  17646. reset: function(t) {
  17647. if (Pl(t) && Nl(t)) {
  17648. var e = t.getData(),
  17649. i = t.coordinateSystem,
  17650. n = i.getBaseAxis(),
  17651. o = i.getOtherAxis(n),
  17652. a = e.mapDimension(o.dim),
  17653. r = e.mapDimension(n.dim),
  17654. s = o.isHorizontal(),
  17655. l = s ? 0 : 1,
  17656. u = Ll(Dl([t]), n, t).width;
  17657. return u > .5 || (u = .5), {
  17658. progress: function(t, e) {
  17659. for (var n, h = new dA(2 * t.count), c = [], d = [], f = 0; null != (n = t.next());) d[l] = e.get(a, n), d[1 -
  17660. l] = e.get(r, n), c = i.dataToPoint(d, null, c), h[f++] = c[0], h[f++] = c[1];
  17661. e.setLayout({
  17662. largePoints: h,
  17663. barWidth: u,
  17664. valueAxisStart: Ol(0, o),
  17665. valueAxisHorizontal: s
  17666. })
  17667. }
  17668. }
  17669. }
  17670. }
  17671. },
  17672. pA = hA.prototype,
  17673. gA = Math.ceil,
  17674. mA = Math.floor,
  17675. vA = function(t, e, i, n) {
  17676. for (; i < n;) {
  17677. var o = i + n >>> 1;
  17678. t[o][1] < e ? i = o + 1 : n = o
  17679. }
  17680. return i
  17681. },
  17682. yA = hA.extend({
  17683. type: "time",
  17684. getLabel: function(t) {
  17685. var e = this._stepLvl,
  17686. i = new Date(t);
  17687. return oa(e[0], i, this.getSetting("useUTC"))
  17688. },
  17689. niceExtent: function(t) {
  17690. var e = this._extent;
  17691. if (e[0] === e[1] && (e[0] -= 864e5, e[1] += 864e5), e[1] === -1 / 0 && e[0] === 1 / 0) {
  17692. var i = new Date;
  17693. e[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), e[0] = e[1] - 864e5
  17694. }
  17695. this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  17696. var n = this._interval;
  17697. t.fixMin || (e[0] = zo(mA(e[0] / n) * n)), t.fixMax || (e[1] = zo(gA(e[1] / n) * n))
  17698. },
  17699. niceTicks: function(t, e, i) {
  17700. t = t || 10;
  17701. var n = this._extent,
  17702. o = n[1] - n[0],
  17703. a = o / t;
  17704. null != e && a < e && (a = e), null != i && a > i && (a = i);
  17705. var r = xA.length,
  17706. s = vA(xA, a, 0, r),
  17707. l = xA[Math.min(s, r - 1)],
  17708. u = l[1];
  17709. "year" === l[0] && (u *= Yo(o / u / t, !0));
  17710. var h = this.getSetting("useUTC") ? 0 : 60 * new Date(+n[0] || +n[1]).getTimezoneOffset() * 1e3,
  17711. c = [Math.round(gA((n[0] - h) / u) * u + h), Math.round(mA((n[1] - h) / u) * u + h)];
  17712. bl(c, n), this._stepLvl = l, this._interval = u, this._niceExtent = c
  17713. },
  17714. parse: function(t) {
  17715. return +Uo(t)
  17716. }
  17717. });
  17718. d(["contain", "normalize"], function(t) {
  17719. yA.prototype[t] = function(e) {
  17720. return pA[t].call(this, this.parse(e))
  17721. }
  17722. });
  17723. var xA = [
  17724. ["hh:mm:ss", 1e3],
  17725. ["hh:mm:ss", 5e3],
  17726. ["hh:mm:ss", 1e4],
  17727. ["hh:mm:ss", 15e3],
  17728. ["hh:mm:ss", 3e4],
  17729. ["hh:mm\nMM-dd", 6e4],
  17730. ["hh:mm\nMM-dd", 3e5],
  17731. ["hh:mm\nMM-dd", 6e5],
  17732. ["hh:mm\nMM-dd", 9e5],
  17733. ["hh:mm\nMM-dd", 18e5],
  17734. ["hh:mm\nMM-dd", 36e5],
  17735. ["hh:mm\nMM-dd", 72e5],
  17736. ["hh:mm\nMM-dd", 216e5],
  17737. ["hh:mm\nMM-dd", 432e5],
  17738. ["MM-dd\nyyyy", 864e5],
  17739. ["MM-dd\nyyyy", 1728e5],
  17740. ["MM-dd\nyyyy", 2592e5],
  17741. ["MM-dd\nyyyy", 3456e5],
  17742. ["MM-dd\nyyyy", 432e6],
  17743. ["MM-dd\nyyyy", 5184e5],
  17744. ["week", 6048e5],
  17745. ["MM-dd\nyyyy", 864e6],
  17746. ["week", 12096e5],
  17747. ["week", 18144e5],
  17748. ["month", 26784e5],
  17749. ["week", 36288e5],
  17750. ["month", 53568e5],
  17751. ["week", 6048e6],
  17752. ["quarter", 8208e6],
  17753. ["month", 107136e5],
  17754. ["month", 13392e6],
  17755. ["half-year", 16416e6],
  17756. ["month", 214272e5],
  17757. ["month", 26784e6],
  17758. ["year", 32832e6]
  17759. ];
  17760. yA.create = function(t) {
  17761. return new yA({
  17762. useUTC: t.ecModel.get("useUTC")
  17763. })
  17764. };
  17765. var _A = gl.prototype,
  17766. wA = hA.prototype,
  17767. bA = Go,
  17768. SA = zo,
  17769. MA = Math.floor,
  17770. IA = Math.ceil,
  17771. TA = Math.pow,
  17772. AA = Math.log,
  17773. DA = gl.extend({
  17774. type: "log",
  17775. base: 10,
  17776. $constructor: function() {
  17777. gl.apply(this, arguments), this._originalScale = new hA
  17778. },
  17779. getTicks: function() {
  17780. var t = this._originalScale,
  17781. e = this._extent,
  17782. i = t.getExtent();
  17783. return f(wA.getTicks.call(this), function(n) {
  17784. var o = zo(TA(this.base, n));
  17785. return o = n === e[0] && t.__fixMin ? El(o, i[0]) : o, o = n === e[1] && t.__fixMax ? El(o, i[1]) : o
  17786. }, this)
  17787. },
  17788. getLabel: wA.getLabel,
  17789. scale: function(t) {
  17790. return t = _A.scale.call(this, t), TA(this.base, t)
  17791. },
  17792. setExtent: function(t, e) {
  17793. var i = this.base;
  17794. t = AA(t) / AA(i), e = AA(e) / AA(i), wA.setExtent.call(this, t, e)
  17795. },
  17796. getExtent: function() {
  17797. var t = this.base,
  17798. e = _A.getExtent.call(this);
  17799. e[0] = TA(t, e[0]), e[1] = TA(t, e[1]);
  17800. var i = this._originalScale,
  17801. n = i.getExtent();
  17802. return i.__fixMin && (e[0] = El(e[0], n[0])), i.__fixMax && (e[1] = El(e[1], n[1])), e
  17803. },
  17804. unionExtent: function(t) {
  17805. this._originalScale.unionExtent(t);
  17806. var e = this.base;
  17807. t[0] = AA(t[0]) / AA(e), t[1] = AA(t[1]) / AA(e), _A.unionExtent.call(this, t)
  17808. },
  17809. unionExtentFromData: function(t, e) {
  17810. this.unionExtent(t.getApproximateExtent(e))
  17811. },
  17812. niceTicks: function(t) {
  17813. t = t || 10;
  17814. var e = this._extent,
  17815. i = e[1] - e[0];
  17816. if (!(i === 1 / 0 || i <= 0)) {
  17817. var n = Xo(i);
  17818. for (t / i * n <= .5 && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && Math.abs(n) > 0;) n *= 10;
  17819. var o = [zo(IA(e[0] / n) * n), zo(MA(e[1] / n) * n)];
  17820. this._interval = n, this._niceExtent = o
  17821. }
  17822. },
  17823. niceExtent: function(t) {
  17824. wA.niceExtent.call(this, t);
  17825. var e = this._originalScale;
  17826. e.__fixMin = t.fixMin, e.__fixMax = t.fixMax
  17827. }
  17828. });
  17829. d(["contain", "normalize"], function(t) {
  17830. DA.prototype[t] = function(e) {
  17831. return e = AA(e) / AA(this.base), _A[t].call(this, e)
  17832. }
  17833. }), DA.create = function() {
  17834. return new DA
  17835. };
  17836. var CA = {
  17837. getMin: function(t) {
  17838. var e = this.option,
  17839. i = t || null == e.rangeStart ? e.min : e.rangeStart;
  17840. return this.axis && null != i && "dataMin" !== i && "function" != typeof i && !I(i) && (i = this.axis.scale.parse(
  17841. i)), i
  17842. },
  17843. getMax: function(t) {
  17844. var e = this.option,
  17845. i = t || null == e.rangeEnd ? e.max : e.rangeEnd;
  17846. return this.axis && null != i && "dataMax" !== i && "function" != typeof i && !I(i) && (i = this.axis.scale.parse(
  17847. i)), i
  17848. },
  17849. getNeedCrossZero: function() {
  17850. var t = this.option;
  17851. return null == t.rangeStart && null == t.rangeEnd && !t.scale
  17852. },
  17853. getCoordSysModel: B,
  17854. setRange: function(t, e) {
  17855. this.option.rangeStart = t, this.option.rangeEnd = e
  17856. },
  17857. resetRange: function() {
  17858. this.option.rangeStart = this.option.rangeEnd = null
  17859. }
  17860. },
  17861. LA = Fn({
  17862. type: "triangle",
  17863. shape: {
  17864. cx: 0,
  17865. cy: 0,
  17866. width: 0,
  17867. height: 0
  17868. },
  17869. buildPath: function(t, e) {
  17870. var i = e.cx,
  17871. n = e.cy,
  17872. o = e.width / 2,
  17873. a = e.height / 2;
  17874. t.moveTo(i, n - a), t.lineTo(i + o, n + a), t.lineTo(i - o, n + a), t.closePath()
  17875. }
  17876. }),
  17877. kA = Fn({
  17878. type: "diamond",
  17879. shape: {
  17880. cx: 0,
  17881. cy: 0,
  17882. width: 0,
  17883. height: 0
  17884. },
  17885. buildPath: function(t, e) {
  17886. var i = e.cx,
  17887. n = e.cy,
  17888. o = e.width / 2,
  17889. a = e.height / 2;
  17890. t.moveTo(i, n - a), t.lineTo(i + o, n), t.lineTo(i, n + a), t.lineTo(i - o, n), t.closePath()
  17891. }
  17892. }),
  17893. PA = Fn({
  17894. type: "pin",
  17895. shape: {
  17896. x: 0,
  17897. y: 0,
  17898. width: 0,
  17899. height: 0
  17900. },
  17901. buildPath: function(t, e) {
  17902. var i = e.x,
  17903. n = e.y,
  17904. o = e.width / 5 * 3,
  17905. a = Math.max(o, e.height),
  17906. r = o / 2,
  17907. s = r * r / (a - r),
  17908. l = n - a + r + s,
  17909. u = Math.asin(s / r),
  17910. h = Math.cos(u) * r,
  17911. c = Math.sin(u),
  17912. d = Math.cos(u),
  17913. f = .6 * r,
  17914. p = .7 * r;
  17915. t.moveTo(i - h, l + s), t.arc(i, l, r, Math.PI - u, 2 * Math.PI + u), t.bezierCurveTo(i + h - c * f, l + s + d *
  17916. f, i, n - p, i, n), t.bezierCurveTo(i, n - p, i - h + c * f, l + s + d * f, i - h, l + s), t.closePath()
  17917. }
  17918. }),
  17919. NA = Fn({
  17920. type: "arrow",
  17921. shape: {
  17922. x: 0,
  17923. y: 0,
  17924. width: 0,
  17925. height: 0
  17926. },
  17927. buildPath: function(t, e) {
  17928. var i = e.height,
  17929. n = e.width,
  17930. o = e.x,
  17931. a = e.y,
  17932. r = n / 3 * 2;
  17933. t.moveTo(o, a), t.lineTo(o + r, a + i), t.lineTo(o, a + i / 4 * 3), t.lineTo(o - r, a + i), t.lineTo(o, a), t.closePath()
  17934. }
  17935. }),
  17936. OA = {
  17937. line: function(t, e, i, n, o) {
  17938. o.x1 = t, o.y1 = e + n / 2, o.x2 = t + i, o.y2 = e + n / 2
  17939. },
  17940. rect: function(t, e, i, n, o) {
  17941. o.x = t, o.y = e, o.width = i, o.height = n
  17942. },
  17943. roundRect: function(t, e, i, n, o) {
  17944. o.x = t, o.y = e, o.width = i, o.height = n, o.r = Math.min(i, n) / 4
  17945. },
  17946. square: function(t, e, i, n, o) {
  17947. var a = Math.min(i, n);
  17948. o.x = t, o.y = e, o.width = a, o.height = a
  17949. },
  17950. circle: function(t, e, i, n, o) {
  17951. o.cx = t + i / 2, o.cy = e + n / 2, o.r = Math.min(i, n) / 2
  17952. },
  17953. diamond: function(t, e, i, n, o) {
  17954. o.cx = t + i / 2, o.cy = e + n / 2, o.width = i, o.height = n
  17955. },
  17956. pin: function(t, e, i, n, o) {
  17957. o.x = t + i / 2, o.y = e + n / 2, o.width = i, o.height = n
  17958. },
  17959. arrow: function(t, e, i, n, o) {
  17960. o.x = t + i / 2, o.y = e + n / 2, o.width = i, o.height = n
  17961. },
  17962. triangle: function(t, e, i, n, o) {
  17963. o.cx = t + i / 2, o.cy = e + n / 2, o.width = i, o.height = n
  17964. }
  17965. },
  17966. EA = {};
  17967. d({
  17968. line: rM,
  17969. rect: aM,
  17970. roundRect: aM,
  17971. square: aM,
  17972. circle: KS,
  17973. diamond: kA,
  17974. pin: PA,
  17975. arrow: NA,
  17976. triangle: LA
  17977. }, function(t, e) {
  17978. EA[e] = new t
  17979. });
  17980. var RA = Fn({
  17981. type: "symbol",
  17982. shape: {
  17983. symbolType: "",
  17984. x: 0,
  17985. y: 0,
  17986. width: 0,
  17987. height: 0
  17988. },
  17989. beforeBrush: function() {
  17990. var t = this.style;
  17991. "pin" === this.shape.symbolType && "inside" === t.textPosition && (t.textPosition = ["50%", "40%"], t.textAlign =
  17992. "center", t.textVerticalAlign = "middle")
  17993. },
  17994. buildPath: function(t, e, i) {
  17995. var n = e.symbolType,
  17996. o = EA[n];
  17997. "none" !== e.symbolType && (o || (o = EA[n = "rect"]), OA[n](e.x, e.y, e.width, e.height, o.shape), o.buildPath(
  17998. t, o.shape, i))
  17999. }
  18000. }),
  18001. zA = {
  18002. isDimensionStacked: hl,
  18003. enableDataStack: ul,
  18004. getStackedDimension: cl
  18005. },
  18006. BA = (Object.freeze || Object)({
  18007. createList: function(t) {
  18008. return dl(t.getSource(), t)
  18009. },
  18010. getLayoutRect: la,
  18011. dataStack: zA,
  18012. createScale: function(t, e) {
  18013. var i = e;
  18014. Lo.isInstance(e) || h(i = new Lo(e), CA);
  18015. var n = Vl(i);
  18016. return n.setExtent(t[0], t[1]), Bl(n, i), n
  18017. },
  18018. mixinAxisModelCommonMethods: function(t) {
  18019. h(t, CA)
  18020. },
  18021. completeDimensions: rl,
  18022. createDimensions: oA,
  18023. createSymbol: Xl
  18024. }),
  18025. VA = 1e-8;
  18026. ql.prototype = {
  18027. constructor: ql,
  18028. properties: null,
  18029. getBoundingRect: function() {
  18030. var t = this._rect;
  18031. if (t) return t;
  18032. for (var e = Number.MAX_VALUE, i = [e, e], n = [-e, -e], o = [], a = [], r = this.geometries, s = 0; s < r.length; s++)
  18033. "polygon" === r[s].type && (dn(r[s].exterior, o, a), tt(i, i, o), et(n, n, a));
  18034. return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0), this._rect = new ue(i[0], i[1], n[0] - i[0], n[1] - i[1])
  18035. },
  18036. contain: function(t) {
  18037. var e = this.getBoundingRect(),
  18038. i = this.geometries;
  18039. if (!e.contain(t[0], t[1])) return !1;
  18040. t: for (var n = 0, o = i.length; n < o; n++)
  18041. if ("polygon" === i[n].type) {
  18042. var a = i[n].exterior,
  18043. r = i[n].interiors;
  18044. if (Yl(a, t[0], t[1])) {
  18045. for (var s = 0; s < (r ? r.length : 0); s++)
  18046. if (Yl(r[s])) continue t;
  18047. return !0
  18048. }
  18049. }
  18050. return !1
  18051. },
  18052. transformTo: function(t, e, i, n) {
  18053. var o = this.getBoundingRect(),
  18054. a = o.width / o.height;
  18055. i ? n || (n = i / a) : i = a * n;
  18056. for (var r = new ue(t, e, i, n), s = o.calculateTransform(r), l = this.geometries, u = 0; u < l.length; u++)
  18057. if ("polygon" === l[u].type) {
  18058. for (var h = l[u].exterior, c = l[u].interiors, d = 0; d < h.length; d++) Q(h[d], h[d], s);
  18059. for (var f = 0; f < (c ? c.length : 0); f++)
  18060. for (d = 0; d < c[f].length; d++) Q(c[f][d], c[f][d], s)
  18061. }(o = this._rect). copy(r), this.center = [o.x + o.width / 2, o.y + o.height / 2]
  18062. },
  18063. cloneShallow: function(t) {
  18064. null == t && (t = this.name);
  18065. var e = new ql(t, this.geometries, this.center);
  18066. return e._rect = this._rect, e.transformTo = null, e
  18067. }
  18068. };
  18069. var GA = function(t) {
  18070. return Kl(t), f(g(t.features, function(t) {
  18071. return t.geometry && t.properties && t.geometry.coordinates.length > 0
  18072. }), function(t) {
  18073. var e = t.properties,
  18074. i = t.geometry,
  18075. n = i.coordinates,
  18076. o = [];
  18077. "Polygon" === i.type && o.push({
  18078. type: "polygon",
  18079. exterior: n[0],
  18080. interiors: n.slice(1)
  18081. }), "MultiPolygon" === i.type && d(n, function(t) {
  18082. t[0] && o.push({
  18083. type: "polygon",
  18084. exterior: t[0],
  18085. interiors: t.slice(1)
  18086. })
  18087. });
  18088. var a = new ql(e.name, o, e.cp);
  18089. return a.properties = e, a
  18090. })
  18091. },
  18092. FA = Bi(),
  18093. WA = [0, 1],
  18094. HA = function(t, e, i) {
  18095. this.dim = t, this.scale = e, this._extent = i || [0, 0], this.inverse = !1, this.onBand = !1
  18096. };
  18097. HA.prototype = {
  18098. constructor: HA,
  18099. contain: function(t) {
  18100. var e = this._extent,
  18101. i = Math.min(e[0], e[1]),
  18102. n = Math.max(e[0], e[1]);
  18103. return t >= i && t <= n
  18104. },
  18105. containData: function(t) {
  18106. return this.contain(this.dataToCoord(t))
  18107. },
  18108. getExtent: function() {
  18109. return this._extent.slice()
  18110. },
  18111. getPixelPrecision: function(t) {
  18112. return Fo(t || this.scale.getExtent(), this._extent)
  18113. },
  18114. setExtent: function(t, e) {
  18115. var i = this._extent;
  18116. i[0] = t, i[1] = e
  18117. },
  18118. dataToCoord: function(t, e) {
  18119. var i = this._extent,
  18120. n = this.scale;
  18121. return t = n.normalize(t), this.onBand && "ordinal" === n.type && fu(i = i.slice(), n.count()), Eo(t, WA, i, e)
  18122. },
  18123. coordToData: function(t, e) {
  18124. var i = this._extent,
  18125. n = this.scale;
  18126. this.onBand && "ordinal" === n.type && fu(i = i.slice(), n.count());
  18127. var o = Eo(t, i, WA, e);
  18128. return this.scale.scale(o)
  18129. },
  18130. pointToData: function(t, e) {},
  18131. getTicksCoords: function(t) {
  18132. var e = (t = t || {}).tickModel || this.getTickModel(),
  18133. i = Ql(this, e),
  18134. n = f(i.ticks, function(t) {
  18135. return {
  18136. coord: this.dataToCoord(t),
  18137. tickValue: t
  18138. }
  18139. }, this),
  18140. o = e.get("alignWithLabel");
  18141. return pu(this, n, i.tickCategoryInterval, o, t.clamp), n
  18142. },
  18143. getViewLabels: function() {
  18144. return Jl(this).labels
  18145. },
  18146. getLabelModel: function() {
  18147. return this.model.getModel("axisLabel")
  18148. },
  18149. getTickModel: function() {
  18150. return this.model.getModel("axisTick")
  18151. },
  18152. getBandWidth: function() {
  18153. var t = this._extent,
  18154. e = this.scale.getExtent(),
  18155. i = e[1] - e[0] + (this.onBand ? 1 : 0);
  18156. 0 === i && (i = 1);
  18157. var n = Math.abs(t[1] - t[0]);
  18158. return Math.abs(n) / i
  18159. },
  18160. isHorizontal: null,
  18161. getRotate: null,
  18162. calculateCategoryInterval: function() {
  18163. return lu(this)
  18164. }
  18165. };
  18166. var ZA = GA,
  18167. UA = {};
  18168. d(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString",
  18169. "isObject", "isFunction", "extend", "defaults", "clone", "merge"
  18170. ], function(t) {
  18171. UA[t] = $_[t]
  18172. });
  18173. var XA = {};
  18174. d(["extendShape", "extendPath", "makePath", "makeImage", "mergePath", "resizePath", "createIcon", "setHoverStyle",
  18175. "setLabelStyle", "setTextStyle", "setText", "getFont", "updateProps", "initProps", "getTransform",
  18176. "clipPointsByRect", "clipRectByRect", "Group", "Image", "Text", "Circle", "Sector", "Ring", "Polygon", "Polyline",
  18177. "Rect", "Line", "BezierCurve", "Arc", "IncrementalDisplayable", "CompoundPath", "LinearGradient", "RadialGradient",
  18178. "BoundingRect"
  18179. ], function(t) {
  18180. XA[t] = bM[t]
  18181. }), OI.extend({
  18182. type: "series.line",
  18183. dependencies: ["grid", "polar"],
  18184. getInitialData: function(t, e) {
  18185. return dl(this.getSource(), this)
  18186. },
  18187. defaultOption: {
  18188. zlevel: 0,
  18189. z: 2,
  18190. coordinateSystem: "cartesian2d",
  18191. legendHoverLink: !0,
  18192. hoverAnimation: !0,
  18193. clipOverflow: !0,
  18194. label: {
  18195. position: "top"
  18196. },
  18197. lineStyle: {
  18198. width: 2,
  18199. type: "solid"
  18200. },
  18201. step: !1,
  18202. smooth: !1,
  18203. smoothMonotone: null,
  18204. symbol: "emptyCircle",
  18205. symbolSize: 4,
  18206. symbolRotate: null,
  18207. showSymbol: !0,
  18208. showAllSymbol: "auto",
  18209. connectNulls: !1,
  18210. sampling: "none",
  18211. animationEasing: "linear",
  18212. progressive: 0,
  18213. hoverLayerThreshold: 1 / 0
  18214. }
  18215. });
  18216. var jA = mu.prototype,
  18217. YA = mu.getSymbolSize = function(t, e) {
  18218. var i = t.getItemVisual(e, "symbolSize");
  18219. return i instanceof Array ? i.slice() : [+i, +i]
  18220. };
  18221. jA._createSymbol = function(t, e, i, n, o) {
  18222. this.removeAll();
  18223. var a = Xl(t, -1, -1, 2, 2, e.getItemVisual(i, "color"), o);
  18224. a.attr({
  18225. z2: 100,
  18226. culling: !0,
  18227. scale: vu(n)
  18228. }), a.drift = yu, this._symbolType = t, this.add(a)
  18229. }, jA.stopSymbolAnimation = function(t) {
  18230. this.childAt(0).stopAnimation(t)
  18231. }, jA.getSymbolPath = function() {
  18232. return this.childAt(0)
  18233. }, jA.getScale = function() {
  18234. return this.childAt(0).scale
  18235. }, jA.highlight = function() {
  18236. this.childAt(0).trigger("emphasis")
  18237. }, jA.downplay = function() {
  18238. this.childAt(0).trigger("normal")
  18239. }, jA.setZ = function(t, e) {
  18240. var i = this.childAt(0);
  18241. i.zlevel = t, i.z = e
  18242. }, jA.setDraggable = function(t) {
  18243. var e = this.childAt(0);
  18244. e.draggable = t, e.cursor = t ? "move" : "pointer"
  18245. }, jA.updateData = function(t, e, i) {
  18246. this.silent = !1;
  18247. var n = t.getItemVisual(e, "symbol") || "circle",
  18248. o = t.hostModel,
  18249. a = YA(t, e),
  18250. r = n !== this._symbolType;
  18251. if (r) {
  18252. var s = t.getItemVisual(e, "symbolKeepAspect");
  18253. this._createSymbol(n, t, e, a, s)
  18254. } else(l = this.childAt(0)).silent = !1, bo(l, {
  18255. scale: vu(a)
  18256. }, o, e);
  18257. if (this._updateCommon(t, e, a, i), r) {
  18258. var l = this.childAt(0),
  18259. u = i && i.fadeIn,
  18260. h = {
  18261. scale: l.scale.slice()
  18262. };
  18263. u && (h.style = {
  18264. opacity: l.style.opacity
  18265. }), l.scale = [0, 0], u && (l.style.opacity = 0), So(l, h, o, e)
  18266. }
  18267. this._seriesModel = o
  18268. };
  18269. var qA = ["itemStyle"],
  18270. KA = ["emphasis", "itemStyle"],
  18271. $A = ["label"],
  18272. JA = ["emphasis", "label"];
  18273. jA._updateCommon = function(t, e, i, n) {
  18274. var o = this.childAt(0),
  18275. r = t.hostModel,
  18276. s = t.getItemVisual(e, "color");
  18277. "image" !== o.type && o.useStyle({
  18278. strokeNoScale: !0
  18279. });
  18280. var l = n && n.itemStyle,
  18281. u = n && n.hoverItemStyle,
  18282. h = n && n.symbolRotate,
  18283. c = n && n.symbolOffset,
  18284. d = n && n.labelModel,
  18285. f = n && n.hoverLabelModel,
  18286. p = n && n.hoverAnimation,
  18287. g = n && n.cursorStyle;
  18288. if (!n || t.hasItemOption) {
  18289. var m = n && n.itemModel ? n.itemModel : t.getItemModel(e);
  18290. l = m.getModel(qA).getItemStyle(["color"]), u = m.getModel(KA).getItemStyle(), h = m.getShallow("symbolRotate"), c =
  18291. m.getShallow("symbolOffset"), d = m.getModel($A), f = m.getModel(JA), p = m.getShallow("hoverAnimation"), g = m.getShallow(
  18292. "cursor")
  18293. } else u = a({}, u);
  18294. var v = o.style;
  18295. o.attr("rotation", (h || 0) * Math.PI / 180 || 0), c && o.attr("position", [Ro(c[0], i[0]), Ro(c[1], i[1])]), g &&
  18296. o.attr("cursor", g), o.setColor(s, n && n.symbolInnerColor), o.setStyle(l);
  18297. var y = t.getItemVisual(e, "opacity");
  18298. null != y && (v.opacity = y);
  18299. var x = t.getItemVisual(e, "liftZ"),
  18300. _ = o.__z2Origin;
  18301. null != x ? null == _ && (o.__z2Origin = o.z2, o.z2 += x) : null != _ && (o.z2 = _, o.__z2Origin = null);
  18302. var w = n && n.useNameLabel;
  18303. co(v, u, d, f, {
  18304. labelFetcher: r,
  18305. labelDataIndex: e,
  18306. defaultText: function(e, i) {
  18307. return w ? t.getName(e) : gu(t, e)
  18308. },
  18309. isRectText: !0,
  18310. autoColor: s
  18311. }), o.off("mouseover").off("mouseout").off("emphasis").off("normal"), o.hoverStyle = u, uo(o), o.__symbolOriginalScale =
  18312. vu(i), p && r.isAnimationEnabled() && o.on("mouseover", xu).on("mouseout", _u).on("emphasis", wu).on("normal", bu)
  18313. }, jA.fadeOut = function(t, e) {
  18314. var i = this.childAt(0);
  18315. this.silent = i.silent = !0, !(e && e.keepLabel) && (i.style.text = null), bo(i, {
  18316. style: {
  18317. opacity: 0
  18318. },
  18319. scale: [0, 0]
  18320. }, this._seriesModel, this.dataIndex, t)
  18321. }, u(mu, Zw);
  18322. var QA = Su.prototype;
  18323. QA.updateData = function(t, e) {
  18324. e = Iu(e);
  18325. var i = this.group,
  18326. n = t.hostModel,
  18327. o = this._data,
  18328. a = this._symbolCtor,
  18329. r = Tu(t);
  18330. o || i.removeAll(), t.diff(o).add(function(n) {
  18331. var o = t.getItemLayout(n);
  18332. if (Mu(t, o, n, e)) {
  18333. var s = new a(t, n, r);
  18334. s.attr("position", o), t.setItemGraphicEl(n, s), i.add(s)
  18335. }
  18336. }).update(function(s, l) {
  18337. var u = o.getItemGraphicEl(l),
  18338. h = t.getItemLayout(s);
  18339. Mu(t, h, s, e) ? (u ? (u.updateData(t, s, r), bo(u, {
  18340. position: h
  18341. }, n)) : (u = new a(t, s)).attr("position", h), i.add(u), t.setItemGraphicEl(s, u)) : i.remove(u)
  18342. }).remove(function(t) {
  18343. var e = o.getItemGraphicEl(t);
  18344. e && e.fadeOut(function() {
  18345. i.remove(e)
  18346. })
  18347. }).execute(), this._data = t
  18348. }, QA.isPersistent = function() {
  18349. return !0
  18350. }, QA.updateLayout = function() {
  18351. var t = this._data;
  18352. t && t.eachItemGraphicEl(function(e, i) {
  18353. var n = t.getItemLayout(i);
  18354. e.attr("position", n)
  18355. })
  18356. }, QA.incrementalPrepareUpdate = function(t) {
  18357. this._seriesScope = Tu(t), this._data = null, this.group.removeAll()
  18358. }, QA.incrementalUpdate = function(t, e, i) {
  18359. i = Iu(i);
  18360. for (var n = t.start; n < t.end; n++) {
  18361. var o = e.getItemLayout(n);
  18362. if (Mu(e, o, n, i)) {
  18363. var a = new this._symbolCtor(e, n, this._seriesScope);
  18364. a.traverse(function(t) {
  18365. t.isGroup || (t.incremental = t.useHoverLayer = !0)
  18366. }), a.attr("position", o), this.group.add(a), e.setItemGraphicEl(n, a)
  18367. }
  18368. }
  18369. }, QA.remove = function(t) {
  18370. var e = this.group,
  18371. i = this._data;
  18372. i && t ? i.eachItemGraphicEl(function(t) {
  18373. t.fadeOut(function() {
  18374. e.remove(t)
  18375. })
  18376. }) : e.removeAll()
  18377. };
  18378. var tD = function(t, e, i, n, o, a, r, s) {
  18379. for (var l = Lu(t, e), u = [], h = [], c = [], d = [], f = [], p = [], g = [], m = Au(o, e, r), v = Au(a, t, s), y =
  18380. 0; y < l.length; y++) {
  18381. var x = l[y],
  18382. _ = !0;
  18383. switch (x.cmd) {
  18384. case "=":
  18385. var w = t.getItemLayout(x.idx),
  18386. b = e.getItemLayout(x.idx1);
  18387. (isNaN(w[0]) || isNaN(w[1])) && (w = b.slice()), u.push(w), h.push(b), c.push(i[x.idx]), d.push(n[x.idx1]), g.push(
  18388. e.getRawIndex(x.idx1));
  18389. break;
  18390. case "+":
  18391. S = x.idx;
  18392. u.push(o.dataToPoint([e.get(m.dataDimsForPoint[0], S), e.get(m.dataDimsForPoint[1], S)])), h.push(e.getItemLayout(
  18393. S).slice()), c.push(Cu(m, o, e, S)), d.push(n[S]), g.push(e.getRawIndex(S));
  18394. break;
  18395. case "-":
  18396. var S = x.idx,
  18397. M = t.getRawIndex(S);
  18398. M !== S ? (u.push(t.getItemLayout(S)), h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0], S), t.get(v.dataDimsForPoint[
  18399. 1], S)])), c.push(i[S]), d.push(Cu(v, a, t, S)), g.push(M)) : _ = !1
  18400. }
  18401. _ && (f.push(x), p.push(p.length))
  18402. }
  18403. p.sort(function(t, e) {
  18404. return g[t] - g[e]
  18405. });
  18406. for (var I = [], T = [], A = [], D = [], C = [], y = 0; y < p.length; y++) {
  18407. S = p[y];
  18408. I[y] = u[S], T[y] = h[S], A[y] = c[S], D[y] = d[S], C[y] = f[S]
  18409. }
  18410. return {
  18411. current: I,
  18412. next: T,
  18413. stackedOnCurrent: A,
  18414. stackedOnNext: D,
  18415. status: C
  18416. }
  18417. },
  18418. eD = tt,
  18419. iD = et,
  18420. nD = Z,
  18421. oD = G,
  18422. aD = [],
  18423. rD = [],
  18424. sD = [],
  18425. lD = kn.extend({
  18426. type: "ec-polyline",
  18427. shape: {
  18428. points: [],
  18429. smooth: 0,
  18430. smoothConstraint: !0,
  18431. smoothMonotone: null,
  18432. connectNulls: !1
  18433. },
  18434. style: {
  18435. fill: null,
  18436. stroke: "#000"
  18437. },
  18438. brush: JS(kn.prototype.brush),
  18439. buildPath: function(t, e) {
  18440. var i = e.points,
  18441. n = 0,
  18442. o = i.length,
  18443. a = Eu(i, e.smoothConstraint);
  18444. if (e.connectNulls) {
  18445. for (; o > 0 && ku(i[o - 1]); o--);
  18446. for (; n < o && ku(i[n]); n++);
  18447. }
  18448. for (; n < o;) n += Pu(t, i, n, o, o, 1, a.min, a.max, e.smooth, e.smoothMonotone, e.connectNulls) + 1
  18449. }
  18450. }),
  18451. uD = kn.extend({
  18452. type: "ec-polygon",
  18453. shape: {
  18454. points: [],
  18455. stackedOnPoints: [],
  18456. smooth: 0,
  18457. stackedOnSmooth: 0,
  18458. smoothConstraint: !0,
  18459. smoothMonotone: null,
  18460. connectNulls: !1
  18461. },
  18462. brush: JS(kn.prototype.brush),
  18463. buildPath: function(t, e) {
  18464. var i = e.points,
  18465. n = e.stackedOnPoints,
  18466. o = 0,
  18467. a = i.length,
  18468. r = e.smoothMonotone,
  18469. s = Eu(i, e.smoothConstraint),
  18470. l = Eu(n, e.smoothConstraint);
  18471. if (e.connectNulls) {
  18472. for (; a > 0 && ku(i[a - 1]); a--);
  18473. for (; o < a && ku(i[o]); o++);
  18474. }
  18475. for (; o < a;) {
  18476. var u = Pu(t, i, o, a, a, 1, s.min, s.max, e.smooth, r, e.connectNulls);
  18477. Pu(t, n, o + u - 1, u, a, -1, l.min, l.max, e.stackedOnSmooth, r, e.connectNulls), o += u + 1, t.closePath()
  18478. }
  18479. }
  18480. });
  18481. Mr.extend({
  18482. type: "line",
  18483. init: function() {
  18484. var t = new Zw,
  18485. e = new Su;
  18486. this.group.add(e.group), this._symbolDraw = e, this._lineGroup = t
  18487. },
  18488. render: function(t, e, i) {
  18489. var n = t.coordinateSystem,
  18490. o = this.group,
  18491. a = t.getData(),
  18492. s = t.getModel("lineStyle"),
  18493. l = t.getModel("areaStyle"),
  18494. u = a.mapArray(a.getItemLayout),
  18495. h = "polar" === n.type,
  18496. c = this._coordSys,
  18497. d = this._symbolDraw,
  18498. f = this._polyline,
  18499. p = this._polygon,
  18500. g = this._lineGroup,
  18501. m = t.get("animation"),
  18502. v = !l.isEmpty(),
  18503. y = l.get("origin"),
  18504. x = Vu(n, a, Au(n, a, y)),
  18505. _ = t.get("showSymbol"),
  18506. w = _ && !h && Uu(t, a, n),
  18507. b = this._data;
  18508. b && b.eachItemGraphicEl(function(t, e) {
  18509. t.__temp && (o.remove(t), b.setItemGraphicEl(e, null))
  18510. }), _ || d.remove(), o.add(g);
  18511. var S = !h && t.get("step");
  18512. f && c.type === n.type && S === this._step ? (v && !p ? p = this._newPolygon(u, x, n, m) : p && !v && (g.remove(
  18513. p), p = this._polygon = null), g.setClipPath(Wu(n, !1, !1, t)), _ && d.updateData(a, {
  18514. isIgnore: w,
  18515. clipShape: Wu(n, !1, !0, t)
  18516. }), a.eachItemGraphicEl(function(t) {
  18517. t.stopAnimation(!0)
  18518. }), Ru(this._stackedOnPoints, x) && Ru(this._points, u) || (m ? this._updateAnimation(a, x, n, i, S, y) : (S &&
  18519. (u = Hu(u, n, S), x = Hu(x, n, S)), f.setShape({
  18520. points: u
  18521. }), p && p.setShape({
  18522. points: u,
  18523. stackedOnPoints: x
  18524. })))) : (_ && d.updateData(a, {
  18525. isIgnore: w,
  18526. clipShape: Wu(n, !1, !0, t)
  18527. }), S && (u = Hu(u, n, S), x = Hu(x, n, S)), f = this._newPolyline(u, n, m), v && (p = this._newPolygon(u, x,
  18528. n, m)), g.setClipPath(Wu(n, !0, !1, t)));
  18529. var M = Zu(a, n) || a.getVisual("color");
  18530. f.useStyle(r(s.getLineStyle(), {
  18531. fill: "none",
  18532. stroke: M,
  18533. lineJoin: "bevel"
  18534. }));
  18535. var I = t.get("smooth");
  18536. if (I = zu(t.get("smooth")), f.setShape({
  18537. smooth: I,
  18538. smoothMonotone: t.get("smoothMonotone"),
  18539. connectNulls: t.get("connectNulls")
  18540. }), p) {
  18541. var T = a.getCalculationInfo("stackedOnSeries"),
  18542. A = 0;
  18543. p.useStyle(r(l.getAreaStyle(), {
  18544. fill: M,
  18545. opacity: .7,
  18546. lineJoin: "bevel"
  18547. })), T && (A = zu(T.get("smooth"))), p.setShape({
  18548. smooth: I,
  18549. stackedOnSmooth: A,
  18550. smoothMonotone: t.get("smoothMonotone"),
  18551. connectNulls: t.get("connectNulls")
  18552. })
  18553. }
  18554. this._data = a, this._coordSys = n, this._stackedOnPoints = x, this._points = u, this._step = S, this._valueOrigin =
  18555. y
  18556. },
  18557. dispose: function() {},
  18558. highlight: function(t, e, i, n) {
  18559. var o = t.getData(),
  18560. a = zi(o, n);
  18561. if (!(a instanceof Array) && null != a && a >= 0) {
  18562. var r = o.getItemGraphicEl(a);
  18563. if (!r) {
  18564. var s = o.getItemLayout(a);
  18565. if (!s) return;
  18566. (r = new mu(o, a)).position = s, r.setZ(t.get("zlevel"), t.get("z")), r.ignore = isNaN(s[0]) || isNaN(s[1]), r
  18567. .__temp = !0, o.setItemGraphicEl(a, r), r.stopSymbolAnimation(!0), this.group.add(r)
  18568. }
  18569. r.highlight()
  18570. } else Mr.prototype.highlight.call(this, t, e, i, n)
  18571. },
  18572. downplay: function(t, e, i, n) {
  18573. var o = t.getData(),
  18574. a = zi(o, n);
  18575. if (null != a && a >= 0) {
  18576. var r = o.getItemGraphicEl(a);
  18577. r && (r.__temp ? (o.setItemGraphicEl(a, null), this.group.remove(r)) : r.downplay())
  18578. } else Mr.prototype.downplay.call(this, t, e, i, n)
  18579. },
  18580. _newPolyline: function(t) {
  18581. var e = this._polyline;
  18582. return e && this._lineGroup.remove(e), e = new lD({
  18583. shape: {
  18584. points: t
  18585. },
  18586. silent: !0,
  18587. z2: 10
  18588. }), this._lineGroup.add(e), this._polyline = e, e
  18589. },
  18590. _newPolygon: function(t, e) {
  18591. var i = this._polygon;
  18592. return i && this._lineGroup.remove(i), i = new uD({
  18593. shape: {
  18594. points: t,
  18595. stackedOnPoints: e
  18596. },
  18597. silent: !0
  18598. }), this._lineGroup.add(i), this._polygon = i, i
  18599. },
  18600. _updateAnimation: function(t, e, i, n, o, a) {
  18601. var r = this._polyline,
  18602. s = this._polygon,
  18603. l = t.hostModel,
  18604. u = tD(this._data, t, this._stackedOnPoints, e, this._coordSys, i, this._valueOrigin, a),
  18605. h = u.current,
  18606. c = u.stackedOnCurrent,
  18607. d = u.next,
  18608. f = u.stackedOnNext;
  18609. o && (h = Hu(u.current, i, o), c = Hu(u.stackedOnCurrent, i, o), d = Hu(u.next, i, o), f = Hu(u.stackedOnNext, i,
  18610. o)), r.shape.__points = u.current, r.shape.points = h, bo(r, {
  18611. shape: {
  18612. points: d
  18613. }
  18614. }, l), s && (s.setShape({
  18615. points: h,
  18616. stackedOnPoints: c
  18617. }), bo(s, {
  18618. shape: {
  18619. points: d,
  18620. stackedOnPoints: f
  18621. }
  18622. }, l));
  18623. for (var p = [], g = u.status, m = 0; m < g.length; m++)
  18624. if ("=" === g[m].cmd) {
  18625. var v = t.getItemGraphicEl(g[m].idx1);
  18626. v && p.push({
  18627. el: v,
  18628. ptIdx: m
  18629. })
  18630. } r.animators && r.animators.length && r.animators[0].during(function() {
  18631. for (var t = 0; t < p.length; t++) p[t].el.attr("position", r.shape.__points[p[t].ptIdx])
  18632. })
  18633. },
  18634. remove: function(t) {
  18635. var e = this.group,
  18636. i = this._data;
  18637. this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function(t, n) {
  18638. t.__temp && (e.remove(t), i.setItemGraphicEl(n, null))
  18639. }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._data = null
  18640. }
  18641. });
  18642. var hD = function(t, e, i) {
  18643. return {
  18644. seriesType: t,
  18645. performRawSeries: !0,
  18646. reset: function(t, n, o) {
  18647. var a = t.getData(),
  18648. r = t.get("symbol") || e,
  18649. s = t.get("symbolSize"),
  18650. l = t.get("symbolKeepAspect");
  18651. if (a.setVisual({
  18652. legendSymbol: i || r,
  18653. symbol: r,
  18654. symbolSize: s,
  18655. symbolKeepAspect: l
  18656. }), !n.isSeriesFiltered(t)) {
  18657. var u = "function" == typeof s;
  18658. return {
  18659. dataEach: a.hasItemOption || u ? function(e, i) {
  18660. if ("function" == typeof s) {
  18661. var n = t.getRawValue(i),
  18662. o = t.getDataParams(i);
  18663. e.setItemVisual(i, "symbolSize", s(n, o))
  18664. }
  18665. if (e.hasItemOption) {
  18666. var a = e.getItemModel(i),
  18667. r = a.getShallow("symbol", !0),
  18668. l = a.getShallow("symbolSize", !0),
  18669. u = a.getShallow("symbolKeepAspect", !0);
  18670. null != r && e.setItemVisual(i, "symbol", r), null != l && e.setItemVisual(i, "symbolSize", l), null != u &&
  18671. e.setItemVisual(i, "symbolKeepAspect", u)
  18672. }
  18673. } : null
  18674. }
  18675. }
  18676. }
  18677. }
  18678. },
  18679. cD = function(t) {
  18680. return {
  18681. seriesType: t,
  18682. plan: zI(),
  18683. reset: function(t) {
  18684. var e = t.getData(),
  18685. i = t.coordinateSystem,
  18686. n = t.pipelineContext.large;
  18687. if (i) {
  18688. var o = f(i.dimensions, function(t) {
  18689. return e.mapDimension(t)
  18690. }).slice(0, 2),
  18691. a = o.length,
  18692. r = e.getCalculationInfo("stackResultDimension");
  18693. return hl(e, o[0]) && (o[0] = r), hl(e, o[1]) && (o[1] = r), a && {
  18694. progress: function(t, e) {
  18695. for (var r = t.end - t.start, s = n && new Float32Array(r * a), l = t.start, u = 0, h = [], c = []; l < t.end; l++) {
  18696. var d;
  18697. if (1 === a) f = e.get(o[0], l), d = !isNaN(f) && i.dataToPoint(f, null, c);
  18698. else {
  18699. var f = h[0] = e.get(o[0], l),
  18700. p = h[1] = e.get(o[1], l);
  18701. d = !isNaN(f) && !isNaN(p) && i.dataToPoint(h, null, c)
  18702. }
  18703. n ? (s[u++] = d ? d[0] : NaN, s[u++] = d ? d[1] : NaN) : e.setItemLayout(l, d && d.slice() || [NaN, NaN])
  18704. }
  18705. n && e.setLayout("symbolPoints", s)
  18706. }
  18707. }
  18708. }
  18709. }
  18710. }
  18711. },
  18712. dD = {
  18713. average: function(t) {
  18714. for (var e = 0, i = 0, n = 0; n < t.length; n++) isNaN(t[n]) || (e += t[n], i++);
  18715. return 0 === i ? NaN : e / i
  18716. },
  18717. sum: function(t) {
  18718. for (var e = 0, i = 0; i < t.length; i++) e += t[i] || 0;
  18719. return e
  18720. },
  18721. max: function(t) {
  18722. for (var e = -1 / 0, i = 0; i < t.length; i++) t[i] > e && (e = t[i]);
  18723. return isFinite(e) ? e : NaN
  18724. },
  18725. min: function(t) {
  18726. for (var e = 1 / 0, i = 0; i < t.length; i++) t[i] < e && (e = t[i]);
  18727. return isFinite(e) ? e : NaN
  18728. },
  18729. nearest: function(t) {
  18730. return t[0]
  18731. }
  18732. },
  18733. fD = function(t, e) {
  18734. return Math.round(t.length / 2)
  18735. },
  18736. pD = function(t) {
  18737. this._axes = {}, this._dimList = [], this.name = t || ""
  18738. };
  18739. pD.prototype = {
  18740. constructor: pD,
  18741. type: "cartesian",
  18742. getAxis: function(t) {
  18743. return this._axes[t]
  18744. },
  18745. getAxes: function() {
  18746. return f(this._dimList, ju, this)
  18747. },
  18748. getAxesByScale: function(t) {
  18749. return t = t.toLowerCase(), g(this.getAxes(), function(e) {
  18750. return e.scale.type === t
  18751. })
  18752. },
  18753. addAxis: function(t) {
  18754. var e = t.dim;
  18755. this._axes[e] = t, this._dimList.push(e)
  18756. },
  18757. dataToCoord: function(t) {
  18758. return this._dataCoordConvert(t, "dataToCoord")
  18759. },
  18760. coordToData: function(t) {
  18761. return this._dataCoordConvert(t, "coordToData")
  18762. },
  18763. _dataCoordConvert: function(t, e) {
  18764. for (var i = this._dimList, n = t instanceof Array ? [] : {}, o = 0; o < i.length; o++) {
  18765. var a = i[o],
  18766. r = this._axes[a];
  18767. n[a] = r[e](t[a])
  18768. }
  18769. return n
  18770. }
  18771. }, Yu.prototype = {
  18772. constructor: Yu,
  18773. type: "cartesian2d",
  18774. dimensions: ["x", "y"],
  18775. getBaseAxis: function() {
  18776. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x")
  18777. },
  18778. containPoint: function(t) {
  18779. var e = this.getAxis("x"),
  18780. i = this.getAxis("y");
  18781. return e.contain(e.toLocalCoord(t[0])) && i.contain(i.toLocalCoord(t[1]))
  18782. },
  18783. containData: function(t) {
  18784. return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1])
  18785. },
  18786. dataToPoint: function(t, e, i) {
  18787. var n = this.getAxis("x"),
  18788. o = this.getAxis("y");
  18789. return i = i || [], i[0] = n.toGlobalCoord(n.dataToCoord(t[0])), i[1] = o.toGlobalCoord(o.dataToCoord(t[1])), i
  18790. },
  18791. clampData: function(t, e) {
  18792. var i = this.getAxis("x").scale,
  18793. n = this.getAxis("y").scale,
  18794. o = i.getExtent(),
  18795. a = n.getExtent(),
  18796. r = i.parse(t[0]),
  18797. s = n.parse(t[1]);
  18798. return e = e || [], e[0] = Math.min(Math.max(Math.min(o[0], o[1]), r), Math.max(o[0], o[1])), e[1] = Math.min(
  18799. Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1])), e
  18800. },
  18801. pointToData: function(t, e) {
  18802. var i = this.getAxis("x"),
  18803. n = this.getAxis("y");
  18804. return e = e || [], e[0] = i.coordToData(i.toLocalCoord(t[0])), e[1] = n.coordToData(n.toLocalCoord(t[1])), e
  18805. },
  18806. getOtherAxis: function(t) {
  18807. return this.getAxis("x" === t.dim ? "y" : "x")
  18808. }
  18809. }, u(Yu, pD);
  18810. var gD = function(t, e, i, n, o) {
  18811. HA.call(this, t, e, i), this.type = n || "value", this.position = o || "bottom"
  18812. };
  18813. gD.prototype = {
  18814. constructor: gD,
  18815. index: 0,
  18816. getAxesOnZeroOf: null,
  18817. model: null,
  18818. isHorizontal: function() {
  18819. var t = this.position;
  18820. return "top" === t || "bottom" === t
  18821. },
  18822. getGlobalExtent: function(t) {
  18823. var e = this.getExtent();
  18824. return e[0] = this.toGlobalCoord(e[0]), e[1] = this.toGlobalCoord(e[1]), t && e[0] > e[1] && e.reverse(), e
  18825. },
  18826. getOtherAxis: function() {
  18827. this.grid.getOtherAxis()
  18828. },
  18829. pointToData: function(t, e) {
  18830. return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e)
  18831. },
  18832. toLocalCoord: null,
  18833. toGlobalCoord: null
  18834. }, u(gD, HA);
  18835. var mD = {
  18836. show: !0,
  18837. zlevel: 0,
  18838. z: 0,
  18839. inverse: !1,
  18840. name: "",
  18841. nameLocation: "end",
  18842. nameRotate: null,
  18843. nameTruncate: {
  18844. maxWidth: null,
  18845. ellipsis: "...",
  18846. placeholder: "."
  18847. },
  18848. nameTextStyle: {},
  18849. nameGap: 15,
  18850. silent: !1,
  18851. triggerEvent: !1,
  18852. tooltip: {
  18853. show: !1
  18854. },
  18855. axisPointer: {},
  18856. axisLine: {
  18857. show: !0,
  18858. onZero: !0,
  18859. onZeroAxisIndex: null,
  18860. lineStyle: {
  18861. color: "#333",
  18862. width: 1,
  18863. type: "solid"
  18864. },
  18865. symbol: ["none", "none"],
  18866. symbolSize: [10, 15]
  18867. },
  18868. axisTick: {
  18869. show: !0,
  18870. inside: !1,
  18871. length: 5,
  18872. lineStyle: {
  18873. width: 1
  18874. }
  18875. },
  18876. axisLabel: {
  18877. show: !0,
  18878. inside: !1,
  18879. rotate: 0,
  18880. showMinLabel: null,
  18881. showMaxLabel: null,
  18882. margin: 8,
  18883. fontSize: 12
  18884. },
  18885. splitLine: {
  18886. show: !0,
  18887. lineStyle: {
  18888. color: ["#ccc"],
  18889. width: 1,
  18890. type: "solid"
  18891. }
  18892. },
  18893. splitArea: {
  18894. show: !1,
  18895. areaStyle: {
  18896. color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"]
  18897. }
  18898. }
  18899. },
  18900. vD = {};
  18901. vD.categoryAxis = n({
  18902. boundaryGap: !0,
  18903. deduplication: null,
  18904. splitLine: {
  18905. show: !1
  18906. },
  18907. axisTick: {
  18908. alignWithLabel: !1,
  18909. interval: "auto"
  18910. },
  18911. axisLabel: {
  18912. interval: "auto"
  18913. }
  18914. }, mD), vD.valueAxis = n({
  18915. boundaryGap: [0, 0],
  18916. splitNumber: 5
  18917. }, mD), vD.timeAxis = r({
  18918. scale: !0,
  18919. min: "dataMin",
  18920. max: "dataMax"
  18921. }, vD.valueAxis), vD.logAxis = r({
  18922. scale: !0,
  18923. logBase: 10
  18924. }, vD.valueAxis);
  18925. var yD = ["value", "category", "time", "log"],
  18926. xD = function(t, e, i, a) {
  18927. d(yD, function(r) {
  18928. e.extend({
  18929. type: t + "Axis." + r,
  18930. mergeDefaultAndTheme: function(e, o) {
  18931. var a = this.layoutMode,
  18932. s = a ? da(e) : {};
  18933. n(e, o.getTheme().get(r + "Axis")), n(e, this.getDefaultOption()), e.type = i(t, e), a && ca(e, s, a)
  18934. },
  18935. optionUpdated: function() {
  18936. "category" === this.option.type && (this.__ordinalMeta = ml.createByAxisModel(this))
  18937. },
  18938. getCategories: function(t) {
  18939. var e = this.option;
  18940. if ("category" === e.type) return t ? e.data : this.__ordinalMeta.categories
  18941. },
  18942. getOrdinalMeta: function() {
  18943. return this.__ordinalMeta
  18944. },
  18945. defaultOption: o([{}, vD[r + "Axis"], a], !0)
  18946. })
  18947. }), YM.registerSubTypeDefaulter(t + "Axis", v(i, t))
  18948. },
  18949. _D = YM.extend({
  18950. type: "cartesian2dAxis",
  18951. axis: null,
  18952. init: function() {
  18953. _D.superApply(this, "init", arguments), this.resetRange()
  18954. },
  18955. mergeOption: function() {
  18956. _D.superApply(this, "mergeOption", arguments), this.resetRange()
  18957. },
  18958. restoreData: function() {
  18959. _D.superApply(this, "restoreData", arguments), this.resetRange()
  18960. },
  18961. getCoordSysModel: function() {
  18962. return this.ecModel.queryComponents({
  18963. mainType: "grid",
  18964. index: this.option.gridIndex,
  18965. id: this.option.gridId
  18966. })[0]
  18967. }
  18968. });
  18969. n(_D.prototype, CA);
  18970. var wD = {
  18971. offset: 0
  18972. };
  18973. xD("x", _D, qu, wD), xD("y", _D, qu, wD), YM.extend({
  18974. type: "grid",
  18975. dependencies: ["xAxis", "yAxis"],
  18976. layoutMode: "box",
  18977. coordinateSystem: null,
  18978. defaultOption: {
  18979. show: !1,
  18980. zlevel: 0,
  18981. z: 0,
  18982. left: "10%",
  18983. top: 60,
  18984. right: "10%",
  18985. bottom: 60,
  18986. containLabel: !1,
  18987. backgroundColor: "rgba(0,0,0,0)",
  18988. borderWidth: 1,
  18989. borderColor: "#ccc"
  18990. }
  18991. });
  18992. var bD = $u.prototype;
  18993. bD.type = "grid", bD.axisPointerEnabled = !0, bD.getRect = function() {
  18994. return this._rect
  18995. }, bD.update = function(t, e) {
  18996. var i = this._axesMap;
  18997. this._updateScale(t, this.model), d(i.x, function(t) {
  18998. Bl(t.scale, t.model)
  18999. }), d(i.y, function(t) {
  19000. Bl(t.scale, t.model)
  19001. });
  19002. var n = {};
  19003. d(i.x, function(t) {
  19004. Ju(i, "y", t, n)
  19005. }), d(i.y, function(t) {
  19006. Ju(i, "x", t, n)
  19007. }), this.resize(this.model, e)
  19008. }, bD.resize = function(t, e, i) {
  19009. function n() {
  19010. d(a, function(t) {
  19011. var e = t.isHorizontal(),
  19012. i = e ? [0, o.width] : [0, o.height],
  19013. n = t.inverse ? 1 : 0;
  19014. t.setExtent(i[n], i[1 - n]), th(t, e ? o.x : o.y)
  19015. })
  19016. }
  19017. var o = la(t.getBoxLayoutParams(), {
  19018. width: e.getWidth(),
  19019. height: e.getHeight()
  19020. });
  19021. this._rect = o;
  19022. var a = this._axesList;
  19023. n(), !i && t.get("containLabel") && (d(a, function(t) {
  19024. if (!t.model.get("axisLabel.inside")) {
  19025. var e = Hl(t);
  19026. if (e) {
  19027. var i = t.isHorizontal() ? "height" : "width",
  19028. n = t.model.get("axisLabel.margin");
  19029. o[i] -= e[i] + n, "top" === t.position ? o.y += e.height + n : "left" === t.position && (o.x += e.width + n)
  19030. }
  19031. }
  19032. }), n())
  19033. }, bD.getAxis = function(t, e) {
  19034. var i = this._axesMap[t];
  19035. if (null != i) {
  19036. if (null == e)
  19037. for (var n in i)
  19038. if (i.hasOwnProperty(n)) return i[n];
  19039. return i[e]
  19040. }
  19041. }, bD.getAxes = function() {
  19042. return this._axesList.slice()
  19043. }, bD.getCartesian = function(t, e) {
  19044. if (null != t && null != e) {
  19045. var i = "x" + t + "y" + e;
  19046. return this._coordsMap[i]
  19047. }
  19048. w(t) && (e = t.yAxisIndex, t = t.xAxisIndex);
  19049. for (var n = 0, o = this._coordsList; n < o.length; n++)
  19050. if (o[n].getAxis("x").index === t || o[n].getAxis("y").index === e) return o[n]
  19051. }, bD.getCartesians = function() {
  19052. return this._coordsList.slice()
  19053. }, bD.convertToPixel = function(t, e, i) {
  19054. var n = this._findConvertTarget(t, e);
  19055. return n.cartesian ? n.cartesian.dataToPoint(i) : n.axis ? n.axis.toGlobalCoord(n.axis.dataToCoord(i)) : null
  19056. }, bD.convertFromPixel = function(t, e, i) {
  19057. var n = this._findConvertTarget(t, e);
  19058. return n.cartesian ? n.cartesian.pointToData(i) : n.axis ? n.axis.coordToData(n.axis.toLocalCoord(i)) : null
  19059. }, bD._findConvertTarget = function(t, e) {
  19060. var i, n, o = e.seriesModel,
  19061. a = e.xAxisModel || o && o.getReferringComponents("xAxis")[0],
  19062. r = e.yAxisModel || o && o.getReferringComponents("yAxis")[0],
  19063. s = e.gridModel,
  19064. u = this._coordsList;
  19065. return o ? l(u, i = o.coordinateSystem) < 0 && (i = null) : a && r ? i = this.getCartesian(a.componentIndex, r.componentIndex) :
  19066. a ? n = this.getAxis("x", a.componentIndex) : r ? n = this.getAxis("y", r.componentIndex) : s && s.coordinateSystem ===
  19067. this && (i = this._coordsList[0]), {
  19068. cartesian: i,
  19069. axis: n
  19070. }
  19071. }, bD.containPoint = function(t) {
  19072. var e = this._coordsList[0];
  19073. if (e) return e.containPoint(t)
  19074. }, bD._initCartesian = function(t, e, i) {
  19075. function n(i) {
  19076. return function(n, s) {
  19077. if (Ku(n, t, e)) {
  19078. var l = n.get("position");
  19079. "x" === i ? "top" !== l && "bottom" !== l && o[l = "bottom"] && (l = "top" === l ? "bottom" : "top") : "left" !==
  19080. l && "right" !== l && o[l = "left"] && (l = "left" === l ? "right" : "left"), o[l] = !0;
  19081. var u = new gD(i, Vl(n), [0, 0], n.get("type"), l),
  19082. h = "category" === u.type;
  19083. u.onBand = h && n.get("boundaryGap"), u.inverse = n.get("inverse"), n.axis = u, u.model = n, u.grid = this, u.index =
  19084. s, this._axesList.push(u), a[i][s] = u, r[i]++
  19085. }
  19086. }
  19087. }
  19088. var o = {
  19089. left: !1,
  19090. right: !1,
  19091. top: !1,
  19092. bottom: !1
  19093. },
  19094. a = {
  19095. x: {},
  19096. y: {}
  19097. },
  19098. r = {
  19099. x: 0,
  19100. y: 0
  19101. };
  19102. if (e.eachComponent("xAxis", n("x"), this), e.eachComponent("yAxis", n("y"), this), !r.x || !r.y) return this._axesMap = {},
  19103. void(this._axesList = []);
  19104. this._axesMap = a, d(a.x, function(e, i) {
  19105. d(a.y, function(n, o) {
  19106. var a = "x" + i + "y" + o,
  19107. r = new Yu(a);
  19108. r.grid = this, r.model = t, this._coordsMap[a] = r, this._coordsList.push(r), r.addAxis(e), r.addAxis(n)
  19109. }, this)
  19110. }, this)
  19111. }, bD._updateScale = function(t, e) {
  19112. function i(t, e, i) {
  19113. d(t.mapDimension(e.dim, !0), function(i) {
  19114. e.scale.unionExtentFromData(t, cl(t, i))
  19115. })
  19116. }
  19117. d(this._axesList, function(t) {
  19118. t.scale.setExtent(1 / 0, -1 / 0)
  19119. }), t.eachSeries(function(n) {
  19120. if (ih(n)) {
  19121. var o = eh(n),
  19122. a = o[0],
  19123. r = o[1];
  19124. if (!Ku(a, e, t) || !Ku(r, e, t)) return;
  19125. var s = this.getCartesian(a.componentIndex, r.componentIndex),
  19126. l = n.getData(),
  19127. u = s.getAxis("x"),
  19128. h = s.getAxis("y");
  19129. "list" === l.type && (i(l, u), i(l, h))
  19130. }
  19131. }, this)
  19132. }, bD.getTooltipAxes = function(t) {
  19133. var e = [],
  19134. i = [];
  19135. return d(this.getCartesians(), function(n) {
  19136. var o = null != t && "auto" !== t ? n.getAxis(t) : n.getBaseAxis(),
  19137. a = n.getOtherAxis(o);
  19138. l(e, o) < 0 && e.push(o), l(i, a) < 0 && i.push(a)
  19139. }), {
  19140. baseAxes: e,
  19141. otherAxes: i
  19142. }
  19143. };
  19144. var SD = ["xAxis", "yAxis"];
  19145. $u.create = function(t, e) {
  19146. var i = [];
  19147. return t.eachComponent("grid", function(n, o) {
  19148. var a = new $u(n, t, e);
  19149. a.name = "grid_" + o, a.resize(n, e, !0), n.coordinateSystem = a, i.push(a)
  19150. }), t.eachSeries(function(t) {
  19151. if (ih(t)) {
  19152. var e = eh(t),
  19153. i = e[0],
  19154. n = e[1],
  19155. o = i.getCoordSysModel().coordinateSystem;
  19156. t.coordinateSystem = o.getCartesian(i.componentIndex, n.componentIndex)
  19157. }
  19158. }), i
  19159. }, $u.dimensions = $u.prototype.dimensions = Yu.prototype.dimensions, Ba.register("cartesian2d", $u);
  19160. var MD = Math.PI,
  19161. ID = function(t, e) {
  19162. this.opt = e, this.axisModel = t, r(e, {
  19163. labelOffset: 0,
  19164. nameDirection: 1,
  19165. tickDirection: 1,
  19166. labelDirection: 1,
  19167. silent: !0
  19168. }), this.group = new Zw;
  19169. var i = new Zw({
  19170. position: e.position.slice(),
  19171. rotation: e.rotation
  19172. });
  19173. i.updateTransform(), this._transform = i.transform, this._dumbGroup = i
  19174. };
  19175. ID.prototype = {
  19176. constructor: ID,
  19177. hasBuilder: function(t) {
  19178. return !!TD[t]
  19179. },
  19180. add: function(t) {
  19181. TD[t].call(this)
  19182. },
  19183. getGroup: function() {
  19184. return this.group
  19185. }
  19186. };
  19187. var TD = {
  19188. axisLine: function() {
  19189. var t = this.opt,
  19190. e = this.axisModel;
  19191. if (e.get("axisLine.show")) {
  19192. var i = this.axisModel.axis.getExtent(),
  19193. n = this._transform,
  19194. o = [i[0], 0],
  19195. r = [i[1], 0];
  19196. n && (Q(o, o, n), Q(r, r, n));
  19197. var s = a({
  19198. lineCap: "round"
  19199. }, e.getModel("axisLine.lineStyle").getLineStyle());
  19200. this.group.add(new rM(Xn({
  19201. anid: "line",
  19202. shape: {
  19203. x1: o[0],
  19204. y1: o[1],
  19205. x2: r[0],
  19206. y2: r[1]
  19207. },
  19208. style: s,
  19209. strokeContainThreshold: t.strokeContainThreshold || 5,
  19210. silent: !0,
  19211. z2: 1
  19212. })));
  19213. var l = e.get("axisLine.symbol"),
  19214. u = e.get("axisLine.symbolSize"),
  19215. h = e.get("axisLine.symbolOffset") || 0;
  19216. if ("number" == typeof h && (h = [h, h]), null != l) {
  19217. "string" == typeof l && (l = [l, l]), "string" != typeof u && "number" != typeof u || (u = [u, u]);
  19218. var c = u[0],
  19219. f = u[1];
  19220. d([{
  19221. rotate: t.rotation + Math.PI / 2,
  19222. offset: h[0],
  19223. r: 0
  19224. }, {
  19225. rotate: t.rotation - Math.PI / 2,
  19226. offset: h[1],
  19227. r: Math.sqrt((o[0] - r[0]) * (o[0] - r[0]) + (o[1] - r[1]) * (o[1] - r[1]))
  19228. }], function(e, i) {
  19229. if ("none" !== l[i] && null != l[i]) {
  19230. var n = Xl(l[i], -c / 2, -f / 2, c, f, s.stroke, !0),
  19231. a = e.r + e.offset,
  19232. r = [o[0] + a * Math.cos(t.rotation), o[1] - a * Math.sin(t.rotation)];
  19233. n.attr({
  19234. rotation: e.rotate,
  19235. position: r,
  19236. silent: !0
  19237. }), this.group.add(n)
  19238. }
  19239. }, this)
  19240. }
  19241. }
  19242. },
  19243. axisTickLabel: function() {
  19244. var t = this.axisModel,
  19245. e = this.opt,
  19246. i = hh(this, t, e);
  19247. rh(t, ch(this, t, e), i)
  19248. },
  19249. axisName: function() {
  19250. var t = this.opt,
  19251. e = this.axisModel,
  19252. i = T(t.axisName, e.get("name"));
  19253. if (i) {
  19254. var n, o = e.get("nameLocation"),
  19255. r = t.nameDirection,
  19256. s = e.getModel("nameTextStyle"),
  19257. l = e.get("nameGap") || 0,
  19258. u = this.axisModel.axis.getExtent(),
  19259. h = u[0] > u[1] ? -1 : 1,
  19260. c = ["start" === o ? u[0] - h * l : "end" === o ? u[1] + h * l : (u[0] + u[1]) / 2, uh(o) ? t.labelOffset + r *
  19261. l : 0
  19262. ],
  19263. d = e.get("nameRotate");
  19264. null != d && (d = d * MD / 180);
  19265. var f;
  19266. uh(o) ? n = AD(t.rotation, null != d ? d : t.rotation, r) : (n = oh(t, o, d || 0, u), null != (f = t.axisNameAvailableWidth) &&
  19267. (f = Math.abs(f / Math.sin(n.rotation)), !isFinite(f) && (f = null)));
  19268. var p = s.getFont(),
  19269. g = e.get("nameTruncate", !0) || {},
  19270. m = g.ellipsis,
  19271. v = T(t.nameTruncateMaxWidth, g.maxWidth, f),
  19272. y = null != m && null != v ? VM(i, v, p, m, {
  19273. minChar: 2,
  19274. placeholder: g.placeholder
  19275. }) : i,
  19276. x = e.get("tooltip", !0),
  19277. _ = e.mainType,
  19278. w = {
  19279. componentType: _,
  19280. name: i,
  19281. $vars: ["name"]
  19282. };
  19283. w[_ + "Index"] = e.componentIndex;
  19284. var b = new qS({
  19285. anid: "name",
  19286. __fullText: i,
  19287. __truncatedText: y,
  19288. position: c,
  19289. rotation: n.rotation,
  19290. silent: ah(e),
  19291. z2: 1,
  19292. tooltip: x && x.show ? a({
  19293. content: i,
  19294. formatter: function() {
  19295. return i
  19296. },
  19297. formatterParams: w
  19298. }, x) : null
  19299. });
  19300. fo(b.style, s, {
  19301. text: y,
  19302. textFont: p,
  19303. textFill: s.getTextColor() || e.get("axisLine.lineStyle.color"),
  19304. textAlign: n.textAlign,
  19305. textVerticalAlign: n.textVerticalAlign
  19306. }), e.get("triggerEvent") && (b.eventData = nh(e), b.eventData.targetType = "axisName", b.eventData.name = i),
  19307. this._dumbGroup.add(b), b.updateTransform(), this.group.add(b), b.decomposeTransform()
  19308. }
  19309. }
  19310. },
  19311. AD = ID.innerTextLayout = function(t, e, i) {
  19312. var n, o, a = Ho(e - t);
  19313. return Zo(a) ? (o = i > 0 ? "top" : "bottom", n = "center") : Zo(a - MD) ? (o = i > 0 ? "bottom" : "top", n =
  19314. "center") : (o = "middle", n = a > 0 && a < MD ? i > 0 ? "right" : "left" : i > 0 ? "left" : "right"), {
  19315. rotation: a,
  19316. textAlign: n,
  19317. textVerticalAlign: o
  19318. }
  19319. },
  19320. DD = d,
  19321. CD = v,
  19322. LD = Vs({
  19323. type: "axis",
  19324. _axisPointer: null,
  19325. axisPointerClass: null,
  19326. render: function(t, e, i, n) {
  19327. this.axisPointerClass && yh(t), LD.superApply(this, "render", arguments), Sh(this, t, 0, i, 0, !0)
  19328. },
  19329. updateAxisPointer: function(t, e, i, n, o) {
  19330. Sh(this, t, 0, i, 0, !1)
  19331. },
  19332. remove: function(t, e) {
  19333. var i = this._axisPointer;
  19334. i && i.remove(e), LD.superApply(this, "remove", arguments)
  19335. },
  19336. dispose: function(t, e) {
  19337. Mh(this, e), LD.superApply(this, "dispose", arguments)
  19338. }
  19339. }),
  19340. kD = [];
  19341. LD.registerAxisPointerClass = function(t, e) {
  19342. kD[t] = e
  19343. }, LD.getAxisPointerClass = function(t) {
  19344. return t && kD[t]
  19345. };
  19346. var PD = ["axisLine", "axisTickLabel", "axisName"],
  19347. ND = ["splitArea", "splitLine"],
  19348. OD = LD.extend({
  19349. type: "cartesianAxis",
  19350. axisPointerClass: "CartesianAxisPointer",
  19351. render: function(t, e, i, n) {
  19352. this.group.removeAll();
  19353. var o = this._axisGroup;
  19354. if (this._axisGroup = new Zw, this.group.add(this._axisGroup), t.get("show")) {
  19355. var a = t.getCoordSysModel(),
  19356. r = Ih(a, t),
  19357. s = new ID(t, r);
  19358. d(PD, s.add, s), this._axisGroup.add(s.getGroup()), d(ND, function(e) {
  19359. t.get(e + ".show") && this["_" + e](t, a)
  19360. }, this), Ao(o, this._axisGroup, t), OD.superCall(this, "render", t, e, i, n)
  19361. }
  19362. },
  19363. remove: function() {
  19364. this._splitAreaColors = null
  19365. },
  19366. _splitLine: function(t, e) {
  19367. var i = t.axis;
  19368. if (!i.scale.isBlank()) {
  19369. var n = t.getModel("splitLine"),
  19370. o = n.getModel("lineStyle"),
  19371. a = o.get("color");
  19372. a = y(a) ? a : [a];
  19373. for (var s = e.coordinateSystem.getRect(), l = i.isHorizontal(), u = 0, h = i.getTicksCoords({
  19374. tickModel: n
  19375. }), c = [], d = [], f = o.getLineStyle(), p = 0; p < h.length; p++) {
  19376. var g = i.toGlobalCoord(h[p].coord);
  19377. l ? (c[0] = g, c[1] = s.y, d[0] = g, d[1] = s.y + s.height) : (c[0] = s.x, c[1] = g, d[0] = s.x + s.width, d[1] =
  19378. g);
  19379. var m = u++ % a.length,
  19380. v = h[p].tickValue;
  19381. this._axisGroup.add(new rM(Xn({
  19382. anid: null != v ? "line_" + h[p].tickValue : null,
  19383. shape: {
  19384. x1: c[0],
  19385. y1: c[1],
  19386. x2: d[0],
  19387. y2: d[1]
  19388. },
  19389. style: r({
  19390. stroke: a[m]
  19391. }, f),
  19392. silent: !0
  19393. })))
  19394. }
  19395. }
  19396. },
  19397. _splitArea: function(t, e) {
  19398. var i = t.axis;
  19399. if (!i.scale.isBlank()) {
  19400. var n = t.getModel("splitArea"),
  19401. o = n.getModel("areaStyle"),
  19402. a = o.get("color"),
  19403. s = e.coordinateSystem.getRect(),
  19404. l = i.getTicksCoords({
  19405. tickModel: n,
  19406. clamp: !0
  19407. });
  19408. if (l.length) {
  19409. var u = a.length,
  19410. h = this._splitAreaColors,
  19411. c = R(),
  19412. d = 0;
  19413. if (h)
  19414. for (m = 0; m < l.length; m++) {
  19415. var f = h.get(l[m].tickValue);
  19416. if (null != f) {
  19417. d = (f + (u - 1) * m) % u;
  19418. break
  19419. }
  19420. }
  19421. var p = i.toGlobalCoord(l[0].coord),
  19422. g = o.getAreaStyle();
  19423. a = y(a) ? a : [a];
  19424. for (var m = 1; m < l.length; m++) {
  19425. var v, x, _, w, b = i.toGlobalCoord(l[m].coord);
  19426. i.isHorizontal() ? (v = p, x = s.y, _ = b - v, w = s.height, p = v + _) : (v = s.x, x = p, _ = s.width, p = x +
  19427. (w = b - x));
  19428. var S = l[m - 1].tickValue;
  19429. null != S && c.set(S, d), this._axisGroup.add(new aM({
  19430. anid: null != S ? "area_" + S : null,
  19431. shape: {
  19432. x: v,
  19433. y: x,
  19434. width: _,
  19435. height: w
  19436. },
  19437. style: r({
  19438. fill: a[d]
  19439. }, g),
  19440. silent: !0
  19441. })), d = (d + 1) % u
  19442. }
  19443. this._splitAreaColors = c
  19444. }
  19445. }
  19446. }
  19447. });
  19448. OD.extend({
  19449. type: "xAxis"
  19450. }), OD.extend({
  19451. type: "yAxis"
  19452. }), Vs({
  19453. type: "grid",
  19454. render: function(t, e) {
  19455. this.group.removeAll(), t.get("show") && this.group.add(new aM({
  19456. shape: t.coordinateSystem.getRect(),
  19457. style: r({
  19458. fill: t.get("backgroundColor")
  19459. }, t.getItemStyle()),
  19460. silent: !0,
  19461. z2: -1
  19462. }))
  19463. }
  19464. }), Ls(function(t) {
  19465. t.xAxis && t.yAxis && !t.grid && (t.grid = {})
  19466. }), Es(hD("line", "circle", "line")), Os(cD("line")), ks(IT.PROCESSOR.STATISTIC, function(t) {
  19467. return {
  19468. seriesType: t,
  19469. modifyOutputEnd: !0,
  19470. reset: function(t, e, i) {
  19471. var n = t.getData(),
  19472. o = t.get("sampling"),
  19473. a = t.coordinateSystem;
  19474. if ("cartesian2d" === a.type && o) {
  19475. var r = a.getBaseAxis(),
  19476. s = a.getOtherAxis(r),
  19477. l = r.getExtent(),
  19478. u = l[1] - l[0],
  19479. h = Math.round(n.count() / u);
  19480. if (h > 1) {
  19481. var c;
  19482. "string" == typeof o ? c = dD[o] : "function" == typeof o && (c = o), c && t.setData(n.downSample(n.mapDimension(
  19483. s.dim), 1 / h, c, fD))
  19484. }
  19485. }
  19486. }
  19487. }
  19488. }("line"));
  19489. var ED = OI.extend({
  19490. type: "series.__base_bar__",
  19491. getInitialData: function(t, e) {
  19492. return dl(this.getSource(), this)
  19493. },
  19494. getMarkerPosition: function(t) {
  19495. var e = this.coordinateSystem;
  19496. if (e) {
  19497. var i = e.dataToPoint(e.clampData(t)),
  19498. n = this.getData(),
  19499. o = n.getLayout("offset"),
  19500. a = n.getLayout("size");
  19501. return i[e.getBaseAxis().isHorizontal() ? 0 : 1] += o + a / 2, i
  19502. }
  19503. return [NaN, NaN]
  19504. },
  19505. defaultOption: {
  19506. zlevel: 0,
  19507. z: 2,
  19508. coordinateSystem: "cartesian2d",
  19509. legendHoverLink: !0,
  19510. barMinHeight: 0,
  19511. barMinAngle: 0,
  19512. large: !1,
  19513. largeThreshold: 400,
  19514. progressive: 3e3,
  19515. progressiveChunkMode: "mod",
  19516. itemStyle: {},
  19517. emphasis: {}
  19518. }
  19519. });
  19520. ED.extend({
  19521. type: "series.bar",
  19522. dependencies: ["grid", "polar"],
  19523. brushSelector: "rect",
  19524. getProgressive: function() {
  19525. return !!this.get("large") && this.get("progressive")
  19526. },
  19527. getProgressiveThreshold: function() {
  19528. var t = this.get("progressiveThreshold"),
  19529. e = this.get("largeThreshold");
  19530. return e > t && (t = e), t
  19531. }
  19532. });
  19533. var RD = Wb([
  19534. ["fill", "color"],
  19535. ["stroke", "borderColor"],
  19536. ["lineWidth", "borderWidth"],
  19537. ["stroke", "barBorderColor"],
  19538. ["lineWidth", "barBorderWidth"],
  19539. ["opacity"],
  19540. ["shadowBlur"],
  19541. ["shadowOffsetX"],
  19542. ["shadowOffsetY"],
  19543. ["shadowColor"]
  19544. ]),
  19545. zD = {
  19546. getBarItemStyle: function(t) {
  19547. var e = RD(this, t);
  19548. if (this.getBorderLineDash) {
  19549. var i = this.getBorderLineDash();
  19550. i && (e.lineDash = i)
  19551. }
  19552. return e
  19553. }
  19554. },
  19555. BD = ["itemStyle", "barBorderWidth"];
  19556. a(Lo.prototype, zD), Fs({
  19557. type: "bar",
  19558. render: function(t, e, i) {
  19559. this._updateDrawMode(t);
  19560. var n = t.get("coordinateSystem");
  19561. return "cartesian2d" !== n && "polar" !== n || (this._isLargeDraw ? this._renderLarge(t, e, i) : this._renderNormal(
  19562. t, e, i)), this.group
  19563. },
  19564. incrementalPrepareRender: function(t, e, i) {
  19565. this._clear(), this._updateDrawMode(t)
  19566. },
  19567. incrementalRender: function(t, e, i, n) {
  19568. this._incrementalRenderLarge(t, e)
  19569. },
  19570. _updateDrawMode: function(t) {
  19571. var e = t.pipelineContext.large;
  19572. (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear())
  19573. },
  19574. _renderNormal: function(t, e, i) {
  19575. var n, o = this.group,
  19576. a = t.getData(),
  19577. r = this._data,
  19578. s = t.coordinateSystem,
  19579. l = s.getBaseAxis();
  19580. "cartesian2d" === s.type ? n = l.isHorizontal() : "polar" === s.type && (n = "angle" === l.dim);
  19581. var u = t.isAnimationEnabled() ? t : null;
  19582. a.diff(r).add(function(e) {
  19583. if (a.hasValue(e)) {
  19584. var i = a.getItemModel(e),
  19585. r = GD[s.type](a, e, i),
  19586. l = VD[s.type](a, e, i, r, n, u);
  19587. a.setItemGraphicEl(e, l), o.add(l), Lh(l, a, e, i, r, t, n, "polar" === s.type)
  19588. }
  19589. }).update(function(e, i) {
  19590. var l = r.getItemGraphicEl(i);
  19591. if (a.hasValue(e)) {
  19592. var h = a.getItemModel(e),
  19593. c = GD[s.type](a, e, h);
  19594. l ? bo(l, {
  19595. shape: c
  19596. }, u, e) : l = VD[s.type](a, e, h, c, n, u, !0), a.setItemGraphicEl(e, l), o.add(l), Lh(l, a, e, h, c, t, n,
  19597. "polar" === s.type)
  19598. } else o.remove(l)
  19599. }).remove(function(t) {
  19600. var e = r.getItemGraphicEl(t);
  19601. "cartesian2d" === s.type ? e && Dh(t, u, e) : e && Ch(t, u, e)
  19602. }).execute(), this._data = a
  19603. },
  19604. _renderLarge: function(t, e, i) {
  19605. this._clear(), Ph(t, this.group)
  19606. },
  19607. _incrementalRenderLarge: function(t, e) {
  19608. Ph(e, this.group, !0)
  19609. },
  19610. dispose: B,
  19611. remove: function(t) {
  19612. this._clear(t)
  19613. },
  19614. _clear: function(t) {
  19615. var e = this.group,
  19616. i = this._data;
  19617. t && t.get("animation") && i && !this._isLargeDraw ? i.eachItemGraphicEl(function(e) {
  19618. "sector" === e.type ? Ch(e.dataIndex, t, e) : Dh(e.dataIndex, t, e)
  19619. }) : e.removeAll(), this._data = null
  19620. }
  19621. });
  19622. var VD = {
  19623. cartesian2d: function(t, e, i, n, o, r, s) {
  19624. var l = new aM({
  19625. shape: a({}, n)
  19626. });
  19627. if (r) {
  19628. var u = l.shape,
  19629. h = o ? "height" : "width",
  19630. c = {};
  19631. u[h] = 0, c[h] = n[h], bM[s ? "updateProps" : "initProps"](l, {
  19632. shape: c
  19633. }, r, e)
  19634. }
  19635. return l
  19636. },
  19637. polar: function(t, e, i, n, o, a, s) {
  19638. var l = n.startAngle < n.endAngle,
  19639. u = new QS({
  19640. shape: r({
  19641. clockwise: l
  19642. }, n)
  19643. });
  19644. if (a) {
  19645. var h = u.shape,
  19646. c = o ? "r" : "endAngle",
  19647. d = {};
  19648. h[c] = o ? 0 : n.startAngle, d[c] = n[c], bM[s ? "updateProps" : "initProps"](u, {
  19649. shape: d
  19650. }, a, e)
  19651. }
  19652. return u
  19653. }
  19654. },
  19655. GD = {
  19656. cartesian2d: function(t, e, i) {
  19657. var n = t.getItemLayout(e),
  19658. o = kh(i, n),
  19659. a = n.width > 0 ? 1 : -1,
  19660. r = n.height > 0 ? 1 : -1;
  19661. return {
  19662. x: n.x + a * o / 2,
  19663. y: n.y + r * o / 2,
  19664. width: n.width - a * o,
  19665. height: n.height - r * o
  19666. }
  19667. },
  19668. polar: function(t, e, i) {
  19669. var n = t.getItemLayout(e);
  19670. return {
  19671. cx: n.cx,
  19672. cy: n.cy,
  19673. r0: n.r0,
  19674. r: n.r,
  19675. startAngle: n.startAngle,
  19676. endAngle: n.endAngle
  19677. }
  19678. }
  19679. },
  19680. FD = kn.extend({
  19681. type: "largeBar",
  19682. shape: {
  19683. points: []
  19684. },
  19685. buildPath: function(t, e) {
  19686. for (var i = e.points, n = this.__startPoint, o = this.__valueIdx, a = 0; a < i.length; a += 2) n[this.__valueIdx] =
  19687. i[a + o], t.moveTo(n[0], n[1]), t.lineTo(i[a], i[a + 1])
  19688. }
  19689. });
  19690. Os(v(kl, "bar")), Os(fA), Es({
  19691. seriesType: "bar",
  19692. reset: function(t) {
  19693. t.getData().setVisual("legendSymbol", "roundRect")
  19694. }
  19695. });
  19696. var WD = function(t, e, i) {
  19697. e = y(e) && {
  19698. coordDimensions: e
  19699. } || a({}, e);
  19700. var n = t.getSource(),
  19701. o = oA(n, e),
  19702. r = new eA(o, t);
  19703. return r.initData(n, i), r
  19704. },
  19705. HD = {
  19706. updateSelectedMap: function(t) {
  19707. this._targetList = y(t) ? t.slice() : [], this._selectTargetMap = p(t || [], function(t, e) {
  19708. return t.set(e.name, e), t
  19709. }, R())
  19710. },
  19711. select: function(t, e) {
  19712. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  19713. "single" === this.get("selectedMode") && this._selectTargetMap.each(function(t) {
  19714. t.selected = !1
  19715. }), i && (i.selected = !0)
  19716. },
  19717. unSelect: function(t, e) {
  19718. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  19719. i && (i.selected = !1)
  19720. },
  19721. toggleSelected: function(t, e) {
  19722. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  19723. if (null != i) return this[i.selected ? "unSelect" : "select"](t, e), i.selected
  19724. },
  19725. isSelected: function(t, e) {
  19726. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  19727. return i && i.selected
  19728. }
  19729. },
  19730. ZD = Gs({
  19731. type: "series.pie",
  19732. init: function(t) {
  19733. ZD.superApply(this, "init", arguments), this.legendDataProvider = function() {
  19734. return this.getRawData()
  19735. }, this.updateSelectedMap(this._createSelectableList()), this._defaultLabelLine(t)
  19736. },
  19737. mergeOption: function(t) {
  19738. ZD.superCall(this, "mergeOption", t), this.updateSelectedMap(this._createSelectableList())
  19739. },
  19740. getInitialData: function(t, e) {
  19741. return WD(this, ["value"])
  19742. },
  19743. _createSelectableList: function() {
  19744. for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, o = t.count(); n < o; n++) i.push({
  19745. name: t.getName(n),
  19746. value: t.get(e, n),
  19747. selected: cr(t, n, "selected")
  19748. });
  19749. return i
  19750. },
  19751. getDataParams: function(t) {
  19752. var e = this.getData(),
  19753. i = ZD.superCall(this, "getDataParams", t),
  19754. n = [];
  19755. return e.each(e.mapDimension("value"), function(t) {
  19756. n.push(t)
  19757. }), i.percent = Wo(n, t, e.hostModel.get("percentPrecision")), i.$vars.push("percent"), i
  19758. },
  19759. _defaultLabelLine: function(t) {
  19760. Ci(t, "labelLine", ["show"]);
  19761. var e = t.labelLine,
  19762. i = t.emphasis.labelLine;
  19763. e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.show
  19764. },
  19765. defaultOption: {
  19766. zlevel: 0,
  19767. z: 2,
  19768. legendHoverLink: !0,
  19769. hoverAnimation: !0,
  19770. center: ["50%", "50%"],
  19771. radius: [0, "75%"],
  19772. clockwise: !0,
  19773. startAngle: 90,
  19774. minAngle: 0,
  19775. selectedOffset: 10,
  19776. hoverOffset: 10,
  19777. avoidLabelOverlap: !0,
  19778. percentPrecision: 2,
  19779. stillShowZeroSum: !0,
  19780. label: {
  19781. rotate: !1,
  19782. show: !0,
  19783. position: "outer"
  19784. },
  19785. labelLine: {
  19786. show: !0,
  19787. length: 15,
  19788. length2: 15,
  19789. smooth: !1,
  19790. lineStyle: {
  19791. width: 1,
  19792. type: "solid"
  19793. }
  19794. },
  19795. itemStyle: {
  19796. borderWidth: 1
  19797. },
  19798. animationType: "expansion",
  19799. animationEasing: "cubicOut"
  19800. }
  19801. });
  19802. h(ZD, HD);
  19803. var UD = Rh.prototype;
  19804. UD.updateData = function(t, e, i) {
  19805. function n() {
  19806. s.stopAnimation(!0), s.animateTo({
  19807. shape: {
  19808. r: h.r + l.get("hoverOffset")
  19809. }
  19810. }, 300, "elasticOut")
  19811. }
  19812. function o() {
  19813. s.stopAnimation(!0), s.animateTo({
  19814. shape: {
  19815. r: h.r
  19816. }
  19817. }, 300, "elasticOut")
  19818. }
  19819. var s = this.childAt(0),
  19820. l = t.hostModel,
  19821. u = t.getItemModel(e),
  19822. h = t.getItemLayout(e),
  19823. c = a({}, h);
  19824. c.label = null, i ? (s.setShape(c), "scale" === l.getShallow("animationType") ? (s.shape.r = h.r0, So(s, {
  19825. shape: {
  19826. r: h.r
  19827. }
  19828. }, l, e)) : (s.shape.endAngle = h.startAngle, bo(s, {
  19829. shape: {
  19830. endAngle: h.endAngle
  19831. }
  19832. }, l, e))) : bo(s, {
  19833. shape: c
  19834. }, l, e);
  19835. var d = t.getItemVisual(e, "color");
  19836. s.useStyle(r({
  19837. lineJoin: "bevel",
  19838. fill: d
  19839. }, u.getModel("itemStyle").getItemStyle())), s.hoverStyle = u.getModel("emphasis.itemStyle").getItemStyle();
  19840. var f = u.getShallow("cursor");
  19841. f && s.attr("cursor", f), Eh(this, t.getItemLayout(e), l.isSelected(null, e), l.get("selectedOffset"), l.get(
  19842. "animation")), s.off("mouseover").off("mouseout").off("emphasis").off("normal"), u.get("hoverAnimation") && l.isAnimationEnabled() &&
  19843. s.on("mouseover", n).on("mouseout", o).on("emphasis", n).on("normal", o), this._updateLabel(t, e), uo(this)
  19844. }, UD._updateLabel = function(t, e) {
  19845. var i = this.childAt(1),
  19846. n = this.childAt(2),
  19847. o = t.hostModel,
  19848. a = t.getItemModel(e),
  19849. r = t.getItemLayout(e).label,
  19850. s = t.getItemVisual(e, "color");
  19851. bo(i, {
  19852. shape: {
  19853. points: r.linePoints || [
  19854. [r.x, r.y],
  19855. [r.x, r.y],
  19856. [r.x, r.y]
  19857. ]
  19858. }
  19859. }, o, e), bo(n, {
  19860. style: {
  19861. x: r.x,
  19862. y: r.y
  19863. }
  19864. }, o, e), n.attr({
  19865. rotation: r.rotation,
  19866. origin: [r.x, r.y],
  19867. z2: 10
  19868. });
  19869. var l = a.getModel("label"),
  19870. u = a.getModel("emphasis.label"),
  19871. h = a.getModel("labelLine"),
  19872. c = a.getModel("emphasis.labelLine"),
  19873. s = t.getItemVisual(e, "color");
  19874. co(n.style, n.hoverStyle = {}, l, u, {
  19875. labelFetcher: t.hostModel,
  19876. labelDataIndex: e,
  19877. defaultText: t.getName(e),
  19878. autoColor: s,
  19879. useInsideStyle: !!r.inside
  19880. }, {
  19881. textAlign: r.textAlign,
  19882. textVerticalAlign: r.verticalAlign,
  19883. opacity: t.getItemVisual(e, "opacity")
  19884. }), n.ignore = n.normalIgnore = !l.get("show"), n.hoverIgnore = !u.get("show"), i.ignore = i.normalIgnore = !h.get(
  19885. "show"), i.hoverIgnore = !c.get("show"), i.setStyle({
  19886. stroke: s,
  19887. opacity: t.getItemVisual(e, "opacity")
  19888. }), i.setStyle(h.getModel("lineStyle").getLineStyle()), i.hoverStyle = c.getModel("lineStyle").getLineStyle();
  19889. var d = h.get("smooth");
  19890. d && !0 === d && (d = .4), i.setShape({
  19891. smooth: d
  19892. })
  19893. }, u(Rh, Zw);
  19894. Mr.extend({
  19895. type: "pie",
  19896. init: function() {
  19897. var t = new Zw;
  19898. this._sectorGroup = t
  19899. },
  19900. render: function(t, e, i, n) {
  19901. if (!n || n.from !== this.uid) {
  19902. var o = t.getData(),
  19903. a = this._data,
  19904. r = this.group,
  19905. s = e.get("animation"),
  19906. l = !a,
  19907. u = t.get("animationType"),
  19908. h = v(Oh, this.uid, t, s, i),
  19909. c = t.get("selectedMode");
  19910. if (o.diff(a).add(function(t) {
  19911. var e = new Rh(o, t);
  19912. l && "scale" !== u && e.eachChild(function(t) {
  19913. t.stopAnimation(!0)
  19914. }), c && e.on("click", h), o.setItemGraphicEl(t, e), r.add(e)
  19915. }).update(function(t, e) {
  19916. var i = a.getItemGraphicEl(e);
  19917. i.updateData(o, t), i.off("click"), c && i.on("click", h), r.add(i), o.setItemGraphicEl(t, i)
  19918. }).remove(function(t) {
  19919. var e = a.getItemGraphicEl(t);
  19920. r.remove(e)
  19921. }).execute(), s && l && o.count() > 0 && "scale" !== u) {
  19922. var d = o.getItemLayout(0),
  19923. f = Math.max(i.getWidth(), i.getHeight()) / 2,
  19924. p = m(r.removeClipPath, r);
  19925. r.setClipPath(this._createClipPath(d.cx, d.cy, f, d.startAngle, d.clockwise, p, t))
  19926. } else r.removeClipPath();
  19927. this._data = o
  19928. }
  19929. },
  19930. dispose: function() {},
  19931. _createClipPath: function(t, e, i, n, o, a, r) {
  19932. var s = new QS({
  19933. shape: {
  19934. cx: t,
  19935. cy: e,
  19936. r0: 0,
  19937. r: i,
  19938. startAngle: n,
  19939. endAngle: n,
  19940. clockwise: o
  19941. }
  19942. });
  19943. return So(s, {
  19944. shape: {
  19945. endAngle: n + (o ? 1 : -1) * Math.PI * 2
  19946. }
  19947. }, r, a), s
  19948. },
  19949. containPoint: function(t, e) {
  19950. var i = e.getData().getItemLayout(0);
  19951. if (i) {
  19952. var n = t[0] - i.cx,
  19953. o = t[1] - i.cy,
  19954. a = Math.sqrt(n * n + o * o);
  19955. return a <= i.r && a >= i.r0
  19956. }
  19957. }
  19958. });
  19959. var XD = function(t, e) {
  19960. d(e, function(e) {
  19961. e.update = "updateView", Ps(e, function(i, n) {
  19962. var o = {};
  19963. return n.eachComponent({
  19964. mainType: "series",
  19965. subType: t,
  19966. query: i
  19967. }, function(t) {
  19968. t[e.method] && t[e.method](i.name, i.dataIndex);
  19969. var n = t.getData();
  19970. n.each(function(e) {
  19971. var i = n.getName(e);
  19972. o[i] = t.isSelected(i) || !1
  19973. })
  19974. }), {
  19975. name: i.name,
  19976. selected: o
  19977. }
  19978. })
  19979. })
  19980. },
  19981. jD = function(t) {
  19982. return {
  19983. getTargetSeries: function(e) {
  19984. var i = {},
  19985. n = R();
  19986. return e.eachSeriesByType(t, function(t) {
  19987. t.__paletteScope = i, n.set(t.uid, t)
  19988. }), n
  19989. },
  19990. reset: function(t, e) {
  19991. var i = t.getRawData(),
  19992. n = {},
  19993. o = t.getData();
  19994. o.each(function(t) {
  19995. var e = o.getRawIndex(t);
  19996. n[e] = t
  19997. }), i.each(function(e) {
  19998. var a = n[e],
  19999. r = null != a && o.getItemVisual(a, "color", !0);
  20000. if (r) i.setItemVisual(e, "color", r);
  20001. else {
  20002. var s = i.getItemModel(e).get("itemStyle.color") || t.getColorFromPalette(i.getName(e) || e + "", t.__paletteScope,
  20003. i.count());
  20004. i.setItemVisual(e, "color", s), null != a && o.setItemVisual(a, "color", s)
  20005. }
  20006. })
  20007. }
  20008. }
  20009. },
  20010. YD = function(t, e, i, n) {
  20011. var o, a, r = t.getData(),
  20012. s = [],
  20013. l = !1;
  20014. r.each(function(i) {
  20015. var n, u, h, c, d = r.getItemLayout(i),
  20016. f = r.getItemModel(i),
  20017. p = f.getModel("label"),
  20018. g = p.get("position") || f.get("emphasis.label.position"),
  20019. m = f.getModel("labelLine"),
  20020. v = m.get("length"),
  20021. y = m.get("length2"),
  20022. x = (d.startAngle + d.endAngle) / 2,
  20023. _ = Math.cos(x),
  20024. w = Math.sin(x);
  20025. o = d.cx, a = d.cy;
  20026. var b = "inside" === g || "inner" === g;
  20027. if ("center" === g) n = d.cx, u = d.cy, c = "center";
  20028. else {
  20029. var S = (b ? (d.r + d.r0) / 2 * _ : d.r * _) + o,
  20030. M = (b ? (d.r + d.r0) / 2 * w : d.r * w) + a;
  20031. if (n = S + 3 * _, u = M + 3 * w, !b) {
  20032. var I = S + _ * (v + e - d.r),
  20033. T = M + w * (v + e - d.r),
  20034. A = I + (_ < 0 ? -1 : 1) * y,
  20035. D = T;
  20036. n = A + (_ < 0 ? -5 : 5), u = D, h = [
  20037. [S, M],
  20038. [I, T],
  20039. [A, D]
  20040. ]
  20041. }
  20042. c = b ? "center" : _ > 0 ? "left" : "right"
  20043. }
  20044. var C = p.getFont(),
  20045. L = p.get("rotate") ? _ < 0 ? -x + Math.PI : -x : 0,
  20046. k = De(t.getFormattedLabel(i, "normal") || r.getName(i), C, c, "top");
  20047. l = !!L, d.label = {
  20048. x: n,
  20049. y: u,
  20050. position: g,
  20051. height: k.height,
  20052. len: v,
  20053. len2: y,
  20054. linePoints: h,
  20055. textAlign: c,
  20056. verticalAlign: "middle",
  20057. rotation: L,
  20058. inside: b
  20059. }, b || s.push(d.label)
  20060. }), !l && t.get("avoidLabelOverlap") && Bh(s, o, a, e, i, n)
  20061. },
  20062. qD = 2 * Math.PI,
  20063. KD = Math.PI / 180,
  20064. $D = function(t) {
  20065. return {
  20066. seriesType: t,
  20067. reset: function(t, e) {
  20068. var i = e.findComponents({
  20069. mainType: "legend"
  20070. });
  20071. if (i && i.length) {
  20072. var n = t.getData();
  20073. n.filterSelf(function(t) {
  20074. for (var e = n.getName(t), o = 0; o < i.length; o++)
  20075. if (!i[o].isSelected(e)) return !1;
  20076. return !0
  20077. })
  20078. }
  20079. }
  20080. }
  20081. };
  20082. XD("pie", [{
  20083. type: "pieToggleSelect",
  20084. event: "pieselectchanged",
  20085. method: "toggleSelected"
  20086. }, {
  20087. type: "pieSelect",
  20088. event: "pieselected",
  20089. method: "select"
  20090. }, {
  20091. type: "pieUnSelect",
  20092. event: "pieunselected",
  20093. method: "unSelect"
  20094. }]), Es(jD("pie")), Os(v(function(t, e, i, n) {
  20095. e.eachSeriesByType(t, function(t) {
  20096. var e = t.getData(),
  20097. n = e.mapDimension("value"),
  20098. o = t.get("center"),
  20099. a = t.get("radius");
  20100. y(a) || (a = [0, a]), y(o) || (o = [o, o]);
  20101. var r = i.getWidth(),
  20102. s = i.getHeight(),
  20103. l = Math.min(r, s),
  20104. u = Ro(o[0], r),
  20105. h = Ro(o[1], s),
  20106. c = Ro(a[0], l / 2),
  20107. d = Ro(a[1], l / 2),
  20108. f = -t.get("startAngle") * KD,
  20109. p = t.get("minAngle") * KD,
  20110. g = 0;
  20111. e.each(n, function(t) {
  20112. !isNaN(t) && g++
  20113. });
  20114. var m = e.getSum(n),
  20115. v = Math.PI / (m || g) * 2,
  20116. x = t.get("clockwise"),
  20117. _ = t.get("roseType"),
  20118. w = t.get("stillShowZeroSum"),
  20119. b = e.getDataExtent(n);
  20120. b[0] = 0;
  20121. var S = qD,
  20122. M = 0,
  20123. I = f,
  20124. T = x ? 1 : -1;
  20125. if (e.each(n, function(t, i) {
  20126. var n;
  20127. if (isNaN(t)) e.setItemLayout(i, {
  20128. angle: NaN,
  20129. startAngle: NaN,
  20130. endAngle: NaN,
  20131. clockwise: x,
  20132. cx: u,
  20133. cy: h,
  20134. r0: c,
  20135. r: _ ? NaN : d
  20136. });
  20137. else {
  20138. (n = "area" !== _ ? 0 === m && w ? v : t * v : qD / g) < p ? (n = p, S -= p) : M += t;
  20139. var o = I + T * n;
  20140. e.setItemLayout(i, {
  20141. angle: n,
  20142. startAngle: I,
  20143. endAngle: o,
  20144. clockwise: x,
  20145. cx: u,
  20146. cy: h,
  20147. r0: c,
  20148. r: _ ? Eo(t, b, [c, d]) : d
  20149. }), I = o
  20150. }
  20151. }), S < qD && g)
  20152. if (S <= .001) {
  20153. var A = qD / g;
  20154. e.each(n, function(t, i) {
  20155. if (!isNaN(t)) {
  20156. var n = e.getItemLayout(i);
  20157. n.angle = A, n.startAngle = f + T * i * A, n.endAngle = f + T * (i + 1) * A
  20158. }
  20159. })
  20160. } else v = S / M, I = f, e.each(n, function(t, i) {
  20161. if (!isNaN(t)) {
  20162. var n = e.getItemLayout(i),
  20163. o = n.angle === p ? p : t * v;
  20164. n.startAngle = I, n.endAngle = I + T * o, I += T * o
  20165. }
  20166. });
  20167. YD(t, d, r, s)
  20168. })
  20169. }, "pie")), ks($D("pie")), OI.extend({
  20170. type: "series.scatter",
  20171. dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"],
  20172. getInitialData: function(t, e) {
  20173. return dl(this.getSource(), this)
  20174. },
  20175. brushSelector: "point",
  20176. getProgressive: function() {
  20177. var t = this.option.progressive;
  20178. return null == t ? this.option.large ? 5e3 : this.get("progressive") : t
  20179. },
  20180. getProgressiveThreshold: function() {
  20181. var t = this.option.progressiveThreshold;
  20182. return null == t ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t
  20183. },
  20184. defaultOption: {
  20185. coordinateSystem: "cartesian2d",
  20186. zlevel: 0,
  20187. z: 2,
  20188. legendHoverLink: !0,
  20189. hoverAnimation: !0,
  20190. symbolSize: 10,
  20191. large: !1,
  20192. largeThreshold: 2e3,
  20193. itemStyle: {
  20194. opacity: .8
  20195. }
  20196. }
  20197. });
  20198. var JD = Fn({
  20199. shape: {
  20200. points: null
  20201. },
  20202. symbolProxy: null,
  20203. buildPath: function(t, e) {
  20204. var i = e.points,
  20205. n = e.size,
  20206. o = this.symbolProxy,
  20207. a = o.shape;
  20208. if (!((t.getContext ? t.getContext() : t) && n[0] < 4))
  20209. for (var r = 0; r < i.length;) {
  20210. var s = i[r++],
  20211. l = i[r++];
  20212. isNaN(s) || isNaN(l) || (a.x = s - n[0] / 2, a.y = l - n[1] / 2, a.width = n[0], a.height = n[1], o.buildPath(
  20213. t, a, !0))
  20214. }
  20215. },
  20216. afterBrush: function(t) {
  20217. var e = this.shape,
  20218. i = e.points,
  20219. n = e.size;
  20220. if (n[0] < 4) {
  20221. this.setTransform(t);
  20222. for (var o = 0; o < i.length;) {
  20223. var a = i[o++],
  20224. r = i[o++];
  20225. isNaN(a) || isNaN(r) || t.fillRect(a - n[0] / 2, r - n[1] / 2, n[0], n[1])
  20226. }
  20227. this.restoreTransform(t)
  20228. }
  20229. },
  20230. findDataIndex: function(t, e) {
  20231. for (var i = this.shape, n = i.points, o = i.size, a = Math.max(o[0], 4), r = Math.max(o[1], 4), s = n.length /
  20232. 2 - 1; s >= 0; s--) {
  20233. var l = 2 * s,
  20234. u = n[l] - a / 2,
  20235. h = n[l + 1] - r / 2;
  20236. if (t >= u && e >= h && t <= u + a && e <= h + r) return s
  20237. }
  20238. return -1
  20239. }
  20240. }),
  20241. QD = Vh.prototype;
  20242. QD.isPersistent = function() {
  20243. return !this._incremental
  20244. }, QD.updateData = function(t) {
  20245. this.group.removeAll();
  20246. var e = new JD({
  20247. rectHover: !0,
  20248. cursor: "default"
  20249. });
  20250. e.setShape({
  20251. points: t.getLayout("symbolPoints")
  20252. }), this._setCommon(e, t), this.group.add(e), this._incremental = null
  20253. }, QD.updateLayout = function(t) {
  20254. if (!this._incremental) {
  20255. var e = t.getLayout("symbolPoints");
  20256. this.group.eachChild(function(t) {
  20257. if (null != t.startIndex) {
  20258. var i = 2 * (t.endIndex - t.startIndex),
  20259. n = 4 * t.startIndex * 2;
  20260. e = new Float32Array(e.buffer, n, i)
  20261. }
  20262. t.setShape("points", e)
  20263. })
  20264. }
  20265. }, QD.incrementalPrepareUpdate = function(t) {
  20266. this.group.removeAll(), this._clearIncremental(), t.count() > 2e6 ? (this._incremental || (this._incremental = new Gn({
  20267. silent: !0
  20268. })), this.group.add(this._incremental)) : this._incremental = null
  20269. }, QD.incrementalUpdate = function(t, e) {
  20270. var i;
  20271. this._incremental ? (i = new JD, this._incremental.addDisplayable(i, !0)) : ((i = new JD({
  20272. rectHover: !0,
  20273. cursor: "default",
  20274. startIndex: t.start,
  20275. endIndex: t.end
  20276. })).incremental = !0, this.group.add(i)), i.setShape({
  20277. points: e.getLayout("symbolPoints")
  20278. }), this._setCommon(i, e, !!this._incremental)
  20279. }, QD._setCommon = function(t, e, i) {
  20280. var n = e.hostModel,
  20281. o = e.getVisual("symbolSize");
  20282. t.setShape("size", o instanceof Array ? o : [o, o]), t.symbolProxy = Xl(e.getVisual("symbol"), 0, 0, 0, 0), t.setColor =
  20283. t.symbolProxy.setColor;
  20284. var a = t.shape.size[0] < 4;
  20285. t.useStyle(n.getModel("itemStyle").getItemStyle(a ? ["color", "shadowBlur", "shadowColor"] : ["color"]));
  20286. var r = e.getVisual("color");
  20287. r && t.setColor(r), i || (t.seriesIndex = n.seriesIndex, t.on("mousemove", function(e) {
  20288. t.dataIndex = null;
  20289. var i = t.findDataIndex(e.offsetX, e.offsetY);
  20290. i >= 0 && (t.dataIndex = i + (t.startIndex || 0))
  20291. }))
  20292. }, QD.remove = function() {
  20293. this._clearIncremental(), this._incremental = null, this.group.removeAll()
  20294. }, QD._clearIncremental = function() {
  20295. var t = this._incremental;
  20296. t && t.clearDisplaybles()
  20297. }, Fs({
  20298. type: "scatter",
  20299. render: function(t, e, i) {
  20300. var n = t.getData();
  20301. this._updateSymbolDraw(n, t).updateData(n), this._finished = !0
  20302. },
  20303. incrementalPrepareRender: function(t, e, i) {
  20304. var n = t.getData();
  20305. this._updateSymbolDraw(n, t).incrementalPrepareUpdate(n), this._finished = !1
  20306. },
  20307. incrementalRender: function(t, e, i) {
  20308. this._symbolDraw.incrementalUpdate(t, e.getData()), this._finished = t.end === e.getData().count()
  20309. },
  20310. updateTransform: function(t, e, i) {
  20311. var n = t.getData();
  20312. if (this.group.dirty(), !this._finished || n.count() > 1e4 || !this._symbolDraw.isPersistent()) return {
  20313. update: !0
  20314. };
  20315. var o = cD().reset(t);
  20316. o.progress && o.progress({
  20317. start: 0,
  20318. end: n.count()
  20319. }, n), this._symbolDraw.updateLayout(n)
  20320. },
  20321. _updateSymbolDraw: function(t, e) {
  20322. var i = this._symbolDraw,
  20323. n = e.pipelineContext.large;
  20324. return i && n === this._isLargeDraw || (i && i.remove(), i = this._symbolDraw = n ? new Vh : new Su, this._isLargeDraw =
  20325. n, this.group.removeAll()), this.group.add(i.group), i
  20326. },
  20327. remove: function(t, e) {
  20328. this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null
  20329. },
  20330. dispose: function() {}
  20331. }), Es(hD("scatter", "circle")), Os(cD("scatter")), u(Gh, HA), Fh.prototype.getIndicatorAxes = function() {
  20332. return this._indicatorAxes
  20333. }, Fh.prototype.dataToPoint = function(t, e) {
  20334. var i = this._indicatorAxes[e];
  20335. return this.coordToPoint(i.dataToCoord(t), e)
  20336. }, Fh.prototype.coordToPoint = function(t, e) {
  20337. var i = this._indicatorAxes[e].angle;
  20338. return [this.cx + t * Math.cos(i), this.cy - t * Math.sin(i)]
  20339. }, Fh.prototype.pointToData = function(t) {
  20340. var e = t[0] - this.cx,
  20341. i = t[1] - this.cy,
  20342. n = Math.sqrt(e * e + i * i);
  20343. e /= n, i /= n;
  20344. for (var o, a = Math.atan2(-i, e), r = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) {
  20345. var u = this._indicatorAxes[l],
  20346. h = Math.abs(a - u.angle);
  20347. h < r && (o = u, s = l, r = h)
  20348. }
  20349. return [s, +(o && o.coodToData(n))]
  20350. }, Fh.prototype.resize = function(t, e) {
  20351. var i = t.get("center"),
  20352. n = e.getWidth(),
  20353. o = e.getHeight(),
  20354. a = Math.min(n, o) / 2;
  20355. this.cx = Ro(i[0], n), this.cy = Ro(i[1], o), this.startAngle = t.get("startAngle") * Math.PI / 180;
  20356. var r = t.get("radius");
  20357. "string" != typeof r && "number" != typeof r || (r = [0, r]), this.r0 = Ro(r[0], a), this.r = Ro(r[1], a), d(this._indicatorAxes,
  20358. function(t, e) {
  20359. t.setExtent(this.r0, this.r);
  20360. var i = this.startAngle + e * Math.PI * 2 / this._indicatorAxes.length;
  20361. i = Math.atan2(Math.sin(i), Math.cos(i)), t.angle = i
  20362. }, this)
  20363. }, Fh.prototype.update = function(t, e) {
  20364. function i(t) {
  20365. var e = Math.pow(10, Math.floor(Math.log(t) / Math.LN10)),
  20366. i = t / e;
  20367. return 2 === i ? i = 5 : i *= 2, i * e
  20368. }
  20369. var n = this._indicatorAxes,
  20370. o = this._model;
  20371. d(n, function(t) {
  20372. t.scale.setExtent(1 / 0, -1 / 0)
  20373. }), t.eachSeriesByType("radar", function(e, i) {
  20374. if ("radar" === e.get("coordinateSystem") && t.getComponent("radar", e.get("radarIndex")) === o) {
  20375. var a = e.getData();
  20376. d(n, function(t) {
  20377. t.scale.unionExtentFromData(a, a.mapDimension(t.dim))
  20378. })
  20379. }
  20380. }, this);
  20381. var a = o.get("splitNumber");
  20382. d(n, function(t, e) {
  20383. var n = Rl(t.scale, t.model);
  20384. Bl(t.scale, t.model);
  20385. var o = t.model,
  20386. r = t.scale,
  20387. s = o.getMin(),
  20388. l = o.getMax(),
  20389. u = r.getInterval();
  20390. if (null != s && null != l) r.setExtent(+s, +l), r.setInterval((l - s) / a);
  20391. else if (null != s) {
  20392. var h;
  20393. do {
  20394. h = s + u * a, r.setExtent(+s, h), r.setInterval(u), u = i(u)
  20395. } while (h < n[1] && isFinite(h) && isFinite(n[1]))
  20396. } else if (null != l) {
  20397. var c;
  20398. do {
  20399. c = l - u * a, r.setExtent(c, +l), r.setInterval(u), u = i(u)
  20400. } while (c > n[0] && isFinite(c) && isFinite(n[0]))
  20401. } else {
  20402. r.getTicks().length - 1 > a && (u = i(u));
  20403. var d = Math.round((n[0] + n[1]) / 2 / u) * u,
  20404. f = Math.round(a / 2);
  20405. r.setExtent(zo(d - f * u), zo(d + (a - f) * u)), r.setInterval(u)
  20406. }
  20407. })
  20408. }, Fh.dimensions = [], Fh.create = function(t, e) {
  20409. var i = [];
  20410. return t.eachComponent("radar", function(n) {
  20411. var o = new Fh(n, t, e);
  20412. i.push(o), n.coordinateSystem = o
  20413. }), t.eachSeriesByType("radar", function(t) {
  20414. "radar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("radarIndex") || 0])
  20415. }), i
  20416. }, Ba.register("radar", Fh);
  20417. var tC = vD.valueAxis,
  20418. eC = (Bs({
  20419. type: "radar",
  20420. optionUpdated: function() {
  20421. var t = this.get("boundaryGap"),
  20422. e = this.get("splitNumber"),
  20423. o = this.get("scale"),
  20424. s = this.get("axisLine"),
  20425. l = this.get("axisTick"),
  20426. u = this.get("axisLabel"),
  20427. h = this.get("name"),
  20428. c = this.get("name.show"),
  20429. d = this.get("name.formatter"),
  20430. p = this.get("nameGap"),
  20431. g = this.get("triggerEvent"),
  20432. m = f(this.get("indicator") || [], function(f) {
  20433. null != f.max && f.max > 0 && !f.min ? f.min = 0 : null != f.min && f.min < 0 && !f.max && (f.max = 0);
  20434. var m = h;
  20435. if (null != f.color && (m = r({
  20436. color: f.color
  20437. }, h)), f = n(i(f), {
  20438. boundaryGap: t,
  20439. splitNumber: e,
  20440. scale: o,
  20441. axisLine: s,
  20442. axisTick: l,
  20443. axisLabel: u,
  20444. name: f.text,
  20445. nameLocation: "end",
  20446. nameGap: p,
  20447. nameTextStyle: m,
  20448. triggerEvent: g
  20449. }, !1), c || (f.name = ""), "string" == typeof d) {
  20450. var v = f.name;
  20451. f.name = d.replace("{value}", null != v ? v : "")
  20452. } else "function" == typeof d && (f.name = d(f.name, f));
  20453. var y = a(new Lo(f, null, this.ecModel), CA);
  20454. return y.mainType = "radar", y.componentIndex = this.componentIndex, y
  20455. }, this);
  20456. this.getIndicatorModels = function() {
  20457. return m
  20458. }
  20459. },
  20460. defaultOption: {
  20461. zlevel: 0,
  20462. z: 0,
  20463. center: ["50%", "50%"],
  20464. radius: "75%",
  20465. startAngle: 90,
  20466. name: {
  20467. show: !0
  20468. },
  20469. boundaryGap: [0, 0],
  20470. splitNumber: 5,
  20471. nameGap: 15,
  20472. scale: !1,
  20473. shape: "polygon",
  20474. axisLine: n({
  20475. lineStyle: {
  20476. color: "#bbb"
  20477. }
  20478. }, tC.axisLine),
  20479. axisLabel: Wh(tC.axisLabel, !1),
  20480. axisTick: Wh(tC.axisTick, !1),
  20481. splitLine: Wh(tC.splitLine, !0),
  20482. splitArea: Wh(tC.splitArea, !0),
  20483. indicator: []
  20484. }
  20485. }), ["axisLine", "axisTickLabel", "axisName"]);
  20486. Vs({
  20487. type: "radar",
  20488. render: function(t, e, i) {
  20489. this.group.removeAll(), this._buildAxes(t), this._buildSplitLineAndArea(t)
  20490. },
  20491. _buildAxes: function(t) {
  20492. var e = t.coordinateSystem;
  20493. d(f(e.getIndicatorAxes(), function(t) {
  20494. return new ID(t.model, {
  20495. position: [e.cx, e.cy],
  20496. rotation: t.angle,
  20497. labelDirection: -1,
  20498. tickDirection: -1,
  20499. nameDirection: 1
  20500. })
  20501. }), function(t) {
  20502. d(eC, t.add, t), this.group.add(t.getGroup())
  20503. }, this)
  20504. },
  20505. _buildSplitLineAndArea: function(t) {
  20506. function e(t, e, i) {
  20507. var n = i % e.length;
  20508. return t[n] = t[n] || [], n
  20509. }
  20510. var i = t.coordinateSystem,
  20511. n = i.getIndicatorAxes();
  20512. if (n.length) {
  20513. var o = t.get("shape"),
  20514. a = t.getModel("splitLine"),
  20515. s = t.getModel("splitArea"),
  20516. l = a.getModel("lineStyle"),
  20517. u = s.getModel("areaStyle"),
  20518. h = a.get("show"),
  20519. c = s.get("show"),
  20520. p = l.get("color"),
  20521. g = u.get("color");
  20522. p = y(p) ? p : [p], g = y(g) ? g : [g];
  20523. var m = [],
  20524. v = [];
  20525. if ("circle" === o)
  20526. for (var x = n[0].getTicksCoords(), _ = i.cx, w = i.cy, b = 0; b < x.length; b++) h && m[D = e(m, p, b)].push(
  20527. new KS({
  20528. shape: {
  20529. cx: _,
  20530. cy: w,
  20531. r: x[b].coord
  20532. }
  20533. })), c && b < x.length - 1 && v[D = e(v, g, b)].push(new tM({
  20534. shape: {
  20535. cx: _,
  20536. cy: w,
  20537. r0: x[b].coord,
  20538. r: x[b + 1].coord
  20539. }
  20540. }));
  20541. else
  20542. for (var S, M = f(n, function(t, e) {
  20543. var n = t.getTicksCoords();
  20544. return S = null == S ? n.length - 1 : Math.min(n.length - 1, S), f(n, function(t) {
  20545. return i.coordToPoint(t.coord, e)
  20546. })
  20547. }), I = [], b = 0; b <= S; b++) {
  20548. for (var T = [], A = 0; A < n.length; A++) T.push(M[A][b]);
  20549. if (T[0] && T.push(T[0].slice()), h && m[D = e(m, p, b)].push(new oM({
  20550. shape: {
  20551. points: T
  20552. }
  20553. })), c && I) {
  20554. var D = e(v, g, b - 1);
  20555. v[D].push(new nM({
  20556. shape: {
  20557. points: T.concat(I)
  20558. }
  20559. }))
  20560. }
  20561. I = T.slice().reverse()
  20562. }
  20563. var C = l.getLineStyle(),
  20564. L = u.getAreaStyle();
  20565. d(v, function(t, e) {
  20566. this.group.add(xM(t, {
  20567. style: r({
  20568. stroke: "none",
  20569. fill: g[e % g.length]
  20570. }, L),
  20571. silent: !0
  20572. }))
  20573. }, this), d(m, function(t, e) {
  20574. this.group.add(xM(t, {
  20575. style: r({
  20576. fill: "none",
  20577. stroke: p[e % p.length]
  20578. }, C),
  20579. silent: !0
  20580. }))
  20581. }, this)
  20582. }
  20583. }
  20584. });
  20585. var iC = OI.extend({
  20586. type: "series.radar",
  20587. dependencies: ["radar"],
  20588. init: function(t) {
  20589. iC.superApply(this, "init", arguments), this.legendDataProvider = function() {
  20590. return this.getRawData()
  20591. }
  20592. },
  20593. getInitialData: function(t, e) {
  20594. return WD(this, {
  20595. generateCoord: "indicator_",
  20596. generateCoordCount: 1 / 0
  20597. })
  20598. },
  20599. formatTooltip: function(t) {
  20600. var e = this.getData(),
  20601. i = this.coordinateSystem.getIndicatorAxes(),
  20602. n = this.getData().getName(t);
  20603. return Qo("" === n ? this.name : n) + "<br/>" + f(i, function(i, n) {
  20604. var o = e.get(e.mapDimension(i.dim), t);
  20605. return Qo(i.name + " : " + o)
  20606. }).join("<br />")
  20607. },
  20608. defaultOption: {
  20609. zlevel: 0,
  20610. z: 2,
  20611. coordinateSystem: "radar",
  20612. legendHoverLink: !0,
  20613. radarIndex: 0,
  20614. lineStyle: {
  20615. width: 2,
  20616. type: "solid"
  20617. },
  20618. label: {
  20619. position: "top"
  20620. },
  20621. symbol: "emptyCircle",
  20622. symbolSize: 4
  20623. }
  20624. });
  20625. Fs({
  20626. type: "radar",
  20627. render: function(t, e, n) {
  20628. function o(t, e) {
  20629. var i = t.getItemVisual(e, "symbol") || "circle",
  20630. n = t.getItemVisual(e, "color");
  20631. if ("none" !== i) {
  20632. var o = Hh(t.getItemVisual(e, "symbolSize")),
  20633. a = Xl(i, -1, -1, 2, 2, n);
  20634. return a.attr({
  20635. style: {
  20636. strokeNoScale: !0
  20637. },
  20638. z2: 100,
  20639. scale: [o[0] / 2, o[1] / 2]
  20640. }), a
  20641. }
  20642. }
  20643. function a(e, i, n, a, r, s) {
  20644. n.removeAll();
  20645. for (var l = 0; l < i.length - 1; l++) {
  20646. var u = o(a, r);
  20647. u && (u.__dimIdx = l, e[l] ? (u.attr("position", e[l]), bM[s ? "initProps" : "updateProps"](u, {
  20648. position: i[l]
  20649. }, t, r)) : u.attr("position", i[l]), n.add(u))
  20650. }
  20651. }
  20652. function s(t) {
  20653. return f(t, function(t) {
  20654. return [l.cx, l.cy]
  20655. })
  20656. }
  20657. var l = t.coordinateSystem,
  20658. u = this.group,
  20659. h = t.getData(),
  20660. c = this._data;
  20661. h.diff(c).add(function(e) {
  20662. var i = h.getItemLayout(e);
  20663. if (i) {
  20664. var n = new nM,
  20665. o = new oM,
  20666. r = {
  20667. shape: {
  20668. points: i
  20669. }
  20670. };
  20671. n.shape.points = s(i), o.shape.points = s(i), So(n, r, t, e), So(o, r, t, e);
  20672. var l = new Zw,
  20673. u = new Zw;
  20674. l.add(o), l.add(n), l.add(u), a(o.shape.points, i, u, h, e, !0), h.setItemGraphicEl(e, l)
  20675. }
  20676. }).update(function(e, i) {
  20677. var n = c.getItemGraphicEl(i),
  20678. o = n.childAt(0),
  20679. r = n.childAt(1),
  20680. s = n.childAt(2),
  20681. l = {
  20682. shape: {
  20683. points: h.getItemLayout(e)
  20684. }
  20685. };
  20686. l.shape.points && (a(o.shape.points, l.shape.points, s, h, e, !1), bo(o, l, t), bo(r, l, t), h.setItemGraphicEl(
  20687. e, n))
  20688. }).remove(function(t) {
  20689. u.remove(c.getItemGraphicEl(t))
  20690. }).execute(), h.eachItemGraphicEl(function(t, e) {
  20691. function n() {
  20692. l.attr("ignore", m)
  20693. }
  20694. function o() {
  20695. l.attr("ignore", g)
  20696. }
  20697. var a = h.getItemModel(e),
  20698. s = t.childAt(0),
  20699. l = t.childAt(1),
  20700. c = t.childAt(2),
  20701. d = h.getItemVisual(e, "color");
  20702. u.add(t), s.useStyle(r(a.getModel("lineStyle").getLineStyle(), {
  20703. fill: "none",
  20704. stroke: d
  20705. })), s.hoverStyle = a.getModel("emphasis.lineStyle").getLineStyle();
  20706. var f = a.getModel("areaStyle"),
  20707. p = a.getModel("emphasis.areaStyle"),
  20708. g = f.isEmpty() && f.parentModel.isEmpty(),
  20709. m = p.isEmpty() && p.parentModel.isEmpty();
  20710. m = m && g, l.ignore = g, l.useStyle(r(f.getAreaStyle(), {
  20711. fill: d,
  20712. opacity: .7
  20713. })), l.hoverStyle = p.getAreaStyle();
  20714. var v = a.getModel("itemStyle").getItemStyle(["color"]),
  20715. y = a.getModel("emphasis.itemStyle").getItemStyle(),
  20716. x = a.getModel("label"),
  20717. _ = a.getModel("emphasis.label");
  20718. c.eachChild(function(t) {
  20719. t.setStyle(v), t.hoverStyle = i(y), co(t.style, t.hoverStyle, x, _, {
  20720. labelFetcher: h.hostModel,
  20721. labelDataIndex: e,
  20722. labelDimIndex: t.__dimIdx,
  20723. defaultText: h.get(h.dimensions[t.__dimIdx], e),
  20724. autoColor: d,
  20725. isRectText: !0
  20726. })
  20727. }), t.off("mouseover").off("mouseout").off("normal").off("emphasis"), t.on("emphasis", n).on("mouseover", n)
  20728. .on("normal", o).on("mouseout", o), uo(t)
  20729. }), this._data = h
  20730. },
  20731. remove: function() {
  20732. this.group.removeAll(), this._data = null
  20733. },
  20734. dispose: function() {}
  20735. });
  20736. Es(jD("radar")), Es(hD("radar", "circle")), Os(function(t) {
  20737. t.eachSeriesByType("radar", function(t) {
  20738. var e = t.getData(),
  20739. i = [],
  20740. n = t.coordinateSystem;
  20741. if (n) {
  20742. for (var o = n.getIndicatorAxes(), a = 0; a < o.length; a++) e.each(e.mapDimension(o[a].dim), function(t, e) {
  20743. i[e] = i[e] || [], i[e][a] = n.dataToPoint(t, a)
  20744. });
  20745. e.each(function(t) {
  20746. i[t][0] && i[t].push(i[t][0].slice()), e.setItemLayout(t, i[t])
  20747. })
  20748. }
  20749. })
  20750. }), ks($D("radar")), Ls(function(t) {
  20751. var e = t.polar;
  20752. if (e) {
  20753. y(e) || (e = [e]);
  20754. var i = [];
  20755. d(e, function(e, n) {
  20756. e.indicator ? (e.type && !e.shape && (e.shape = e.type), t.radar = t.radar || [], y(t.radar) || (t.radar = [t.radar]),
  20757. t.radar.push(e)) : i.push(e)
  20758. }), t.polar = i
  20759. }
  20760. d(t.series, function(t) {
  20761. t && "radar" === t.type && t.polarIndex && (t.radarIndex = t.polarIndex)
  20762. })
  20763. });
  20764. var nC = Q;
  20765. h(Zh, mw), Uh.prototype = {
  20766. constructor: Uh,
  20767. type: "view",
  20768. dimensions: ["x", "y"],
  20769. setBoundingRect: function(t, e, i, n) {
  20770. return this._rect = new ue(t, e, i, n), this._rect
  20771. },
  20772. getBoundingRect: function() {
  20773. return this._rect
  20774. },
  20775. setViewRect: function(t, e, i, n) {
  20776. this.transformTo(t, e, i, n), this._viewRect = new ue(t, e, i, n)
  20777. },
  20778. transformTo: function(t, e, i, n) {
  20779. var o = this.getBoundingRect(),
  20780. a = this._rawTransformable;
  20781. a.transform = o.calculateTransform(new ue(t, e, i, n)), a.decomposeTransform(), this._updateTransform()
  20782. },
  20783. setCenter: function(t) {
  20784. t && (this._center = t, this._updateCenterAndZoom())
  20785. },
  20786. setZoom: function(t) {
  20787. t = t || 1;
  20788. var e = this.zoomLimit;
  20789. e && (null != e.max && (t = Math.min(e.max, t)), null != e.min && (t = Math.max(e.min, t))), this._zoom = t, this
  20790. ._updateCenterAndZoom()
  20791. },
  20792. getDefaultCenter: function() {
  20793. var t = this.getBoundingRect();
  20794. return [t.x + t.width / 2, t.y + t.height / 2]
  20795. },
  20796. getCenter: function() {
  20797. return this._center || this.getDefaultCenter()
  20798. },
  20799. getZoom: function() {
  20800. return this._zoom || 1
  20801. },
  20802. getRoamTransform: function() {
  20803. return this._roamTransformable.getLocalTransform()
  20804. },
  20805. _updateCenterAndZoom: function() {
  20806. var t = this._rawTransformable.getLocalTransform(),
  20807. e = this._roamTransformable,
  20808. i = this.getDefaultCenter(),
  20809. n = this.getCenter(),
  20810. o = this.getZoom();
  20811. n = Q([], n, t), i = Q([], i, t), e.origin = n, e.position = [i[0] - n[0], i[1] - n[1]], e.scale = [o, o], this._updateTransform()
  20812. },
  20813. _updateTransform: function() {
  20814. var t = this._roamTransformable,
  20815. e = this._rawTransformable;
  20816. e.parent = t, t.updateTransform(), e.updateTransform(), yt(this.transform || (this.transform = []), e.transform ||
  20817. mt()), this._rawTransform = e.getLocalTransform(), this.invTransform = this.invTransform || [], St(this.invTransform,
  20818. this.transform), this.decomposeTransform()
  20819. },
  20820. getViewRect: function() {
  20821. return this._viewRect
  20822. },
  20823. getViewRectAfterRoam: function() {
  20824. var t = this.getBoundingRect().clone();
  20825. return t.applyTransform(this.transform), t
  20826. },
  20827. dataToPoint: function(t, e, i) {
  20828. var n = e ? this._rawTransform : this.transform;
  20829. return i = i || [], n ? nC(i, t, n) : G(i, t)
  20830. },
  20831. pointToData: function(t) {
  20832. var e = this.invTransform;
  20833. return e ? nC([], t, e) : [t[0], t[1]]
  20834. },
  20835. convertToPixel: v(Xh, "dataToPoint"),
  20836. convertFromPixel: v(Xh, "pointToData"),
  20837. containPoint: function(t) {
  20838. return this.getViewRectAfterRoam().contain(t[0], t[1])
  20839. }
  20840. }, h(Uh, mw);
  20841. for (var oC = [126, 25], aC = [
  20842. [
  20843. [0, 3.5],
  20844. [7, 11.2],
  20845. [15, 11.9],
  20846. [30, 7],
  20847. [42, .7],
  20848. [52, .7],
  20849. [56, 7.7],
  20850. [59, .7],
  20851. [64, .7],
  20852. [64, 0],
  20853. [5, 0],
  20854. [0, 3.5]
  20855. ],
  20856. [
  20857. [13, 16.1],
  20858. [19, 14.7],
  20859. [16, 21.7],
  20860. [11, 23.1],
  20861. [13, 16.1]
  20862. ],
  20863. [
  20864. [12, 32.2],
  20865. [14, 38.5],
  20866. [15, 38.5],
  20867. [13, 32.2],
  20868. [12, 32.2]
  20869. ],
  20870. [
  20871. [16, 47.6],
  20872. [12, 53.2],
  20873. [13, 53.2],
  20874. [18, 47.6],
  20875. [16, 47.6]
  20876. ],
  20877. [
  20878. [6, 64.4],
  20879. [8, 70],
  20880. [9, 70],
  20881. [8, 64.4],
  20882. [6, 64.4]
  20883. ],
  20884. [
  20885. [23, 82.6],
  20886. [29, 79.8],
  20887. [30, 79.8],
  20888. [25, 82.6],
  20889. [23, 82.6]
  20890. ],
  20891. [
  20892. [37, 70.7],
  20893. [43, 62.3],
  20894. [44, 62.3],
  20895. [39, 70.7],
  20896. [37, 70.7]
  20897. ],
  20898. [
  20899. [48, 51.1],
  20900. [51, 45.5],
  20901. [53, 45.5],
  20902. [50, 51.1],
  20903. [48, 51.1]
  20904. ],
  20905. [
  20906. [51, 35],
  20907. [51, 28.7],
  20908. [53, 28.7],
  20909. [53, 35],
  20910. [51, 35]
  20911. ],
  20912. [
  20913. [52, 22.4],
  20914. [55, 17.5],
  20915. [56, 17.5],
  20916. [53, 22.4],
  20917. [52, 22.4]
  20918. ],
  20919. [
  20920. [58, 12.6],
  20921. [62, 7],
  20922. [63, 7],
  20923. [60, 12.6],
  20924. [58, 12.6]
  20925. ],
  20926. [
  20927. [0, 3.5],
  20928. [0, 93.1],
  20929. [64, 93.1],
  20930. [64, 0],
  20931. [63, 0],
  20932. [63, 92.4],
  20933. [1, 92.4],
  20934. [1, 3.5],
  20935. [0, 3.5]
  20936. ]
  20937. ], rC = 0; rC < aC.length; rC++)
  20938. for (var sC = 0; sC < aC[rC].length; sC++) aC[rC][sC][0] /= 10.5, aC[rC][sC][1] /= -14, aC[rC][sC][0] += oC[0], aC[
  20939. rC][sC][1] += oC[1];
  20940. var lC = function(t, e) {
  20941. "china" === t && e.push(new ql("南海诸岛", f(aC, function(t) {
  20942. return {
  20943. type: "polygon",
  20944. exterior: t
  20945. }
  20946. }), oC))
  20947. },
  20948. uC = {
  20949. "南海诸岛": [32, 80],
  20950. "广东": [0, -10],
  20951. "香港": [10, 5],
  20952. "澳门": [-10, 10],
  20953. "天津": [5, 5]
  20954. },
  20955. hC = function(t, e) {
  20956. if ("china" === t) {
  20957. var i = uC[e.name];
  20958. if (i) {
  20959. var n = e.center;
  20960. n[0] += i[0] / 10.5, n[1] += -i[1] / 14
  20961. }
  20962. }
  20963. },
  20964. cC = {
  20965. Russia: [100, 60],
  20966. "United States": [-99, 38],
  20967. "United States of America": [-99, 38]
  20968. },
  20969. dC = function(t, e) {
  20970. if ("world" === t) {
  20971. var i = cC[e.name];
  20972. if (i) {
  20973. var n = e.center;
  20974. n[0] = i[0], n[1] = i[1]
  20975. }
  20976. }
  20977. },
  20978. fC = [
  20979. [
  20980. [123.45165252685547, 25.73527164402261],
  20981. [123.49731445312499, 25.73527164402261],
  20982. [123.49731445312499, 25.750734064600884],
  20983. [123.45165252685547, 25.750734064600884],
  20984. [123.45165252685547, 25.73527164402261]
  20985. ]
  20986. ],
  20987. pC = function(t, e) {
  20988. "china" === t && "台湾" === e.name && e.geometries.push({
  20989. type: "polygon",
  20990. exterior: fC[0]
  20991. })
  20992. },
  20993. gC = Bi(),
  20994. mC = {
  20995. load: function(t, e) {
  20996. var i = gC(e).parsed;
  20997. if (i) return i;
  20998. var n, o = e.specialAreas || {},
  20999. a = e.geoJSON;
  21000. try {
  21001. n = a ? GA(a) : []
  21002. } catch (t) {
  21003. throw new Error("Invalid geoJson format\n" + t.message)
  21004. }
  21005. return d(n, function(e) {
  21006. var i = e.name;
  21007. hC(t, e), dC(t, e), pC(t, e);
  21008. var n = o[i];
  21009. n && e.transformTo(n.left, n.top, n.width, n.height)
  21010. }), lC(t, n), gC(e).parsed = {
  21011. regions: n,
  21012. boundingRect: jh(n)
  21013. }
  21014. }
  21015. },
  21016. vC = Bi(),
  21017. yC = {
  21018. geoJSON: mC,
  21019. svg: {
  21020. load: function(t, e) {
  21021. var i = vC(e).originRoot;
  21022. if (i) return {
  21023. root: i,
  21024. boundingRect: vC(e).boundingRect
  21025. };
  21026. var n = Yh(e);
  21027. return vC(e).originRoot = n.root, vC(e).boundingRect = n.boundingRect, n
  21028. },
  21029. makeGraphic: function(t, e, i) {
  21030. var n = vC(e),
  21031. o = n.rootMap || (n.rootMap = R()),
  21032. a = o.get(i);
  21033. if (a) return a;
  21034. var r = n.originRoot,
  21035. s = n.boundingRect;
  21036. return n.originRootHostKey ? a = Yh(e, s).root : (n.originRootHostKey = i, a = r), o.set(i, a)
  21037. },
  21038. removeGraphic: function(t, e, i) {
  21039. var n = vC(e),
  21040. o = n.rootMap;
  21041. o && o.removeKey(i), i === n.originRootHostKey && (n.originRootHostKey = null)
  21042. }
  21043. }
  21044. },
  21045. xC = {
  21046. load: function(t, e) {
  21047. var i, n = [],
  21048. o = R(),
  21049. a = R();
  21050. return d(Kh(t), function(r) {
  21051. var s = yC[r.type].load(t, r);
  21052. d(s.regions, function(t) {
  21053. var i = t.name;
  21054. e && e.hasOwnProperty(i) && (t = t.cloneShallow(i = e[i])), n.push(t), o.set(i, t), a.set(i, t.center)
  21055. });
  21056. var l = s.boundingRect;
  21057. l && (i ? i.union(l) : i = l.clone())
  21058. }), {
  21059. regions: n,
  21060. regionsMap: o,
  21061. nameCoordMap: a,
  21062. boundingRect: i || new ue(0, 0, 0, 0)
  21063. }
  21064. },
  21065. makeGraphic: qh("makeGraphic"),
  21066. removeGraphic: qh("removeGraphic")
  21067. };
  21068. $h.prototype = {
  21069. constructor: $h,
  21070. type: "geo",
  21071. dimensions: ["lng", "lat"],
  21072. containCoord: function(t) {
  21073. for (var e = this.regions, i = 0; i < e.length; i++)
  21074. if (e[i].contain(t)) return !0;
  21075. return !1
  21076. },
  21077. transformTo: function(t, e, i, n) {
  21078. var o = this.getBoundingRect(),
  21079. a = this._invertLongitute;
  21080. o = o.clone(), a && (o.y = -o.y - o.height);
  21081. var r = this._rawTransformable;
  21082. if (r.transform = o.calculateTransform(new ue(t, e, i, n)), r.decomposeTransform(), a) {
  21083. var s = r.scale;
  21084. s[1] = -s[1]
  21085. }
  21086. r.updateTransform(), this._updateTransform()
  21087. },
  21088. getRegion: function(t) {
  21089. return this._regionsMap.get(t)
  21090. },
  21091. getRegionByCoord: function(t) {
  21092. for (var e = this.regions, i = 0; i < e.length; i++)
  21093. if (e[i].contain(t)) return e[i]
  21094. },
  21095. addGeoCoord: function(t, e) {
  21096. this._nameCoordMap.set(t, e)
  21097. },
  21098. getGeoCoord: function(t) {
  21099. return this._nameCoordMap.get(t)
  21100. },
  21101. getBoundingRect: function() {
  21102. return this._rect
  21103. },
  21104. dataToPoint: function(t, e, i) {
  21105. if ("string" == typeof t && (t = this.getGeoCoord(t)), t) return Uh.prototype.dataToPoint.call(this, t, e, i)
  21106. },
  21107. convertToPixel: v(Jh, "dataToPoint"),
  21108. convertFromPixel: v(Jh, "pointToData")
  21109. }, h($h, Uh);
  21110. var _C = {
  21111. dimensions: $h.prototype.dimensions,
  21112. create: function(t, e) {
  21113. var i = [];
  21114. t.eachComponent("geo", function(t, n) {
  21115. var o = t.get("map"),
  21116. a = t.get("aspectScale"),
  21117. r = !0,
  21118. s = pT.retrieveMap(o);
  21119. s && s[0] && "svg" === s[0].type ? (null == a && (a = 1), r = !1) : null == a && (a = .75);
  21120. var l = new $h(o + n, o, t.get("nameMap"), r);
  21121. l.aspectScale = a, l.zoomLimit = t.get("scaleLimit"), i.push(l), tc(l, t), t.coordinateSystem = l, l.model = t,
  21122. l.resize = Qh, l.resize(t, e)
  21123. }), t.eachSeries(function(t) {
  21124. if ("geo" === t.get("coordinateSystem")) {
  21125. var e = t.get("geoIndex") || 0;
  21126. t.coordinateSystem = i[e]
  21127. }
  21128. });
  21129. var n = {};
  21130. return t.eachSeriesByType("map", function(t) {
  21131. if (!t.getHostGeoModel()) {
  21132. var e = t.getMapType();
  21133. n[e] = n[e] || [], n[e].push(t)
  21134. }
  21135. }), d(n, function(t, n) {
  21136. var a = new $h(n, n, o(f(t, function(t) {
  21137. return t.get("nameMap")
  21138. })));
  21139. a.zoomLimit = T.apply(null, f(t, function(t) {
  21140. return t.get("scaleLimit")
  21141. })), i.push(a), a.resize = Qh, a.aspectScale = t[0].get("aspectScale"), a.resize(t[0], e), d(t, function(t) {
  21142. t.coordinateSystem = a, tc(a, t)
  21143. })
  21144. }), i
  21145. },
  21146. getFilledRegions: function(t, e, i) {
  21147. for (var n = (t || []).slice(), o = R(), a = 0; a < n.length; a++) o.set(n[a].name, n[a]);
  21148. return d(xC.load(e, i).regions, function(t) {
  21149. var e = t.name;
  21150. !o.get(e) && n.push({
  21151. name: e
  21152. })
  21153. }), n
  21154. }
  21155. };
  21156. Ns("geo", _C);
  21157. var wC = OI.extend({
  21158. type: "series.map",
  21159. dependencies: ["geo"],
  21160. layoutMode: "box",
  21161. needsDrawMap: !1,
  21162. seriesGroup: [],
  21163. init: function(t) {
  21164. wC.superApply(this, "init", arguments), this.updateSelectedMap(this._createSelectableList())
  21165. },
  21166. getInitialData: function(t) {
  21167. return WD(this, ["value"])
  21168. },
  21169. mergeOption: function(t) {
  21170. wC.superApply(this, "mergeOption", arguments), this.updateSelectedMap(this._createSelectableList())
  21171. },
  21172. _createSelectableList: function() {
  21173. for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, o = t.count(); n < o; n++) i.push({
  21174. name: t.getName(n),
  21175. value: t.get(e, n),
  21176. selected: cr(t, n, "selected")
  21177. });
  21178. return i = _C.getFilledRegions(i, this.getMapType(), this.option.nameMap)
  21179. },
  21180. getHostGeoModel: function() {
  21181. var t = this.option.geoIndex;
  21182. return null != t ? this.dependentModels.geo[t] : null
  21183. },
  21184. getMapType: function() {
  21185. return (this.getHostGeoModel() || this).option.map
  21186. },
  21187. _fillOption: function(t, e) {},
  21188. getRawValue: function(t) {
  21189. var e = this.getData();
  21190. return e.get(e.mapDimension("value"), t)
  21191. },
  21192. getRegionModel: function(t) {
  21193. var e = this.getData();
  21194. return e.getItemModel(e.indexOfName(t))
  21195. },
  21196. formatTooltip: function(t) {
  21197. for (var e = this.getData(), i = $o(this.getRawValue(t)), n = e.getName(t), o = this.seriesGroup, a = [], r = 0; r <
  21198. o.length; r++) {
  21199. var s = o[r].originalData.indexOfName(n),
  21200. l = e.mapDimension("value");
  21201. isNaN(o[r].originalData.get(l, s)) || a.push(Qo(o[r].name))
  21202. }
  21203. return a.join(", ") + "<br />" + Qo(n + " : " + i)
  21204. },
  21205. getTooltipPosition: function(t) {
  21206. if (null != t) {
  21207. var e = this.getData().getName(t),
  21208. i = this.coordinateSystem,
  21209. n = i.getRegion(e);
  21210. return n && i.dataToPoint(n.center)
  21211. }
  21212. },
  21213. setZoom: function(t) {
  21214. this.option.zoom = t
  21215. },
  21216. setCenter: function(t) {
  21217. this.option.center = t
  21218. },
  21219. defaultOption: {
  21220. zlevel: 0,
  21221. z: 2,
  21222. coordinateSystem: "geo",
  21223. map: "",
  21224. left: "center",
  21225. top: "center",
  21226. aspectScale: .75,
  21227. showLegendSymbol: !0,
  21228. dataRangeHoverLink: !0,
  21229. boundingCoords: null,
  21230. center: null,
  21231. zoom: 1,
  21232. scaleLimit: null,
  21233. label: {
  21234. show: !1,
  21235. color: "#000"
  21236. },
  21237. itemStyle: {
  21238. borderWidth: .5,
  21239. borderColor: "#444",
  21240. areaColor: "#eee"
  21241. },
  21242. emphasis: {
  21243. label: {
  21244. show: !0,
  21245. color: "rgb(100,0,0)"
  21246. },
  21247. itemStyle: {
  21248. areaColor: "rgba(255,215,0,0.8)"
  21249. }
  21250. }
  21251. }
  21252. });
  21253. h(wC, HD);
  21254. var bC = "\0_ec_interaction_mutex";
  21255. Ps({
  21256. type: "takeGlobalCursor",
  21257. event: "globalCursorTaken",
  21258. update: "update"
  21259. }, function() {}), h(ac, aw);
  21260. var SC = {
  21261. axisPointer: 1,
  21262. tooltip: 1,
  21263. brush: 1
  21264. };
  21265. _c.prototype = {
  21266. constructor: _c,
  21267. draw: function(t, e, i, n, o) {
  21268. var a = "geo" === t.mainType,
  21269. r = t.getData && t.getData();
  21270. a && e.eachComponent({
  21271. mainType: "series",
  21272. subType: "map"
  21273. }, function(e) {
  21274. r || e.getHostGeoModel() !== t || (r = e.getData())
  21275. });
  21276. var s = t.coordinateSystem;
  21277. this._updateBackground(s);
  21278. var l = this._regionsGroup,
  21279. u = this.group,
  21280. h = s.scale,
  21281. c = {
  21282. position: s.position,
  21283. scale: h
  21284. };
  21285. !l.childAt(0) || o ? u.attr(c) : bo(u, c, t), l.removeAll();
  21286. var f = ["itemStyle"],
  21287. p = ["emphasis", "itemStyle"],
  21288. g = ["label"],
  21289. m = ["emphasis", "label"],
  21290. v = R();
  21291. d(s.regions, function(e) {
  21292. var i = v.get(e.name) || v.set(e.name, new Zw),
  21293. n = new hM({
  21294. shape: {
  21295. paths: []
  21296. }
  21297. });
  21298. i.add(n);
  21299. var o, s = (C = t.getRegionModel(e.name) || t).getModel(f),
  21300. u = C.getModel(p),
  21301. c = vc(s),
  21302. y = vc(u),
  21303. x = C.getModel(g),
  21304. _ = C.getModel(m);
  21305. if (r) {
  21306. o = r.indexOfName(e.name);
  21307. var w = r.getItemVisual(o, "color", !0);
  21308. w && (c.fill = w)
  21309. }
  21310. d(e.geometries, function(t) {
  21311. if ("polygon" === t.type) {
  21312. n.shape.paths.push(new nM({
  21313. shape: {
  21314. points: t.exterior
  21315. }
  21316. }));
  21317. for (var e = 0; e < (t.interiors ? t.interiors.length : 0); e++) n.shape.paths.push(new nM({
  21318. shape: {
  21319. points: t.interiors[e]
  21320. }
  21321. }))
  21322. }
  21323. }), n.setStyle(c), n.style.strokeNoScale = !0, n.culling = !0;
  21324. var b = x.get("show"),
  21325. S = _.get("show"),
  21326. M = r && isNaN(r.get(r.mapDimension("value"), o)),
  21327. I = r && r.getItemLayout(o);
  21328. if (a || M && (b || S) || I && I.showLabel) {
  21329. var T, A = a ? e.name : o;
  21330. (!r || o >= 0) && (T = t);
  21331. var D = new qS({
  21332. position: e.center.slice(),
  21333. scale: [1 / h[0], 1 / h[1]],
  21334. z2: 10,
  21335. silent: !0
  21336. });
  21337. co(D.style, D.hoverStyle = {}, x, _, {
  21338. labelFetcher: T,
  21339. labelDataIndex: A,
  21340. defaultText: e.name,
  21341. useInsideStyle: !1
  21342. }, {
  21343. textAlign: "center",
  21344. textVerticalAlign: "middle"
  21345. }), i.add(D)
  21346. }
  21347. if (r) r.setItemGraphicEl(o, i);
  21348. else {
  21349. var C = t.getRegionModel(e.name);
  21350. n.eventData = {
  21351. componentType: "geo",
  21352. componentIndex: t.componentIndex,
  21353. geoIndex: t.componentIndex,
  21354. name: e.name,
  21355. region: C && C.option || {}
  21356. }
  21357. }(i.__regions || (i.__regions = [])).push(e), uo(i, y, {
  21358. hoverSilentOnTouch: !!t.get("selectedMode")
  21359. }), l.add(i)
  21360. }), this._updateController(t, e, i), yc(this, t, l, i, n), xc(t, l)
  21361. },
  21362. remove: function() {
  21363. this._regionsGroup.removeAll(), this._backgroundGroup.removeAll(), this._controller.dispose(), this._mapName &&
  21364. xC.removeGraphic(this._mapName, this.uid), this._mapName = null, this._controllerHost = {}
  21365. },
  21366. _updateBackground: function(t) {
  21367. var e = t.map;
  21368. this._mapName !== e && d(xC.makeGraphic(e, this.uid), function(t) {
  21369. this._backgroundGroup.add(t)
  21370. }, this), this._mapName = e
  21371. },
  21372. _updateController: function(t, e, i) {
  21373. function n() {
  21374. var e = {
  21375. type: "geoRoam",
  21376. componentType: l
  21377. };
  21378. return e[l + "Id"] = t.id, e
  21379. }
  21380. var o = t.coordinateSystem,
  21381. r = this._controller,
  21382. s = this._controllerHost;
  21383. s.zoomLimit = t.get("scaleLimit"), s.zoom = o.getZoom(), r.enable(t.get("roam") || !1);
  21384. var l = t.mainType;
  21385. r.off("pan").on("pan", function(t) {
  21386. this._mouseDownFlag = !1, pc(s, t.dx, t.dy), i.dispatchAction(a(n(), {
  21387. dx: t.dx,
  21388. dy: t.dy
  21389. }))
  21390. }, this), r.off("zoom").on("zoom", function(t) {
  21391. if (this._mouseDownFlag = !1, gc(s, t.scale, t.originX, t.originY), i.dispatchAction(a(n(), {
  21392. zoom: t.scale,
  21393. originX: t.originX,
  21394. originY: t.originY
  21395. })), this._updateGroup) {
  21396. var e = this.group.scale;
  21397. this._regionsGroup.traverse(function(t) {
  21398. "text" === t.type && t.attr("scale", [1 / e[0], 1 / e[1]])
  21399. })
  21400. }
  21401. }, this), r.setPointerChecker(function(e, n, a) {
  21402. return o.getViewRectAfterRoam().contain(n, a) && !mc(e, i, t)
  21403. })
  21404. }
  21405. }, Fs({
  21406. type: "map",
  21407. render: function(t, e, i, n) {
  21408. if (!n || "mapToggleSelect" !== n.type || n.from !== this.uid) {
  21409. var o = this.group;
  21410. if (o.removeAll(), !t.getHostGeoModel()) {
  21411. if (n && "geoRoam" === n.type && "series" === n.componentType && n.seriesId === t.id)(a = this._mapDraw) && o.add(
  21412. a.group);
  21413. else if (t.needsDrawMap) {
  21414. var a = this._mapDraw || new _c(i, !0);
  21415. o.add(a.group), a.draw(t, e, i, this, n), this._mapDraw = a
  21416. } else this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  21417. t.get("showLegendSymbol") && e.getComponent("legend") && this._renderSymbols(t, e, i)
  21418. }
  21419. }
  21420. },
  21421. remove: function() {
  21422. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll()
  21423. },
  21424. dispose: function() {
  21425. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null
  21426. },
  21427. _renderSymbols: function(t, e, i) {
  21428. var n = t.originalData,
  21429. o = this.group;
  21430. n.each(n.mapDimension("value"), function(e, i) {
  21431. if (!isNaN(e)) {
  21432. var a = n.getItemLayout(i);
  21433. if (a && a.point) {
  21434. var r = a.point,
  21435. s = a.offset,
  21436. l = new KS({
  21437. style: {
  21438. fill: t.getData().getVisual("color")
  21439. },
  21440. shape: {
  21441. cx: r[0] + 9 * s,
  21442. cy: r[1],
  21443. r: 3
  21444. },
  21445. silent: !0,
  21446. z2: s ? 8 : 10
  21447. });
  21448. if (!s) {
  21449. var u = t.mainSeries.getData(),
  21450. h = n.getName(i),
  21451. c = u.indexOfName(h),
  21452. d = n.getItemModel(i),
  21453. f = d.getModel("label"),
  21454. p = d.getModel("emphasis.label"),
  21455. g = u.getItemGraphicEl(c),
  21456. m = A(t.getFormattedLabel(i, "normal"), h),
  21457. v = A(t.getFormattedLabel(i, "emphasis"), m),
  21458. y = function() {
  21459. var t = fo({}, p, {
  21460. text: p.get("show") ? v : null
  21461. }, {
  21462. isRectText: !0,
  21463. useInsideStyle: !1
  21464. }, !0);
  21465. l.style.extendFrom(t), l.__mapOriginalZ2 = l.z2, l.z2 += 1
  21466. },
  21467. x = function() {
  21468. fo(l.style, f, {
  21469. text: f.get("show") ? m : null,
  21470. textPosition: f.getShallow("position") || "bottom"
  21471. }, {
  21472. isRectText: !0,
  21473. useInsideStyle: !1
  21474. }), null != l.__mapOriginalZ2 && (l.z2 = l.__mapOriginalZ2, l.__mapOriginalZ2 = null)
  21475. };
  21476. g.on("mouseover", y).on("mouseout", x).on("emphasis", y).on("normal", x), x()
  21477. }
  21478. o.add(l)
  21479. }
  21480. }
  21481. })
  21482. }
  21483. }), Ps({
  21484. type: "geoRoam",
  21485. event: "geoRoam",
  21486. update: "updateTransform"
  21487. }, function(t, e) {
  21488. var i = t.componentType || "series";
  21489. e.eachComponent({
  21490. mainType: i,
  21491. query: t
  21492. }, function(e) {
  21493. var n = e.coordinateSystem;
  21494. if ("geo" === n.type) {
  21495. var o = wc(n, t, e.get("scaleLimit"));
  21496. e.setCenter && e.setCenter(o.center), e.setZoom && e.setZoom(o.zoom), "series" === i && d(e.seriesGroup,
  21497. function(t) {
  21498. t.setCenter(o.center), t.setZoom(o.zoom)
  21499. })
  21500. }
  21501. })
  21502. });
  21503. Os(function(t) {
  21504. var e = {};
  21505. t.eachSeriesByType("map", function(i) {
  21506. var n = i.getMapType();
  21507. if (!i.getHostGeoModel() && !e[n]) {
  21508. var o = {};
  21509. d(i.seriesGroup, function(e) {
  21510. var i = e.coordinateSystem,
  21511. n = e.originalData;
  21512. e.get("showLegendSymbol") && t.getComponent("legend") && n.each(n.mapDimension("value"), function(t, e) {
  21513. var a = n.getName(e),
  21514. r = i.getRegion(a);
  21515. if (r && !isNaN(t)) {
  21516. var s = o[a] || 0,
  21517. l = i.dataToPoint(r.center);
  21518. o[a] = s + 1, n.setItemLayout(e, {
  21519. point: l,
  21520. offset: s
  21521. })
  21522. }
  21523. })
  21524. });
  21525. var a = i.getData();
  21526. a.each(function(t) {
  21527. var e = a.getName(t),
  21528. i = a.getItemLayout(t) || {};
  21529. i.showLabel = !o[e], a.setItemLayout(t, i)
  21530. }), e[n] = !0
  21531. }
  21532. })
  21533. }), Es(function(t) {
  21534. t.eachSeriesByType("map", function(t) {
  21535. var e = t.get("color"),
  21536. i = t.getModel("itemStyle"),
  21537. n = i.get("areaColor"),
  21538. o = i.get("color") || e[t.seriesIndex % e.length];
  21539. t.getData().setVisual({
  21540. areaColor: n,
  21541. color: o
  21542. })
  21543. })
  21544. }), ks(IT.PROCESSOR.STATISTIC, function(t) {
  21545. var e = {};
  21546. t.eachSeriesByType("map", function(t) {
  21547. var i = t.getHostGeoModel(),
  21548. n = i ? "o" + i.id : "i" + t.getMapType();
  21549. (e[n] = e[n] || []).push(t)
  21550. }), d(e, function(t, e) {
  21551. for (var i = bc(f(t, function(t) {
  21552. return t.getData()
  21553. }), t[0].get("mapValueCalculation")), n = 0; n < t.length; n++) t[n].originalData = t[n].getData();
  21554. for (n = 0; n < t.length; n++) t[n].seriesGroup = t, t[n].needsDrawMap = 0 === n && !t[n].getHostGeoModel(), t[
  21555. n].setData(i.cloneShallow()), t[n].mainSeries = t[0]
  21556. })
  21557. }), Ls(function(t) {
  21558. var e = [];
  21559. d(t.series, function(t) {
  21560. t && "map" === t.type && (e.push(t), t.map = t.map || t.mapType, r(t, t.mapLocation))
  21561. })
  21562. }), XD("map", [{
  21563. type: "mapToggleSelect",
  21564. event: "mapselectchanged",
  21565. method: "toggleSelected"
  21566. }, {
  21567. type: "mapSelect",
  21568. event: "mapselected",
  21569. method: "select"
  21570. }, {
  21571. type: "mapUnSelect",
  21572. event: "mapunselected",
  21573. method: "unSelect"
  21574. }]);
  21575. var MC = d,
  21576. IC = "\0__link_datas",
  21577. TC = "\0__link_mainData",
  21578. AC = function(t, e) {
  21579. this.name = t || "", this.depth = 0, this.height = 0, this.parentNode = null, this.dataIndex = -1, this.children = [],
  21580. this.viewChildren = [], this.hostTree = e
  21581. };
  21582. AC.prototype = {
  21583. constructor: AC,
  21584. isRemoved: function() {
  21585. return this.dataIndex < 0
  21586. },
  21587. eachNode: function(t, e, i) {
  21588. "function" == typeof t && (i = e, e = t, t = null), _(t = t || {}) && (t = {
  21589. order: t
  21590. });
  21591. var n, o = t.order || "preorder",
  21592. a = this[t.attr || "children"];
  21593. "preorder" === o && (n = e.call(i, this));
  21594. for (var r = 0; !n && r < a.length; r++) a[r].eachNode(t, e, i);
  21595. "postorder" === o && e.call(i, this)
  21596. },
  21597. updateDepthAndHeight: function(t) {
  21598. var e = 0;
  21599. this.depth = t;
  21600. for (var i = 0; i < this.children.length; i++) {
  21601. var n = this.children[i];
  21602. n.updateDepthAndHeight(t + 1), n.height > e && (e = n.height)
  21603. }
  21604. this.height = e + 1
  21605. },
  21606. getNodeById: function(t) {
  21607. if (this.getId() === t) return this;
  21608. for (var e = 0, i = this.children, n = i.length; e < n; e++) {
  21609. var o = i[e].getNodeById(t);
  21610. if (o) return o
  21611. }
  21612. },
  21613. contains: function(t) {
  21614. if (t === this) return !0;
  21615. for (var e = 0, i = this.children, n = i.length; e < n; e++) {
  21616. var o = i[e].contains(t);
  21617. if (o) return o
  21618. }
  21619. },
  21620. getAncestors: function(t) {
  21621. for (var e = [], i = t ? this : this.parentNode; i;) e.push(i), i = i.parentNode;
  21622. return e.reverse(), e
  21623. },
  21624. getValue: function(t) {
  21625. var e = this.hostTree.data;
  21626. return e.get(e.getDimension(t || "value"), this.dataIndex)
  21627. },
  21628. setLayout: function(t, e) {
  21629. this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, t, e)
  21630. },
  21631. getLayout: function() {
  21632. return this.hostTree.data.getItemLayout(this.dataIndex)
  21633. },
  21634. getModel: function(t) {
  21635. if (!(this.dataIndex < 0)) {
  21636. var e, i = this.hostTree,
  21637. n = i.data.getItemModel(this.dataIndex),
  21638. o = this.getLevelModel();
  21639. return o || 0 !== this.children.length && (0 === this.children.length || !1 !== this.isExpand) || (e = this.getLeavesModel()),
  21640. n.getModel(t, (o || e || i.hostModel).getModel(t))
  21641. }
  21642. },
  21643. getLevelModel: function() {
  21644. return (this.hostTree.levelModels || [])[this.depth]
  21645. },
  21646. getLeavesModel: function() {
  21647. return this.hostTree.leavesModel
  21648. },
  21649. setVisual: function(t, e) {
  21650. this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, t, e)
  21651. },
  21652. getVisual: function(t, e) {
  21653. return this.hostTree.data.getItemVisual(this.dataIndex, t, e)
  21654. },
  21655. getRawIndex: function() {
  21656. return this.hostTree.data.getRawIndex(this.dataIndex)
  21657. },
  21658. getId: function() {
  21659. return this.hostTree.data.getId(this.dataIndex)
  21660. },
  21661. isAncestorOf: function(t) {
  21662. for (var e = t.parentNode; e;) {
  21663. if (e === this) return !0;
  21664. e = e.parentNode
  21665. }
  21666. return !1
  21667. },
  21668. isDescendantOf: function(t) {
  21669. return t !== this && t.isAncestorOf(this)
  21670. }
  21671. }, kc.prototype = {
  21672. constructor: kc,
  21673. type: "tree",
  21674. eachNode: function(t, e, i) {
  21675. this.root.eachNode(t, e, i)
  21676. },
  21677. getNodeByDataIndex: function(t) {
  21678. var e = this.data.getRawIndex(t);
  21679. return this._nodes[e]
  21680. },
  21681. getNodeByName: function(t) {
  21682. return this.root.getNodeByName(t)
  21683. },
  21684. update: function() {
  21685. for (var t = this.data, e = this._nodes, i = 0, n = e.length; i < n; i++) e[i].dataIndex = -1;
  21686. for (var i = 0, n = t.count(); i < n; i++) e[t.getRawIndex(i)].dataIndex = i
  21687. },
  21688. clearLayouts: function() {
  21689. this.data.clearItemLayouts()
  21690. }
  21691. }, kc.createTree = function(t, e, i) {
  21692. function n(t, e) {
  21693. var i = t.value;
  21694. r = Math.max(r, y(i) ? i.length : 1), a.push(t);
  21695. var s = new AC(t.name, o);
  21696. e ? Pc(s, e) : o.root = s, o._nodes.push(s);
  21697. var l = t.children;
  21698. if (l)
  21699. for (var u = 0; u < l.length; u++) n(l[u], s)
  21700. }
  21701. var o = new kc(e, i.levels, i.leaves),
  21702. a = [],
  21703. r = 1;
  21704. n(t), o.root.updateDepthAndHeight(0);
  21705. var s = oA(a, {
  21706. coordDimensions: ["value"],
  21707. dimensionsCount: r
  21708. }),
  21709. l = new eA(s, e);
  21710. return l.initData(a), Sc({
  21711. mainData: l,
  21712. struct: o,
  21713. structAttr: "tree"
  21714. }), o.update(), o
  21715. }, OI.extend({
  21716. type: "series.tree",
  21717. layoutInfo: null,
  21718. layoutMode: "box",
  21719. getInitialData: function(t) {
  21720. var e = {
  21721. name: t.name,
  21722. children: t.data
  21723. },
  21724. i = t.leaves || {},
  21725. n = {};
  21726. n.leaves = i;
  21727. var o = kc.createTree(e, this, n),
  21728. a = 0;
  21729. o.eachNode("preorder", function(t) {
  21730. t.depth > a && (a = t.depth)
  21731. });
  21732. var r = t.expandAndCollapse && t.initialTreeDepth >= 0 ? t.initialTreeDepth : a;
  21733. return o.root.eachNode("preorder", function(t) {
  21734. var e = t.hostTree.data.getRawDataItem(t.dataIndex);
  21735. t.isExpand = e && null != e.collapsed ? !e.collapsed : t.depth <= r
  21736. }), o.data
  21737. },
  21738. getOrient: function() {
  21739. var t = this.get("orient");
  21740. return "horizontal" === t ? t = "LR" : "vertical" === t && (t = "TB"), t
  21741. },
  21742. setZoom: function(t) {
  21743. this.option.zoom = t
  21744. },
  21745. setCenter: function(t) {
  21746. this.option.center = t
  21747. },
  21748. formatTooltip: function(t) {
  21749. for (var e = this.getData().tree, i = e.root.children[0], n = e.getNodeByDataIndex(t), o = n.getValue(), a = n.name; n &&
  21750. n !== i;) a = n.parentNode.name + "." + a, n = n.parentNode;
  21751. return Qo(a + (isNaN(o) || null == o ? "" : " : " + o))
  21752. },
  21753. defaultOption: {
  21754. zlevel: 0,
  21755. z: 2,
  21756. coordinateSystem: "view",
  21757. left: "12%",
  21758. top: "12%",
  21759. right: "12%",
  21760. bottom: "12%",
  21761. layout: "orthogonal",
  21762. roam: !1,
  21763. nodeScaleRatio: .4,
  21764. center: null,
  21765. zoom: 1,
  21766. orient: "LR",
  21767. symbol: "emptyCircle",
  21768. symbolSize: 7,
  21769. expandAndCollapse: !0,
  21770. initialTreeDepth: 2,
  21771. lineStyle: {
  21772. color: "#ccc",
  21773. width: 1.5,
  21774. curveness: .5
  21775. },
  21776. itemStyle: {
  21777. color: "lightsteelblue",
  21778. borderColor: "#c23531",
  21779. borderWidth: 1.5
  21780. },
  21781. label: {
  21782. show: !0,
  21783. color: "#555"
  21784. },
  21785. leaves: {
  21786. label: {
  21787. show: !0
  21788. }
  21789. },
  21790. animationEasing: "linear",
  21791. animationDuration: 700,
  21792. animationDurationUpdate: 1e3
  21793. }
  21794. }), Fs({
  21795. type: "tree",
  21796. init: function(t, e) {
  21797. this._oldTree, this._mainGroup = new Zw, this._controller = new ac(e.getZr()), this._controllerHost = {
  21798. target: this.group
  21799. }, this.group.add(this._mainGroup)
  21800. },
  21801. render: function(t, e, i, n) {
  21802. var o = t.getData(),
  21803. a = t.layoutInfo,
  21804. r = this._mainGroup,
  21805. s = t.get("layout");
  21806. "radial" === s ? r.attr("position", [a.x + a.width / 2, a.y + a.height / 2]) : r.attr("position", [a.x, a.y]),
  21807. this._updateViewCoordSys(t), this._updateController(t, e, i);
  21808. var l = this._data,
  21809. u = {
  21810. expandAndCollapse: t.get("expandAndCollapse"),
  21811. layout: s,
  21812. orient: t.getOrient(),
  21813. curvature: t.get("lineStyle.curveness"),
  21814. symbolRotate: t.get("symbolRotate"),
  21815. symbolOffset: t.get("symbolOffset"),
  21816. hoverAnimation: t.get("hoverAnimation"),
  21817. useNameLabel: !0,
  21818. fadeIn: !0
  21819. };
  21820. o.diff(l).add(function(e) {
  21821. Xc(o, e) && Yc(o, e, null, r, t, u)
  21822. }).update(function(e, i) {
  21823. var n = l.getItemGraphicEl(i);
  21824. Xc(o, e) ? Yc(o, e, n, r, t, u) : n && qc(l, i, n, r, t, u)
  21825. }).remove(function(e) {
  21826. var i = l.getItemGraphicEl(e);
  21827. i && qc(l, e, i, r, t, u)
  21828. }).execute(), this._nodeScaleRatio = t.get("nodeScaleRatio"), this._updateNodeAndLinkScale(t), !0 === u.expandAndCollapse &&
  21829. o.eachItemGraphicEl(function(e, n) {
  21830. e.off("click").on("click", function() {
  21831. i.dispatchAction({
  21832. type: "treeExpandAndCollapse",
  21833. seriesId: t.id,
  21834. dataIndex: n
  21835. })
  21836. })
  21837. }), this._data = o
  21838. },
  21839. _updateViewCoordSys: function(t) {
  21840. var e = t.getData(),
  21841. i = [];
  21842. e.each(function(t) {
  21843. var n = e.getItemLayout(t);
  21844. !n || isNaN(n.x) || isNaN(n.y) || i.push([+n.x, +n.y])
  21845. });
  21846. var n = [],
  21847. o = [];
  21848. dn(i, n, o), o[0] - n[0] == 0 && (o[0] += 1, n[0] -= 1), o[1] - n[1] == 0 && (o[1] += 1, n[1] -= 1);
  21849. var a = t.coordinateSystem = new Uh;
  21850. a.zoomLimit = t.get("scaleLimit"), a.setBoundingRect(n[0], n[1], o[0] - n[0], o[1] - n[1]), a.setCenter(t.get(
  21851. "center")), a.setZoom(t.get("zoom")), this.group.attr({
  21852. position: a.position,
  21853. scale: a.scale
  21854. }), this._viewCoordSys = a
  21855. },
  21856. _updateController: function(t, e, i) {
  21857. var n = this._controller,
  21858. o = this._controllerHost,
  21859. a = this.group;
  21860. n.setPointerChecker(function(e, n, o) {
  21861. var r = a.getBoundingRect();
  21862. return r.applyTransform(a.transform), r.contain(n, o) && !mc(e, i, t)
  21863. }), n.enable(t.get("roam")), o.zoomLimit = t.get("scaleLimit"), o.zoom = t.coordinateSystem.getZoom(), n.off(
  21864. "pan").off("zoom").on("pan", function(e) {
  21865. pc(o, e.dx, e.dy), i.dispatchAction({
  21866. seriesId: t.id,
  21867. type: "treeRoam",
  21868. dx: e.dx,
  21869. dy: e.dy
  21870. })
  21871. }, this).on("zoom", function(e) {
  21872. gc(o, e.scale, e.originX, e.originY), i.dispatchAction({
  21873. seriesId: t.id,
  21874. type: "treeRoam",
  21875. zoom: e.scale,
  21876. originX: e.originX,
  21877. originY: e.originY
  21878. }), this._updateNodeAndLinkScale(t)
  21879. }, this)
  21880. },
  21881. _updateNodeAndLinkScale: function(t) {
  21882. var e = t.getData(),
  21883. i = this._getNodeGlobalScale(t),
  21884. n = [i, i];
  21885. e.eachItemGraphicEl(function(t, e) {
  21886. t.attr("scale", n)
  21887. })
  21888. },
  21889. _getNodeGlobalScale: function(t) {
  21890. var e = t.coordinateSystem;
  21891. if ("view" !== e.type) return 1;
  21892. var i = this._nodeScaleRatio,
  21893. n = e.scale,
  21894. o = n && n[0] || 1;
  21895. return ((e.getZoom() - 1) * i + 1) / o
  21896. },
  21897. dispose: function() {
  21898. this._controller && this._controller.dispose(), this._controllerHost = {}
  21899. },
  21900. remove: function() {
  21901. this._mainGroup.removeAll(), this._data = null
  21902. }
  21903. }), Ps({
  21904. type: "treeExpandAndCollapse",
  21905. event: "treeExpandAndCollapse",
  21906. update: "update"
  21907. }, function(t, e) {
  21908. e.eachComponent({
  21909. mainType: "series",
  21910. subType: "tree",
  21911. query: t
  21912. }, function(e) {
  21913. var i = t.dataIndex,
  21914. n = e.getData().tree.getNodeByDataIndex(i);
  21915. n.isExpand = !n.isExpand
  21916. })
  21917. }), Ps({
  21918. type: "treeRoam",
  21919. event: "treeRoam",
  21920. update: "none"
  21921. }, function(t, e) {
  21922. e.eachComponent({
  21923. mainType: "series",
  21924. subType: "tree",
  21925. query: t
  21926. }, function(e) {
  21927. var i = wc(e.coordinateSystem, t);
  21928. e.setCenter && e.setCenter(i.center), e.setZoom && e.setZoom(i.zoom)
  21929. })
  21930. });
  21931. Es(hD("tree", "circle")), Os(function(t, e) {
  21932. t.eachSeriesByType("tree", function(t) {
  21933. Qc(t, e)
  21934. })
  21935. }), OI.extend({
  21936. type: "series.treemap",
  21937. layoutMode: "box",
  21938. dependencies: ["grid", "polar"],
  21939. _viewRoot: null,
  21940. defaultOption: {
  21941. progressive: 0,
  21942. hoverLayerThreshold: 1 / 0,
  21943. left: "center",
  21944. top: "middle",
  21945. right: null,
  21946. bottom: null,
  21947. width: "80%",
  21948. height: "80%",
  21949. sort: !0,
  21950. clipWindow: "origin",
  21951. squareRatio: .5 * (1 + Math.sqrt(5)),
  21952. leafDepth: null,
  21953. drillDownIcon: "▶",
  21954. zoomToNodeRatio: .1024,
  21955. roam: !0,
  21956. nodeClick: "zoomToNode",
  21957. animation: !0,
  21958. animationDurationUpdate: 900,
  21959. animationEasing: "quinticInOut",
  21960. breadcrumb: {
  21961. show: !0,
  21962. height: 22,
  21963. left: "center",
  21964. top: "bottom",
  21965. emptyItemWidth: 25,
  21966. itemStyle: {
  21967. color: "rgba(0,0,0,0.7)",
  21968. borderColor: "rgba(255,255,255,0.7)",
  21969. borderWidth: 1,
  21970. shadowColor: "rgba(150,150,150,1)",
  21971. shadowBlur: 3,
  21972. shadowOffsetX: 0,
  21973. shadowOffsetY: 0,
  21974. textStyle: {
  21975. color: "#fff"
  21976. }
  21977. },
  21978. emphasis: {
  21979. textStyle: {}
  21980. }
  21981. },
  21982. label: {
  21983. show: !0,
  21984. distance: 0,
  21985. padding: 5,
  21986. position: "inside",
  21987. color: "#fff",
  21988. ellipsis: !0
  21989. },
  21990. upperLabel: {
  21991. show: !1,
  21992. position: [0, "50%"],
  21993. height: 20,
  21994. color: "#fff",
  21995. ellipsis: !0,
  21996. verticalAlign: "middle"
  21997. },
  21998. itemStyle: {
  21999. color: null,
  22000. colorAlpha: null,
  22001. colorSaturation: null,
  22002. borderWidth: 0,
  22003. gapWidth: 0,
  22004. borderColor: "#fff",
  22005. borderColorSaturation: null
  22006. },
  22007. emphasis: {
  22008. upperLabel: {
  22009. show: !0,
  22010. position: [0, "50%"],
  22011. color: "#fff",
  22012. ellipsis: !0,
  22013. verticalAlign: "middle"
  22014. }
  22015. },
  22016. visualDimension: 0,
  22017. visualMin: null,
  22018. visualMax: null,
  22019. color: [],
  22020. colorAlpha: null,
  22021. colorSaturation: null,
  22022. colorMappingBy: "index",
  22023. visibleMin: 10,
  22024. childrenVisibleMin: null,
  22025. levels: []
  22026. },
  22027. getInitialData: function(t, e) {
  22028. var i = {
  22029. name: t.name,
  22030. children: t.data
  22031. };
  22032. od(i);
  22033. var n = t.levels || [];
  22034. n = t.levels = ad(n, e);
  22035. var o = {};
  22036. return o.levels = n, kc.createTree(i, this, o).data
  22037. },
  22038. optionUpdated: function() {
  22039. this.resetViewRoot()
  22040. },
  22041. formatTooltip: function(t) {
  22042. var e = this.getData(),
  22043. i = this.getRawValue(t),
  22044. n = $o(y(i) ? i[0] : i);
  22045. return Qo(e.getName(t) + ": " + n)
  22046. },
  22047. getDataParams: function(t) {
  22048. var e = OI.prototype.getDataParams.apply(this, arguments),
  22049. i = this.getData().tree.getNodeByDataIndex(t);
  22050. return e.treePathInfo = nd(i, this), e
  22051. },
  22052. setLayoutInfo: function(t) {
  22053. this.layoutInfo = this.layoutInfo || {}, a(this.layoutInfo, t)
  22054. },
  22055. mapIdToIndex: function(t) {
  22056. var e = this._idIndexMap;
  22057. e || (e = this._idIndexMap = R(), this._idIndexMapCount = 0);
  22058. var i = e.get(t);
  22059. return null == i && e.set(t, i = this._idIndexMapCount++), i
  22060. },
  22061. getViewRoot: function() {
  22062. return this._viewRoot
  22063. },
  22064. resetViewRoot: function(t) {
  22065. t ? this._viewRoot = t : t = this._viewRoot;
  22066. var e = this.getRawData().tree.root;
  22067. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  22068. }
  22069. });
  22070. var DC = 5;
  22071. rd.prototype = {
  22072. constructor: rd,
  22073. render: function(t, e, i, n) {
  22074. var o = t.getModel("breadcrumb"),
  22075. a = this.group;
  22076. if (a.removeAll(), o.get("show") && i) {
  22077. var r = o.getModel("itemStyle"),
  22078. s = r.getModel("textStyle"),
  22079. l = {
  22080. pos: {
  22081. left: o.get("left"),
  22082. right: o.get("right"),
  22083. top: o.get("top"),
  22084. bottom: o.get("bottom")
  22085. },
  22086. box: {
  22087. width: e.getWidth(),
  22088. height: e.getHeight()
  22089. },
  22090. emptyItemWidth: o.get("emptyItemWidth"),
  22091. totalWidth: 0,
  22092. renderList: []
  22093. };
  22094. this._prepare(i, l, s), this._renderContent(t, l, r, s, n), ua(a, l.pos, l.box)
  22095. }
  22096. },
  22097. _prepare: function(t, e, i) {
  22098. for (var n = t; n; n = n.parentNode) {
  22099. var o = n.getModel().get("name"),
  22100. a = i.getTextRect(o),
  22101. r = Math.max(a.width + 16, e.emptyItemWidth);
  22102. e.totalWidth += r + 8, e.renderList.push({
  22103. node: n,
  22104. text: o,
  22105. width: r
  22106. })
  22107. }
  22108. },
  22109. _renderContent: function(t, e, i, n, o) {
  22110. for (var a = 0, s = e.emptyItemWidth, l = t.get("breadcrumb.height"), u = sa(e.pos, e.box), h = e.totalWidth, c =
  22111. e.renderList, d = c.length - 1; d >= 0; d--) {
  22112. var f = c[d],
  22113. p = f.node,
  22114. g = f.width,
  22115. m = f.text;
  22116. h > u.width && (h -= g - s, g = s, m = null);
  22117. var y = new nM({
  22118. shape: {
  22119. points: sd(a, 0, g, l, d === c.length - 1, 0 === d)
  22120. },
  22121. style: r(i.getItemStyle(), {
  22122. lineJoin: "bevel",
  22123. text: m,
  22124. textFill: n.getTextColor(),
  22125. textFont: n.getFont()
  22126. }),
  22127. z: 10,
  22128. onclick: v(o, p)
  22129. });
  22130. this.group.add(y), ld(y, t, p), a += g + 8
  22131. }
  22132. },
  22133. remove: function() {
  22134. this.group.removeAll()
  22135. }
  22136. };
  22137. var CC = m,
  22138. LC = Zw,
  22139. kC = aM,
  22140. PC = d,
  22141. NC = ["label"],
  22142. OC = ["emphasis", "label"],
  22143. EC = ["upperLabel"],
  22144. RC = ["emphasis", "upperLabel"],
  22145. zC = 10,
  22146. BC = 1,
  22147. VC = 2,
  22148. GC = Wb([
  22149. ["fill", "color"],
  22150. ["stroke", "strokeColor"],
  22151. ["lineWidth", "strokeWidth"],
  22152. ["shadowBlur"],
  22153. ["shadowOffsetX"],
  22154. ["shadowOffsetY"],
  22155. ["shadowColor"]
  22156. ]),
  22157. FC = function(t) {
  22158. var e = GC(t);
  22159. return e.stroke = e.fill = e.lineWidth = null, e
  22160. };
  22161. Fs({
  22162. type: "treemap",
  22163. init: function(t, e) {
  22164. this._containerGroup, this._storage = {
  22165. nodeGroup: [],
  22166. background: [],
  22167. content: []
  22168. }, this._oldTree, this._breadcrumb, this._controller, this._state = "ready"
  22169. },
  22170. render: function(t, e, i, n) {
  22171. if (!(l(e.findComponents({
  22172. mainType: "series",
  22173. subType: "treemap",
  22174. query: n
  22175. }), t) < 0)) {
  22176. this.seriesModel = t, this.api = i, this.ecModel = e;
  22177. var o = td(n, ["treemapZoomToNode", "treemapRootToNode"], t),
  22178. a = n && n.type,
  22179. r = t.layoutInfo,
  22180. s = !this._oldTree,
  22181. u = this._storage,
  22182. h = "treemapRootToNode" === a && o && u ? {
  22183. rootNodeGroup: u.nodeGroup[o.node.getRawIndex()],
  22184. direction: n.direction
  22185. } : null,
  22186. c = this._giveContainerGroup(r),
  22187. d = this._doRender(c, t, h);
  22188. s || a && "treemapZoomToNode" !== a && "treemapRootToNode" !== a ? d.renderFinally() : this._doAnimation(c, d,
  22189. t, h), this._resetController(i), this._renderBreadcrumb(t, i, o)
  22190. }
  22191. },
  22192. _giveContainerGroup: function(t) {
  22193. var e = this._containerGroup;
  22194. return e || (e = this._containerGroup = new LC, this._initEvents(e), this.group.add(e)), e.attr("position", [t.x,
  22195. t.y
  22196. ]), e
  22197. },
  22198. _doRender: function(t, e, i) {
  22199. function n(t, e, i, o, a) {
  22200. function r(t) {
  22201. return t.getId()
  22202. }
  22203. function s(r, s) {
  22204. var l = null != r ? t[r] : null,
  22205. u = null != s ? e[s] : null,
  22206. c = h(l, u, i, a);
  22207. c && n(l && l.viewChildren || [], u && u.viewChildren || [], c, o, a + 1)
  22208. }
  22209. o ? (e = t, PC(t, function(t, e) {
  22210. !t.isRemoved() && s(e, e)
  22211. })) : new Hs(e, t, r, r).add(s).update(s).remove(v(s, null)).execute()
  22212. }
  22213. var o = e.getData().tree,
  22214. a = this._oldTree,
  22215. r = {
  22216. nodeGroup: [],
  22217. background: [],
  22218. content: []
  22219. },
  22220. s = {
  22221. nodeGroup: [],
  22222. background: [],
  22223. content: []
  22224. },
  22225. l = this._storage,
  22226. u = [],
  22227. h = v(hd, e, s, l, i, r, u);
  22228. n(o.root ? [o.root] : [], a && a.root ? [a.root] : [], t, o === a || !a, 0);
  22229. var c = function(t) {
  22230. var e = {
  22231. nodeGroup: [],
  22232. background: [],
  22233. content: []
  22234. };
  22235. return t && PC(t, function(t, i) {
  22236. var n = e[i];
  22237. PC(t, function(t) {
  22238. t && (n.push(t), t.__tmWillDelete = 1)
  22239. })
  22240. }), e
  22241. }(l);
  22242. return this._oldTree = o, this._storage = s, {
  22243. lastsForAnimation: r,
  22244. willDeleteEls: c,
  22245. renderFinally: function() {
  22246. PC(c, function(t) {
  22247. PC(t, function(t) {
  22248. t.parent && t.parent.remove(t)
  22249. })
  22250. }), PC(u, function(t) {
  22251. t.invisible = !0, t.dirty()
  22252. })
  22253. }
  22254. }
  22255. },
  22256. _doAnimation: function(t, e, i, n) {
  22257. if (i.get("animation")) {
  22258. var o = i.get("animationDurationUpdate"),
  22259. r = i.get("animationEasing"),
  22260. s = ud();
  22261. PC(e.willDeleteEls, function(t, e) {
  22262. PC(t, function(t, i) {
  22263. if (!t.invisible) {
  22264. var a, l = t.parent;
  22265. if (n && "drillDown" === n.direction) a = l === n.rootNodeGroup ? {
  22266. shape: {
  22267. x: 0,
  22268. y: 0,
  22269. width: l.__tmNodeWidth,
  22270. height: l.__tmNodeHeight
  22271. },
  22272. style: {
  22273. opacity: 0
  22274. }
  22275. } : {
  22276. style: {
  22277. opacity: 0
  22278. }
  22279. };
  22280. else {
  22281. var u = 0,
  22282. h = 0;
  22283. l.__tmWillDelete || (u = l.__tmNodeWidth / 2, h = l.__tmNodeHeight / 2), a = "nodeGroup" === e ? {
  22284. position: [u, h],
  22285. style: {
  22286. opacity: 0
  22287. }
  22288. } : {
  22289. shape: {
  22290. x: u,
  22291. y: h,
  22292. width: 0,
  22293. height: 0
  22294. },
  22295. style: {
  22296. opacity: 0
  22297. }
  22298. }
  22299. }
  22300. a && s.add(t, a, o, r)
  22301. }
  22302. })
  22303. }), PC(this._storage, function(t, i) {
  22304. PC(t, function(t, n) {
  22305. var l = e.lastsForAnimation[i][n],
  22306. u = {};
  22307. l && ("nodeGroup" === i ? l.old && (u.position = t.position.slice(), t.attr("position", l.old)) : (l.old &&
  22308. (u.shape = a({}, t.shape), t.setShape(l.old)), l.fadein ? (t.setStyle("opacity", 0), u.style = {
  22309. opacity: 1
  22310. }) : 1 !== t.style.opacity && (u.style = {
  22311. opacity: 1
  22312. })), s.add(t, u, o, r))
  22313. })
  22314. }, this), this._state = "animating", s.done(CC(function() {
  22315. this._state = "ready", e.renderFinally()
  22316. }, this)).start()
  22317. }
  22318. },
  22319. _resetController: function(t) {
  22320. var e = this._controller;
  22321. e || ((e = this._controller = new ac(t.getZr())).enable(this.seriesModel.get("roam")), e.on("pan", CC(this._onPan,
  22322. this)), e.on("zoom", CC(this._onZoom, this)));
  22323. var i = new ue(0, 0, t.getWidth(), t.getHeight());
  22324. e.setPointerChecker(function(t, e, n) {
  22325. return i.contain(e, n)
  22326. })
  22327. },
  22328. _clearController: function() {
  22329. var t = this._controller;
  22330. t && (t.dispose(), t = null)
  22331. },
  22332. _onPan: function(t) {
  22333. if ("animating" !== this._state && (Math.abs(t.dx) > 3 || Math.abs(t.dy) > 3)) {
  22334. var e = this.seriesModel.getData().tree.root;
  22335. if (!e) return;
  22336. var i = e.getLayout();
  22337. if (!i) return;
  22338. this.api.dispatchAction({
  22339. type: "treemapMove",
  22340. from: this.uid,
  22341. seriesId: this.seriesModel.id,
  22342. rootRect: {
  22343. x: i.x + t.dx,
  22344. y: i.y + t.dy,
  22345. width: i.width,
  22346. height: i.height
  22347. }
  22348. })
  22349. }
  22350. },
  22351. _onZoom: function(t) {
  22352. var e = t.originX,
  22353. i = t.originY;
  22354. if ("animating" !== this._state) {
  22355. var n = this.seriesModel.getData().tree.root;
  22356. if (!n) return;
  22357. var o = n.getLayout();
  22358. if (!o) return;
  22359. var a = new ue(o.x, o.y, o.width, o.height),
  22360. r = this.seriesModel.layoutInfo;
  22361. e -= r.x, i -= r.y;
  22362. var s = mt();
  22363. _t(s, s, [-e, -i]), bt(s, s, [t.scale, t.scale]), _t(s, s, [e, i]), a.applyTransform(s), this.api.dispatchAction({
  22364. type: "treemapRender",
  22365. from: this.uid,
  22366. seriesId: this.seriesModel.id,
  22367. rootRect: {
  22368. x: a.x,
  22369. y: a.y,
  22370. width: a.width,
  22371. height: a.height
  22372. }
  22373. })
  22374. }
  22375. },
  22376. _initEvents: function(t) {
  22377. t.on("click", function(t) {
  22378. if ("ready" === this._state) {
  22379. var e = this.seriesModel.get("nodeClick", !0);
  22380. if (e) {
  22381. var i = this.findTarget(t.offsetX, t.offsetY);
  22382. if (i) {
  22383. var n = i.node;
  22384. if (n.getLayout().isLeafRoot) this._rootToNode(i);
  22385. else if ("zoomToNode" === e) this._zoomToNode(i);
  22386. else if ("link" === e) {
  22387. var o = n.hostTree.data.getItemModel(n.dataIndex),
  22388. a = o.get("link", !0),
  22389. r = o.get("target", !0) || "blank";
  22390. a && window.open(a, r)
  22391. }
  22392. }
  22393. }
  22394. }
  22395. }, this)
  22396. },
  22397. _renderBreadcrumb: function(t, e, i) {
  22398. i || (i = null != t.get("leafDepth", !0) ? {
  22399. node: t.getViewRoot()
  22400. } : this.findTarget(e.getWidth() / 2, e.getHeight() / 2)) || (i = {
  22401. node: t.getData().tree.root
  22402. }), (this._breadcrumb || (this._breadcrumb = new rd(this.group))).render(t, e, i.node, CC(function(e) {
  22403. "animating" !== this._state && (id(t.getViewRoot(), e) ? this._rootToNode({
  22404. node: e
  22405. }) : this._zoomToNode({
  22406. node: e
  22407. }))
  22408. }, this))
  22409. },
  22410. remove: function() {
  22411. this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = {
  22412. nodeGroup: [],
  22413. background: [],
  22414. content: []
  22415. }, this._state = "ready", this._breadcrumb && this._breadcrumb.remove()
  22416. },
  22417. dispose: function() {
  22418. this._clearController()
  22419. },
  22420. _zoomToNode: function(t) {
  22421. this.api.dispatchAction({
  22422. type: "treemapZoomToNode",
  22423. from: this.uid,
  22424. seriesId: this.seriesModel.id,
  22425. targetNode: t.node
  22426. })
  22427. },
  22428. _rootToNode: function(t) {
  22429. this.api.dispatchAction({
  22430. type: "treemapRootToNode",
  22431. from: this.uid,
  22432. seriesId: this.seriesModel.id,
  22433. targetNode: t.node
  22434. })
  22435. },
  22436. findTarget: function(t, e) {
  22437. var i;
  22438. return this.seriesModel.getViewRoot().eachNode({
  22439. attr: "viewChildren",
  22440. order: "preorder"
  22441. }, function(n) {
  22442. var o = this._storage.background[n.getRawIndex()];
  22443. if (o) {
  22444. var a = o.transformCoordToLocal(t, e),
  22445. r = o.shape;
  22446. if (!(r.x <= a[0] && a[0] <= r.x + r.width && r.y <= a[1] && a[1] <= r.y + r.height)) return !1;
  22447. i = {
  22448. node: n,
  22449. offsetX: a[0],
  22450. offsetY: a[1]
  22451. }
  22452. }
  22453. }, this), i
  22454. }
  22455. });
  22456. for (var WC = ["treemapZoomToNode", "treemapRender", "treemapMove"], HC = 0; HC < WC.length; HC++) Ps({
  22457. type: WC[HC],
  22458. update: "updateView"
  22459. }, function() {});
  22460. Ps({
  22461. type: "treemapRootToNode",
  22462. update: "updateView"
  22463. }, function(t, e) {
  22464. e.eachComponent({
  22465. mainType: "series",
  22466. subType: "treemap",
  22467. query: t
  22468. }, function(e, i) {
  22469. var n = td(t, ["treemapZoomToNode", "treemapRootToNode"], e);
  22470. if (n) {
  22471. var o = e.getViewRoot();
  22472. o && (t.direction = id(o, n.node) ? "rollUp" : "drillDown"), e.resetViewRoot(n.node)
  22473. }
  22474. })
  22475. });
  22476. var ZC = d,
  22477. UC = w,
  22478. XC = -1,
  22479. jC = function(t) {
  22480. var e = t.mappingMethod,
  22481. n = t.type,
  22482. o = this.option = i(t);
  22483. this.type = n, this.mappingMethod = e, this._normalizeData = qC[e];
  22484. var a = YC[n];
  22485. this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._doMap = a._doMap[e], "piecewise" ===
  22486. e ? (pd(o), dd(o)) : "category" === e ? o.categories ? fd(o) : pd(o, !0) : (k("linear" !== e || o.dataExtent), pd(
  22487. o))
  22488. };
  22489. jC.prototype = {
  22490. constructor: jC,
  22491. mapValueToVisual: function(t) {
  22492. var e = this._normalizeData(t);
  22493. return this._doMap(e, t)
  22494. },
  22495. getNormalizer: function() {
  22496. return m(this._normalizeData, this)
  22497. }
  22498. };
  22499. var YC = jC.visualHandlers = {
  22500. color: {
  22501. applyVisual: vd("color"),
  22502. getColorMapper: function() {
  22503. var t = this.option;
  22504. return m("category" === t.mappingMethod ? function(t, e) {
  22505. return !e && (t = this._normalizeData(t)), yd.call(this, t)
  22506. } : function(e, i, n) {
  22507. var o = !!n;
  22508. return !i && (e = this._normalizeData(e)), n = Wt(e, t.parsedVisual, n), o ? n : Xt(n, "rgba")
  22509. }, this)
  22510. },
  22511. _doMap: {
  22512. linear: function(t) {
  22513. return Xt(Wt(t, this.option.parsedVisual), "rgba")
  22514. },
  22515. category: yd,
  22516. piecewise: function(t, e) {
  22517. var i = wd.call(this, e);
  22518. return null == i && (i = Xt(Wt(t, this.option.parsedVisual), "rgba")), i
  22519. },
  22520. fixed: xd
  22521. }
  22522. },
  22523. colorHue: gd(function(t, e) {
  22524. return Zt(t, e)
  22525. }),
  22526. colorSaturation: gd(function(t, e) {
  22527. return Zt(t, null, e)
  22528. }),
  22529. colorLightness: gd(function(t, e) {
  22530. return Zt(t, null, null, e)
  22531. }),
  22532. colorAlpha: gd(function(t, e) {
  22533. return Ut(t, e)
  22534. }),
  22535. opacity: {
  22536. applyVisual: vd("opacity"),
  22537. _doMap: _d([0, 1])
  22538. },
  22539. liftZ: {
  22540. applyVisual: vd("liftZ"),
  22541. _doMap: {
  22542. linear: xd,
  22543. category: xd,
  22544. piecewise: xd,
  22545. fixed: xd
  22546. }
  22547. },
  22548. symbol: {
  22549. applyVisual: function(t, e, i) {
  22550. var n = this.mapValueToVisual(t);
  22551. if (_(n)) i("symbol", n);
  22552. else if (UC(n))
  22553. for (var o in n) n.hasOwnProperty(o) && i(o, n[o])
  22554. },
  22555. _doMap: {
  22556. linear: md,
  22557. category: yd,
  22558. piecewise: function(t, e) {
  22559. var i = wd.call(this, e);
  22560. return null == i && (i = md.call(this, t)), i
  22561. },
  22562. fixed: xd
  22563. }
  22564. },
  22565. symbolSize: {
  22566. applyVisual: vd("symbolSize"),
  22567. _doMap: _d([0, 1])
  22568. }
  22569. },
  22570. qC = {
  22571. linear: function(t) {
  22572. return Eo(t, this.option.dataExtent, [0, 1], !0)
  22573. },
  22574. piecewise: function(t) {
  22575. var e = this.option.pieceList,
  22576. i = jC.findPieceIndex(t, e, !0);
  22577. if (null != i) return Eo(i, [0, e.length - 1], [0, 1], !0)
  22578. },
  22579. category: function(t) {
  22580. var e = this.option.categories ? this.option.categoryMap[t] : t;
  22581. return null == e ? XC : e
  22582. },
  22583. fixed: B
  22584. };
  22585. jC.listVisualTypes = function() {
  22586. var t = [];
  22587. return d(YC, function(e, i) {
  22588. t.push(i)
  22589. }), t
  22590. }, jC.addVisualHandler = function(t, e) {
  22591. YC[t] = e
  22592. }, jC.isValidType = function(t) {
  22593. return YC.hasOwnProperty(t)
  22594. }, jC.eachVisual = function(t, e, i) {
  22595. w(t) ? d(t, e, i) : e.call(i, t)
  22596. }, jC.mapVisual = function(t, e, i) {
  22597. var n, o = y(t) ? [] : w(t) ? {} : (n = !0, null);
  22598. return jC.eachVisual(t, function(t, a) {
  22599. var r = e.call(i, t, a);
  22600. n ? o = r : o[a] = r
  22601. }), o
  22602. }, jC.retrieveVisuals = function(t) {
  22603. var e, i = {};
  22604. return t && ZC(YC, function(n, o) {
  22605. t.hasOwnProperty(o) && (i[o] = t[o], e = !0)
  22606. }), e ? i : null
  22607. }, jC.prepareVisualTypes = function(t) {
  22608. if (UC(t)) {
  22609. var e = [];
  22610. ZC(t, function(t, i) {
  22611. e.push(i)
  22612. }), t = e
  22613. } else {
  22614. if (!y(t)) return [];
  22615. t = t.slice()
  22616. }
  22617. return t.sort(function(t, e) {
  22618. return "color" === e && "color" !== t && 0 === t.indexOf("color") ? 1 : -1
  22619. }), t
  22620. }, jC.dependsOn = function(t, e) {
  22621. return "color" === e ? !(!t || 0 !== t.indexOf(e)) : t === e
  22622. }, jC.findPieceIndex = function(t, e, i) {
  22623. function n(e, i) {
  22624. var n = Math.abs(e - t);
  22625. n < a && (a = n, o = i)
  22626. }
  22627. for (var o, a = 1 / 0, r = 0, s = e.length; r < s; r++) {
  22628. var l = e[r].value;
  22629. if (null != l) {
  22630. if (l === t || "string" == typeof l && l === t + "") return r;
  22631. i && n(l, r)
  22632. }
  22633. }
  22634. for (var r = 0, s = e.length; r < s; r++) {
  22635. var u = e[r],
  22636. h = u.interval,
  22637. c = u.close;
  22638. if (h) {
  22639. if (h[0] === -1 / 0) {
  22640. if (Sd(c[1], t, h[1])) return r
  22641. } else if (h[1] === 1 / 0) {
  22642. if (Sd(c[0], h[0], t)) return r
  22643. } else if (Sd(c[0], h[0], t) && Sd(c[1], t, h[1])) return r;
  22644. i && n(h[0], r), i && n(h[1], r)
  22645. }
  22646. }
  22647. if (i) return t === 1 / 0 ? e.length - 1 : t === -1 / 0 ? 0 : o
  22648. };
  22649. var KC = y,
  22650. $C = "itemStyle",
  22651. JC = {
  22652. seriesType: "treemap",
  22653. reset: function(t, e, i, n) {
  22654. var o = t.getData().tree,
  22655. a = o.root,
  22656. r = t.getModel($C);
  22657. a.isRemoved() || Md(a, {}, f(o.levelModels, function(t) {
  22658. return t ? t.get($C) : null
  22659. }), r, t.getViewRoot().getAncestors(), t)
  22660. }
  22661. },
  22662. QC = Math.max,
  22663. tL = Math.min,
  22664. eL = T,
  22665. iL = d,
  22666. nL = ["itemStyle", "borderWidth"],
  22667. oL = ["itemStyle", "gapWidth"],
  22668. aL = ["upperLabel", "show"],
  22669. rL = ["upperLabel", "height"],
  22670. sL = {
  22671. seriesType: "treemap",
  22672. reset: function(t, e, i, n) {
  22673. var o = i.getWidth(),
  22674. r = i.getHeight(),
  22675. s = t.option,
  22676. l = la(t.getBoxLayoutParams(), {
  22677. width: i.getWidth(),
  22678. height: i.getHeight()
  22679. }),
  22680. u = s.size || [],
  22681. h = Ro(eL(l.width, u[0]), o),
  22682. c = Ro(eL(l.height, u[1]), r),
  22683. d = n && n.type,
  22684. f = td(n, ["treemapZoomToNode", "treemapRootToNode"], t),
  22685. p = "treemapRender" === d || "treemapMove" === d ? n.rootRect : null,
  22686. g = t.getViewRoot(),
  22687. m = ed(g);
  22688. if ("treemapMove" !== d) {
  22689. var v = "treemapZoomToNode" === d ? Vd(t, f, g, h, c) : p ? [p.width, p.height] : [h, c],
  22690. y = s.sort;
  22691. y && "asc" !== y && "desc" !== y && (y = "desc");
  22692. var x = {
  22693. squareRatio: s.squareRatio,
  22694. sort: y,
  22695. leafDepth: s.leafDepth
  22696. };
  22697. g.hostTree.clearLayouts();
  22698. _ = {
  22699. x: 0,
  22700. y: 0,
  22701. width: v[0],
  22702. height: v[1],
  22703. area: v[0] * v[1]
  22704. };
  22705. g.setLayout(_), Pd(g, x, !1, 0);
  22706. var _ = g.getLayout();
  22707. iL(m, function(t, e) {
  22708. var i = (m[e + 1] || g).getValue();
  22709. t.setLayout(a({
  22710. dataExtent: [i, i],
  22711. borderWidth: 0,
  22712. upperHeight: 0
  22713. }, _))
  22714. })
  22715. }
  22716. var w = t.getData().tree.root;
  22717. w.setLayout(Gd(l, p, f), !0), t.setLayoutInfo(l), Fd(w, new ue(-l.x, -l.y, o, r), m, g, 0)
  22718. }
  22719. };
  22720. Es(JC), Os(sL);
  22721. var lL = function(t) {
  22722. this._directed = t || !1, this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this.data,
  22723. this.edgeData
  22724. },
  22725. uL = lL.prototype;
  22726. uL.type = "graph", uL.isDirected = function() {
  22727. return this._directed
  22728. }, uL.addNode = function(t, e) {
  22729. t = t || "" + e;
  22730. var i = this._nodesMap;
  22731. if (!i[Hd(t)]) {
  22732. var n = new Zd(t, e);
  22733. return n.hostGraph = this, this.nodes.push(n), i[Hd(t)] = n, n
  22734. }
  22735. }, uL.getNodeByIndex = function(t) {
  22736. var e = this.data.getRawIndex(t);
  22737. return this.nodes[e]
  22738. }, uL.getNodeById = function(t) {
  22739. return this._nodesMap[Hd(t)]
  22740. }, uL.addEdge = function(t, e, i) {
  22741. var n = this._nodesMap,
  22742. o = this._edgesMap;
  22743. if ("number" == typeof t && (t = this.nodes[t]), "number" == typeof e && (e = this.nodes[e]), Zd.isInstance(t) || (
  22744. t = n[Hd(t)]), Zd.isInstance(e) || (e = n[Hd(e)]), t && e) {
  22745. var a = t.id + "-" + e.id;
  22746. if (!o[a]) {
  22747. var r = new Ud(t, e, i);
  22748. return r.hostGraph = this, this._directed && (t.outEdges.push(r), e.inEdges.push(r)), t.edges.push(r), t !== e &&
  22749. e.edges.push(r), this.edges.push(r), o[a] = r, r
  22750. }
  22751. }
  22752. }, uL.getEdgeByIndex = function(t) {
  22753. var e = this.edgeData.getRawIndex(t);
  22754. return this.edges[e]
  22755. }, uL.getEdge = function(t, e) {
  22756. Zd.isInstance(t) && (t = t.id), Zd.isInstance(e) && (e = e.id);
  22757. var i = this._edgesMap;
  22758. return this._directed ? i[t + "-" + e] : i[t + "-" + e] || i[e + "-" + t]
  22759. }, uL.eachNode = function(t, e) {
  22760. for (var i = this.nodes, n = i.length, o = 0; o < n; o++) i[o].dataIndex >= 0 && t.call(e, i[o], o)
  22761. }, uL.eachEdge = function(t, e) {
  22762. for (var i = this.edges, n = i.length, o = 0; o < n; o++) i[o].dataIndex >= 0 && i[o].node1.dataIndex >= 0 && i[o].node2
  22763. .dataIndex >= 0 && t.call(e, i[o], o)
  22764. }, uL.breadthFirstTraverse = function(t, e, i, n) {
  22765. if (Zd.isInstance(e) || (e = this._nodesMap[Hd(e)]), e) {
  22766. for (var o = "out" === i ? "outEdges" : "in" === i ? "inEdges" : "edges", a = 0; a < this.nodes.length; a++) this.nodes[
  22767. a].__visited = !1;
  22768. if (!t.call(n, e, null))
  22769. for (var r = [e]; r.length;)
  22770. for (var s = r.shift(), l = s[o], a = 0; a < l.length; a++) {
  22771. var u = l[a],
  22772. h = u.node1 === s ? u.node2 : u.node1;
  22773. if (!h.__visited) {
  22774. if (t.call(n, h, s)) return;
  22775. r.push(h), h.__visited = !0
  22776. }
  22777. }
  22778. }
  22779. }, uL.update = function() {
  22780. for (var t = this.data, e = this.edgeData, i = this.nodes, n = this.edges, o = 0, a = i.length; o < a; o++) i[o].dataIndex = -
  22781. 1;
  22782. for (var o = 0, a = t.count(); o < a; o++) i[t.getRawIndex(o)].dataIndex = o;
  22783. e.filterSelf(function(t) {
  22784. var i = n[e.getRawIndex(t)];
  22785. return i.node1.dataIndex >= 0 && i.node2.dataIndex >= 0
  22786. });
  22787. for (var o = 0, a = n.length; o < a; o++) n[o].dataIndex = -1;
  22788. for (var o = 0, a = e.count(); o < a; o++) n[e.getRawIndex(o)].dataIndex = o
  22789. }, uL.clone = function() {
  22790. for (var t = new lL(this._directed), e = this.nodes, i = this.edges, n = 0; n < e.length; n++) t.addNode(e[n].id, e[
  22791. n].dataIndex);
  22792. for (n = 0; n < i.length; n++) {
  22793. var o = i[n];
  22794. t.addEdge(o.node1.id, o.node2.id, o.dataIndex)
  22795. }
  22796. return t
  22797. }, Zd.prototype = {
  22798. constructor: Zd,
  22799. degree: function() {
  22800. return this.edges.length
  22801. },
  22802. inDegree: function() {
  22803. return this.inEdges.length
  22804. },
  22805. outDegree: function() {
  22806. return this.outEdges.length
  22807. },
  22808. getModel: function(t) {
  22809. if (!(this.dataIndex < 0)) return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)
  22810. }
  22811. }, Ud.prototype.getModel = function(t) {
  22812. if (!(this.dataIndex < 0)) return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)
  22813. };
  22814. var hL = function(t, e) {
  22815. return {
  22816. getValue: function(i) {
  22817. var n = this[t][e];
  22818. return n.get(n.getDimension(i || "value"), this.dataIndex)
  22819. },
  22820. setVisual: function(i, n) {
  22821. this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, i, n)
  22822. },
  22823. getVisual: function(i, n) {
  22824. return this[t][e].getItemVisual(this.dataIndex, i, n)
  22825. },
  22826. setLayout: function(i, n) {
  22827. this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, i, n)
  22828. },
  22829. getLayout: function() {
  22830. return this[t][e].getItemLayout(this.dataIndex)
  22831. },
  22832. getGraphicEl: function() {
  22833. return this[t][e].getItemGraphicEl(this.dataIndex)
  22834. },
  22835. getRawIndex: function() {
  22836. return this[t][e].getRawIndex(this.dataIndex)
  22837. }
  22838. }
  22839. };
  22840. h(Zd, hL("hostGraph", "data")), h(Ud, hL("hostGraph", "edgeData")), lL.Node = Zd, lL.Edge = Ud, ji(Zd), ji(Ud);
  22841. var cL = function(t, e, i, n, o) {
  22842. for (var a = new lL(n), r = 0; r < t.length; r++) a.addNode(T(t[r].id, t[r].name, r), r);
  22843. for (var s = [], u = [], h = 0, r = 0; r < e.length; r++) {
  22844. var c = e[r],
  22845. d = c.source,
  22846. f = c.target;
  22847. a.addEdge(d, f, h) && (u.push(c), s.push(T(c.id, d + " > " + f)), h++)
  22848. }
  22849. var p, g = i.get("coordinateSystem");
  22850. if ("cartesian2d" === g || "polar" === g) p = dl(t, i);
  22851. else {
  22852. var m = Ba.get(g),
  22853. v = m && "view" !== m.type ? m.dimensions || [] : [];
  22854. l(v, "value") < 0 && v.concat(["value"]);
  22855. var y = oA(t, {
  22856. coordDimensions: v
  22857. });
  22858. (p = new eA(y, i)).initData(t)
  22859. }
  22860. var x = new eA(["value"], i);
  22861. return x.initData(u, s), o && o(p, x), Sc({
  22862. mainData: p,
  22863. struct: a,
  22864. structAttr: "graph",
  22865. datas: {
  22866. node: p,
  22867. edge: x
  22868. },
  22869. datasAttr: {
  22870. node: "data",
  22871. edge: "edgeData"
  22872. }
  22873. }), a.update(), a
  22874. },
  22875. dL = Gs({
  22876. type: "series.graph",
  22877. init: function(t) {
  22878. dL.superApply(this, "init", arguments), this.legendDataProvider = function() {
  22879. return this._categoriesData
  22880. }, this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData()
  22881. },
  22882. mergeOption: function(t) {
  22883. dL.superApply(this, "mergeOption", arguments), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData()
  22884. },
  22885. mergeDefaultAndTheme: function(t) {
  22886. dL.superApply(this, "mergeDefaultAndTheme", arguments), Ci(t, ["edgeLabel"], ["show"])
  22887. },
  22888. getInitialData: function(t, e) {
  22889. var i = t.edges || t.links || [],
  22890. n = t.data || t.nodes || [],
  22891. o = this;
  22892. if (n && i) return cL(n, i, this, !0, function(t, i) {
  22893. function n(t) {
  22894. return (t = this.parsePath(t)) && "label" === t[0] ? r : t && "emphasis" === t[0] && "label" === t[1] ? l :
  22895. this.parentModel
  22896. }
  22897. t.wrapMethod("getItemModel", function(t) {
  22898. var e = o._categoriesModels[t.getShallow("category")];
  22899. return e && (e.parentModel = t.parentModel, t.parentModel = e), t
  22900. });
  22901. var a = o.getModel("edgeLabel"),
  22902. r = new Lo({
  22903. label: a.option
  22904. }, a.parentModel, e),
  22905. s = o.getModel("emphasis.edgeLabel"),
  22906. l = new Lo({
  22907. emphasis: {
  22908. label: s.option
  22909. }
  22910. }, s.parentModel, e);
  22911. i.wrapMethod("getItemModel", function(t) {
  22912. return t.customizeGetParent(n), t
  22913. })
  22914. }).data
  22915. },
  22916. getGraph: function() {
  22917. return this.getData().graph
  22918. },
  22919. getEdgeData: function() {
  22920. return this.getGraph().edgeData
  22921. },
  22922. getCategoriesData: function() {
  22923. return this._categoriesData
  22924. },
  22925. formatTooltip: function(t, e, i) {
  22926. if ("edge" === i) {
  22927. var n = this.getData(),
  22928. o = this.getDataParams(t, i),
  22929. a = n.graph.getEdgeByIndex(t),
  22930. r = n.getName(a.node1.dataIndex),
  22931. s = n.getName(a.node2.dataIndex),
  22932. l = [];
  22933. return null != r && l.push(r), null != s && l.push(s), l = Qo(l.join(" > ")), o.value && (l += " : " + Qo(o.value)),
  22934. l
  22935. }
  22936. return dL.superApply(this, "formatTooltip", arguments)
  22937. },
  22938. _updateCategoriesData: function() {
  22939. var t = f(this.option.categories || [], function(t) {
  22940. return null != t.value ? t : a({
  22941. value: 0
  22942. }, t)
  22943. }),
  22944. e = new eA(["value"], this);
  22945. e.initData(t), this._categoriesData = e, this._categoriesModels = e.mapArray(function(t) {
  22946. return e.getItemModel(t, !0)
  22947. })
  22948. },
  22949. setZoom: function(t) {
  22950. this.option.zoom = t
  22951. },
  22952. setCenter: function(t) {
  22953. this.option.center = t
  22954. },
  22955. isAnimationEnabled: function() {
  22956. return dL.superCall(this, "isAnimationEnabled") && !("force" === this.get("layout") && this.get(
  22957. "force.layoutAnimation"))
  22958. },
  22959. defaultOption: {
  22960. zlevel: 0,
  22961. z: 2,
  22962. coordinateSystem: "view",
  22963. legendHoverLink: !0,
  22964. hoverAnimation: !0,
  22965. layout: null,
  22966. focusNodeAdjacency: !1,
  22967. circular: {
  22968. rotateLabel: !1
  22969. },
  22970. force: {
  22971. initLayout: null,
  22972. repulsion: [0, 50],
  22973. gravity: .1,
  22974. edgeLength: 30,
  22975. layoutAnimation: !0
  22976. },
  22977. left: "center",
  22978. top: "center",
  22979. symbol: "circle",
  22980. symbolSize: 10,
  22981. edgeSymbol: ["none", "none"],
  22982. edgeSymbolSize: 10,
  22983. edgeLabel: {
  22984. position: "middle"
  22985. },
  22986. draggable: !1,
  22987. roam: !1,
  22988. center: null,
  22989. zoom: 1,
  22990. nodeScaleRatio: .6,
  22991. label: {
  22992. show: !1,
  22993. formatter: "{b}"
  22994. },
  22995. itemStyle: {},
  22996. lineStyle: {
  22997. color: "#aaa",
  22998. width: 1,
  22999. curveness: 0,
  23000. opacity: .5
  23001. },
  23002. emphasis: {
  23003. label: {
  23004. show: !0
  23005. }
  23006. }
  23007. }
  23008. }),
  23009. fL = rM.prototype,
  23010. pL = lM.prototype,
  23011. gL = Fn({
  23012. type: "ec-line",
  23013. style: {
  23014. stroke: "#000",
  23015. fill: null
  23016. },
  23017. shape: {
  23018. x1: 0,
  23019. y1: 0,
  23020. x2: 0,
  23021. y2: 0,
  23022. percent: 1,
  23023. cpx1: null,
  23024. cpy1: null
  23025. },
  23026. buildPath: function(t, e) {
  23027. (Xd(e) ? fL : pL).buildPath(t, e)
  23028. },
  23029. pointAt: function(t) {
  23030. return Xd(this.shape) ? fL.pointAt.call(this, t) : pL.pointAt.call(this, t)
  23031. },
  23032. tangentAt: function(t) {
  23033. var e = this.shape,
  23034. i = Xd(e) ? [e.x2 - e.x1, e.y2 - e.y1] : pL.tangentAt.call(this, t);
  23035. return q(i, i)
  23036. }
  23037. }),
  23038. mL = ["fromSymbol", "toSymbol"],
  23039. vL = $d.prototype;
  23040. vL.beforeUpdate = function() {
  23041. var t = this,
  23042. e = t.childOfName("fromSymbol"),
  23043. i = t.childOfName("toSymbol"),
  23044. n = t.childOfName("label");
  23045. if (e || i || !n.ignore) {
  23046. for (var o = 1, a = this.parent; a;) a.scale && (o /= a.scale[0]), a = a.parent;
  23047. var r = t.childOfName("line");
  23048. if (this.__dirty || r.__dirty) {
  23049. var s = r.shape.percent,
  23050. l = r.pointAt(0),
  23051. u = r.pointAt(s),
  23052. h = U([], u, l);
  23053. if (q(h, h), e && (e.attr("position", l), c = r.tangentAt(0), e.attr("rotation", Math.PI / 2 - Math.atan2(c[1], c[
  23054. 0])), e.attr("scale", [o * s, o * s])), i) {
  23055. i.attr("position", u);
  23056. var c = r.tangentAt(1);
  23057. i.attr("rotation", -Math.PI / 2 - Math.atan2(c[1], c[0])), i.attr("scale", [o * s, o * s])
  23058. }
  23059. if (!n.ignore) {
  23060. n.attr("position", u);
  23061. var d, f, p, g = 5 * o;
  23062. if ("end" === n.__position) d = [h[0] * g + u[0], h[1] * g + u[1]], f = h[0] > .8 ? "left" : h[0] < -.8 ?
  23063. "right" : "center", p = h[1] > .8 ? "top" : h[1] < -.8 ? "bottom" : "middle";
  23064. else if ("middle" === n.__position) {
  23065. var m = s / 2,
  23066. v = [(c = r.tangentAt(m))[1], -c[0]],
  23067. y = r.pointAt(m);
  23068. v[1] > 0 && (v[0] = -v[0], v[1] = -v[1]), d = [y[0] + v[0] * g, y[1] + v[1] * g], f = "center", p = "bottom";
  23069. var x = -Math.atan2(c[1], c[0]);
  23070. u[0] < l[0] && (x = Math.PI + x), n.attr("rotation", x)
  23071. } else d = [-h[0] * g + l[0], -h[1] * g + l[1]], f = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center", p = h[
  23072. 1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle";
  23073. n.attr({
  23074. style: {
  23075. textVerticalAlign: n.__verticalAlign || p,
  23076. textAlign: n.__textAlign || f
  23077. },
  23078. position: d,
  23079. scale: [o, o]
  23080. })
  23081. }
  23082. }
  23083. }
  23084. }, vL._createLine = function(t, e, i) {
  23085. var n = t.hostModel,
  23086. o = qd(t.getItemLayout(e));
  23087. o.shape.percent = 0, So(o, {
  23088. shape: {
  23089. percent: 1
  23090. }
  23091. }, n, e), this.add(o);
  23092. var a = new qS({
  23093. name: "label"
  23094. });
  23095. this.add(a), d(mL, function(i) {
  23096. var n = Yd(i, t, e);
  23097. this.add(n), this[jd(i)] = t.getItemVisual(e, i)
  23098. }, this), this._updateCommonStl(t, e, i)
  23099. }, vL.updateData = function(t, e, i) {
  23100. var n = t.hostModel,
  23101. o = this.childOfName("line"),
  23102. a = t.getItemLayout(e),
  23103. r = {
  23104. shape: {}
  23105. };
  23106. Kd(r.shape, a), bo(o, r, n, e), d(mL, function(i) {
  23107. var n = t.getItemVisual(e, i),
  23108. o = jd(i);
  23109. if (this[o] !== n) {
  23110. this.remove(this.childOfName(i));
  23111. var a = Yd(i, t, e);
  23112. this.add(a)
  23113. }
  23114. this[o] = n
  23115. }, this), this._updateCommonStl(t, e, i)
  23116. }, vL._updateCommonStl = function(t, e, i) {
  23117. var n = t.hostModel,
  23118. o = this.childOfName("line"),
  23119. a = i && i.lineStyle,
  23120. s = i && i.hoverLineStyle,
  23121. l = i && i.labelModel,
  23122. u = i && i.hoverLabelModel;
  23123. if (!i || t.hasItemOption) {
  23124. var h = t.getItemModel(e);
  23125. a = h.getModel("lineStyle").getLineStyle(), s = h.getModel("emphasis.lineStyle").getLineStyle(), l = h.getModel(
  23126. "label"), u = h.getModel("emphasis.label")
  23127. }
  23128. var c = t.getItemVisual(e, "color"),
  23129. f = D(t.getItemVisual(e, "opacity"), a.opacity, 1);
  23130. o.useStyle(r({
  23131. strokeNoScale: !0,
  23132. fill: "none",
  23133. stroke: c,
  23134. opacity: f
  23135. }, a)), o.hoverStyle = s, d(mL, function(t) {
  23136. var e = this.childOfName(t);
  23137. e && (e.setColor(c), e.setStyle({
  23138. opacity: f
  23139. }))
  23140. }, this);
  23141. var p, g, m = l.getShallow("show"),
  23142. v = u.getShallow("show"),
  23143. y = this.childOfName("label");
  23144. if ((m || v) && (p = c || "#000", null == (g = n.getFormattedLabel(e, "normal", t.dataType)))) {
  23145. var x = n.getRawValue(e);
  23146. g = null == x ? t.getName(e) : isFinite(x) ? zo(x) : x
  23147. }
  23148. var _ = m ? g : null,
  23149. w = v ? A(n.getFormattedLabel(e, "emphasis", t.dataType), g) : null,
  23150. b = y.style;
  23151. null == _ && null == w || (fo(y.style, l, {
  23152. text: _
  23153. }, {
  23154. autoColor: p
  23155. }), y.__textAlign = b.textAlign, y.__verticalAlign = b.textVerticalAlign, y.__position = l.get("position") ||
  23156. "middle"), y.hoverStyle = null != w ? {
  23157. text: w,
  23158. textFill: u.getTextColor(!0),
  23159. fontStyle: u.getShallow("fontStyle"),
  23160. fontWeight: u.getShallow("fontWeight"),
  23161. fontSize: u.getShallow("fontSize"),
  23162. fontFamily: u.getShallow("fontFamily")
  23163. } : {
  23164. text: null
  23165. }, y.ignore = !m && !v, uo(this)
  23166. }, vL.highlight = function() {
  23167. this.trigger("emphasis")
  23168. }, vL.downplay = function() {
  23169. this.trigger("normal")
  23170. }, vL.updateLayout = function(t, e) {
  23171. this.setLinePoints(t.getItemLayout(e))
  23172. }, vL.setLinePoints = function(t) {
  23173. var e = this.childOfName("line");
  23174. Kd(e.shape, t), e.dirty()
  23175. }, u($d, Zw);
  23176. var yL = Jd.prototype;
  23177. yL.isPersistent = function() {
  23178. return !0
  23179. }, yL.updateData = function(t) {
  23180. var e = this,
  23181. i = e.group,
  23182. n = e._lineData;
  23183. e._lineData = t, n || i.removeAll();
  23184. var o = ef(t);
  23185. t.diff(n).add(function(i) {
  23186. Qd(e, t, i, o)
  23187. }).update(function(i, a) {
  23188. tf(e, n, t, a, i, o)
  23189. }).remove(function(t) {
  23190. i.remove(n.getItemGraphicEl(t))
  23191. }).execute()
  23192. }, yL.updateLayout = function() {
  23193. var t = this._lineData;
  23194. t && t.eachItemGraphicEl(function(e, i) {
  23195. e.updateLayout(t, i)
  23196. }, this)
  23197. }, yL.incrementalPrepareUpdate = function(t) {
  23198. this._seriesScope = ef(t), this._lineData = null, this.group.removeAll()
  23199. }, yL.incrementalUpdate = function(t, e) {
  23200. for (var i = t.start; i < t.end; i++)
  23201. if ( of (e.getItemLayout(i))) {
  23202. var n = new this._ctor(e, i, this._seriesScope);
  23203. n.traverse(function(t) {
  23204. t.isGroup || (t.incremental = t.useHoverLayer = !0)
  23205. }), this.group.add(n), e.setItemGraphicEl(i, n)
  23206. }
  23207. }, yL.remove = function() {
  23208. this._clearIncremental(), this._incremental = null, this.group.removeAll()
  23209. }, yL._clearIncremental = function() {
  23210. var t = this._incremental;
  23211. t && t.clearDisplaybles()
  23212. };
  23213. var xL = [],
  23214. _L = [],
  23215. wL = [],
  23216. bL = rn,
  23217. SL = iw,
  23218. ML = Math.abs,
  23219. IL = function(t, e) {
  23220. function i(t) {
  23221. var e = t.getVisual("symbolSize");
  23222. return e instanceof Array && (e = (e[0] + e[1]) / 2), e
  23223. }
  23224. var n = [],
  23225. o = hn,
  23226. a = [
  23227. [],
  23228. [],
  23229. []
  23230. ],
  23231. r = [
  23232. [],
  23233. []
  23234. ],
  23235. s = [];
  23236. e /= 2, t.eachEdge(function(t, l) {
  23237. var u = t.getLayout(),
  23238. h = t.getVisual("fromSymbol"),
  23239. c = t.getVisual("toSymbol");
  23240. u.__original || (u.__original = [F(u[0]), F(u[1])], u[2] && u.__original.push(F(u[2])));
  23241. var d = u.__original;
  23242. if (null != u[2]) {
  23243. if (G(a[0], d[0]), G(a[1], d[2]), G(a[2], d[1]), h && "none" !== h) {
  23244. var f = i(t.node1),
  23245. p = af(a, d[0], f * e);
  23246. o(a[0][0], a[1][0], a[2][0], p, n), a[0][0] = n[3], a[1][0] = n[4], o(a[0][1], a[1][1], a[2][1], p, n), a[0][1] =
  23247. n[3], a[1][1] = n[4]
  23248. }
  23249. if (c && "none" !== c) {
  23250. var f = i(t.node2),
  23251. p = af(a, d[1], f * e);
  23252. o(a[0][0], a[1][0], a[2][0], p, n), a[1][0] = n[1], a[2][0] = n[2], o(a[0][1], a[1][1], a[2][1], p, n), a[1][1] =
  23253. n[1], a[2][1] = n[2]
  23254. }
  23255. G(u[0], a[0]), G(u[1], a[2]), G(u[2], a[1])
  23256. } else {
  23257. if (G(r[0], d[0]), G(r[1], d[1]), U(s, r[1], r[0]), q(s, s), h && "none" !== h) {
  23258. f = i(t.node1);
  23259. Z(r[0], r[0], s, f * e)
  23260. }
  23261. if (c && "none" !== c) {
  23262. f = i(t.node2);
  23263. Z(r[1], r[1], s, -f * e)
  23264. }
  23265. G(u[0], r[0]), G(u[1], r[1])
  23266. }
  23267. })
  23268. },
  23269. TL = ["itemStyle", "opacity"],
  23270. AL = ["lineStyle", "opacity"];
  23271. Fs({
  23272. type: "graph",
  23273. init: function(t, e) {
  23274. var i = new Su,
  23275. n = new Jd,
  23276. o = this.group;
  23277. this._controller = new ac(e.getZr()), this._controllerHost = {
  23278. target: o
  23279. }, o.add(i.group), o.add(n.group), this._symbolDraw = i, this._lineDraw = n, this._firstRender = !0
  23280. },
  23281. render: function(t, e, i) {
  23282. var n = t.coordinateSystem;
  23283. this._model = t, this._nodeScaleRatio = t.get("nodeScaleRatio");
  23284. var o = this._symbolDraw,
  23285. a = this._lineDraw,
  23286. r = this.group;
  23287. if ("view" === n.type) {
  23288. var s = {
  23289. position: n.position,
  23290. scale: n.scale
  23291. };
  23292. this._firstRender ? r.attr(s) : bo(r, s, t)
  23293. }
  23294. IL(t.getGraph(), this._getNodeGlobalScale(t));
  23295. var l = t.getData();
  23296. o.updateData(l);
  23297. var u = t.getEdgeData();
  23298. a.updateData(u), this._updateNodeAndLinkScale(), this._updateController(t, e, i), clearTimeout(this._layoutTimeout);
  23299. var h = t.forceLayout,
  23300. c = t.get("force.layoutAnimation");
  23301. h && this._startForceLayoutIteration(h, c), l.eachItemGraphicEl(function(e, n) {
  23302. var o = l.getItemModel(n);
  23303. e.off("drag").off("dragend");
  23304. var a = o.get("draggable");
  23305. a && e.on("drag", function() {
  23306. h && (h.warmUp(), !this._layouting && this._startForceLayoutIteration(h, c), h.setFixed(n), l.setItemLayout(
  23307. n, e.position))
  23308. }, this).on("dragend", function() {
  23309. h && h.setUnfixed(n)
  23310. }, this), e.setDraggable(a && h), e.off("mouseover", e.__focusNodeAdjacency), e.off("mouseout", e.__unfocusNodeAdjacency),
  23311. o.get("focusNodeAdjacency") && (e.on("mouseover", e.__focusNodeAdjacency = function() {
  23312. i.dispatchAction({
  23313. type: "focusNodeAdjacency",
  23314. seriesId: t.id,
  23315. dataIndex: e.dataIndex
  23316. })
  23317. }), e.on("mouseout", e.__unfocusNodeAdjacency = function() {
  23318. i.dispatchAction({
  23319. type: "unfocusNodeAdjacency",
  23320. seriesId: t.id
  23321. })
  23322. }))
  23323. }, this), l.graph.eachEdge(function(e) {
  23324. var n = e.getGraphicEl();
  23325. n.off("mouseover", n.__focusNodeAdjacency), n.off("mouseout", n.__unfocusNodeAdjacency), e.getModel().get(
  23326. "focusNodeAdjacency") && (n.on("mouseover", n.__focusNodeAdjacency = function() {
  23327. i.dispatchAction({
  23328. type: "focusNodeAdjacency",
  23329. seriesId: t.id,
  23330. edgeDataIndex: e.dataIndex
  23331. })
  23332. }), n.on("mouseout", n.__unfocusNodeAdjacency = function() {
  23333. i.dispatchAction({
  23334. type: "unfocusNodeAdjacency",
  23335. seriesId: t.id
  23336. })
  23337. }))
  23338. });
  23339. var d = "circular" === t.get("layout") && t.get("circular.rotateLabel"),
  23340. f = l.getLayout("cx"),
  23341. p = l.getLayout("cy");
  23342. l.eachItemGraphicEl(function(t, e) {
  23343. var i = t.getSymbolPath();
  23344. if (d) {
  23345. var n = l.getItemLayout(e),
  23346. o = Math.atan2(n[1] - p, n[0] - f);
  23347. o < 0 && (o = 2 * Math.PI + o);
  23348. var a = n[0] < f;
  23349. a && (o -= Math.PI);
  23350. var r = a ? "left" : "right";
  23351. i.setStyle({
  23352. textRotation: -o,
  23353. textPosition: r,
  23354. textOrigin: "center"
  23355. }), i.hoverStyle && (i.hoverStyle.textPosition = r)
  23356. } else i.setStyle({
  23357. textRotation: 0
  23358. })
  23359. }), this._firstRender = !1
  23360. },
  23361. dispose: function() {
  23362. this._controller && this._controller.dispose(), this._controllerHost = {}
  23363. },
  23364. focusNodeAdjacency: function(t, e, i, n) {
  23365. var o = this._model.getData().graph,
  23366. a = n.dataIndex,
  23367. r = n.edgeDataIndex,
  23368. s = o.getNodeByIndex(a),
  23369. l = o.getEdgeByIndex(r);
  23370. (s || l) && (o.eachNode(function(t) {
  23371. sf(t, TL, .1)
  23372. }), o.eachEdge(function(t) {
  23373. sf(t, AL, .1)
  23374. }), s && (lf(s, TL), d(s.edges, function(t) {
  23375. t.dataIndex < 0 || (lf(t, AL), lf(t.node1, TL), lf(t.node2, TL))
  23376. })), l && (lf(l, AL), lf(l.node1, TL), lf(l.node2, TL)))
  23377. },
  23378. unfocusNodeAdjacency: function(t, e, i, n) {
  23379. var o = this._model.getData().graph;
  23380. o.eachNode(function(t) {
  23381. sf(t, TL)
  23382. }), o.eachEdge(function(t) {
  23383. sf(t, AL)
  23384. })
  23385. },
  23386. _startForceLayoutIteration: function(t, e) {
  23387. var i = this;
  23388. ! function n() {
  23389. t.step(function(t) {
  23390. i.updateLayout(i._model), (i._layouting = !t) && (e ? i._layoutTimeout = setTimeout(n, 16) : n())
  23391. })
  23392. }()
  23393. },
  23394. _updateController: function(t, e, i) {
  23395. var n = this._controller,
  23396. o = this._controllerHost,
  23397. a = this.group;
  23398. n.setPointerChecker(function(e, n, o) {
  23399. var r = a.getBoundingRect();
  23400. return r.applyTransform(a.transform), r.contain(n, o) && !mc(e, i, t)
  23401. }), "view" === t.coordinateSystem.type ? (n.enable(t.get("roam")), o.zoomLimit = t.get("scaleLimit"), o.zoom =
  23402. t.coordinateSystem.getZoom(), n.off("pan").off("zoom").on("pan", function(e) {
  23403. pc(o, e.dx, e.dy), i.dispatchAction({
  23404. seriesId: t.id,
  23405. type: "graphRoam",
  23406. dx: e.dx,
  23407. dy: e.dy
  23408. })
  23409. }).on("zoom", function(e) {
  23410. gc(o, e.scale, e.originX, e.originY), i.dispatchAction({
  23411. seriesId: t.id,
  23412. type: "graphRoam",
  23413. zoom: e.scale,
  23414. originX: e.originX,
  23415. originY: e.originY
  23416. }), this._updateNodeAndLinkScale(), IL(t.getGraph(), this._getNodeGlobalScale(t)), this._lineDraw.updateLayout()
  23417. }, this)) : n.disable()
  23418. },
  23419. _updateNodeAndLinkScale: function() {
  23420. var t = this._model,
  23421. e = t.getData(),
  23422. i = this._getNodeGlobalScale(t),
  23423. n = [i, i];
  23424. e.eachItemGraphicEl(function(t, e) {
  23425. t.attr("scale", n)
  23426. })
  23427. },
  23428. _getNodeGlobalScale: function(t) {
  23429. var e = t.coordinateSystem;
  23430. if ("view" !== e.type) return 1;
  23431. var i = this._nodeScaleRatio,
  23432. n = e.scale,
  23433. o = n && n[0] || 1;
  23434. return ((e.getZoom() - 1) * i + 1) / o
  23435. },
  23436. updateLayout: function(t) {
  23437. IL(t.getGraph(), this._getNodeGlobalScale(t)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout()
  23438. },
  23439. remove: function(t, e) {
  23440. this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove()
  23441. }
  23442. }), Ps({
  23443. type: "focusNodeAdjacency",
  23444. event: "focusNodeAdjacency",
  23445. update: "series:focusNodeAdjacency"
  23446. }, function() {}), Ps({
  23447. type: "unfocusNodeAdjacency",
  23448. event: "unfocusNodeAdjacency",
  23449. update: "series:unfocusNodeAdjacency"
  23450. }, function() {}), Ps({
  23451. type: "graphRoam",
  23452. event: "graphRoam",
  23453. update: "none"
  23454. }, function(t, e) {
  23455. e.eachComponent({
  23456. mainType: "series",
  23457. query: t
  23458. }, function(e) {
  23459. var i = wc(e.coordinateSystem, t);
  23460. e.setCenter && e.setCenter(i.center), e.setZoom && e.setZoom(i.zoom)
  23461. })
  23462. });
  23463. var DL = Z;
  23464. ks(function(t) {
  23465. var e = t.findComponents({
  23466. mainType: "legend"
  23467. });
  23468. e && e.length && t.eachSeriesByType("graph", function(t) {
  23469. var i = t.getCategoriesData(),
  23470. n = t.getGraph().data,
  23471. o = i.mapArray(i.getName);
  23472. n.filterSelf(function(t) {
  23473. var i = n.getItemModel(t).getShallow("category");
  23474. if (null != i) {
  23475. "number" == typeof i && (i = o[i]);
  23476. for (var a = 0; a < e.length; a++)
  23477. if (!e[a].isSelected(i)) return !1
  23478. }
  23479. return !0
  23480. })
  23481. }, this)
  23482. }), Es(hD("graph", "circle", null)), Es(function(t) {
  23483. var e = {};
  23484. t.eachSeriesByType("graph", function(t) {
  23485. var i = t.getCategoriesData(),
  23486. n = t.getData(),
  23487. o = {};
  23488. i.each(function(n) {
  23489. var a = i.getName(n);
  23490. o["ec-" + a] = n;
  23491. var r = i.getItemModel(n).get("itemStyle.color") || t.getColorFromPalette(a, e);
  23492. i.setItemVisual(n, "color", r)
  23493. }), i.count() && n.each(function(t) {
  23494. var e = n.getItemModel(t).getShallow("category");
  23495. null != e && ("string" == typeof e && (e = o["ec-" + e]), n.getItemVisual(t, "color", !0) || n.setItemVisual(
  23496. t, "color", i.getItemVisual(e, "color")))
  23497. })
  23498. })
  23499. }), Es(function(t) {
  23500. t.eachSeriesByType("graph", function(t) {
  23501. var e = t.getGraph(),
  23502. i = t.getEdgeData(),
  23503. n = uf(t.get("edgeSymbol")),
  23504. o = uf(t.get("edgeSymbolSize")),
  23505. a = "lineStyle.color".split("."),
  23506. r = "lineStyle.opacity".split(".");
  23507. i.setVisual("fromSymbol", n && n[0]), i.setVisual("toSymbol", n && n[1]), i.setVisual("fromSymbolSize", o && o[
  23508. 0]), i.setVisual("toSymbolSize", o && o[1]), i.setVisual("color", t.get(a)), i.setVisual("opacity", t.get(r)),
  23509. i.each(function(t) {
  23510. var n = i.getItemModel(t),
  23511. o = e.getEdgeByIndex(t),
  23512. s = uf(n.getShallow("symbol", !0)),
  23513. l = uf(n.getShallow("symbolSize", !0)),
  23514. u = n.get(a),
  23515. h = n.get(r);
  23516. switch (u) {
  23517. case "source":
  23518. u = o.node1.getVisual("color");
  23519. break;
  23520. case "target":
  23521. u = o.node2.getVisual("color")
  23522. }
  23523. s[0] && o.setVisual("fromSymbol", s[0]), s[1] && o.setVisual("toSymbol", s[1]), l[0] && o.setVisual(
  23524. "fromSymbolSize", l[0]), l[1] && o.setVisual("toSymbolSize", l[1]), o.setVisual("color", u), o.setVisual(
  23525. "opacity", h)
  23526. })
  23527. })
  23528. }), Os(function(t, e) {
  23529. t.eachSeriesByType("graph", function(t) {
  23530. var e = t.get("layout"),
  23531. i = t.coordinateSystem;
  23532. if (i && "view" !== i.type) {
  23533. var n = t.getData(),
  23534. o = [];
  23535. d(i.dimensions, function(t) {
  23536. o = o.concat(n.mapDimension(t, !0))
  23537. });
  23538. for (var a = 0; a < n.count(); a++) {
  23539. for (var r = [], s = !1, l = 0; l < o.length; l++) {
  23540. var u = n.get(o[l], a);
  23541. isNaN(u) || (s = !0), r.push(u)
  23542. }
  23543. s ? n.setItemLayout(a, i.dataToPoint(r)) : n.setItemLayout(a, [NaN, NaN])
  23544. }
  23545. cf(n.graph)
  23546. } else e && "none" !== e || hf(t)
  23547. })
  23548. }), Os(function(t) {
  23549. t.eachSeriesByType("graph", function(t) {
  23550. "circular" === t.get("layout") && df(t)
  23551. })
  23552. }), Os(function(t) {
  23553. t.eachSeriesByType("graph", function(t) {
  23554. var e = t.coordinateSystem;
  23555. if (!e || "view" === e.type)
  23556. if ("force" === t.get("layout")) {
  23557. var i = t.preservedPoints || {},
  23558. n = t.getGraph(),
  23559. o = n.data,
  23560. a = n.edgeData,
  23561. r = t.getModel("force"),
  23562. s = r.get("initLayout");
  23563. t.preservedPoints ? o.each(function(t) {
  23564. var e = o.getId(t);
  23565. o.setItemLayout(t, i[e] || [NaN, NaN])
  23566. }) : s && "none" !== s ? "circular" === s && df(t) : hf(t);
  23567. var l = o.getDataExtent("value"),
  23568. u = a.getDataExtent("value"),
  23569. h = r.get("repulsion"),
  23570. c = r.get("edgeLength");
  23571. y(h) || (h = [h, h]), y(c) || (c = [c, c]), c = [c[1], c[0]];
  23572. var d = o.mapArray("value", function(t, e) {
  23573. var i = o.getItemLayout(e),
  23574. n = Eo(t, l, h);
  23575. return isNaN(n) && (n = (h[0] + h[1]) / 2), {
  23576. w: n,
  23577. rep: n,
  23578. fixed: o.getItemModel(e).get("fixed"),
  23579. p: !i || isNaN(i[0]) || isNaN(i[1]) ? null : i
  23580. }
  23581. }),
  23582. f = a.mapArray("value", function(t, e) {
  23583. var i = n.getEdgeByIndex(e),
  23584. o = Eo(t, u, c);
  23585. return isNaN(o) && (o = (c[0] + c[1]) / 2), {
  23586. n1: d[i.node1.dataIndex],
  23587. n2: d[i.node2.dataIndex],
  23588. d: o,
  23589. curveness: i.getModel().get("lineStyle.curveness") || 0
  23590. }
  23591. }),
  23592. p = (e = t.coordinateSystem).getBoundingRect(),
  23593. g = ff(d, f, {
  23594. rect: p,
  23595. gravity: r.get("gravity")
  23596. }),
  23597. m = g.step;
  23598. g.step = function(t) {
  23599. for (var e = 0, a = d.length; e < a; e++) d[e].fixed && G(d[e].p, n.getNodeByIndex(e).getLayout());
  23600. m(function(e, a, r) {
  23601. for (var s = 0, l = e.length; s < l; s++) e[s].fixed || n.getNodeByIndex(s).setLayout(e[s].p), i[o.getId(
  23602. s)] = e[s].p;
  23603. for (var s = 0, l = a.length; s < l; s++) {
  23604. var u = a[s],
  23605. h = n.getEdgeByIndex(s),
  23606. c = u.n1.p,
  23607. d = u.n2.p,
  23608. f = h.getLayout();
  23609. (f = f ? f.slice() : [])[0] = f[0] || [], f[1] = f[1] || [], G(f[0], c), G(f[1], d), +u.curveness && (f[
  23610. 2] = [(c[0] + d[0]) / 2 - (c[1] - d[1]) * u.curveness, (c[1] + d[1]) / 2 - (d[0] - c[0]) * u.curveness]),
  23611. h.setLayout(f)
  23612. }
  23613. t && t(r)
  23614. })
  23615. }, t.forceLayout = g, t.preservedPoints = i, g.step()
  23616. } else t.forceLayout = null
  23617. })
  23618. }), Ns("graphView", {
  23619. create: function(t, e) {
  23620. var i = [];
  23621. return t.eachSeriesByType("graph", function(t) {
  23622. var n = t.get("coordinateSystem");
  23623. if (!n || "view" === n) {
  23624. var o = t.getData(),
  23625. a = [],
  23626. r = [];
  23627. dn(o.mapArray(function(t) {
  23628. var e = o.getItemModel(t);
  23629. return [+e.get("x"), +e.get("y")]
  23630. }), a, r), r[0] - a[0] == 0 && (r[0] += 1, a[0] -= 1), r[1] - a[1] == 0 && (r[1] += 1, a[1] -= 1);
  23631. var s = (r[0] - a[0]) / (r[1] - a[1]),
  23632. l = pf(t, e, s);
  23633. isNaN(s) && (a = [l.x, l.y], r = [l.x + l.width, l.y + l.height]);
  23634. var u = r[0] - a[0],
  23635. h = r[1] - a[1],
  23636. c = l.width,
  23637. d = l.height,
  23638. f = t.coordinateSystem = new Uh;
  23639. f.zoomLimit = t.get("scaleLimit"), f.setBoundingRect(a[0], a[1], u, h), f.setViewRect(l.x, l.y, c, d), f.setCenter(
  23640. t.get("center")), f.setZoom(t.get("zoom")), i.push(f)
  23641. }
  23642. }), i
  23643. }
  23644. });
  23645. OI.extend({
  23646. type: "series.gauge",
  23647. getInitialData: function(t, e) {
  23648. var i = t.data || [];
  23649. return y(i) || (i = [i]), t.data = i, WD(this, ["value"])
  23650. },
  23651. defaultOption: {
  23652. zlevel: 0,
  23653. z: 2,
  23654. center: ["50%", "50%"],
  23655. legendHoverLink: !0,
  23656. radius: "75%",
  23657. startAngle: 225,
  23658. endAngle: -45,
  23659. clockwise: !0,
  23660. min: 0,
  23661. max: 100,
  23662. splitNumber: 10,
  23663. axisLine: {
  23664. show: !0,
  23665. lineStyle: {
  23666. color: [
  23667. [.2, "#91c7ae"],
  23668. [.8, "#63869e"],
  23669. [1, "#c23531"]
  23670. ],
  23671. width: 30
  23672. }
  23673. },
  23674. splitLine: {
  23675. show: !0,
  23676. length: 30,
  23677. lineStyle: {
  23678. color: "#eee",
  23679. width: 2,
  23680. type: "solid"
  23681. }
  23682. },
  23683. axisTick: {
  23684. show: !0,
  23685. splitNumber: 5,
  23686. length: 8,
  23687. lineStyle: {
  23688. color: "#eee",
  23689. width: 1,
  23690. type: "solid"
  23691. }
  23692. },
  23693. axisLabel: {
  23694. show: !0,
  23695. distance: 5,
  23696. color: "auto"
  23697. },
  23698. pointer: {
  23699. show: !0,
  23700. length: "80%",
  23701. width: 8
  23702. },
  23703. itemStyle: {
  23704. color: "auto"
  23705. },
  23706. title: {
  23707. show: !0,
  23708. offsetCenter: [0, "-40%"],
  23709. color: "#333",
  23710. fontSize: 15
  23711. },
  23712. detail: {
  23713. show: !0,
  23714. backgroundColor: "rgba(0,0,0,0)",
  23715. borderWidth: 0,
  23716. borderColor: "#ccc",
  23717. width: 100,
  23718. height: null,
  23719. padding: [5, 10],
  23720. offsetCenter: [0, "40%"],
  23721. color: "auto",
  23722. fontSize: 30
  23723. }
  23724. }
  23725. });
  23726. var CL = kn.extend({
  23727. type: "echartsGaugePointer",
  23728. shape: {
  23729. angle: 0,
  23730. width: 10,
  23731. r: 10,
  23732. x: 0,
  23733. y: 0
  23734. },
  23735. buildPath: function(t, e) {
  23736. var i = Math.cos,
  23737. n = Math.sin,
  23738. o = e.r,
  23739. a = e.width,
  23740. r = e.angle,
  23741. s = e.x - i(r) * a * (a >= o / 3 ? 1 : 2),
  23742. l = e.y - n(r) * a * (a >= o / 3 ? 1 : 2);
  23743. r = e.angle - Math.PI / 2, t.moveTo(s, l), t.lineTo(e.x + i(r) * a, e.y + n(r) * a), t.lineTo(e.x + i(e.angle) *
  23744. o, e.y + n(e.angle) * o), t.lineTo(e.x - i(r) * a, e.y - n(r) * a), t.lineTo(s, l)
  23745. }
  23746. }),
  23747. LL = 2 * Math.PI,
  23748. kL = (Mr.extend({
  23749. type: "gauge",
  23750. render: function(t, e, i) {
  23751. this.group.removeAll();
  23752. var n = t.get("axisLine.lineStyle.color"),
  23753. o = gf(t, i);
  23754. this._renderMain(t, e, i, n, o)
  23755. },
  23756. dispose: function() {},
  23757. _renderMain: function(t, e, i, n, o) {
  23758. for (var a = this.group, r = t.getModel("axisLine").getModel("lineStyle"), s = t.get("clockwise"), l = -t.get(
  23759. "startAngle") / 180 * Math.PI, u = -t.get("endAngle") / 180 * Math.PI, h = (u - l) % LL, c = l, d = r.get(
  23760. "width"), f = 0; f < n.length; f++) {
  23761. var p = Math.min(Math.max(n[f][0], 0), 1),
  23762. g = new QS({
  23763. shape: {
  23764. startAngle: c,
  23765. endAngle: u = l + h * p,
  23766. cx: o.cx,
  23767. cy: o.cy,
  23768. clockwise: s,
  23769. r0: o.r - d,
  23770. r: o.r
  23771. },
  23772. silent: !0
  23773. });
  23774. g.setStyle({
  23775. fill: n[f][1]
  23776. }), g.setStyle(r.getLineStyle(["color", "borderWidth", "borderColor"])), a.add(g), c = u
  23777. }
  23778. var m = function(t) {
  23779. if (t <= 0) return n[0][1];
  23780. for (var e = 0; e < n.length; e++)
  23781. if (n[e][0] >= t && (0 === e ? 0 : n[e - 1][0]) < t) return n[e][1];
  23782. return n[e - 1][1]
  23783. };
  23784. if (!s) {
  23785. var v = l;
  23786. l = u, u = v
  23787. }
  23788. this._renderTicks(t, e, i, m, o, l, u, s), this._renderPointer(t, e, i, m, o, l, u, s), this._renderTitle(t, e,
  23789. i, m, o), this._renderDetail(t, e, i, m, o)
  23790. },
  23791. _renderTicks: function(t, e, i, n, o, a, r, s) {
  23792. for (var l = this.group, u = o.cx, h = o.cy, c = o.r, d = +t.get("min"), f = +t.get("max"), p = t.getModel(
  23793. "splitLine"), g = t.getModel("axisTick"), m = t.getModel("axisLabel"), v = t.get("splitNumber"), y = g.get(
  23794. "splitNumber"), x = Ro(p.get("length"), c), _ = Ro(g.get("length"), c), w = a, b = (r - a) / v, S = b / y, M =
  23795. p.getModel("lineStyle").getLineStyle(), I = g.getModel("lineStyle").getLineStyle(), T = 0; T <= v; T++) {
  23796. var A = Math.cos(w),
  23797. D = Math.sin(w);
  23798. if (p.get("show")) {
  23799. var C = new rM({
  23800. shape: {
  23801. x1: A * c + u,
  23802. y1: D * c + h,
  23803. x2: A * (c - x) + u,
  23804. y2: D * (c - x) + h
  23805. },
  23806. style: M,
  23807. silent: !0
  23808. });
  23809. "auto" === M.stroke && C.setStyle({
  23810. stroke: n(T / v)
  23811. }), l.add(C)
  23812. }
  23813. if (m.get("show")) {
  23814. var L = mf(zo(T / v * (f - d) + d), m.get("formatter")),
  23815. k = m.get("distance"),
  23816. P = n(T / v);
  23817. l.add(new qS({
  23818. style: fo({}, m, {
  23819. text: L,
  23820. x: A * (c - x - k) + u,
  23821. y: D * (c - x - k) + h,
  23822. textVerticalAlign: D < -.4 ? "top" : D > .4 ? "bottom" : "middle",
  23823. textAlign: A < -.4 ? "left" : A > .4 ? "right" : "center"
  23824. }, {
  23825. autoColor: P
  23826. }),
  23827. silent: !0
  23828. }))
  23829. }
  23830. if (g.get("show") && T !== v) {
  23831. for (var N = 0; N <= y; N++) {
  23832. var A = Math.cos(w),
  23833. D = Math.sin(w),
  23834. O = new rM({
  23835. shape: {
  23836. x1: A * c + u,
  23837. y1: D * c + h,
  23838. x2: A * (c - _) + u,
  23839. y2: D * (c - _) + h
  23840. },
  23841. silent: !0,
  23842. style: I
  23843. });
  23844. "auto" === I.stroke && O.setStyle({
  23845. stroke: n((T + N / y) / v)
  23846. }), l.add(O), w += S
  23847. }
  23848. w -= S
  23849. } else w += b
  23850. }
  23851. },
  23852. _renderPointer: function(t, e, i, n, o, a, r, s) {
  23853. var l = this.group,
  23854. u = this._data;
  23855. if (t.get("pointer.show")) {
  23856. var h = [+t.get("min"), +t.get("max")],
  23857. c = [a, r],
  23858. d = t.getData(),
  23859. f = d.mapDimension("value");
  23860. d.diff(u).add(function(e) {
  23861. var i = new CL({
  23862. shape: {
  23863. angle: a
  23864. }
  23865. });
  23866. So(i, {
  23867. shape: {
  23868. angle: Eo(d.get(f, e), h, c, !0)
  23869. }
  23870. }, t), l.add(i), d.setItemGraphicEl(e, i)
  23871. }).update(function(e, i) {
  23872. var n = u.getItemGraphicEl(i);
  23873. bo(n, {
  23874. shape: {
  23875. angle: Eo(d.get(f, e), h, c, !0)
  23876. }
  23877. }, t), l.add(n), d.setItemGraphicEl(e, n)
  23878. }).remove(function(t) {
  23879. var e = u.getItemGraphicEl(t);
  23880. l.remove(e)
  23881. }).execute(), d.eachItemGraphicEl(function(t, e) {
  23882. var i = d.getItemModel(e),
  23883. a = i.getModel("pointer");
  23884. t.setShape({
  23885. x: o.cx,
  23886. y: o.cy,
  23887. width: Ro(a.get("width"), o.r),
  23888. r: Ro(a.get("length"), o.r)
  23889. }), t.useStyle(i.getModel("itemStyle").getItemStyle()), "auto" === t.style.fill && t.setStyle("fill", n(Eo(
  23890. d.get(f, e), h, [0, 1], !0))), uo(t, i.getModel("emphasis.itemStyle").getItemStyle())
  23891. }), this._data = d
  23892. } else u && u.eachItemGraphicEl(function(t) {
  23893. l.remove(t)
  23894. })
  23895. },
  23896. _renderTitle: function(t, e, i, n, o) {
  23897. var a = t.getData(),
  23898. r = a.mapDimension("value"),
  23899. s = t.getModel("title");
  23900. if (s.get("show")) {
  23901. var l = s.get("offsetCenter"),
  23902. u = o.cx + Ro(l[0], o.r),
  23903. h = o.cy + Ro(l[1], o.r),
  23904. c = +t.get("min"),
  23905. d = +t.get("max"),
  23906. f = n(Eo(t.getData().get(r, 0), [c, d], [0, 1], !0));
  23907. this.group.add(new qS({
  23908. silent: !0,
  23909. style: fo({}, s, {
  23910. x: u,
  23911. y: h,
  23912. text: a.getName(0),
  23913. textAlign: "center",
  23914. textVerticalAlign: "middle"
  23915. }, {
  23916. autoColor: f,
  23917. forceRich: !0
  23918. })
  23919. }))
  23920. }
  23921. },
  23922. _renderDetail: function(t, e, i, n, o) {
  23923. var a = t.getModel("detail"),
  23924. r = +t.get("min"),
  23925. s = +t.get("max");
  23926. if (a.get("show")) {
  23927. var l = a.get("offsetCenter"),
  23928. u = o.cx + Ro(l[0], o.r),
  23929. h = o.cy + Ro(l[1], o.r),
  23930. c = Ro(a.get("width"), o.r),
  23931. d = Ro(a.get("height"), o.r),
  23932. f = t.getData(),
  23933. p = f.get(f.mapDimension("value"), 0),
  23934. g = n(Eo(p, [r, s], [0, 1], !0));
  23935. this.group.add(new qS({
  23936. silent: !0,
  23937. style: fo({}, a, {
  23938. x: u,
  23939. y: h,
  23940. text: mf(p, a.get("formatter")),
  23941. textWidth: isNaN(c) ? null : c,
  23942. textHeight: isNaN(d) ? null : d,
  23943. textAlign: "center",
  23944. textVerticalAlign: "middle"
  23945. }, {
  23946. autoColor: g,
  23947. forceRich: !0
  23948. })
  23949. }))
  23950. }
  23951. }
  23952. }), Gs({
  23953. type: "series.funnel",
  23954. init: function(t) {
  23955. kL.superApply(this, "init", arguments), this.legendDataProvider = function() {
  23956. return this.getRawData()
  23957. }, this._defaultLabelLine(t)
  23958. },
  23959. getInitialData: function(t, e) {
  23960. return WD(this, ["value"])
  23961. },
  23962. _defaultLabelLine: function(t) {
  23963. Ci(t, "labelLine", ["show"]);
  23964. var e = t.labelLine,
  23965. i = t.emphasis.labelLine;
  23966. e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.show
  23967. },
  23968. getDataParams: function(t) {
  23969. var e = this.getData(),
  23970. i = kL.superCall(this, "getDataParams", t),
  23971. n = e.mapDimension("value"),
  23972. o = e.getSum(n);
  23973. return i.percent = o ? +(e.get(n, t) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i
  23974. },
  23975. defaultOption: {
  23976. zlevel: 0,
  23977. z: 2,
  23978. legendHoverLink: !0,
  23979. left: 80,
  23980. top: 60,
  23981. right: 80,
  23982. bottom: 60,
  23983. minSize: "0%",
  23984. maxSize: "100%",
  23985. sort: "descending",
  23986. gap: 0,
  23987. funnelAlign: "center",
  23988. label: {
  23989. show: !0,
  23990. position: "outer"
  23991. },
  23992. labelLine: {
  23993. show: !0,
  23994. length: 20,
  23995. lineStyle: {
  23996. width: 1,
  23997. type: "solid"
  23998. }
  23999. },
  24000. itemStyle: {
  24001. borderColor: "#fff",
  24002. borderWidth: 1
  24003. },
  24004. emphasis: {
  24005. label: {
  24006. show: !0
  24007. }
  24008. }
  24009. }
  24010. })),
  24011. PL = vf.prototype,
  24012. NL = ["itemStyle", "opacity"];
  24013. PL.updateData = function(t, e, i) {
  24014. var n = this.childAt(0),
  24015. o = t.hostModel,
  24016. a = t.getItemModel(e),
  24017. s = t.getItemLayout(e),
  24018. l = t.getItemModel(e).get(NL);
  24019. l = null == l ? 1 : l, n.useStyle({}), i ? (n.setShape({
  24020. points: s.points
  24021. }), n.setStyle({
  24022. opacity: 0
  24023. }), So(n, {
  24024. style: {
  24025. opacity: l
  24026. }
  24027. }, o, e)) : bo(n, {
  24028. style: {
  24029. opacity: l
  24030. },
  24031. shape: {
  24032. points: s.points
  24033. }
  24034. }, o, e);
  24035. var u = a.getModel("itemStyle"),
  24036. h = t.getItemVisual(e, "color");
  24037. n.setStyle(r({
  24038. lineJoin: "round",
  24039. fill: h
  24040. }, u.getItemStyle(["opacity"]))), n.hoverStyle = u.getModel("emphasis").getItemStyle(), this._updateLabel(t, e),
  24041. uo(this)
  24042. }, PL._updateLabel = function(t, e) {
  24043. var i = this.childAt(1),
  24044. n = this.childAt(2),
  24045. o = t.hostModel,
  24046. a = t.getItemModel(e),
  24047. r = t.getItemLayout(e).label,
  24048. s = t.getItemVisual(e, "color");
  24049. bo(i, {
  24050. shape: {
  24051. points: r.linePoints || r.linePoints
  24052. }
  24053. }, o, e), bo(n, {
  24054. style: {
  24055. x: r.x,
  24056. y: r.y
  24057. }
  24058. }, o, e), n.attr({
  24059. rotation: r.rotation,
  24060. origin: [r.x, r.y],
  24061. z2: 10
  24062. });
  24063. var l = a.getModel("label"),
  24064. u = a.getModel("emphasis.label"),
  24065. h = a.getModel("labelLine"),
  24066. c = a.getModel("emphasis.labelLine"),
  24067. s = t.getItemVisual(e, "color");
  24068. co(n.style, n.hoverStyle = {}, l, u, {
  24069. labelFetcher: t.hostModel,
  24070. labelDataIndex: e,
  24071. defaultText: t.getName(e),
  24072. autoColor: s,
  24073. useInsideStyle: !!r.inside
  24074. }, {
  24075. textAlign: r.textAlign,
  24076. textVerticalAlign: r.verticalAlign
  24077. }), n.ignore = n.normalIgnore = !l.get("show"), n.hoverIgnore = !u.get("show"), i.ignore = i.normalIgnore = !h.get(
  24078. "show"), i.hoverIgnore = !c.get("show"), i.setStyle({
  24079. stroke: s
  24080. }), i.setStyle(h.getModel("lineStyle").getLineStyle()), i.hoverStyle = c.getModel("lineStyle").getLineStyle()
  24081. }, u(vf, Zw);
  24082. Mr.extend({
  24083. type: "funnel",
  24084. render: function(t, e, i) {
  24085. var n = t.getData(),
  24086. o = this._data,
  24087. a = this.group;
  24088. n.diff(o).add(function(t) {
  24089. var e = new vf(n, t);
  24090. n.setItemGraphicEl(t, e), a.add(e)
  24091. }).update(function(t, e) {
  24092. var i = o.getItemGraphicEl(e);
  24093. i.updateData(n, t), a.add(i), n.setItemGraphicEl(t, i)
  24094. }).remove(function(t) {
  24095. var e = o.getItemGraphicEl(t);
  24096. a.remove(e)
  24097. }).execute(), this._data = n
  24098. },
  24099. remove: function() {
  24100. this.group.removeAll(), this._data = null
  24101. },
  24102. dispose: function() {}
  24103. });
  24104. Es(jD("funnel")), Os(function(t, e, i) {
  24105. t.eachSeriesByType("funnel", function(t) {
  24106. var i = t.getData(),
  24107. n = i.mapDimension("value"),
  24108. o = t.get("sort"),
  24109. a = yf(t, e),
  24110. r = xf(i, o),
  24111. s = [Ro(t.get("minSize"), a.width), Ro(t.get("maxSize"), a.width)],
  24112. l = i.getDataExtent(n),
  24113. u = t.get("min"),
  24114. h = t.get("max");
  24115. null == u && (u = Math.min(l[0], 0)), null == h && (h = l[1]);
  24116. var c = t.get("funnelAlign"),
  24117. d = t.get("gap"),
  24118. f = (a.height - d * (i.count() - 1)) / i.count(),
  24119. p = a.y,
  24120. g = function(t, e) {
  24121. var o, r = Eo(i.get(n, t) || 0, [u, h], s, !0);
  24122. switch (c) {
  24123. case "left":
  24124. o = a.x;
  24125. break;
  24126. case "center":
  24127. o = a.x + (a.width - r) / 2;
  24128. break;
  24129. case "right":
  24130. o = a.x + a.width - r
  24131. }
  24132. return [
  24133. [o, e],
  24134. [o + r, e]
  24135. ]
  24136. };
  24137. "ascending" === o && (f = -f, d = -d, p += a.height, r = r.reverse());
  24138. for (var m = 0; m < r.length; m++) {
  24139. var v = r[m],
  24140. y = r[m + 1],
  24141. x = i.getItemModel(v).get("itemStyle.height");
  24142. null == x ? x = f : (x = Ro(x, a.height), "ascending" === o && (x = -x));
  24143. var _ = g(v, p),
  24144. w = g(y, p + x);
  24145. p += x + d, i.setItemLayout(v, {
  24146. points: _.concat(w.slice().reverse())
  24147. })
  24148. }
  24149. _f(i)
  24150. })
  24151. }), ks($D("funnel"));
  24152. var OL = function(t, e, i, n, o) {
  24153. HA.call(this, t, e, i), this.type = n || "value", this.axisIndex = o
  24154. };
  24155. OL.prototype = {
  24156. constructor: OL,
  24157. model: null,
  24158. isHorizontal: function() {
  24159. return "horizontal" !== this.coordinateSystem.getModel().get("layout")
  24160. }
  24161. }, u(OL, HA);
  24162. var EL = function(t, e, i, n, o, a) {
  24163. e[0] = Mf(e[0], i), e[1] = Mf(e[1], i), t = t || 0;
  24164. var r = i[1] - i[0];
  24165. null != o && (o = Mf(o, [0, r])), null != a && (a = Math.max(a, null != o ? o : 0)), "all" === n && (o = a = Math.abs(
  24166. e[1] - e[0]), n = 0);
  24167. var s = Sf(e, n);
  24168. e[n] += t;
  24169. var l = o || 0,
  24170. u = i.slice();
  24171. s.sign < 0 ? u[0] += l : u[1] -= l, e[n] = Mf(e[n], u);
  24172. h = Sf(e, n);
  24173. null != o && (h.sign !== s.sign || h.span < o) && (e[1 - n] = e[n] + s.sign * o);
  24174. var h = Sf(e, n);
  24175. return null != a && h.span > a && (e[1 - n] = e[n] + h.sign * a), e
  24176. },
  24177. RL = d,
  24178. zL = Math.min,
  24179. BL = Math.max,
  24180. VL = Math.floor,
  24181. GL = Math.ceil,
  24182. FL = zo,
  24183. WL = Math.PI;
  24184. If.prototype = {
  24185. type: "parallel",
  24186. constructor: If,
  24187. _init: function(t, e, i) {
  24188. var n = t.dimensions,
  24189. o = t.parallelAxisIndex;
  24190. RL(n, function(t, i) {
  24191. var n = o[i],
  24192. a = e.getComponent("parallelAxis", n),
  24193. r = this._axesMap.set(t, new OL(t, Vl(a), [0, 0], a.get("type"), n)),
  24194. s = "category" === r.type;
  24195. r.onBand = s && a.get("boundaryGap"), r.inverse = a.get("inverse"), a.axis = r, r.model = a, r.coordinateSystem =
  24196. a.coordinateSystem = this
  24197. }, this)
  24198. },
  24199. update: function(t, e) {
  24200. this._updateAxesFromSeries(this._model, t)
  24201. },
  24202. containPoint: function(t) {
  24203. var e = this._makeLayoutInfo(),
  24204. i = e.axisBase,
  24205. n = e.layoutBase,
  24206. o = e.pixelDimIndex,
  24207. a = t[1 - o],
  24208. r = t[o];
  24209. return a >= i && a <= i + e.axisLength && r >= n && r <= n + e.layoutLength
  24210. },
  24211. getModel: function() {
  24212. return this._model
  24213. },
  24214. _updateAxesFromSeries: function(t, e) {
  24215. e.eachSeries(function(i) {
  24216. if (t.contains(i, e)) {
  24217. var n = i.getData();
  24218. RL(this.dimensions, function(t) {
  24219. var e = this._axesMap.get(t);
  24220. e.scale.unionExtentFromData(n, n.mapDimension(t)), Bl(e.scale, e.model)
  24221. }, this)
  24222. }
  24223. }, this)
  24224. },
  24225. resize: function(t, e) {
  24226. this._rect = la(t.getBoxLayoutParams(), {
  24227. width: e.getWidth(),
  24228. height: e.getHeight()
  24229. }), this._layoutAxes()
  24230. },
  24231. getRect: function() {
  24232. return this._rect
  24233. },
  24234. _makeLayoutInfo: function() {
  24235. var t, e = this._model,
  24236. i = this._rect,
  24237. n = ["x", "y"],
  24238. o = ["width", "height"],
  24239. a = e.get("layout"),
  24240. r = "horizontal" === a ? 0 : 1,
  24241. s = i[o[r]],
  24242. l = [0, s],
  24243. u = this.dimensions.length,
  24244. h = Tf(e.get("axisExpandWidth"), l),
  24245. c = Tf(e.get("axisExpandCount") || 0, [0, u]),
  24246. d = e.get("axisExpandable") && u > 3 && u > c && c > 1 && h > 0 && s > 0,
  24247. f = e.get("axisExpandWindow");
  24248. f ? (t = Tf(f[1] - f[0], l), f[1] = f[0] + t) : (t = Tf(h * (c - 1), l), (f = [h * (e.get("axisExpandCenter") ||
  24249. VL(u / 2)) - t / 2])[1] = f[0] + t);
  24250. var p = (s - t) / (u - c);
  24251. p < 3 && (p = 0);
  24252. var g = [VL(FL(f[0] / h, 1)) + 1, GL(FL(f[1] / h, 1)) - 1],
  24253. m = p / h * f[0];
  24254. return {
  24255. layout: a,
  24256. pixelDimIndex: r,
  24257. layoutBase: i[n[r]],
  24258. layoutLength: s,
  24259. axisBase: i[n[1 - r]],
  24260. axisLength: i[o[1 - r]],
  24261. axisExpandable: d,
  24262. axisExpandWidth: h,
  24263. axisCollapseWidth: p,
  24264. axisExpandWindow: f,
  24265. axisCount: u,
  24266. winInnerIndices: g,
  24267. axisExpandWindow0Pos: m
  24268. }
  24269. },
  24270. _layoutAxes: function() {
  24271. var t = this._rect,
  24272. e = this._axesMap,
  24273. i = this.dimensions,
  24274. n = this._makeLayoutInfo(),
  24275. o = n.layout;
  24276. e.each(function(t) {
  24277. var e = [0, n.axisLength],
  24278. i = t.inverse ? 1 : 0;
  24279. t.setExtent(e[i], e[1 - i])
  24280. }), RL(i, function(e, i) {
  24281. var a = (n.axisExpandable ? Df : Af)(i, n),
  24282. r = {
  24283. horizontal: {
  24284. x: a.position,
  24285. y: n.axisLength
  24286. },
  24287. vertical: {
  24288. x: 0,
  24289. y: a.position
  24290. }
  24291. },
  24292. s = {
  24293. horizontal: WL / 2,
  24294. vertical: 0
  24295. },
  24296. l = [r[o].x + t.x, r[o].y + t.y],
  24297. u = s[o],
  24298. h = mt();
  24299. wt(h, h, u), _t(h, h, l), this._axesLayout[e] = {
  24300. position: l,
  24301. rotation: u,
  24302. transform: h,
  24303. axisNameAvailableWidth: a.axisNameAvailableWidth,
  24304. axisLabelShow: a.axisLabelShow,
  24305. nameTruncateMaxWidth: a.nameTruncateMaxWidth,
  24306. tickDirection: 1,
  24307. labelDirection: 1
  24308. }
  24309. }, this)
  24310. },
  24311. getAxis: function(t) {
  24312. return this._axesMap.get(t)
  24313. },
  24314. dataToPoint: function(t, e) {
  24315. return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t), e)
  24316. },
  24317. eachActiveState: function(t, e, i, n) {
  24318. null == i && (i = 0), null == n && (n = t.count());
  24319. var o = this._axesMap,
  24320. a = this.dimensions,
  24321. r = [],
  24322. s = [];
  24323. d(a, function(e) {
  24324. r.push(t.mapDimension(e)), s.push(o.get(e).model)
  24325. });
  24326. for (var l = this.hasAxisBrushed(), u = i; u < n; u++) {
  24327. var h;
  24328. if (l) {
  24329. h = "active";
  24330. for (var c = t.getValues(r, u), f = 0, p = a.length; f < p; f++)
  24331. if ("inactive" === s[f].getActiveState(c[f])) {
  24332. h = "inactive";
  24333. break
  24334. }
  24335. } else h = "normal";
  24336. e(h, u)
  24337. }
  24338. },
  24339. hasAxisBrushed: function() {
  24340. for (var t = this.dimensions, e = this._axesMap, i = !1, n = 0, o = t.length; n < o; n++) "normal" !== e.get(t[n])
  24341. .model.getActiveState() && (i = !0);
  24342. return i
  24343. },
  24344. axisCoordToPoint: function(t, e) {
  24345. return Io([t, 0], this._axesLayout[e].transform)
  24346. },
  24347. getAxisLayout: function(t) {
  24348. return i(this._axesLayout[t])
  24349. },
  24350. getSlidedAxisExpandWindow: function(t) {
  24351. var e = this._makeLayoutInfo(),
  24352. i = e.pixelDimIndex,
  24353. n = e.axisExpandWindow.slice(),
  24354. o = n[1] - n[0],
  24355. a = [0, e.axisExpandWidth * (e.axisCount - 1)];
  24356. if (!this.containPoint(t)) return {
  24357. behavior: "none",
  24358. axisExpandWindow: n
  24359. };
  24360. var r, s = t[i] - e.layoutBase - e.axisExpandWindow0Pos,
  24361. l = "slide",
  24362. u = e.axisCollapseWidth,
  24363. h = this._model.get("axisExpandSlideTriggerArea"),
  24364. c = null != h[0];
  24365. if (u) c && u && s < o * h[0] ? (l = "jump", r = s - o * h[2]) : c && u && s > o * (1 - h[0]) ? (l = "jump", r =
  24366. s - o * (1 - h[2])) : (r = s - o * h[1]) >= 0 && (r = s - o * (1 - h[1])) <= 0 && (r = 0), (r *= e.axisExpandWidth /
  24367. u) ? EL(r, n, a, "all") : l = "none";
  24368. else {
  24369. o = n[1] - n[0];
  24370. (n = [BL(0, a[1] * s / o - o / 2)])[1] = zL(a[1], n[0] + o), n[0] = n[1] - o
  24371. }
  24372. return {
  24373. axisExpandWindow: n,
  24374. behavior: l
  24375. }
  24376. }
  24377. }, Ba.register("parallel", {
  24378. create: function(t, e) {
  24379. var i = [];
  24380. return t.eachComponent("parallel", function(n, o) {
  24381. var a = new If(n, t, e);
  24382. a.name = "parallel_" + o, a.resize(n, e), n.coordinateSystem = a, a.model = n, i.push(a)
  24383. }), t.eachSeries(function(e) {
  24384. if ("parallel" === e.get("coordinateSystem")) {
  24385. var i = t.queryComponents({
  24386. mainType: "parallel",
  24387. index: e.get("parallelIndex"),
  24388. id: e.get("parallelId")
  24389. })[0];
  24390. e.coordinateSystem = i.coordinateSystem
  24391. }
  24392. }), i
  24393. }
  24394. });
  24395. var HL = YM.extend({
  24396. type: "baseParallelAxis",
  24397. axis: null,
  24398. activeIntervals: [],
  24399. getAreaSelectStyle: function() {
  24400. return Wb([
  24401. ["fill", "color"],
  24402. ["lineWidth", "borderWidth"],
  24403. ["stroke", "borderColor"],
  24404. ["width", "width"],
  24405. ["opacity", "opacity"]
  24406. ])(this.getModel("areaSelectStyle"))
  24407. },
  24408. setActiveIntervals: function(t) {
  24409. var e = this.activeIntervals = i(t);
  24410. if (e)
  24411. for (var n = e.length - 1; n >= 0; n--) Bo(e[n])
  24412. },
  24413. getActiveState: function(t) {
  24414. var e = this.activeIntervals;
  24415. if (!e.length) return "normal";
  24416. if (null == t || isNaN(t)) return "inactive";
  24417. if (1 === e.length) {
  24418. var i = e[0];
  24419. if (i[0] <= t && t <= i[1]) return "active"
  24420. } else
  24421. for (var n = 0, o = e.length; n < o; n++)
  24422. if (e[n][0] <= t && t <= e[n][1]) return "active";
  24423. return "inactive"
  24424. }
  24425. }),
  24426. ZL = {
  24427. type: "value",
  24428. dim: null,
  24429. areaSelectStyle: {
  24430. width: 20,
  24431. borderWidth: 1,
  24432. borderColor: "rgba(160,197,232)",
  24433. color: "rgba(160,197,232)",
  24434. opacity: .3
  24435. },
  24436. realtime: !0,
  24437. z: 10
  24438. };
  24439. n(HL.prototype, CA), xD("parallel", HL, function(t, e) {
  24440. return e.type || (e.data ? "category" : "value")
  24441. }, ZL), YM.extend({
  24442. type: "parallel",
  24443. dependencies: ["parallelAxis"],
  24444. coordinateSystem: null,
  24445. dimensions: null,
  24446. parallelAxisIndex: null,
  24447. layoutMode: "box",
  24448. defaultOption: {
  24449. zlevel: 0,
  24450. z: 0,
  24451. left: 80,
  24452. top: 60,
  24453. right: 80,
  24454. bottom: 60,
  24455. layout: "horizontal",
  24456. axisExpandable: !1,
  24457. axisExpandCenter: null,
  24458. axisExpandCount: 0,
  24459. axisExpandWidth: 50,
  24460. axisExpandRate: 17,
  24461. axisExpandDebounce: 50,
  24462. axisExpandSlideTriggerArea: [-.15, .05, .4],
  24463. axisExpandTriggerOn: "click",
  24464. parallelAxisDefault: null
  24465. },
  24466. init: function() {
  24467. YM.prototype.init.apply(this, arguments), this.mergeOption({})
  24468. },
  24469. mergeOption: function(t) {
  24470. var e = this.option;
  24471. t && n(e, t, !0), this._initDimensions()
  24472. },
  24473. contains: function(t, e) {
  24474. var i = t.get("parallelIndex");
  24475. return null != i && e.getComponent("parallel", i) === this
  24476. },
  24477. setAxisExpand: function(t) {
  24478. d(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(e) {
  24479. t.hasOwnProperty(e) && (this.option[e] = t[e])
  24480. }, this)
  24481. },
  24482. _initDimensions: function() {
  24483. var t = this.dimensions = [],
  24484. e = this.parallelAxisIndex = [];
  24485. d(g(this.dependentModels.parallelAxis, function(t) {
  24486. return (t.get("parallelIndex") || 0) === this.componentIndex
  24487. }, this), function(i) {
  24488. t.push("dim" + i.get("dim")), e.push(i.componentIndex)
  24489. })
  24490. }
  24491. }), Ps({
  24492. type: "axisAreaSelect",
  24493. event: "axisAreaSelected"
  24494. }, function(t, e) {
  24495. e.eachComponent({
  24496. mainType: "parallelAxis",
  24497. query: t
  24498. }, function(e) {
  24499. e.axis.model.setActiveIntervals(t.intervals)
  24500. })
  24501. }), Ps("parallelAxisExpand", function(t, e) {
  24502. e.eachComponent({
  24503. mainType: "parallel",
  24504. query: t
  24505. }, function(e) {
  24506. e.setAxisExpand(t)
  24507. })
  24508. });
  24509. var UL = v,
  24510. XL = d,
  24511. jL = f,
  24512. YL = Math.min,
  24513. qL = Math.max,
  24514. KL = Math.pow,
  24515. $L = 1e4,
  24516. JL = 6,
  24517. QL = 6,
  24518. tk = "globalPan",
  24519. ek = {
  24520. w: [0, 0],
  24521. e: [0, 1],
  24522. n: [1, 0],
  24523. s: [1, 1]
  24524. },
  24525. ik = {
  24526. w: "ew",
  24527. e: "ew",
  24528. n: "ns",
  24529. s: "ns",
  24530. ne: "nesw",
  24531. sw: "nesw",
  24532. nw: "nwse",
  24533. se: "nwse"
  24534. },
  24535. nk = {
  24536. brushStyle: {
  24537. lineWidth: 2,
  24538. stroke: "rgba(0,0,0,0.3)",
  24539. fill: "rgba(0,0,0,0.1)"
  24540. },
  24541. transformable: !0,
  24542. brushMode: "single",
  24543. removeOnClick: !1
  24544. },
  24545. ok = 0;
  24546. Cf.prototype = {
  24547. constructor: Cf,
  24548. enableBrush: function(t) {
  24549. return this._brushType && kf(this), t.brushType && Lf(this, t), this
  24550. },
  24551. setPanels: function(t) {
  24552. if (t && t.length) {
  24553. var e = this._panels = {};
  24554. d(t, function(t) {
  24555. e[t.panelId] = i(t)
  24556. })
  24557. } else this._panels = null;
  24558. return this
  24559. },
  24560. mount: function(t) {
  24561. t = t || {}, this._enableGlobalPan = t.enableGlobalPan;
  24562. var e = this.group;
  24563. return this._zr.add(e), e.attr({
  24564. position: t.position || [0, 0],
  24565. rotation: t.rotation || 0,
  24566. scale: t.scale || [1, 1]
  24567. }), this._transform = e.getLocalTransform(), this
  24568. },
  24569. eachCover: function(t, e) {
  24570. XL(this._covers, t, e)
  24571. },
  24572. updateCovers: function(t) {
  24573. function e(t, e) {
  24574. return (null != t.id ? t.id : a + e) + "-" + t.brushType
  24575. }
  24576. function o(e, i) {
  24577. var n = t[e];
  24578. if (null != i && r[i] === u) s[e] = r[i];
  24579. else {
  24580. var o = s[e] = null != i ? (r[i].__brushOption = n, r[i]) : Nf(l, Pf(l, n));
  24581. Rf(l, o)
  24582. }
  24583. }
  24584. t = f(t, function(t) {
  24585. return n(i(nk), t, !0)
  24586. });
  24587. var a = "\0-brush-index-",
  24588. r = this._covers,
  24589. s = this._covers = [],
  24590. l = this,
  24591. u = this._creatingCover;
  24592. return new Hs(r, t, function(t, i) {
  24593. return e(t.__brushOption, i)
  24594. }, e).add(o).update(o).remove(function(t) {
  24595. r[t] !== u && l.group.remove(r[t])
  24596. }).execute(), this
  24597. },
  24598. unmount: function() {
  24599. return this.enableBrush(!1), Gf(this), this._zr.remove(this.group), this
  24600. },
  24601. dispose: function() {
  24602. this.unmount(), this.off()
  24603. }
  24604. }, h(Cf, aw);
  24605. var ak = {
  24606. mousedown: function(t) {
  24607. if (this._dragging) lp.call(this, t);
  24608. else if (!t.target || !t.target.draggable) {
  24609. op(t);
  24610. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  24611. this._creatingCover = null, (this._creatingPanel = Bf(this, t, e)) && (this._dragging = !0, this._track = [e.slice()])
  24612. }
  24613. },
  24614. mousemove: function(t) {
  24615. var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
  24616. if (np(this, t, e), this._dragging) {
  24617. op(t);
  24618. var i = rp(this, t, e, !1);
  24619. i && Ff(this, i)
  24620. }
  24621. },
  24622. mouseup: lp
  24623. },
  24624. rk = {
  24625. lineX: up(0),
  24626. lineY: up(1),
  24627. rect: {
  24628. createCover: function(t, e) {
  24629. return Zf(UL(Jf, function(t) {
  24630. return t
  24631. }, function(t) {
  24632. return t
  24633. }), t, e, ["w", "e", "n", "s", "se", "sw", "ne", "nw"])
  24634. },
  24635. getCreatingRange: function(t) {
  24636. var e = Hf(t);
  24637. return qf(e[1][0], e[1][1], e[0][0], e[0][1])
  24638. },
  24639. updateCoverShape: function(t, e, i, n) {
  24640. Uf(t, e, i, n)
  24641. },
  24642. updateCommon: Xf,
  24643. contain: ap
  24644. },
  24645. polygon: {
  24646. createCover: function(t, e) {
  24647. var i = new Zw;
  24648. return i.add(new oM({
  24649. name: "main",
  24650. style: Yf(e),
  24651. silent: !0
  24652. })), i
  24653. },
  24654. getCreatingRange: function(t) {
  24655. return t
  24656. },
  24657. endCreating: function(t, e) {
  24658. e.remove(e.childAt(0)), e.add(new nM({
  24659. name: "main",
  24660. draggable: !0,
  24661. drift: UL(Qf, t, e),
  24662. ondragend: UL(Ff, t, {
  24663. isEnd: !0
  24664. })
  24665. }))
  24666. },
  24667. updateCoverShape: function(t, e, i, n) {
  24668. e.childAt(0).setShape({
  24669. points: ep(t, e, i)
  24670. })
  24671. },
  24672. updateCommon: Xf,
  24673. contain: ap
  24674. }
  24675. },
  24676. sk = ["axisLine", "axisTickLabel", "axisName"],
  24677. lk = Vs({
  24678. type: "parallelAxis",
  24679. init: function(t, e) {
  24680. lk.superApply(this, "init", arguments), (this._brushController = new Cf(e.getZr())).on("brush", m(this._onBrush,
  24681. this))
  24682. },
  24683. render: function(t, e, i, n) {
  24684. if (!pp(t, e, n)) {
  24685. this.axisModel = t, this.api = i, this.group.removeAll();
  24686. var o = this._axisGroup;
  24687. if (this._axisGroup = new Zw, this.group.add(this._axisGroup), t.get("show")) {
  24688. var r = mp(t, e),
  24689. s = r.coordinateSystem,
  24690. l = t.getAreaSelectStyle(),
  24691. u = l.width,
  24692. h = t.axis.dim,
  24693. c = a({
  24694. strokeContainThreshold: u
  24695. }, s.getAxisLayout(h)),
  24696. f = new ID(t, c);
  24697. d(sk, f.add, f), this._axisGroup.add(f.getGroup()), this._refreshBrushController(c, l, t, r, u, i);
  24698. var p = n && !1 === n.animation ? null : t;
  24699. Ao(o, this._axisGroup, p)
  24700. }
  24701. }
  24702. },
  24703. _refreshBrushController: function(t, e, i, n, o, a) {
  24704. var r = i.axis.getExtent(),
  24705. s = r[1] - r[0],
  24706. l = Math.min(30, .1 * Math.abs(s)),
  24707. u = ue.create({
  24708. x: r[0],
  24709. y: -o / 2,
  24710. width: s,
  24711. height: o
  24712. });
  24713. u.x -= l, u.width += 2 * l, this._brushController.mount({
  24714. enableGlobalPan: !0,
  24715. rotation: t.rotation,
  24716. position: t.position
  24717. }).setPanels([{
  24718. panelId: "pl",
  24719. clipPath: hp(u),
  24720. isTargetByCursor: dp(u, a, n),
  24721. getLinearBrushOtherExtent: cp(u, 0)
  24722. }]).enableBrush({
  24723. brushType: "lineX",
  24724. brushStyle: e,
  24725. removeOnClick: !0
  24726. }).updateCovers(gp(i))
  24727. },
  24728. _onBrush: function(t, e) {
  24729. var i = this.axisModel,
  24730. n = i.axis,
  24731. o = f(t, function(t) {
  24732. return [n.coordToData(t.range[0], !0), n.coordToData(t.range[1], !0)]
  24733. });
  24734. (!i.option.realtime === e.isEnd || e.removeOnClick) && this.api.dispatchAction({
  24735. type: "axisAreaSelect",
  24736. parallelAxisId: i.id,
  24737. intervals: o
  24738. })
  24739. },
  24740. dispose: function() {
  24741. this._brushController.dispose()
  24742. }
  24743. });
  24744. Vs({
  24745. type: "parallel",
  24746. render: function(t, e, i) {
  24747. this._model = t, this._api = i, this._handlers || (this._handlers = {}, d(uk, function(t, e) {
  24748. i.getZr().on(e, this._handlers[e] = m(t, this))
  24749. }, this)), Lr(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate")
  24750. },
  24751. dispose: function(t, e) {
  24752. d(this._handlers, function(t, i) {
  24753. e.getZr().off(i, t)
  24754. }), this._handlers = null
  24755. },
  24756. _throttledDispatchExpand: function(t) {
  24757. this._dispatchExpand(t)
  24758. },
  24759. _dispatchExpand: function(t) {
  24760. t && this._api.dispatchAction(a({
  24761. type: "parallelAxisExpand"
  24762. }, t))
  24763. }
  24764. });
  24765. var uk = {
  24766. mousedown: function(t) {
  24767. vp(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY])
  24768. },
  24769. mouseup: function(t) {
  24770. var e = this._mouseDownPoint;
  24771. if (vp(this, "click") && e) {
  24772. var i = [t.offsetX, t.offsetY];
  24773. if (Math.pow(e[0] - i[0], 2) + Math.pow(e[1] - i[1], 2) > 5) return;
  24774. var n = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
  24775. "none" !== n.behavior && this._dispatchExpand({
  24776. axisExpandWindow: n.axisExpandWindow
  24777. })
  24778. }
  24779. this._mouseDownPoint = null
  24780. },
  24781. mousemove: function(t) {
  24782. if (!this._mouseDownPoint && vp(this, "mousemove")) {
  24783. var e = this._model,
  24784. i = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]),
  24785. n = i.behavior;
  24786. "jump" === n && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(
  24787. "none" === n ? null : {
  24788. axisExpandWindow: i.axisExpandWindow,
  24789. animation: "jump" === n && null
  24790. })
  24791. }
  24792. }
  24793. };
  24794. Ls(function(t) {
  24795. wf(t), bf(t)
  24796. }), OI.extend({
  24797. type: "series.parallel",
  24798. dependencies: ["parallel"],
  24799. visualColorAccessPath: "lineStyle.color",
  24800. getInitialData: function(t, e) {
  24801. var i = this.getSource();
  24802. return yp(i, this), dl(i, this)
  24803. },
  24804. getRawIndicesByActiveState: function(t) {
  24805. var e = this.coordinateSystem,
  24806. i = this.getData(),
  24807. n = [];
  24808. return e.eachActiveState(i, function(e, o) {
  24809. t === e && n.push(i.getRawIndex(o))
  24810. }), n
  24811. },
  24812. defaultOption: {
  24813. zlevel: 0,
  24814. z: 2,
  24815. coordinateSystem: "parallel",
  24816. parallelIndex: 0,
  24817. label: {
  24818. show: !1
  24819. },
  24820. inactiveOpacity: .05,
  24821. activeOpacity: 1,
  24822. lineStyle: {
  24823. width: 1,
  24824. opacity: .45,
  24825. type: "solid"
  24826. },
  24827. emphasis: {
  24828. label: {
  24829. show: !1
  24830. }
  24831. },
  24832. progressive: 500,
  24833. smooth: !1,
  24834. animationEasing: "linear"
  24835. }
  24836. });
  24837. var hk = .3,
  24838. ck = (Mr.extend({
  24839. type: "parallel",
  24840. init: function() {
  24841. this._dataGroup = new Zw, this.group.add(this._dataGroup), this._data, this._initialized
  24842. },
  24843. render: function(t, e, i, n) {
  24844. var o = this._dataGroup,
  24845. a = t.getData(),
  24846. r = this._data,
  24847. s = t.coordinateSystem,
  24848. l = s.dimensions,
  24849. u = Sp(t);
  24850. if (a.diff(r).add(function(t) {
  24851. Mp(bp(a, o, t, l, s), a, t, u)
  24852. }).update(function(e, i) {
  24853. var o = r.getItemGraphicEl(i),
  24854. h = wp(a, e, l, s);
  24855. a.setItemGraphicEl(e, o), bo(o, {
  24856. shape: {
  24857. points: h
  24858. }
  24859. }, n && !1 === n.animation ? null : t, e), Mp(o, a, e, u)
  24860. }).remove(function(t) {
  24861. var e = r.getItemGraphicEl(t);
  24862. o.remove(e)
  24863. }).execute(), !this._initialized) {
  24864. this._initialized = !0;
  24865. var h = _p(s, t, function() {
  24866. setTimeout(function() {
  24867. o.removeClipPath()
  24868. })
  24869. });
  24870. o.setClipPath(h)
  24871. }
  24872. this._data = a
  24873. },
  24874. incrementalPrepareRender: function(t, e, i) {
  24875. this._initialized = !0, this._data = null, this._dataGroup.removeAll()
  24876. },
  24877. incrementalRender: function(t, e, i) {
  24878. for (var n = e.getData(), o = e.coordinateSystem, a = o.dimensions, r = Sp(e), s = t.start; s < t.end; s++) {
  24879. var l = bp(n, this._dataGroup, s, a, o);
  24880. l.incremental = !0, Mp(l, n, s, r)
  24881. }
  24882. },
  24883. dispose: function() {},
  24884. remove: function() {
  24885. this._dataGroup && this._dataGroup.removeAll(), this._data = null
  24886. }
  24887. }), ["lineStyle", "normal", "opacity"]);
  24888. Es({
  24889. seriesType: "parallel",
  24890. reset: function(t, e, i) {
  24891. var n = t.getModel("itemStyle"),
  24892. o = t.getModel("lineStyle"),
  24893. a = e.get("color"),
  24894. r = o.get("color") || n.get("color") || a[t.seriesIndex % a.length],
  24895. s = t.get("inactiveOpacity"),
  24896. l = t.get("activeOpacity"),
  24897. u = t.getModel("lineStyle").getLineStyle(),
  24898. h = t.coordinateSystem,
  24899. c = t.getData(),
  24900. d = {
  24901. normal: u.opacity,
  24902. active: l,
  24903. inactive: s
  24904. };
  24905. return c.setVisual("color", r), {
  24906. progress: function(t, e) {
  24907. h.eachActiveState(e, function(t, i) {
  24908. var n = d[t];
  24909. if ("normal" === t && e.hasItemOption) {
  24910. var o = e.getItemModel(i).get(ck, !0);
  24911. null != o && (n = o)
  24912. }
  24913. e.setItemVisual(i, "opacity", n)
  24914. }, t.start, t.end)
  24915. }
  24916. }
  24917. }
  24918. });
  24919. var dk = OI.extend({
  24920. type: "series.sankey",
  24921. layoutInfo: null,
  24922. getInitialData: function(t) {
  24923. var e = t.edges || t.links,
  24924. i = t.data || t.nodes;
  24925. if (i && e) return cL(i, e, this, !0).data
  24926. },
  24927. setNodePosition: function(t, e) {
  24928. var i = this.option.data[t];
  24929. i.localX = e[0], i.localY = e[1]
  24930. },
  24931. getGraph: function() {
  24932. return this.getData().graph
  24933. },
  24934. getEdgeData: function() {
  24935. return this.getGraph().edgeData
  24936. },
  24937. formatTooltip: function(t, e, i) {
  24938. if ("edge" === i) {
  24939. var n = this.getDataParams(t, i),
  24940. o = n.data,
  24941. a = o.source + " -- " + o.target;
  24942. return n.value && (a += " : " + n.value), Qo(a)
  24943. }
  24944. return dk.superCall(this, "formatTooltip", t, e)
  24945. },
  24946. optionUpdated: function() {
  24947. var t = this.option;
  24948. !0 === t.focusNodeAdjacency && (t.focusNodeAdjacency = "allEdges")
  24949. },
  24950. defaultOption: {
  24951. zlevel: 0,
  24952. z: 2,
  24953. coordinateSystem: "view",
  24954. layout: null,
  24955. left: "5%",
  24956. top: "5%",
  24957. right: "20%",
  24958. bottom: "5%",
  24959. orient: "horizontal",
  24960. nodeWidth: 20,
  24961. nodeGap: 8,
  24962. draggable: !0,
  24963. focusNodeAdjacency: !1,
  24964. layoutIterations: 32,
  24965. label: {
  24966. show: !0,
  24967. position: "right",
  24968. color: "#000",
  24969. fontSize: 12
  24970. },
  24971. itemStyle: {
  24972. borderWidth: 1,
  24973. borderColor: "#333"
  24974. },
  24975. lineStyle: {
  24976. color: "#314656",
  24977. opacity: .2,
  24978. curveness: .5
  24979. },
  24980. emphasis: {
  24981. label: {
  24982. show: !0
  24983. },
  24984. lineStyle: {
  24985. opacity: .6
  24986. }
  24987. },
  24988. animationEasing: "linear",
  24989. animationDuration: 1e3
  24990. }
  24991. }),
  24992. fk = ["itemStyle", "opacity"],
  24993. pk = ["lineStyle", "opacity"],
  24994. gk = Fn({
  24995. shape: {
  24996. x1: 0,
  24997. y1: 0,
  24998. x2: 0,
  24999. y2: 0,
  25000. cpx1: 0,
  25001. cpy1: 0,
  25002. cpx2: 0,
  25003. cpy2: 0,
  25004. extent: 0,
  25005. orient: ""
  25006. },
  25007. buildPath: function(t, e) {
  25008. var i = e.extent;
  25009. "vertical" === e.orient ? (t.moveTo(e.x1, e.y1), t.bezierCurveTo(e.cpx1, e.cpy1, e.cpx2, e.cpy2, e.x2, e.y2), t.lineTo(
  25010. e.x2 + i, e.y2), t.bezierCurveTo(e.cpx2 + i, e.cpy2, e.cpx1 + i, e.cpy1, e.x1 + i, e.y1)) : (t.moveTo(e.x1, e.y1),
  25011. t.bezierCurveTo(e.cpx1, e.cpy1, e.cpx2, e.cpy2, e.x2, e.y2), t.lineTo(e.x2, e.y2 + i), t.bezierCurveTo(e.cpx2,
  25012. e.cpy2 + i, e.cpx1, e.cpy1 + i, e.x1, e.y1 + i)), t.closePath()
  25013. }
  25014. });
  25015. Fs({
  25016. type: "sankey",
  25017. _model: null,
  25018. _focusAdjacencyDisabled: !1,
  25019. render: function(t, e, i) {
  25020. var n = this,
  25021. o = t.getGraph(),
  25022. a = this.group,
  25023. r = t.layoutInfo,
  25024. s = r.width,
  25025. l = r.height,
  25026. u = t.getData(),
  25027. h = t.getData("edge"),
  25028. c = t.get("orient");
  25029. this._model = t, a.removeAll(), a.attr("position", [r.x, r.y]), o.eachEdge(function(e) {
  25030. var i = new gk;
  25031. i.dataIndex = e.dataIndex, i.seriesIndex = t.seriesIndex, i.dataType = "edge";
  25032. var n, o, r, u, d, f, p, g, m = e.getModel("lineStyle"),
  25033. v = m.get("curveness"),
  25034. y = e.node1.getLayout(),
  25035. x = e.node1.getModel(),
  25036. _ = x.get("localX"),
  25037. w = x.get("localY"),
  25038. b = e.node2.getLayout(),
  25039. S = e.node2.getModel(),
  25040. M = S.get("localX"),
  25041. I = S.get("localY"),
  25042. T = e.getLayout();
  25043. switch (i.shape.extent = Math.max(1, T.dy), i.shape.orient = c, "vertical" === c ? (n = (null != _ ? _ * s :
  25044. y.x) + T.sy, o = (null != w ? w * l : y.y) + y.dy, r = (null != M ? M * s : b.x) + T.ty, d = n, f = o * (1 -
  25045. v) + (u = null != I ? I * l : b.y) * v, p = r, g = o * v + u * (1 - v)) : (n = (null != _ ? _ * s : y.x) +
  25046. y.dx, o = (null != w ? w * l : y.y) + T.sy, d = n * (1 - v) + (r = null != M ? M * s : b.x) * v, f = o, p =
  25047. n * v + r * (1 - v), g = u = (null != I ? I * l : b.y) + T.ty), i.setShape({
  25048. x1: n,
  25049. y1: o,
  25050. x2: r,
  25051. y2: u,
  25052. cpx1: d,
  25053. cpy1: f,
  25054. cpx2: p,
  25055. cpy2: g
  25056. }), i.setStyle(m.getItemStyle()), i.style.fill) {
  25057. case "source":
  25058. i.style.fill = e.node1.getVisual("color");
  25059. break;
  25060. case "target":
  25061. i.style.fill = e.node2.getVisual("color")
  25062. }
  25063. uo(i, e.getModel("emphasis.lineStyle").getItemStyle()), a.add(i), h.setItemGraphicEl(e.dataIndex, i)
  25064. }), o.eachNode(function(e) {
  25065. var i = e.getLayout(),
  25066. n = e.getModel(),
  25067. o = n.get("localX"),
  25068. r = n.get("localY"),
  25069. h = n.getModel("label"),
  25070. c = n.getModel("emphasis.label"),
  25071. d = new aM({
  25072. shape: {
  25073. x: null != o ? o * s : i.x,
  25074. y: null != r ? r * l : i.y,
  25075. width: i.dx,
  25076. height: i.dy
  25077. },
  25078. style: n.getModel("itemStyle").getItemStyle()
  25079. }),
  25080. f = e.getModel("emphasis.itemStyle").getItemStyle();
  25081. co(d.style, f, h, c, {
  25082. labelFetcher: t,
  25083. labelDataIndex: e.dataIndex,
  25084. defaultText: e.id,
  25085. isRectText: !0
  25086. }), d.setStyle("fill", e.getVisual("color")), uo(d, f), a.add(d), u.setItemGraphicEl(e.dataIndex, d), d.dataType =
  25087. "node"
  25088. }), u.eachItemGraphicEl(function(e, o) {
  25089. var a = u.getItemModel(o);
  25090. a.get("draggable") && (e.drift = function(e, a) {
  25091. n._focusAdjacencyDisabled = !0, this.shape.x += e, this.shape.y += a, this.dirty(), i.dispatchAction({
  25092. type: "dragNode",
  25093. seriesId: t.id,
  25094. dataIndex: u.getRawIndex(o),
  25095. localX: this.shape.x / s,
  25096. localY: this.shape.y / l
  25097. })
  25098. }, e.ondragend = function() {
  25099. n._focusAdjacencyDisabled = !1
  25100. }, e.draggable = !0, e.cursor = "move"), a.get("focusNodeAdjacency") && (e.off("mouseover").on("mouseover",
  25101. function() {
  25102. n._focusAdjacencyDisabled || i.dispatchAction({
  25103. type: "focusNodeAdjacency",
  25104. seriesId: t.id,
  25105. dataIndex: e.dataIndex
  25106. })
  25107. }), e.off("mouseout").on("mouseout", function() {
  25108. n._focusAdjacencyDisabled || i.dispatchAction({
  25109. type: "unfocusNodeAdjacency",
  25110. seriesId: t.id
  25111. })
  25112. }))
  25113. }), h.eachItemGraphicEl(function(e, o) {
  25114. h.getItemModel(o).get("focusNodeAdjacency") && (e.off("mouseover").on("mouseover", function() {
  25115. n._focusAdjacencyDisabled || i.dispatchAction({
  25116. type: "focusNodeAdjacency",
  25117. seriesId: t.id,
  25118. edgeDataIndex: e.dataIndex
  25119. })
  25120. }), e.off("mouseout").on("mouseout", function() {
  25121. n._focusAdjacencyDisabled || i.dispatchAction({
  25122. type: "unfocusNodeAdjacency",
  25123. seriesId: t.id
  25124. })
  25125. }))
  25126. }), !this._data && t.get("animation") && a.setClipPath(Cp(a.getBoundingRect(), t, function() {
  25127. a.removeClipPath()
  25128. })), this._data = t.getData()
  25129. },
  25130. dispose: function() {},
  25131. focusNodeAdjacency: function(t, e, i, n) {
  25132. var o = this._model.getData(),
  25133. a = o.graph,
  25134. r = n.dataIndex,
  25135. s = o.getItemModel(r),
  25136. l = n.edgeDataIndex;
  25137. if (null != r || null != l) {
  25138. var u = a.getNodeByIndex(r),
  25139. h = a.getEdgeByIndex(l);
  25140. if (a.eachNode(function(t) {
  25141. Ap(t, fk, .1)
  25142. }), a.eachEdge(function(t) {
  25143. Ap(t, pk, .1)
  25144. }), u) {
  25145. Dp(u, fk);
  25146. var c = s.get("focusNodeAdjacency");
  25147. "outEdges" === c ? d(u.outEdges, function(t) {
  25148. t.dataIndex < 0 || (Dp(t, pk), Dp(t.node2, fk))
  25149. }) : "inEdges" === c ? d(u.inEdges, function(t) {
  25150. t.dataIndex < 0 || (Dp(t, pk), Dp(t.node1, fk))
  25151. }) : "allEdges" === c && d(u.edges, function(t) {
  25152. t.dataIndex < 0 || (Dp(t, pk), Dp(t.node1, fk), Dp(t.node2, fk))
  25153. })
  25154. }
  25155. h && (Dp(h, pk), Dp(h.node1, fk), Dp(h.node2, fk))
  25156. }
  25157. },
  25158. unfocusNodeAdjacency: function(t, e, i, n) {
  25159. var o = this._model.getGraph();
  25160. o.eachNode(function(t) {
  25161. Ap(t, fk)
  25162. }), o.eachEdge(function(t) {
  25163. Ap(t, pk)
  25164. })
  25165. }
  25166. }), Ps({
  25167. type: "dragNode",
  25168. event: "dragNode",
  25169. update: "update"
  25170. }, function(t, e) {
  25171. e.eachComponent({
  25172. mainType: "series",
  25173. subType: "sankey",
  25174. query: t
  25175. }, function(e) {
  25176. e.setNodePosition(t.dataIndex, [t.localX, t.localY])
  25177. })
  25178. });
  25179. Os(function(t, e, i) {
  25180. t.eachSeriesByType("sankey", function(t) {
  25181. var i = t.get("nodeWidth"),
  25182. n = t.get("nodeGap"),
  25183. o = kp(t, e);
  25184. t.layoutInfo = o;
  25185. var a = o.width,
  25186. r = o.height,
  25187. s = t.getGraph(),
  25188. l = s.nodes,
  25189. u = s.edges;
  25190. Np(l), Pp(l, u, i, n, a, r, 0 !== g(l, function(t) {
  25191. return 0 === t.getLayout().value
  25192. }).length ? 0 : t.get("layoutIterations"), t.get("orient"))
  25193. })
  25194. }), Es(function(t, e) {
  25195. t.eachSeriesByType("sankey", function(t) {
  25196. var e = t.getGraph().nodes;
  25197. if (e.length) {
  25198. var i = 1 / 0,
  25199. n = -1 / 0;
  25200. d(e, function(t) {
  25201. var e = t.getLayout().value;
  25202. e < i && (i = e), e > n && (n = e)
  25203. }), d(e, function(e) {
  25204. var o = new jC({
  25205. type: "color",
  25206. mappingMethod: "linear",
  25207. dataExtent: [i, n],
  25208. visual: t.get("color")
  25209. }).mapValueToVisual(e.getLayout().value);
  25210. e.setVisual("color", o);
  25211. var a = e.getModel().get("itemStyle.color");
  25212. null != a && e.setVisual("color", a)
  25213. })
  25214. }
  25215. })
  25216. });
  25217. var mk = {
  25218. _baseAxisDim: null,
  25219. getInitialData: function(t, e) {
  25220. var i, n, o = e.getComponent("xAxis", this.get("xAxisIndex")),
  25221. a = e.getComponent("yAxis", this.get("yAxisIndex")),
  25222. r = o.get("type"),
  25223. s = a.get("type");
  25224. "category" === r ? (t.layout = "horizontal", i = o.getOrdinalMeta(), n = !0) : "category" === s ? (t.layout =
  25225. "vertical", i = a.getOrdinalMeta(), n = !0) : t.layout = t.layout || "horizontal";
  25226. var l = ["x", "y"],
  25227. u = "horizontal" === t.layout ? 0 : 1,
  25228. h = this._baseAxisDim = l[u],
  25229. c = l[1 - u],
  25230. f = [o, a],
  25231. p = f[u].get("type"),
  25232. g = f[1 - u].get("type"),
  25233. m = t.data;
  25234. if (m && n) {
  25235. var v = [];
  25236. d(m, function(t, e) {
  25237. var i;
  25238. t.value && y(t.value) ? (i = t.value.slice(), t.value.unshift(e)) : y(t) ? (i = t.slice(), t.unshift(e)) : i =
  25239. t, v.push(i)
  25240. }), t.data = v
  25241. }
  25242. var x = this.defaultValueDimensions;
  25243. return WD(this, {
  25244. coordDimensions: [{
  25245. name: h,
  25246. type: Xs(p),
  25247. ordinalMeta: i,
  25248. otherDims: {
  25249. tooltip: !1,
  25250. itemName: 0
  25251. },
  25252. dimsDef: ["base"]
  25253. }, {
  25254. name: c,
  25255. type: Xs(g),
  25256. dimsDef: x.slice()
  25257. }],
  25258. dimensionsCount: x.length + 1
  25259. })
  25260. },
  25261. getBaseAxis: function() {
  25262. var t = this._baseAxisDim;
  25263. return this.ecModel.getComponent(t + "Axis", this.get(t + "AxisIndex")).axis
  25264. }
  25265. };
  25266. h(OI.extend({
  25267. type: "series.boxplot",
  25268. dependencies: ["xAxis", "yAxis", "grid"],
  25269. defaultValueDimensions: [{
  25270. name: "min",
  25271. defaultTooltip: !0
  25272. }, {
  25273. name: "Q1",
  25274. defaultTooltip: !0
  25275. }, {
  25276. name: "median",
  25277. defaultTooltip: !0
  25278. }, {
  25279. name: "Q3",
  25280. defaultTooltip: !0
  25281. }, {
  25282. name: "max",
  25283. defaultTooltip: !0
  25284. }],
  25285. dimensions: null,
  25286. defaultOption: {
  25287. zlevel: 0,
  25288. z: 2,
  25289. coordinateSystem: "cartesian2d",
  25290. legendHoverLink: !0,
  25291. hoverAnimation: !0,
  25292. layout: null,
  25293. boxWidth: [7, 50],
  25294. itemStyle: {
  25295. color: "#fff",
  25296. borderWidth: 1
  25297. },
  25298. emphasis: {
  25299. itemStyle: {
  25300. borderWidth: 2,
  25301. shadowBlur: 5,
  25302. shadowOffsetX: 2,
  25303. shadowOffsetY: 2,
  25304. shadowColor: "rgba(0,0,0,0.4)"
  25305. }
  25306. },
  25307. animationEasing: "elasticOut",
  25308. animationDuration: 800
  25309. }
  25310. }), mk, !0);
  25311. var vk = ["itemStyle"],
  25312. yk = ["emphasis", "itemStyle"],
  25313. xk = (Mr.extend({
  25314. type: "boxplot",
  25315. render: function(t, e, i) {
  25316. var n = t.getData(),
  25317. o = this.group,
  25318. a = this._data;
  25319. this._data || o.removeAll();
  25320. var r = "horizontal" === t.get("layout") ? 1 : 0;
  25321. n.diff(a).add(function(t) {
  25322. if (n.hasValue(t)) {
  25323. var e = qp(n.getItemLayout(t), n, t, r, !0);
  25324. n.setItemGraphicEl(t, e), o.add(e)
  25325. }
  25326. }).update(function(t, e) {
  25327. var i = a.getItemGraphicEl(e);
  25328. if (n.hasValue(t)) {
  25329. var s = n.getItemLayout(t);
  25330. i ? Kp(s, i, n, t) : i = qp(s, n, t, r), o.add(i), n.setItemGraphicEl(t, i)
  25331. } else o.remove(i)
  25332. }).remove(function(t) {
  25333. var e = a.getItemGraphicEl(t);
  25334. e && o.remove(e)
  25335. }).execute(), this._data = n
  25336. },
  25337. remove: function(t) {
  25338. var e = this.group,
  25339. i = this._data;
  25340. this._data = null, i && i.eachItemGraphicEl(function(t) {
  25341. t && e.remove(t)
  25342. })
  25343. },
  25344. dispose: B
  25345. }), kn.extend({
  25346. type: "boxplotBoxPath",
  25347. shape: {},
  25348. buildPath: function(t, e) {
  25349. var i = e.points,
  25350. n = 0;
  25351. for (t.moveTo(i[n][0], i[n][1]), n++; n < 4; n++) t.lineTo(i[n][0], i[n][1]);
  25352. for (t.closePath(); n < i.length; n++) t.moveTo(i[n][0], i[n][1]), n++, t.lineTo(i[n][0], i[n][1])
  25353. }
  25354. })),
  25355. _k = ["itemStyle", "borderColor"],
  25356. wk = d;
  25357. Es(function(t, e) {
  25358. var i = t.get("color");
  25359. t.eachRawSeriesByType("boxplot", function(e) {
  25360. var n = i[e.seriesIndex % i.length],
  25361. o = e.getData();
  25362. o.setVisual({
  25363. legendSymbol: "roundRect",
  25364. color: e.get(_k) || n
  25365. }), t.isSeriesFiltered(e) || o.each(function(t) {
  25366. var e = o.getItemModel(t);
  25367. o.setItemVisual(t, {
  25368. color: e.get(_k, !0)
  25369. })
  25370. })
  25371. })
  25372. }), Os(function(t) {
  25373. var e = Jp(t);
  25374. wk(e, function(t) {
  25375. var e = t.seriesModels;
  25376. e.length && (Qp(t), wk(e, function(e, i) {
  25377. tg(e, t.boxOffsetList[i], t.boxWidthList[i])
  25378. }))
  25379. })
  25380. }), h(OI.extend({
  25381. type: "series.candlestick",
  25382. dependencies: ["xAxis", "yAxis", "grid"],
  25383. defaultValueDimensions: [{
  25384. name: "open",
  25385. defaultTooltip: !0
  25386. }, {
  25387. name: "close",
  25388. defaultTooltip: !0
  25389. }, {
  25390. name: "lowest",
  25391. defaultTooltip: !0
  25392. }, {
  25393. name: "highest",
  25394. defaultTooltip: !0
  25395. }],
  25396. dimensions: null,
  25397. defaultOption: {
  25398. zlevel: 0,
  25399. z: 2,
  25400. coordinateSystem: "cartesian2d",
  25401. legendHoverLink: !0,
  25402. hoverAnimation: !0,
  25403. layout: null,
  25404. itemStyle: {
  25405. color: "#c23531",
  25406. color0: "#314656",
  25407. borderWidth: 1,
  25408. borderColor: "#c23531",
  25409. borderColor0: "#314656"
  25410. },
  25411. emphasis: {
  25412. itemStyle: {
  25413. borderWidth: 2
  25414. }
  25415. },
  25416. barMaxWidth: null,
  25417. barMinWidth: null,
  25418. barWidth: null,
  25419. large: !0,
  25420. largeThreshold: 600,
  25421. progressive: 3e3,
  25422. progressiveThreshold: 1e4,
  25423. progressiveChunkMode: "mod",
  25424. animationUpdate: !1,
  25425. animationEasing: "linear",
  25426. animationDuration: 300
  25427. },
  25428. getShadowDim: function() {
  25429. return "open"
  25430. },
  25431. brushSelector: function(t, e, i) {
  25432. var n = e.getItemLayout(t);
  25433. return n && i.rect(n.brushRect)
  25434. }
  25435. }), mk, !0);
  25436. var bk = ["itemStyle"],
  25437. Sk = ["emphasis", "itemStyle"],
  25438. Mk = ["color", "color0", "borderColor", "borderColor0"],
  25439. Ik = (Mr.extend({
  25440. type: "candlestick",
  25441. render: function(t, e, i) {
  25442. this._updateDrawMode(t), this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t)
  25443. },
  25444. incrementalPrepareRender: function(t, e, i) {
  25445. this._clear(), this._updateDrawMode(t)
  25446. },
  25447. incrementalRender: function(t, e, i, n) {
  25448. this._isLargeDraw ? this._incrementalRenderLarge(t, e) : this._incrementalRenderNormal(t, e)
  25449. },
  25450. _updateDrawMode: function(t) {
  25451. var e = t.pipelineContext.large;
  25452. (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear())
  25453. },
  25454. _renderNormal: function(t) {
  25455. var e = t.getData(),
  25456. i = this._data,
  25457. n = this.group,
  25458. o = e.getLayout("isSimpleBox");
  25459. this._data || n.removeAll(), e.diff(i).add(function(i) {
  25460. if (e.hasValue(i)) {
  25461. var a, r = e.getItemLayout(i);
  25462. So(a = eg(r, 0, !0), {
  25463. shape: {
  25464. points: r.ends
  25465. }
  25466. }, t, i), ig(a, e, i, o), n.add(a), e.setItemGraphicEl(i, a)
  25467. }
  25468. }).update(function(a, r) {
  25469. var s = i.getItemGraphicEl(r);
  25470. if (e.hasValue(a)) {
  25471. var l = e.getItemLayout(a);
  25472. s ? bo(s, {
  25473. shape: {
  25474. points: l.ends
  25475. }
  25476. }, t, a) : s = eg(l), ig(s, e, a, o), n.add(s), e.setItemGraphicEl(a, s)
  25477. } else n.remove(s)
  25478. }).remove(function(t) {
  25479. var e = i.getItemGraphicEl(t);
  25480. e && n.remove(e)
  25481. }).execute(), this._data = e
  25482. },
  25483. _renderLarge: function(t) {
  25484. this._clear(), og(t, this.group)
  25485. },
  25486. _incrementalRenderNormal: function(t, e) {
  25487. for (var i, n = e.getData(), o = n.getLayout("isSimpleBox"); null != (i = t.next());) {
  25488. var a;
  25489. ig(a = eg(n.getItemLayout(i)), n, i, o), a.incremental = !0, this.group.add(a)
  25490. }
  25491. },
  25492. _incrementalRenderLarge: function(t, e) {
  25493. og(e, this.group, !0)
  25494. },
  25495. remove: function(t) {
  25496. this._clear()
  25497. },
  25498. _clear: function() {
  25499. this.group.removeAll(), this._data = null
  25500. },
  25501. dispose: B
  25502. }), kn.extend({
  25503. type: "normalCandlestickBox",
  25504. shape: {},
  25505. buildPath: function(t, e) {
  25506. var i = e.points;
  25507. this.__simpleBox ? (t.moveTo(i[4][0], i[4][1]), t.lineTo(i[6][0], i[6][1])) : (t.moveTo(i[0][0], i[0][1]), t.lineTo(
  25508. i[1][0], i[1][1]), t.lineTo(i[2][0], i[2][1]), t.lineTo(i[3][0], i[3][1]), t.closePath(), t.moveTo(i[4][0],
  25509. i[4][1]), t.lineTo(i[5][0], i[5][1]), t.moveTo(i[6][0], i[6][1]), t.lineTo(i[7][0], i[7][1]))
  25510. }
  25511. })),
  25512. Tk = kn.extend({
  25513. type: "largeCandlestickBox",
  25514. shape: {},
  25515. buildPath: function(t, e) {
  25516. for (var i = e.points, n = 0; n < i.length;)
  25517. if (this.__sign === i[n++]) {
  25518. var o = i[n++];
  25519. t.moveTo(o, i[n++]), t.lineTo(o, i[n++])
  25520. } else n += 3
  25521. }
  25522. }),
  25523. Ak = ["itemStyle", "borderColor"],
  25524. Dk = ["itemStyle", "borderColor0"],
  25525. Ck = ["itemStyle", "color"],
  25526. Lk = ["itemStyle", "color0"],
  25527. kk = {
  25528. seriesType: "candlestick",
  25529. plan: zI(),
  25530. performRawSeries: !0,
  25531. reset: function(t, e) {
  25532. function i(t, e) {
  25533. return e.get(t > 0 ? Ck : Lk)
  25534. }
  25535. function n(t, e) {
  25536. return e.get(t > 0 ? Ak : Dk)
  25537. }
  25538. var o = t.getData(),
  25539. a = t.pipelineContext.large;
  25540. if (o.setVisual({
  25541. legendSymbol: "roundRect",
  25542. colorP: i(1, t),
  25543. colorN: i(-1, t),
  25544. borderColorP: n(1, t),
  25545. borderColorN: n(-1, t)
  25546. }), !e.isSeriesFiltered(t)) return !a && {
  25547. progress: function(t, e) {
  25548. for (var o; null != (o = t.next());) {
  25549. var a = e.getItemModel(o),
  25550. r = e.getItemLayout(o).sign;
  25551. e.setItemVisual(o, {
  25552. color: i(r, a),
  25553. borderColor: n(r, a)
  25554. })
  25555. }
  25556. }
  25557. }
  25558. }
  25559. },
  25560. Pk = "undefined" != typeof Float32Array ? Float32Array : Array,
  25561. Nk = {
  25562. seriesType: "candlestick",
  25563. plan: zI(),
  25564. reset: function(t) {
  25565. var e = t.coordinateSystem,
  25566. i = t.getData(),
  25567. n = sg(t, i),
  25568. o = 0,
  25569. a = 1,
  25570. r = ["x", "y"],
  25571. s = i.mapDimension(r[o]),
  25572. l = i.mapDimension(r[a], !0),
  25573. u = l[0],
  25574. h = l[1],
  25575. c = l[2],
  25576. d = l[3];
  25577. if (i.setLayout({
  25578. candleWidth: n,
  25579. isSimpleBox: n <= 1.3
  25580. }), !(null == s || l.length < 4)) return {
  25581. progress: t.pipelineContext.large ? function(t, i) {
  25582. for (var n, r, l = new Pk(5 * t.count), f = 0, p = [], g = []; null != (r = t.next());) {
  25583. var m = i.get(s, r),
  25584. v = i.get(u, r),
  25585. y = i.get(h, r),
  25586. x = i.get(c, r),
  25587. _ = i.get(d, r);
  25588. isNaN(m) || isNaN(x) || isNaN(_) ? (l[f++] = NaN, f += 4) : (l[f++] = rg(i, r, v, y, h), p[o] = m, p[a] = x,
  25589. n = e.dataToPoint(p, null, g), l[f++] = n ? n[0] : NaN, l[f++] = n ? n[1] : NaN, p[a] = _, n = e.dataToPoint(
  25590. p, null, g), l[f++] = n ? n[1] : NaN)
  25591. }
  25592. i.setLayout("largePoints", l)
  25593. } : function(t, i) {
  25594. function r(t, i) {
  25595. var n = [];
  25596. return n[o] = i, n[a] = t, isNaN(i) || isNaN(t) ? [NaN, NaN] : e.dataToPoint(n)
  25597. }
  25598. function l(t, e, i) {
  25599. var a = e.slice(),
  25600. r = e.slice();
  25601. a[o] = Yn(a[o] + n / 2, 1, !1), r[o] = Yn(r[o] - n / 2, 1, !0), i ? t.push(a, r) : t.push(r, a)
  25602. }
  25603. function f(t) {
  25604. return t[o] = Yn(t[o], 1), t
  25605. }
  25606. for (var p; null != (p = t.next());) {
  25607. var g = i.get(s, p),
  25608. m = i.get(u, p),
  25609. v = i.get(h, p),
  25610. y = i.get(c, p),
  25611. x = i.get(d, p),
  25612. _ = Math.min(m, v),
  25613. w = Math.max(m, v),
  25614. b = r(_, g),
  25615. S = r(w, g),
  25616. M = r(y, g),
  25617. I = r(x, g),
  25618. T = [];
  25619. l(T, S, 0), l(T, b, 1), T.push(f(I), f(S), f(M), f(b)), i.setItemLayout(p, {
  25620. sign: rg(i, p, m, v, h),
  25621. initBaseline: m > v ? S[a] : b[a],
  25622. ends: T,
  25623. brushRect: function(t, e, i) {
  25624. var s = r(t, i),
  25625. l = r(e, i);
  25626. return s[o] -= n / 2, l[o] -= n / 2, {
  25627. x: s[0],
  25628. y: s[1],
  25629. width: a ? n : l[0] - s[0],
  25630. height: a ? l[1] - s[1] : n
  25631. }
  25632. }(y, x, g)
  25633. })
  25634. }
  25635. }
  25636. }
  25637. }
  25638. };
  25639. Ls(function(t) {
  25640. t && y(t.series) && d(t.series, function(t) {
  25641. w(t) && "k" === t.type && (t.type = "candlestick")
  25642. })
  25643. }), Es(kk), Os(Nk), OI.extend({
  25644. type: "series.effectScatter",
  25645. dependencies: ["grid", "polar"],
  25646. getInitialData: function(t, e) {
  25647. return dl(this.getSource(), this)
  25648. },
  25649. brushSelector: "point",
  25650. defaultOption: {
  25651. coordinateSystem: "cartesian2d",
  25652. zlevel: 0,
  25653. z: 2,
  25654. legendHoverLink: !0,
  25655. effectType: "ripple",
  25656. progressive: 0,
  25657. showEffectOn: "render",
  25658. rippleEffect: {
  25659. period: 4,
  25660. scale: 2.5,
  25661. brushType: "fill"
  25662. },
  25663. symbolSize: 10
  25664. }
  25665. });
  25666. var Ok = hg.prototype;
  25667. Ok.stopEffectAnimation = function() {
  25668. this.childAt(1).removeAll()
  25669. }, Ok.startEffectAnimation = function(t) {
  25670. for (var e = t.symbolType, i = t.color, n = this.childAt(1), o = 0; o < 3; o++) {
  25671. var a = Xl(e, -1, -1, 2, 2, i);
  25672. a.attr({
  25673. style: {
  25674. strokeNoScale: !0
  25675. },
  25676. z2: 99,
  25677. silent: !0,
  25678. scale: [.5, .5]
  25679. });
  25680. var r = -o / 3 * t.period + t.effectOffset;
  25681. a.animate("", !0).when(t.period, {
  25682. scale: [t.rippleScale / 2, t.rippleScale / 2]
  25683. }).delay(r).start(), a.animateStyle(!0).when(t.period, {
  25684. opacity: 0
  25685. }).delay(r).start(), n.add(a)
  25686. }
  25687. ug(n, t)
  25688. }, Ok.updateEffectAnimation = function(t) {
  25689. for (var e = this._effectCfg, i = this.childAt(1), n = ["symbolType", "period", "rippleScale"], o = 0; o < n.length; o++) {
  25690. var a = n[o];
  25691. if (e[a] !== t[a]) return this.stopEffectAnimation(), void this.startEffectAnimation(t)
  25692. }
  25693. ug(i, t)
  25694. }, Ok.highlight = function() {
  25695. this.trigger("emphasis")
  25696. }, Ok.downplay = function() {
  25697. this.trigger("normal")
  25698. }, Ok.updateData = function(t, e) {
  25699. var i = t.hostModel;
  25700. this.childAt(0).updateData(t, e);
  25701. var n = this.childAt(1),
  25702. o = t.getItemModel(e),
  25703. a = t.getItemVisual(e, "symbol"),
  25704. r = lg(t.getItemVisual(e, "symbolSize")),
  25705. s = t.getItemVisual(e, "color");
  25706. n.attr("scale", r), n.traverse(function(t) {
  25707. t.attr({
  25708. fill: s
  25709. })
  25710. });
  25711. var l = o.getShallow("symbolOffset");
  25712. if (l) {
  25713. var u = n.position;
  25714. u[0] = Ro(l[0], r[0]), u[1] = Ro(l[1], r[1])
  25715. }
  25716. n.rotation = (o.getShallow("symbolRotate") || 0) * Math.PI / 180 || 0;
  25717. var h = {};
  25718. if (h.showEffectOn = i.get("showEffectOn"), h.rippleScale = o.get("rippleEffect.scale"), h.brushType = o.get(
  25719. "rippleEffect.brushType"), h.period = 1e3 * o.get("rippleEffect.period"), h.effectOffset = e / t.count(), h.z = o
  25720. .getShallow("z") || 0, h.zlevel = o.getShallow("zlevel") || 0, h.symbolType = a, h.color = s, this.off("mouseover")
  25721. .off("mouseout").off("emphasis").off("normal"), "render" === h.showEffectOn) this._effectCfg ? this.updateEffectAnimation(
  25722. h) : this.startEffectAnimation(h), this._effectCfg = h;
  25723. else {
  25724. this._effectCfg = null, this.stopEffectAnimation();
  25725. var c = this.childAt(0),
  25726. d = function() {
  25727. c.highlight(), "render" !== h.showEffectOn && this.startEffectAnimation(h)
  25728. },
  25729. f = function() {
  25730. c.downplay(), "render" !== h.showEffectOn && this.stopEffectAnimation()
  25731. };
  25732. this.on("mouseover", d, this).on("mouseout", f, this).on("emphasis", d, this).on("normal", f, this)
  25733. }
  25734. this._effectCfg = h
  25735. }, Ok.fadeOut = function(t) {
  25736. this.off("mouseover").off("mouseout").off("emphasis").off("normal"), t && t()
  25737. }, u(hg, Zw), Fs({
  25738. type: "effectScatter",
  25739. init: function() {
  25740. this._symbolDraw = new Su(hg)
  25741. },
  25742. render: function(t, e, i) {
  25743. var n = t.getData(),
  25744. o = this._symbolDraw;
  25745. o.updateData(n), this.group.add(o.group)
  25746. },
  25747. updateTransform: function(t, e, i) {
  25748. var n = t.getData();
  25749. this.group.dirty();
  25750. var o = cD().reset(t);
  25751. o.progress && o.progress({
  25752. start: 0,
  25753. end: n.count()
  25754. }, n), this._symbolDraw.updateLayout(n)
  25755. },
  25756. _updateGroupTransform: function(t) {
  25757. var e = t.coordinateSystem;
  25758. e && e.getRoamTransform && (this.group.transform = Mt(e.getRoamTransform()), this.group.decomposeTransform())
  25759. },
  25760. remove: function(t, e) {
  25761. this._symbolDraw && this._symbolDraw.remove(e)
  25762. },
  25763. dispose: function() {}
  25764. }), Es(hD("effectScatter", "circle")), Os(cD("effectScatter"));
  25765. var Ek = "undefined" == typeof Uint32Array ? Array : Uint32Array,
  25766. Rk = "undefined" == typeof Float64Array ? Array : Float64Array,
  25767. zk = OI.extend({
  25768. type: "series.lines",
  25769. dependencies: ["grid", "polar"],
  25770. visualColorAccessPath: "lineStyle.color",
  25771. init: function(t) {
  25772. t.data = t.data || [], cg(t);
  25773. var e = this._processFlatCoordsArray(t.data);
  25774. this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset, e.flatCoords && (t.data = new Float32Array(
  25775. e.count)), zk.superApply(this, "init", arguments)
  25776. },
  25777. mergeOption: function(t) {
  25778. if (t.data = t.data || [], cg(t), t.data) {
  25779. var e = this._processFlatCoordsArray(t.data);
  25780. this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset, e.flatCoords && (t.data = new Float32Array(
  25781. e.count))
  25782. }
  25783. zk.superApply(this, "mergeOption", arguments)
  25784. },
  25785. appendData: function(t) {
  25786. var e = this._processFlatCoordsArray(t.data);
  25787. e.flatCoords && (this._flatCoords ? (this._flatCoords = z(this._flatCoords, e.flatCoords), this._flatCoordsOffset =
  25788. z(this._flatCoordsOffset, e.flatCoordsOffset)) : (this._flatCoords = e.flatCoords, this._flatCoordsOffset = e
  25789. .flatCoordsOffset), t.data = new Float32Array(e.count)), this.getRawData().appendData(t.data)
  25790. },
  25791. _getCoordsFromItemModel: function(t) {
  25792. var e = this.getData().getItemModel(t);
  25793. return e.option instanceof Array ? e.option : e.getShallow("coords")
  25794. },
  25795. getLineCoordsCount: function(t) {
  25796. return this._flatCoordsOffset ? this._flatCoordsOffset[2 * t + 1] : this._getCoordsFromItemModel(t).length
  25797. },
  25798. getLineCoords: function(t, e) {
  25799. if (this._flatCoordsOffset) {
  25800. for (var i = this._flatCoordsOffset[2 * t], n = this._flatCoordsOffset[2 * t + 1], o = 0; o < n; o++) e[o] = e[
  25801. o] || [], e[o][0] = this._flatCoords[i + 2 * o], e[o][1] = this._flatCoords[i + 2 * o + 1];
  25802. return n
  25803. }
  25804. for (var a = this._getCoordsFromItemModel(t), o = 0; o < a.length; o++) e[o] = e[o] || [], e[o][0] = a[o][0], e[
  25805. o][1] = a[o][1];
  25806. return a.length
  25807. },
  25808. _processFlatCoordsArray: function(t) {
  25809. var e = 0;
  25810. if (this._flatCoords && (e = this._flatCoords.length), "number" == typeof t[0]) {
  25811. for (var i = t.length, n = new Ek(i), o = new Rk(i), a = 0, r = 0, s = 0, l = 0; l < i;) {
  25812. s++;
  25813. var u = t[l++];
  25814. n[r++] = a + e, n[r++] = u;
  25815. for (var h = 0; h < u; h++) {
  25816. var c = t[l++],
  25817. d = t[l++];
  25818. o[a++] = c, o[a++] = d
  25819. }
  25820. }
  25821. return {
  25822. flatCoordsOffset: new Uint32Array(n.buffer, 0, r),
  25823. flatCoords: o,
  25824. count: s
  25825. }
  25826. }
  25827. return {
  25828. flatCoordsOffset: null,
  25829. flatCoords: null,
  25830. count: t.length
  25831. }
  25832. },
  25833. getInitialData: function(t, e) {
  25834. var i = new eA(["value"], this);
  25835. return i.hasItemOption = !1, i.initData(t.data, [], function(t, e, n, o) {
  25836. if (t instanceof Array) return NaN;
  25837. i.hasItemOption = !0;
  25838. var a = t.value;
  25839. return null != a ? a instanceof Array ? a[o] : a : void 0
  25840. }), i
  25841. },
  25842. formatTooltip: function(t) {
  25843. var e = this.getData().getItemModel(t),
  25844. i = e.get("name");
  25845. if (i) return i;
  25846. var n = e.get("fromName"),
  25847. o = e.get("toName"),
  25848. a = [];
  25849. return null != n && a.push(n), null != o && a.push(o), Qo(a.join(" > "))
  25850. },
  25851. preventIncremental: function() {
  25852. return !!this.get("effect.show")
  25853. },
  25854. getProgressive: function() {
  25855. var t = this.option.progressive;
  25856. return null == t ? this.option.large ? 1e4 : this.get("progressive") : t
  25857. },
  25858. getProgressiveThreshold: function() {
  25859. var t = this.option.progressiveThreshold;
  25860. return null == t ? this.option.large ? 2e4 : this.get("progressiveThreshold") : t
  25861. },
  25862. defaultOption: {
  25863. coordinateSystem: "geo",
  25864. zlevel: 0,
  25865. z: 2,
  25866. legendHoverLink: !0,
  25867. hoverAnimation: !0,
  25868. xAxisIndex: 0,
  25869. yAxisIndex: 0,
  25870. symbol: ["none", "none"],
  25871. symbolSize: [10, 10],
  25872. geoIndex: 0,
  25873. effect: {
  25874. show: !1,
  25875. period: 4,
  25876. constantSpeed: 0,
  25877. symbol: "circle",
  25878. symbolSize: 3,
  25879. loop: !0,
  25880. trailLength: .2
  25881. },
  25882. large: !1,
  25883. largeThreshold: 2e3,
  25884. polyline: !1,
  25885. label: {
  25886. show: !1,
  25887. position: "end"
  25888. },
  25889. lineStyle: {
  25890. opacity: .5
  25891. }
  25892. }
  25893. }),
  25894. Bk = dg.prototype;
  25895. Bk.createLine = function(t, e, i) {
  25896. return new $d(t, e, i)
  25897. }, Bk._updateEffectSymbol = function(t, e) {
  25898. var i = t.getItemModel(e).getModel("effect"),
  25899. n = i.get("symbolSize"),
  25900. o = i.get("symbol");
  25901. y(n) || (n = [n, n]);
  25902. var a = i.get("color") || t.getItemVisual(e, "color"),
  25903. r = this.childAt(1);
  25904. this._symbolType !== o && (this.remove(r), (r = Xl(o, -.5, -.5, 1, 1, a)).z2 = 100, r.culling = !0, this.add(r)), r &&
  25905. (r.setStyle("shadowColor", a), r.setStyle(i.getItemStyle(["color"])), r.attr("scale", n), r.setColor(a), r.attr(
  25906. "scale", n), this._symbolType = o, this._updateEffectAnimation(t, i, e))
  25907. }, Bk._updateEffectAnimation = function(t, e, i) {
  25908. var n = this.childAt(1);
  25909. if (n) {
  25910. var o = this,
  25911. a = t.getItemLayout(i),
  25912. r = 1e3 * e.get("period"),
  25913. s = e.get("loop"),
  25914. l = e.get("constantSpeed"),
  25915. u = T(e.get("delay"), function(e) {
  25916. return e / t.count() * r / 3
  25917. }),
  25918. h = "function" == typeof u;
  25919. if (n.ignore = !0, this.updateAnimationPoints(n, a), l > 0 && (r = this.getLineLength(n) / l * 1e3), r !== this._period ||
  25920. s !== this._loop) {
  25921. n.stopAnimation();
  25922. var c = u;
  25923. h && (c = u(i)), n.__t > 0 && (c = -r * n.__t), n.__t = 0;
  25924. var d = n.animate("", s).when(r, {
  25925. __t: 1
  25926. }).delay(c).during(function() {
  25927. o.updateSymbolPosition(n)
  25928. });
  25929. s || d.done(function() {
  25930. o.remove(n)
  25931. }), d.start()
  25932. }
  25933. this._period = r, this._loop = s
  25934. }
  25935. }, Bk.getLineLength = function(t) {
  25936. return ew(t.__p1, t.__cp1) + ew(t.__cp1, t.__p2)
  25937. }, Bk.updateAnimationPoints = function(t, e) {
  25938. t.__p1 = e[0], t.__p2 = e[1], t.__cp1 = e[2] || [(e[0][0] + e[1][0]) / 2, (e[0][1] + e[1][1]) / 2]
  25939. }, Bk.updateData = function(t, e, i) {
  25940. this.childAt(0).updateData(t, e, i), this._updateEffectSymbol(t, e)
  25941. }, Bk.updateSymbolPosition = function(t) {
  25942. var e = t.__p1,
  25943. i = t.__p2,
  25944. n = t.__cp1,
  25945. o = t.__t,
  25946. a = t.position,
  25947. r = rn,
  25948. s = sn;
  25949. a[0] = r(e[0], n[0], i[0], o), a[1] = r(e[1], n[1], i[1], o);
  25950. var l = s(e[0], n[0], i[0], o),
  25951. u = s(e[1], n[1], i[1], o);
  25952. t.rotation = -Math.atan2(u, l) - Math.PI / 2, t.ignore = !1
  25953. }, Bk.updateLayout = function(t, e) {
  25954. this.childAt(0).updateLayout(t, e);
  25955. var i = t.getItemModel(e).getModel("effect");
  25956. this._updateEffectAnimation(t, i, e)
  25957. }, u(dg, Zw);
  25958. var Vk = fg.prototype;
  25959. Vk._createPolyline = function(t, e, i) {
  25960. var n = t.getItemLayout(e),
  25961. o = new oM({
  25962. shape: {
  25963. points: n
  25964. }
  25965. });
  25966. this.add(o), this._updateCommonStl(t, e, i)
  25967. }, Vk.updateData = function(t, e, i) {
  25968. var n = t.hostModel;
  25969. bo(this.childAt(0), {
  25970. shape: {
  25971. points: t.getItemLayout(e)
  25972. }
  25973. }, n, e), this._updateCommonStl(t, e, i)
  25974. }, Vk._updateCommonStl = function(t, e, i) {
  25975. var n = this.childAt(0),
  25976. o = t.getItemModel(e),
  25977. a = t.getItemVisual(e, "color"),
  25978. s = i && i.lineStyle,
  25979. l = i && i.hoverLineStyle;
  25980. i && !t.hasItemOption || (s = o.getModel("lineStyle").getLineStyle(), l = o.getModel("emphasis.lineStyle").getLineStyle()),
  25981. n.useStyle(r({
  25982. strokeNoScale: !0,
  25983. fill: "none",
  25984. stroke: a
  25985. }, s)), n.hoverStyle = l, uo(this)
  25986. }, Vk.updateLayout = function(t, e) {
  25987. this.childAt(0).setShape("points", t.getItemLayout(e))
  25988. }, u(fg, Zw);
  25989. var Gk = pg.prototype;
  25990. Gk.createLine = function(t, e, i) {
  25991. return new fg(t, e, i)
  25992. }, Gk.updateAnimationPoints = function(t, e) {
  25993. this._points = e;
  25994. for (var i = [0], n = 0, o = 1; o < e.length; o++) {
  25995. var a = e[o - 1],
  25996. r = e[o];
  25997. n += ew(a, r), i.push(n)
  25998. }
  25999. if (0 !== n) {
  26000. for (o = 0; o < i.length; o++) i[o] /= n;
  26001. this._offsets = i, this._length = n
  26002. }
  26003. }, Gk.getLineLength = function(t) {
  26004. return this._length
  26005. }, Gk.updateSymbolPosition = function(t) {
  26006. var e = t.__t,
  26007. i = this._points,
  26008. n = this._offsets,
  26009. o = i.length;
  26010. if (n) {
  26011. var a = this._lastFrame;
  26012. if (e < this._lastFramePercent) {
  26013. for (r = Math.min(a + 1, o - 1); r >= 0 && !(n[r] <= e); r--);
  26014. r = Math.min(r, o - 2)
  26015. } else {
  26016. for (var r = a; r < o && !(n[r] > e); r++);
  26017. r = Math.min(r - 1, o - 2)
  26018. }
  26019. J(t.position, i[r], i[r + 1], (e - n[r]) / (n[r + 1] - n[r]));
  26020. var s = i[r + 1][0] - i[r][0],
  26021. l = i[r + 1][1] - i[r][1];
  26022. t.rotation = -Math.atan2(l, s) - Math.PI / 2, this._lastFrame = r, this._lastFramePercent = e, t.ignore = !1
  26023. }
  26024. }, u(pg, dg);
  26025. var Fk = Fn({
  26026. shape: {
  26027. polyline: !1,
  26028. curveness: 0,
  26029. segs: []
  26030. },
  26031. buildPath: function(t, e) {
  26032. var i = e.segs,
  26033. n = e.curveness;
  26034. if (e.polyline)
  26035. for (r = 0; r < i.length;) {
  26036. var o = i[r++];
  26037. if (o > 0) {
  26038. t.moveTo(i[r++], i[r++]);
  26039. for (var a = 1; a < o; a++) t.lineTo(i[r++], i[r++])
  26040. }
  26041. } else
  26042. for (var r = 0; r < i.length;) {
  26043. var s = i[r++],
  26044. l = i[r++],
  26045. u = i[r++],
  26046. h = i[r++];
  26047. if (t.moveTo(s, l), n > 0) {
  26048. var c = (s + u) / 2 - (l - h) * n,
  26049. d = (l + h) / 2 - (u - s) * n;
  26050. t.quadraticCurveTo(c, d, u, h)
  26051. } else t.lineTo(u, h)
  26052. }
  26053. },
  26054. findDataIndex: function(t, e) {
  26055. var i = this.shape,
  26056. n = i.segs,
  26057. o = i.curveness;
  26058. if (i.polyline)
  26059. for (var a = 0, r = 0; r < n.length;) {
  26060. var s = n[r++];
  26061. if (s > 0)
  26062. for (var l = n[r++], u = n[r++], h = 1; h < s; h++)
  26063. if (vn(l, u, c = n[r++], d = n[r++])) return a;
  26064. a++
  26065. } else
  26066. for (var a = 0, r = 0; r < n.length;) {
  26067. var l = n[r++],
  26068. u = n[r++],
  26069. c = n[r++],
  26070. d = n[r++];
  26071. if (o > 0) {
  26072. if (xn(l, u, (l + c) / 2 - (u - d) * o, (u + d) / 2 - (c - l) * o, c, d)) return a
  26073. } else if (vn(l, u, c, d)) return a;
  26074. a++
  26075. }
  26076. return -1
  26077. }
  26078. }),
  26079. Wk = gg.prototype;
  26080. Wk.isPersistent = function() {
  26081. return !this._incremental
  26082. }, Wk.updateData = function(t) {
  26083. this.group.removeAll();
  26084. var e = new Fk({
  26085. rectHover: !0,
  26086. cursor: "default"
  26087. });
  26088. e.setShape({
  26089. segs: t.getLayout("linesPoints")
  26090. }), this._setCommon(e, t), this.group.add(e), this._incremental = null
  26091. }, Wk.incrementalPrepareUpdate = function(t) {
  26092. this.group.removeAll(), this._clearIncremental(), t.count() > 5e5 ? (this._incremental || (this._incremental = new Gn({
  26093. silent: !0
  26094. })), this.group.add(this._incremental)) : this._incremental = null
  26095. }, Wk.incrementalUpdate = function(t, e) {
  26096. var i = new Fk;
  26097. i.setShape({
  26098. segs: e.getLayout("linesPoints")
  26099. }), this._setCommon(i, e, !!this._incremental), this._incremental ? this._incremental.addDisplayable(i, !0) : (i.rectHover = !
  26100. 0, i.cursor = "default", i.__startIndex = t.start, this.group.add(i))
  26101. }, Wk.remove = function() {
  26102. this._clearIncremental(), this._incremental = null, this.group.removeAll()
  26103. }, Wk._setCommon = function(t, e, i) {
  26104. var n = e.hostModel;
  26105. t.setShape({
  26106. polyline: n.get("polyline"),
  26107. curveness: n.get("lineStyle.curveness")
  26108. }), t.useStyle(n.getModel("lineStyle").getLineStyle()), t.style.strokeNoScale = !0;
  26109. var o = e.getVisual("color");
  26110. o && t.setStyle("stroke", o), t.setStyle("fill"), i || (t.seriesIndex = n.seriesIndex, t.on("mousemove", function(e) {
  26111. t.dataIndex = null;
  26112. var i = t.findDataIndex(e.offsetX, e.offsetY);
  26113. i > 0 && (t.dataIndex = i + t.__startIndex)
  26114. }))
  26115. }, Wk._clearIncremental = function() {
  26116. var t = this._incremental;
  26117. t && t.clearDisplaybles()
  26118. };
  26119. var Hk = {
  26120. seriesType: "lines",
  26121. plan: zI(),
  26122. reset: function(t) {
  26123. var e = t.coordinateSystem,
  26124. i = t.get("polyline"),
  26125. n = t.pipelineContext.large;
  26126. return {
  26127. progress: function(o, a) {
  26128. var r = [];
  26129. if (n) {
  26130. var s, l = o.end - o.start;
  26131. if (i) {
  26132. for (var u = 0, h = o.start; h < o.end; h++) u += t.getLineCoordsCount(h);
  26133. s = new Float32Array(l + 2 * u)
  26134. } else s = new Float32Array(4 * l);
  26135. for (var c = 0, d = [], h = o.start; h < o.end; h++) {
  26136. g = t.getLineCoords(h, r), i && (s[c++] = g);
  26137. for (var f = 0; f < g; f++) d = e.dataToPoint(r[f], !1, d), s[c++] = d[0], s[c++] = d[1]
  26138. }
  26139. a.setLayout("linesPoints", s)
  26140. } else
  26141. for (h = o.start; h < o.end; h++) {
  26142. var p = a.getItemModel(h),
  26143. g = t.getLineCoords(h, r),
  26144. m = [];
  26145. if (i)
  26146. for (var v = 0; v < g; v++) m.push(e.dataToPoint(r[v]));
  26147. else {
  26148. m[0] = e.dataToPoint(r[0]), m[1] = e.dataToPoint(r[1]);
  26149. var y = p.get("lineStyle.curveness"); + y && (m[2] = [(m[0][0] + m[1][0]) / 2 - (m[0][1] - m[1][1]) * y, (m[
  26150. 0][1] + m[1][1]) / 2 - (m[1][0] - m[0][0]) * y])
  26151. }
  26152. a.setItemLayout(h, m)
  26153. }
  26154. }
  26155. }
  26156. }
  26157. };
  26158. Fs({
  26159. type: "lines",
  26160. init: function() {},
  26161. render: function(t, e, i) {
  26162. var n = t.getData(),
  26163. o = this._updateLineDraw(n, t),
  26164. a = t.get("zlevel"),
  26165. r = t.get("effect.trailLength"),
  26166. s = i.getZr(),
  26167. l = "svg" === s.painter.getType();
  26168. l || s.painter.getLayer(a).clear(!0), null == this._lastZlevel || l || s.configLayer(this._lastZlevel, {
  26169. motionBlur: !1
  26170. }), this._showEffect(t) && r && (l || s.configLayer(a, {
  26171. motionBlur: !0,
  26172. lastFrameAlpha: Math.max(Math.min(r / 10 + .9, 1), 0)
  26173. })), o.updateData(n), this._lastZlevel = a, this._finished = !0
  26174. },
  26175. incrementalPrepareRender: function(t, e, i) {
  26176. var n = t.getData();
  26177. this._updateLineDraw(n, t).incrementalPrepareUpdate(n), this._clearLayer(i), this._finished = !1
  26178. },
  26179. incrementalRender: function(t, e, i) {
  26180. this._lineDraw.incrementalUpdate(t, e.getData()), this._finished = t.end === e.getData().count()
  26181. },
  26182. updateTransform: function(t, e, i) {
  26183. var n = t.getData(),
  26184. o = t.pipelineContext;
  26185. if (!this._finished || o.large || o.progressiveRender) return {
  26186. update: !0
  26187. };
  26188. var a = Hk.reset(t);
  26189. a.progress && a.progress({
  26190. start: 0,
  26191. end: n.count()
  26192. }, n), this._lineDraw.updateLayout(), this._clearLayer(i)
  26193. },
  26194. _updateLineDraw: function(t, e) {
  26195. var i = this._lineDraw,
  26196. n = this._showEffect(e),
  26197. o = !!e.get("polyline"),
  26198. a = e.pipelineContext.large;
  26199. return i && n === this._hasEffet && o === this._isPolyline && a === this._isLargeDraw || (i && i.remove(), i =
  26200. this._lineDraw = a ? new gg : new Jd(o ? n ? pg : fg : n ? dg : $d), this._hasEffet = n, this._isPolyline = o,
  26201. this._isLargeDraw = a, this.group.removeAll()), this.group.add(i.group), i
  26202. },
  26203. _showEffect: function(t) {
  26204. return !!t.get("effect.show")
  26205. },
  26206. _clearLayer: function(t) {
  26207. var e = t.getZr();
  26208. "svg" === e.painter.getType() || null == this._lastZlevel || e.painter.getLayer(this._lastZlevel).clear(!0)
  26209. },
  26210. remove: function(t, e) {
  26211. this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(e)
  26212. },
  26213. dispose: function() {}
  26214. });
  26215. var Zk = "lineStyle.opacity".split("."),
  26216. Uk = {
  26217. seriesType: "lines",
  26218. reset: function(t, e, i) {
  26219. var n = mg(t.get("symbol")),
  26220. o = mg(t.get("symbolSize")),
  26221. a = t.getData();
  26222. return a.setVisual("fromSymbol", n && n[0]), a.setVisual("toSymbol", n && n[1]), a.setVisual("fromSymbolSize", o &&
  26223. o[0]), a.setVisual("toSymbolSize", o && o[1]), a.setVisual("opacity", t.get(Zk)), {
  26224. dataEach: a.hasItemOption ? function(t, e) {
  26225. var i = t.getItemModel(e),
  26226. n = mg(i.getShallow("symbol", !0)),
  26227. o = mg(i.getShallow("symbolSize", !0)),
  26228. a = i.get(Zk);
  26229. n[0] && t.setItemVisual(e, "fromSymbol", n[0]), n[1] && t.setItemVisual(e, "toSymbol", n[1]), o[0] && t.setItemVisual(
  26230. e, "fromSymbolSize", o[0]), o[1] && t.setItemVisual(e, "toSymbolSize", o[1]), t.setItemVisual(e, "opacity",
  26231. a)
  26232. } : null
  26233. }
  26234. }
  26235. };
  26236. Os(Hk), Es(Uk), OI.extend({
  26237. type: "series.heatmap",
  26238. getInitialData: function(t, e) {
  26239. return dl(this.getSource(), this, {
  26240. generateCoord: "value"
  26241. })
  26242. },
  26243. preventIncremental: function() {
  26244. var t = Ba.get(this.get("coordinateSystem"));
  26245. if (t && t.dimensions) return "lng" === t.dimensions[0] && "lat" === t.dimensions[1]
  26246. },
  26247. defaultOption: {
  26248. coordinateSystem: "cartesian2d",
  26249. zlevel: 0,
  26250. z: 2,
  26251. geoIndex: 0,
  26252. blurSize: 30,
  26253. pointSize: 20,
  26254. maxOpacity: 1,
  26255. minOpacity: 0
  26256. }
  26257. });
  26258. vg.prototype = {
  26259. update: function(t, e, i, n, o, a) {
  26260. var r = this._getBrush(),
  26261. s = this._getGradient(t, o, "inRange"),
  26262. l = this._getGradient(t, o, "outOfRange"),
  26263. u = this.pointSize + this.blurSize,
  26264. h = this.canvas,
  26265. c = h.getContext("2d"),
  26266. d = t.length;
  26267. h.width = e, h.height = i;
  26268. for (var f = 0; f < d; ++f) {
  26269. var p = t[f],
  26270. g = p[0],
  26271. m = p[1],
  26272. v = n(p[2]);
  26273. c.globalAlpha = v, c.drawImage(r, g - u, m - u)
  26274. }
  26275. if (!h.width || !h.height) return h;
  26276. for (var y = c.getImageData(0, 0, h.width, h.height), x = y.data, _ = 0, w = x.length, b = this.minOpacity, S =
  26277. this.maxOpacity - b; _ < w;) {
  26278. var v = x[_ + 3] / 256,
  26279. M = 4 * Math.floor(255 * v);
  26280. if (v > 0) {
  26281. var I = a(v) ? s : l;
  26282. v > 0 && (v = v * S + b), x[_++] = I[M], x[_++] = I[M + 1], x[_++] = I[M + 2], x[_++] = I[M + 3] * v * 256
  26283. } else _ += 4
  26284. }
  26285. return c.putImageData(y, 0, 0), h
  26286. },
  26287. _getBrush: function() {
  26288. var t = this._brushCanvas || (this._brushCanvas = Y_()),
  26289. e = this.pointSize + this.blurSize,
  26290. i = 2 * e;
  26291. t.width = i, t.height = i;
  26292. var n = t.getContext("2d");
  26293. return n.clearRect(0, 0, i, i), n.shadowOffsetX = i, n.shadowBlur = this.blurSize, n.shadowColor = "#000", n.beginPath(),
  26294. n.arc(-e, e, this.pointSize, 0, 2 * Math.PI, !0), n.closePath(), n.fill(), t
  26295. },
  26296. _getGradient: function(t, e, i) {
  26297. for (var n = this._gradientPixels, o = n[i] || (n[i] = new Uint8ClampedArray(1024)), a = [0, 0, 0, 0], r = 0, s =
  26298. 0; s < 256; s++) e[i](s / 255, !0, a), o[r++] = a[0], o[r++] = a[1], o[r++] = a[2], o[r++] = a[3];
  26299. return o
  26300. }
  26301. }, Fs({
  26302. type: "heatmap",
  26303. render: function(t, e, i) {
  26304. var n;
  26305. e.eachComponent("visualMap", function(e) {
  26306. e.eachTargetSeries(function(i) {
  26307. i === t && (n = e)
  26308. })
  26309. }), this.group.removeAll(), this._incrementalDisplayable = null;
  26310. var o = t.coordinateSystem;
  26311. "cartesian2d" === o.type || "calendar" === o.type ? this._renderOnCartesianAndCalendar(t, i, 0, t.getData().count()) :
  26312. _g(o) && this._renderOnGeo(o, t, n, i)
  26313. },
  26314. incrementalPrepareRender: function(t, e, i) {
  26315. this.group.removeAll()
  26316. },
  26317. incrementalRender: function(t, e, i, n) {
  26318. e.coordinateSystem && this._renderOnCartesianAndCalendar(e, n, t.start, t.end, !0)
  26319. },
  26320. _renderOnCartesianAndCalendar: function(t, e, i, n, o) {
  26321. var r, s, l = t.coordinateSystem;
  26322. if ("cartesian2d" === l.type) {
  26323. var u = l.getAxis("x"),
  26324. h = l.getAxis("y");
  26325. r = u.getBandWidth(), s = h.getBandWidth()
  26326. }
  26327. for (var c = this.group, d = t.getData(), f = t.getModel("itemStyle").getItemStyle(["color"]), p = t.getModel(
  26328. "emphasis.itemStyle").getItemStyle(), g = t.getModel("label"), m = t.getModel("emphasis.label"), v = l.type,
  26329. y = "cartesian2d" === v ? [d.mapDimension("x"), d.mapDimension("y"), d.mapDimension("value")] : [d.mapDimension(
  26330. "time"), d.mapDimension("value")], x = i; x < n; x++) {
  26331. var _;
  26332. if ("cartesian2d" === v) {
  26333. if (isNaN(d.get(y[2], x))) continue;
  26334. var w = l.dataToPoint([d.get(y[0], x), d.get(y[1], x)]);
  26335. _ = new aM({
  26336. shape: {
  26337. x: w[0] - r / 2,
  26338. y: w[1] - s / 2,
  26339. width: r,
  26340. height: s
  26341. },
  26342. style: {
  26343. fill: d.getItemVisual(x, "color"),
  26344. opacity: d.getItemVisual(x, "opacity")
  26345. }
  26346. })
  26347. } else {
  26348. if (isNaN(d.get(y[1], x))) continue;
  26349. _ = new aM({
  26350. z2: 1,
  26351. shape: l.dataToRect([d.get(y[0], x)]).contentShape,
  26352. style: {
  26353. fill: d.getItemVisual(x, "color"),
  26354. opacity: d.getItemVisual(x, "opacity")
  26355. }
  26356. })
  26357. }
  26358. var b = d.getItemModel(x);
  26359. d.hasItemOption && (f = b.getModel("itemStyle").getItemStyle(["color"]), p = b.getModel("emphasis.itemStyle").getItemStyle(),
  26360. g = b.getModel("label"), m = b.getModel("emphasis.label"));
  26361. var S = t.getRawValue(x),
  26362. M = "-";
  26363. S && null != S[2] && (M = S[2]), co(f, p, g, m, {
  26364. labelFetcher: t,
  26365. labelDataIndex: x,
  26366. defaultText: M,
  26367. isRectText: !0
  26368. }), _.setStyle(f), uo(_, d.hasItemOption ? p : a({}, p)), _.incremental = o, o && (_.useHoverLayer = !0), c.add(
  26369. _), d.setItemGraphicEl(x, _)
  26370. }
  26371. },
  26372. _renderOnGeo: function(t, e, i, n) {
  26373. var o = i.targetVisuals.inRange,
  26374. a = i.targetVisuals.outOfRange,
  26375. r = e.getData(),
  26376. s = this._hmLayer || this._hmLayer || new vg;
  26377. s.blurSize = e.get("blurSize"), s.pointSize = e.get("pointSize"), s.minOpacity = e.get("minOpacity"), s.maxOpacity =
  26378. e.get("maxOpacity");
  26379. var l = t.getViewRect().clone(),
  26380. u = t.getRoamTransform();
  26381. l.applyTransform(u);
  26382. var h = Math.max(l.x, 0),
  26383. c = Math.max(l.y, 0),
  26384. d = Math.min(l.width + l.x, n.getWidth()),
  26385. f = Math.min(l.height + l.y, n.getHeight()),
  26386. p = d - h,
  26387. g = f - c,
  26388. m = [r.mapDimension("lng"), r.mapDimension("lat"), r.mapDimension("value")],
  26389. v = r.mapArray(m, function(e, i, n) {
  26390. var o = t.dataToPoint([e, i]);
  26391. return o[0] -= h, o[1] -= c, o.push(n), o
  26392. }),
  26393. y = i.getExtent(),
  26394. x = "visualMap.continuous" === i.type ? xg(y, i.option.range) : yg(y, i.getPieceList(), i.option.selected);
  26395. s.update(v, p, g, o.color.getNormalizer(), {
  26396. inRange: o.color.getColorMapper(),
  26397. outOfRange: a.color.getColorMapper()
  26398. }, x);
  26399. var _ = new hi({
  26400. style: {
  26401. width: p,
  26402. height: g,
  26403. x: h,
  26404. y: c,
  26405. image: s.canvas
  26406. },
  26407. silent: !0
  26408. });
  26409. this.group.add(_)
  26410. },
  26411. dispose: function() {}
  26412. });
  26413. var Xk = ED.extend({
  26414. type: "series.pictorialBar",
  26415. dependencies: ["grid"],
  26416. defaultOption: {
  26417. symbol: "circle",
  26418. symbolSize: null,
  26419. symbolRotate: null,
  26420. symbolPosition: null,
  26421. symbolOffset: null,
  26422. symbolMargin: null,
  26423. symbolRepeat: !1,
  26424. symbolRepeatDirection: "end",
  26425. symbolClip: !1,
  26426. symbolBoundingData: null,
  26427. symbolPatternSize: 400,
  26428. barGap: "-100%",
  26429. progressive: 0,
  26430. hoverAnimation: !1
  26431. },
  26432. getInitialData: function(t) {
  26433. return t.stack = null, Xk.superApply(this, "getInitialData", arguments)
  26434. }
  26435. }),
  26436. jk = ["itemStyle", "borderWidth"],
  26437. Yk = [{
  26438. xy: "x",
  26439. wh: "width",
  26440. index: 0,
  26441. posDesc: ["left", "right"]
  26442. }, {
  26443. xy: "y",
  26444. wh: "height",
  26445. index: 1,
  26446. posDesc: ["top", "bottom"]
  26447. }],
  26448. qk = new KS;
  26449. Fs({
  26450. type: "pictorialBar",
  26451. render: function(t, e, i) {
  26452. var n = this.group,
  26453. o = t.getData(),
  26454. a = this._data,
  26455. r = t.coordinateSystem,
  26456. s = !!r.getBaseAxis().isHorizontal(),
  26457. l = r.grid.getRect(),
  26458. u = {
  26459. ecSize: {
  26460. width: i.getWidth(),
  26461. height: i.getHeight()
  26462. },
  26463. seriesModel: t,
  26464. coordSys: r,
  26465. coordSysExtent: [
  26466. [l.x, l.x + l.width],
  26467. [l.y, l.y + l.height]
  26468. ],
  26469. isHorizontal: s,
  26470. valueDim: Yk[+s],
  26471. categoryDim: Yk[1 - s]
  26472. };
  26473. return o.diff(a).add(function(t) {
  26474. if (o.hasValue(t)) {
  26475. var e = Pg(o, t),
  26476. i = wg(o, t, e, u),
  26477. a = Rg(o, u, i);
  26478. o.setItemGraphicEl(t, a), n.add(a), Wg(a, u, i)
  26479. }
  26480. }).update(function(t, e) {
  26481. var i = a.getItemGraphicEl(e);
  26482. if (o.hasValue(t)) {
  26483. var r = Pg(o, t),
  26484. s = wg(o, t, r, u),
  26485. l = Vg(o, s);
  26486. i && l !== i.__pictorialShapeStr && (n.remove(i), o.setItemGraphicEl(t, null), i = null), i ? zg(i, u, s) :
  26487. i = Rg(o, u, s, !0), o.setItemGraphicEl(t, i), i.__pictorialSymbolMeta = s, n.add(i), Wg(i, u, s)
  26488. } else n.remove(i)
  26489. }).remove(function(t) {
  26490. var e = a.getItemGraphicEl(t);
  26491. e && Bg(a, t, e.__pictorialSymbolMeta.animationModel, e)
  26492. }).execute(), this._data = o, this.group
  26493. },
  26494. dispose: B,
  26495. remove: function(t, e) {
  26496. var i = this.group,
  26497. n = this._data;
  26498. t.get("animation") ? n && n.eachItemGraphicEl(function(e) {
  26499. Bg(n, e.dataIndex, t, e)
  26500. }) : i.removeAll()
  26501. }
  26502. });
  26503. Os(v(kl, "pictorialBar")), Es(hD("pictorialBar", "roundRect"));
  26504. var Kk = function(t, e, i, n, o) {
  26505. HA.call(this, t, e, i), this.type = n || "value", this.position = o || "bottom", this.orient = null
  26506. };
  26507. Kk.prototype = {
  26508. constructor: Kk,
  26509. model: null,
  26510. isHorizontal: function() {
  26511. var t = this.position;
  26512. return "top" === t || "bottom" === t
  26513. },
  26514. pointToData: function(t, e) {
  26515. return this.coordinateSystem.pointToData(t, e)[0]
  26516. },
  26517. toGlobalCoord: null,
  26518. toLocalCoord: null
  26519. }, u(Kk, HA), Zg.prototype = {
  26520. type: "singleAxis",
  26521. axisPointerEnabled: !0,
  26522. constructor: Zg,
  26523. _init: function(t, e, i) {
  26524. var n = this.dimension,
  26525. o = new Kk(n, Vl(t), [0, 0], t.get("type"), t.get("position")),
  26526. a = "category" === o.type;
  26527. o.onBand = a && t.get("boundaryGap"), o.inverse = t.get("inverse"), o.orient = t.get("orient"), t.axis = o, o.model =
  26528. t, o.coordinateSystem = this, this._axis = o
  26529. },
  26530. update: function(t, e) {
  26531. t.eachSeries(function(t) {
  26532. if (t.coordinateSystem === this) {
  26533. var e = t.getData();
  26534. d(e.mapDimension(this.dimension, !0), function(t) {
  26535. this._axis.scale.unionExtentFromData(e, t)
  26536. }, this), Bl(this._axis.scale, this._axis.model)
  26537. }
  26538. }, this)
  26539. },
  26540. resize: function(t, e) {
  26541. this._rect = la({
  26542. left: t.get("left"),
  26543. top: t.get("top"),
  26544. right: t.get("right"),
  26545. bottom: t.get("bottom"),
  26546. width: t.get("width"),
  26547. height: t.get("height")
  26548. }, {
  26549. width: e.getWidth(),
  26550. height: e.getHeight()
  26551. }), this._adjustAxis()
  26552. },
  26553. getRect: function() {
  26554. return this._rect
  26555. },
  26556. _adjustAxis: function() {
  26557. var t = this._rect,
  26558. e = this._axis,
  26559. i = e.isHorizontal(),
  26560. n = i ? [0, t.width] : [0, t.height],
  26561. o = e.reverse ? 1 : 0;
  26562. e.setExtent(n[o], n[1 - o]), this._updateAxisTransform(e, i ? t.x : t.y)
  26563. },
  26564. _updateAxisTransform: function(t, e) {
  26565. var i = t.getExtent(),
  26566. n = i[0] + i[1],
  26567. o = t.isHorizontal();
  26568. t.toGlobalCoord = o ? function(t) {
  26569. return t + e
  26570. } : function(t) {
  26571. return n - t + e
  26572. }, t.toLocalCoord = o ? function(t) {
  26573. return t - e
  26574. } : function(t) {
  26575. return n - t + e
  26576. }
  26577. },
  26578. getAxis: function() {
  26579. return this._axis
  26580. },
  26581. getBaseAxis: function() {
  26582. return this._axis
  26583. },
  26584. getAxes: function() {
  26585. return [this._axis]
  26586. },
  26587. getTooltipAxes: function() {
  26588. return {
  26589. baseAxes: [this.getAxis()]
  26590. }
  26591. },
  26592. containPoint: function(t) {
  26593. var e = this.getRect(),
  26594. i = this.getAxis();
  26595. return "horizontal" === i.orient ? i.contain(i.toLocalCoord(t[0])) && t[1] >= e.y && t[1] <= e.y + e.height : i.contain(
  26596. i.toLocalCoord(t[1])) && t[0] >= e.y && t[0] <= e.y + e.height
  26597. },
  26598. pointToData: function(t) {
  26599. var e = this.getAxis();
  26600. return [e.coordToData(e.toLocalCoord(t["horizontal" === e.orient ? 0 : 1]))]
  26601. },
  26602. dataToPoint: function(t) {
  26603. var e = this.getAxis(),
  26604. i = this.getRect(),
  26605. n = [],
  26606. o = "horizontal" === e.orient ? 0 : 1;
  26607. return t instanceof Array && (t = t[0]), n[o] = e.toGlobalCoord(e.dataToCoord(+t)), n[1 - o] = 0 === o ? i.y + i.height /
  26608. 2 : i.x + i.width / 2, n
  26609. }
  26610. }, Ba.register("single", {
  26611. create: function(t, e) {
  26612. var i = [];
  26613. return t.eachComponent("singleAxis", function(n, o) {
  26614. var a = new Zg(n, t, e);
  26615. a.name = "single_" + o, a.resize(n, e), n.coordinateSystem = a, i.push(a)
  26616. }), t.eachSeries(function(e) {
  26617. if ("singleAxis" === e.get("coordinateSystem")) {
  26618. var i = t.queryComponents({
  26619. mainType: "singleAxis",
  26620. index: e.get("singleAxisIndex"),
  26621. id: e.get("singleAxisId")
  26622. })[0];
  26623. e.coordinateSystem = i && i.coordinateSystem
  26624. }
  26625. }), i
  26626. },
  26627. dimensions: Zg.prototype.dimensions
  26628. });
  26629. var $k = ["axisLine", "axisTickLabel", "axisName"],
  26630. Jk = LD.extend({
  26631. type: "singleAxis",
  26632. axisPointerClass: "SingleAxisPointer",
  26633. render: function(t, e, i, n) {
  26634. var o = this.group;
  26635. o.removeAll();
  26636. var a = Ug(t),
  26637. r = new ID(t, a);
  26638. d($k, r.add, r), o.add(r.getGroup()), t.get("splitLine.show") && this._splitLine(t), Jk.superCall(this, "render",
  26639. t, e, i, n)
  26640. },
  26641. _splitLine: function(t) {
  26642. var e = t.axis;
  26643. if (!e.scale.isBlank()) {
  26644. var i = t.getModel("splitLine"),
  26645. n = i.getModel("lineStyle"),
  26646. o = n.get("width"),
  26647. a = n.get("color");
  26648. a = a instanceof Array ? a : [a];
  26649. for (var r = t.coordinateSystem.getRect(), s = e.isHorizontal(), l = [], u = 0, h = e.getTicksCoords({
  26650. tickModel: i
  26651. }), c = [], d = [], f = 0; f < h.length; ++f) {
  26652. var p = e.toGlobalCoord(h[f].coord);
  26653. s ? (c[0] = p, c[1] = r.y, d[0] = p, d[1] = r.y + r.height) : (c[0] = r.x, c[1] = p, d[0] = r.x + r.width, d[1] =
  26654. p);
  26655. var g = u++ % a.length;
  26656. l[g] = l[g] || [], l[g].push(new rM(Xn({
  26657. shape: {
  26658. x1: c[0],
  26659. y1: c[1],
  26660. x2: d[0],
  26661. y2: d[1]
  26662. },
  26663. style: {
  26664. lineWidth: o
  26665. },
  26666. silent: !0
  26667. })))
  26668. }
  26669. for (f = 0; f < l.length; ++f) this.group.add(xM(l[f], {
  26670. style: {
  26671. stroke: a[f % a.length],
  26672. lineDash: n.getLineDash(o),
  26673. lineWidth: o
  26674. },
  26675. silent: !0
  26676. }))
  26677. }
  26678. }
  26679. }),
  26680. Qk = YM.extend({
  26681. type: "singleAxis",
  26682. layoutMode: "box",
  26683. axis: null,
  26684. coordinateSystem: null,
  26685. getCoordSysModel: function() {
  26686. return this
  26687. }
  26688. }),
  26689. tP = {
  26690. left: "5%",
  26691. top: "5%",
  26692. right: "5%",
  26693. bottom: "5%",
  26694. type: "value",
  26695. position: "bottom",
  26696. orient: "horizontal",
  26697. axisLine: {
  26698. show: !0,
  26699. lineStyle: {
  26700. width: 2,
  26701. type: "solid"
  26702. }
  26703. },
  26704. tooltip: {
  26705. show: !0
  26706. },
  26707. axisTick: {
  26708. show: !0,
  26709. length: 6,
  26710. lineStyle: {
  26711. width: 2
  26712. }
  26713. },
  26714. axisLabel: {
  26715. show: !0,
  26716. interval: "auto"
  26717. },
  26718. splitLine: {
  26719. show: !0,
  26720. lineStyle: {
  26721. type: "dashed",
  26722. opacity: .2
  26723. }
  26724. }
  26725. };
  26726. n(Qk.prototype, CA), xD("single", Qk, function(t, e) {
  26727. return e.type || (e.data ? "category" : "value")
  26728. }, tP);
  26729. var eP = function(t, e) {
  26730. var i, n = [],
  26731. o = t.seriesIndex;
  26732. if (null == o || !(i = e.getSeriesByIndex(o))) return {
  26733. point: []
  26734. };
  26735. var a = i.getData(),
  26736. r = zi(a, t);
  26737. if (null == r || r < 0 || y(r)) return {
  26738. point: []
  26739. };
  26740. var s = a.getItemGraphicEl(r),
  26741. l = i.coordinateSystem;
  26742. if (i.getTooltipPosition) n = i.getTooltipPosition(r) || [];
  26743. else if (l && l.dataToPoint) n = l.dataToPoint(a.getValues(f(l.dimensions, function(t) {
  26744. return a.mapDimension(t)
  26745. }), r, !0)) || [];
  26746. else if (s) {
  26747. var u = s.getBoundingRect().clone();
  26748. u.applyTransform(s.transform), n = [u.x + u.width / 2, u.y + u.height / 2]
  26749. }
  26750. return {
  26751. point: n,
  26752. el: s
  26753. }
  26754. },
  26755. iP = d,
  26756. nP = v,
  26757. oP = Bi(),
  26758. aP = (Bs({
  26759. type: "axisPointer",
  26760. coordSysAxesInfo: null,
  26761. defaultOption: {
  26762. show: "auto",
  26763. triggerOn: null,
  26764. zlevel: 0,
  26765. z: 50,
  26766. type: "line",
  26767. snap: !1,
  26768. triggerTooltip: !0,
  26769. value: null,
  26770. status: null,
  26771. link: [],
  26772. animation: null,
  26773. animationDurationUpdate: 200,
  26774. lineStyle: {
  26775. color: "#aaa",
  26776. width: 1,
  26777. type: "solid"
  26778. },
  26779. shadowStyle: {
  26780. color: "rgba(150,150,150,0.3)"
  26781. },
  26782. label: {
  26783. show: !0,
  26784. formatter: null,
  26785. precision: "auto",
  26786. margin: 3,
  26787. color: "#fff",
  26788. padding: [5, 7, 5, 7],
  26789. backgroundColor: "auto",
  26790. borderColor: null,
  26791. borderWidth: 0,
  26792. shadowBlur: 3,
  26793. shadowColor: "#aaa"
  26794. },
  26795. handle: {
  26796. show: !1,
  26797. 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",
  26798. size: 45,
  26799. margin: 50,
  26800. color: "#333",
  26801. shadowBlur: 3,
  26802. shadowColor: "#aaa",
  26803. shadowOffsetX: 0,
  26804. shadowOffsetY: 2,
  26805. throttle: 40
  26806. }
  26807. }
  26808. }), Bi()),
  26809. rP = d,
  26810. sP = Vs({
  26811. type: "axisPointer",
  26812. render: function(t, e, i) {
  26813. var n = e.getComponent("tooltip"),
  26814. o = t.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click";
  26815. im("axisPointer", i, function(t, e, i) {
  26816. "none" !== o && ("leave" === t || o.indexOf(t) >= 0) && i({
  26817. type: "updateAxisPointer",
  26818. currTrigger: t,
  26819. x: e && e.offsetX,
  26820. y: e && e.offsetY
  26821. })
  26822. })
  26823. },
  26824. remove: function(t, e) {
  26825. lm(e.getZr(), "axisPointer"), sP.superApply(this._model, "remove", arguments)
  26826. },
  26827. dispose: function(t, e) {
  26828. lm("axisPointer", e), sP.superApply(this._model, "dispose", arguments)
  26829. }
  26830. }),
  26831. lP = Bi(),
  26832. uP = i,
  26833. hP = m;
  26834. (um.prototype = {
  26835. _group: null,
  26836. _lastGraphicKey: null,
  26837. _handle: null,
  26838. _dragging: !1,
  26839. _lastValue: null,
  26840. _lastStatus: null,
  26841. _payloadInfo: null,
  26842. animationThreshold: 15,
  26843. render: function(t, e, i, n) {
  26844. var o = e.get("value"),
  26845. a = e.get("status");
  26846. if (this._axisModel = t, this._axisPointerModel = e, this._api = i, n || this._lastValue !== o || this._lastStatus !==
  26847. a) {
  26848. this._lastValue = o, this._lastStatus = a;
  26849. var r = this._group,
  26850. s = this._handle;
  26851. if (!a || "hide" === a) return r && r.hide(), void(s && s.hide());
  26852. r && r.show(), s && s.show();
  26853. var l = {};
  26854. this.makeElOption(l, o, t, e, i);
  26855. var u = l.graphicKey;
  26856. u !== this._lastGraphicKey && this.clear(i), this._lastGraphicKey = u;
  26857. var h = this._moveAnimation = this.determineAnimation(t, e);
  26858. if (r) {
  26859. var c = v(hm, e, h);
  26860. this.updatePointerEl(r, l, c, e), this.updateLabelEl(r, l, c, e)
  26861. } else r = this._group = new Zw, this.createPointerEl(r, l, t, e), this.createLabelEl(r, l, t, e), i.getZr().add(
  26862. r);
  26863. pm(r, e, !0), this._renderHandle(o)
  26864. }
  26865. },
  26866. remove: function(t) {
  26867. this.clear(t)
  26868. },
  26869. dispose: function(t) {
  26870. this.clear(t)
  26871. },
  26872. determineAnimation: function(t, e) {
  26873. var i = e.get("animation"),
  26874. n = t.axis,
  26875. o = "category" === n.type,
  26876. a = e.get("snap");
  26877. if (!a && !o) return !1;
  26878. if ("auto" === i || null == i) {
  26879. var r = this.animationThreshold;
  26880. if (o && n.getBandWidth() > r) return !0;
  26881. if (a) {
  26882. var s = xh(t).seriesDataCount,
  26883. l = n.getExtent();
  26884. return Math.abs(l[0] - l[1]) / s > r
  26885. }
  26886. return !1
  26887. }
  26888. return !0 === i
  26889. },
  26890. makeElOption: function(t, e, i, n, o) {},
  26891. createPointerEl: function(t, e, i, n) {
  26892. var o = e.pointer;
  26893. if (o) {
  26894. var a = lP(t).pointerEl = new bM[o.type](uP(e.pointer));
  26895. t.add(a)
  26896. }
  26897. },
  26898. createLabelEl: function(t, e, i, n) {
  26899. if (e.label) {
  26900. var o = lP(t).labelEl = new aM(uP(e.label));
  26901. t.add(o), dm(o, n)
  26902. }
  26903. },
  26904. updatePointerEl: function(t, e, i) {
  26905. var n = lP(t).pointerEl;
  26906. n && (n.setStyle(e.pointer.style), i(n, {
  26907. shape: e.pointer.shape
  26908. }))
  26909. },
  26910. updateLabelEl: function(t, e, i, n) {
  26911. var o = lP(t).labelEl;
  26912. o && (o.setStyle(e.label.style), i(o, {
  26913. shape: e.label.shape,
  26914. position: e.label.position
  26915. }), dm(o, n))
  26916. },
  26917. _renderHandle: function(t) {
  26918. if (!this._dragging && this.updateHandleTransform) {
  26919. var e = this._axisPointerModel,
  26920. i = this._api.getZr(),
  26921. n = this._handle,
  26922. o = e.getModel("handle"),
  26923. a = e.get("status");
  26924. if (!o.get("show") || !a || "hide" === a) return n && i.remove(n), void(this._handle = null);
  26925. var r;
  26926. this._handle || (r = !0, n = this._handle = Co(o.get("icon"), {
  26927. cursor: "move",
  26928. draggable: !0,
  26929. onmousemove: function(t) {
  26930. lw(t.event)
  26931. },
  26932. onmousedown: hP(this._onHandleDragMove, this, 0, 0),
  26933. drift: hP(this._onHandleDragMove, this),
  26934. ondragend: hP(this._onHandleDragEnd, this)
  26935. }), i.add(n)), pm(n, e, !1);
  26936. var s = ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX",
  26937. "shadowOffsetY"
  26938. ];
  26939. n.setStyle(o.getItemStyle(null, s));
  26940. var l = o.get("size");
  26941. y(l) || (l = [l, l]), n.attr("scale", [l[0] / 2, l[1] / 2]), Lr(this, "_doDispatchAxisPointer", o.get("throttle") ||
  26942. 0, "fixRate"), this._moveHandleToValue(t, r)
  26943. }
  26944. },
  26945. _moveHandleToValue: function(t, e) {
  26946. hm(this._axisPointerModel, !e && this._moveAnimation, this._handle, fm(this.getHandleTransform(t, this._axisModel,
  26947. this._axisPointerModel)))
  26948. },
  26949. _onHandleDragMove: function(t, e) {
  26950. var i = this._handle;
  26951. if (i) {
  26952. this._dragging = !0;
  26953. var n = this.updateHandleTransform(fm(i), [t, e], this._axisModel, this._axisPointerModel);
  26954. this._payloadInfo = n, i.stopAnimation(), i.attr(fm(n)), lP(i).lastProp = null, this._doDispatchAxisPointer()
  26955. }
  26956. },
  26957. _doDispatchAxisPointer: function() {
  26958. if (this._handle) {
  26959. var t = this._payloadInfo,
  26960. e = this._axisModel;
  26961. this._api.dispatchAction({
  26962. type: "updateAxisPointer",
  26963. x: t.cursorPoint[0],
  26964. y: t.cursorPoint[1],
  26965. tooltipOption: t.tooltipOption,
  26966. axesInfo: [{
  26967. axisDim: e.axis.dim,
  26968. axisIndex: e.componentIndex
  26969. }]
  26970. })
  26971. }
  26972. },
  26973. _onHandleDragEnd: function(t) {
  26974. if (this._dragging = !1, this._handle) {
  26975. var e = this._axisPointerModel.get("value");
  26976. this._moveHandleToValue(e), this._api.dispatchAction({
  26977. type: "hideTip"
  26978. })
  26979. }
  26980. },
  26981. getHandleTransform: null,
  26982. updateHandleTransform: null,
  26983. clear: function(t) {
  26984. this._lastValue = null, this._lastStatus = null;
  26985. var e = t.getZr(),
  26986. i = this._group,
  26987. n = this._handle;
  26988. e && i && (this._lastGraphicKey = null, i && e.remove(i), n && e.remove(n), this._group = null, this._handle =
  26989. null, this._payloadInfo = null)
  26990. },
  26991. doClear: function() {},
  26992. buildLabel: function(t, e, i) {
  26993. return i = i || 0, {
  26994. x: t[i],
  26995. y: t[1 - i],
  26996. width: e[i],
  26997. height: e[1 - i]
  26998. }
  26999. }
  27000. }).constructor = um, Xi(um);
  27001. var cP = um.extend({
  27002. makeElOption: function(t, e, i, n, o) {
  27003. var a = i.axis,
  27004. r = a.grid,
  27005. s = n.get("type"),
  27006. l = Mm(r, a).getOtherAxis(a).getGlobalExtent(),
  27007. u = a.toGlobalCoord(a.dataToCoord(e, !0));
  27008. if (s && "none" !== s) {
  27009. var h = gm(n),
  27010. c = dP[s](a, u, l, h);
  27011. c.style = h, t.graphicKey = c.type, t.pointer = c
  27012. }
  27013. _m(e, t, Ih(r.model, i), i, n, o)
  27014. },
  27015. getHandleTransform: function(t, e, i) {
  27016. var n = Ih(e.axis.grid.model, e, {
  27017. labelInside: !1
  27018. });
  27019. return n.labelMargin = i.get("handle.margin"), {
  27020. position: xm(e.axis, t, n),
  27021. rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
  27022. }
  27023. },
  27024. updateHandleTransform: function(t, e, i, n) {
  27025. var o = i.axis,
  27026. a = o.grid,
  27027. r = o.getGlobalExtent(!0),
  27028. s = Mm(a, o).getOtherAxis(o).getGlobalExtent(),
  27029. l = "x" === o.dim ? 0 : 1,
  27030. u = t.position;
  27031. u[l] += e[l], u[l] = Math.min(r[1], u[l]), u[l] = Math.max(r[0], u[l]);
  27032. var h = (s[1] + s[0]) / 2,
  27033. c = [h, h];
  27034. c[l] = u[l];
  27035. var d = [{
  27036. verticalAlign: "middle"
  27037. }, {
  27038. align: "center"
  27039. }];
  27040. return {
  27041. position: u,
  27042. rotation: t.rotation,
  27043. cursorPoint: c,
  27044. tooltipOption: d[l]
  27045. }
  27046. }
  27047. }),
  27048. dP = {
  27049. line: function(t, e, i, n) {
  27050. var o = wm([e, i[0]], [e, i[1]], Im(t));
  27051. return Xn({
  27052. shape: o,
  27053. style: n
  27054. }), {
  27055. type: "Line",
  27056. shape: o
  27057. }
  27058. },
  27059. shadow: function(t, e, i, n) {
  27060. var o = Math.max(1, t.getBandWidth()),
  27061. a = i[1] - i[0];
  27062. return {
  27063. type: "Rect",
  27064. shape: bm([e - o / 2, i[0]], [o, a], Im(t))
  27065. }
  27066. }
  27067. };
  27068. LD.registerAxisPointerClass("CartesianAxisPointer", cP), Ls(function(t) {
  27069. if (t) {
  27070. (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {});
  27071. var e = t.axisPointer.link;
  27072. e && !y(e) && (t.axisPointer.link = [e])
  27073. }
  27074. }), ks(IT.PROCESSOR.STATISTIC, function(t, e) {
  27075. t.getComponent("axisPointer").coordSysAxesInfo = dh(t, e)
  27076. }), Ps({
  27077. type: "updateAxisPointer",
  27078. event: "updateAxisPointer",
  27079. update: ":updateAxisPointer"
  27080. }, function(t, e, i) {
  27081. var n = t.currTrigger,
  27082. o = [t.x, t.y],
  27083. a = t,
  27084. r = t.dispatchAction || m(i.dispatchAction, i),
  27085. s = e.getComponent("axisPointer").coordSysAxesInfo;
  27086. if (s) {
  27087. em(o) && (o = eP({
  27088. seriesIndex: a.seriesIndex,
  27089. dataIndex: a.dataIndex
  27090. }, e).point);
  27091. var l = em(o),
  27092. u = a.axesInfo,
  27093. h = s.axesInfo,
  27094. c = "leave" === n || em(o),
  27095. d = {},
  27096. f = {},
  27097. p = {
  27098. list: [],
  27099. map: {}
  27100. },
  27101. g = {
  27102. showPointer: nP(Yg, f),
  27103. showTooltip: nP(qg, p)
  27104. };
  27105. iP(s.coordSysMap, function(t, e) {
  27106. var i = l || t.containPoint(o);
  27107. iP(s.coordSysAxesInfo[e], function(t, e) {
  27108. var n = t.axis,
  27109. a = Qg(u, t);
  27110. if (!c && i && (!u || a)) {
  27111. var r = a && a.value;
  27112. null != r || l || (r = n.pointToData(o)), null != r && Xg(t, r, g, !1, d)
  27113. }
  27114. })
  27115. });
  27116. var v = {};
  27117. return iP(h, function(t, e) {
  27118. var i = t.linkGroup;
  27119. i && !f[e] && iP(i.axesInfo, function(e, n) {
  27120. var o = f[n];
  27121. if (e !== t && o) {
  27122. var a = o.value;
  27123. i.mapper && (a = t.axis.scale.parse(i.mapper(a, tm(e), tm(t)))), v[t.key] = a
  27124. }
  27125. })
  27126. }), iP(v, function(t, e) {
  27127. Xg(h[e], t, g, !0, d)
  27128. }), Kg(f, h, d), $g(p, o, t, r), Jg(h, 0, i), d
  27129. }
  27130. });
  27131. var fP = ["x", "y"],
  27132. pP = ["width", "height"],
  27133. gP = um.extend({
  27134. makeElOption: function(t, e, i, n, o) {
  27135. var a = i.axis,
  27136. r = a.coordinateSystem,
  27137. s = Am(r, 1 - Tm(a)),
  27138. l = r.dataToPoint(e)[0],
  27139. u = n.get("type");
  27140. if (u && "none" !== u) {
  27141. var h = gm(n),
  27142. c = mP[u](a, l, s, h);
  27143. c.style = h, t.graphicKey = c.type, t.pointer = c
  27144. }
  27145. _m(e, t, Ug(i), i, n, o)
  27146. },
  27147. getHandleTransform: function(t, e, i) {
  27148. var n = Ug(e, {
  27149. labelInside: !1
  27150. });
  27151. return n.labelMargin = i.get("handle.margin"), {
  27152. position: xm(e.axis, t, n),
  27153. rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
  27154. }
  27155. },
  27156. updateHandleTransform: function(t, e, i, n) {
  27157. var o = i.axis,
  27158. a = o.coordinateSystem,
  27159. r = Tm(o),
  27160. s = Am(a, r),
  27161. l = t.position;
  27162. l[r] += e[r], l[r] = Math.min(s[1], l[r]), l[r] = Math.max(s[0], l[r]);
  27163. var u = Am(a, 1 - r),
  27164. h = (u[1] + u[0]) / 2,
  27165. c = [h, h];
  27166. return c[r] = l[r], {
  27167. position: l,
  27168. rotation: t.rotation,
  27169. cursorPoint: c,
  27170. tooltipOption: {
  27171. verticalAlign: "middle"
  27172. }
  27173. }
  27174. }
  27175. }),
  27176. mP = {
  27177. line: function(t, e, i, n) {
  27178. var o = wm([e, i[0]], [e, i[1]], Tm(t));
  27179. return Xn({
  27180. shape: o,
  27181. style: n
  27182. }), {
  27183. type: "Line",
  27184. shape: o
  27185. }
  27186. },
  27187. shadow: function(t, e, i, n) {
  27188. var o = t.getBandWidth(),
  27189. a = i[1] - i[0];
  27190. return {
  27191. type: "Rect",
  27192. shape: bm([e - o / 2, i[0]], [o, a], Tm(t))
  27193. }
  27194. }
  27195. };
  27196. LD.registerAxisPointerClass("SingleAxisPointer", gP), Vs({
  27197. type: "single"
  27198. });
  27199. var vP = OI.extend({
  27200. type: "series.themeRiver",
  27201. dependencies: ["singleAxis"],
  27202. nameMap: null,
  27203. init: function(t) {
  27204. vP.superApply(this, "init", arguments), this.legendDataProvider = function() {
  27205. return this.getRawData()
  27206. }
  27207. },
  27208. fixData: function(t) {
  27209. for (var e = t.length, i = f(Lp().key(function(t) {
  27210. return t[2]
  27211. }).entries(t), function(t) {
  27212. return {
  27213. name: t.key,
  27214. dataList: t.values
  27215. }
  27216. }), n = i.length, o = -1, a = -1, r = 0; r < n; ++r) {
  27217. var s = i[r].dataList.length;
  27218. s > o && (o = s, a = r)
  27219. }
  27220. for (var l = 0; l < n; ++l)
  27221. if (l !== a)
  27222. for (var u = i[l].name, h = 0; h < o; ++h) {
  27223. for (var c = i[a].dataList[h][0], d = i[l].dataList.length, p = -1, g = 0; g < d; ++g)
  27224. if (i[l].dataList[g][0] === c) {
  27225. p = g;
  27226. break
  27227. } - 1 === p && (t[e] = [], t[e][0] = c, t[e][1] = 0, t[e][2] = u, e++)
  27228. }
  27229. return t
  27230. },
  27231. getInitialData: function(t, e) {
  27232. for (var i = e.queryComponents({
  27233. mainType: "singleAxis",
  27234. index: this.get("singleAxisIndex"),
  27235. id: this.get("singleAxisId")
  27236. })[0].get("type"), n = g(t.data, function(t) {
  27237. return void 0 !== t[2]
  27238. }), o = this.fixData(n || []), a = [], r = this.nameMap = R(), s = 0, l = 0; l < o.length; ++l) a.push(o[l][2]),
  27239. r.get(o[l][2]) || (r.set(o[l][2], s), s++);
  27240. var u = oA(o, {
  27241. coordDimensions: ["single"],
  27242. dimensionsDefine: [{
  27243. name: "time",
  27244. type: Xs(i)
  27245. }, {
  27246. name: "value",
  27247. type: "float"
  27248. }, {
  27249. name: "name",
  27250. type: "ordinal"
  27251. }],
  27252. encodeDefine: {
  27253. single: 0,
  27254. value: 1,
  27255. itemName: 2
  27256. }
  27257. }),
  27258. h = new eA(u, this);
  27259. return h.initData(o), h
  27260. },
  27261. getLayerSeries: function() {
  27262. for (var t = this.getData(), e = t.count(), i = [], n = 0; n < e; ++n) i[n] = n;
  27263. for (var o = f(Lp().key(function(e) {
  27264. return t.get("name", e)
  27265. }).entries(i), function(t) {
  27266. return {
  27267. name: t.key,
  27268. indices: t.values
  27269. }
  27270. }), a = t.mapDimension("single"), r = 0; r < o.length; ++r) o[r].indices.sort(function(e, i) {
  27271. return t.get(a, e) - t.get(a, i)
  27272. });
  27273. return o
  27274. },
  27275. getAxisTooltipData: function(t, e, i) {
  27276. y(t) || (t = t ? [t] : []);
  27277. for (var n, o = this.getData(), a = this.getLayerSeries(), r = [], s = a.length, l = 0; l < s; ++l) {
  27278. for (var u = Number.MAX_VALUE, h = -1, c = a[l].indices.length, d = 0; d < c; ++d) {
  27279. var f = o.get(t[0], a[l].indices[d]),
  27280. p = Math.abs(f - e);
  27281. p <= u && (n = f, u = p, h = a[l].indices[d])
  27282. }
  27283. r.push(h)
  27284. }
  27285. return {
  27286. dataIndices: r,
  27287. nestestValue: n
  27288. }
  27289. },
  27290. formatTooltip: function(t) {
  27291. var e = this.getData(),
  27292. i = e.getName(t),
  27293. n = e.get(e.mapDimension("value"), t);
  27294. return (isNaN(n) || null == n) && (n = "-"), Qo(i + " : " + n)
  27295. },
  27296. defaultOption: {
  27297. zlevel: 0,
  27298. z: 2,
  27299. coordinateSystem: "singleAxis",
  27300. boundaryGap: ["10%", "10%"],
  27301. singleAxisIndex: 0,
  27302. animationEasing: "linear",
  27303. label: {
  27304. margin: 4,
  27305. show: !0,
  27306. position: "left",
  27307. color: "#000",
  27308. fontSize: 11
  27309. },
  27310. emphasis: {
  27311. label: {
  27312. show: !0
  27313. }
  27314. }
  27315. }
  27316. });
  27317. Fs({
  27318. type: "themeRiver",
  27319. init: function() {
  27320. this._layers = []
  27321. },
  27322. render: function(t, e, i) {
  27323. function n(t) {
  27324. return t.name
  27325. }
  27326. function o(e, i, n) {
  27327. var o = this._layers;
  27328. if ("remove" !== e) {
  27329. for (var u, h = [], c = [], f = l[i].indices, p = 0; p < f.length; p++) {
  27330. var g = r.getItemLayout(f[p]),
  27331. m = g.x,
  27332. v = g.y0,
  27333. y = g.y;
  27334. h.push([m, v]), c.push([m, v + y]), u = r.getItemVisual(f[p], "color")
  27335. }
  27336. var x, _, w = r.getItemLayout(f[0]),
  27337. b = r.getItemModel(f[p - 1]),
  27338. S = b.getModel("label"),
  27339. M = S.get("margin");
  27340. if ("add" === e) {
  27341. I = d[i] = new Zw;
  27342. x = new uD({
  27343. shape: {
  27344. points: h,
  27345. stackedOnPoints: c,
  27346. smooth: .4,
  27347. stackedOnSmooth: .4,
  27348. smoothConstraint: !1
  27349. },
  27350. z2: 0
  27351. }), _ = new qS({
  27352. style: {
  27353. x: w.x - M,
  27354. y: w.y0 + w.y / 2
  27355. }
  27356. }), I.add(x), I.add(_), s.add(I), x.setClipPath(Dm(x.getBoundingRect(), t, function() {
  27357. x.removeClipPath()
  27358. }))
  27359. } else {
  27360. var I = o[n];
  27361. x = I.childAt(0), _ = I.childAt(1), s.add(I), d[i] = I, bo(x, {
  27362. shape: {
  27363. points: h,
  27364. stackedOnPoints: c
  27365. }
  27366. }, t), bo(_, {
  27367. style: {
  27368. x: w.x - M,
  27369. y: w.y0 + w.y / 2
  27370. }
  27371. }, t)
  27372. }
  27373. var T = b.getModel("emphasis.itemStyle"),
  27374. A = b.getModel("itemStyle");
  27375. fo(_.style, S, {
  27376. text: S.get("show") ? t.getFormattedLabel(f[p - 1], "normal") || r.getName(f[p - 1]) : null,
  27377. textVerticalAlign: "middle"
  27378. }), x.setStyle(a({
  27379. fill: u
  27380. }, A.getItemStyle(["color"]))), uo(x, T.getItemStyle())
  27381. } else s.remove(o[i])
  27382. }
  27383. var r = t.getData(),
  27384. s = this.group,
  27385. l = t.getLayerSeries(),
  27386. u = r.getLayout("layoutInfo"),
  27387. h = u.rect,
  27388. c = u.boundaryGap;
  27389. s.attr("position", [0, h.y + c[0]]);
  27390. var d = {};
  27391. new Hs(this._layersSeries || [], l, n, n).add(m(o, this, "add")).update(m(o, this, "update")).remove(m(o, this,
  27392. "remove")).execute(), this._layersSeries = l, this._layers = d
  27393. },
  27394. dispose: function() {}
  27395. });
  27396. Os(function(t, e) {
  27397. t.eachSeriesByType("themeRiver", function(t) {
  27398. var e = t.getData(),
  27399. i = t.coordinateSystem,
  27400. n = {},
  27401. o = i.getRect();
  27402. n.rect = o;
  27403. var a = t.get("boundaryGap"),
  27404. r = i.getAxis();
  27405. n.boundaryGap = a, "horizontal" === r.orient ? (a[0] = Ro(a[0], o.height), a[1] = Ro(a[1], o.height), Cm(e, t,
  27406. o.height - a[0] - a[1])) : (a[0] = Ro(a[0], o.width), a[1] = Ro(a[1], o.width), Cm(e, t, o.width - a[0] - a[1])),
  27407. e.setLayout("layoutInfo", n)
  27408. })
  27409. }), Es(function(t) {
  27410. t.eachSeriesByType("themeRiver", function(t) {
  27411. var e = t.getData(),
  27412. i = t.getRawData(),
  27413. n = t.get("color"),
  27414. o = R();
  27415. e.each(function(t) {
  27416. o.set(e.getRawIndex(t), t)
  27417. }), i.each(function(a) {
  27418. var r = i.getName(a),
  27419. s = n[(t.nameMap.get(r) - 1) % n.length];
  27420. i.setItemVisual(a, "color", s);
  27421. var l = o.get(a);
  27422. null != l && e.setItemVisual(l, "color", s)
  27423. })
  27424. })
  27425. }), ks($D("themeRiver")), OI.extend({
  27426. type: "series.sunburst",
  27427. _viewRoot: null,
  27428. getInitialData: function(t, e) {
  27429. var i = {
  27430. name: t.name,
  27431. children: t.data
  27432. };
  27433. km(i);
  27434. var n = t.levels || [],
  27435. o = {};
  27436. return o.levels = n, kc.createTree(i, this, o).data
  27437. },
  27438. optionUpdated: function() {
  27439. this.resetViewRoot()
  27440. },
  27441. getDataParams: function(t) {
  27442. var e = OI.prototype.getDataParams.apply(this, arguments),
  27443. i = this.getData().tree.getNodeByDataIndex(t);
  27444. return e.treePathInfo = nd(i, this), e
  27445. },
  27446. defaultOption: {
  27447. zlevel: 0,
  27448. z: 2,
  27449. center: ["50%", "50%"],
  27450. radius: [0, "75%"],
  27451. clockwise: !0,
  27452. startAngle: 90,
  27453. minAngle: 0,
  27454. percentPrecision: 2,
  27455. stillShowZeroSum: !0,
  27456. highlightPolicy: "descendant",
  27457. nodeClick: "rootToNode",
  27458. renderLabelForZeroData: !1,
  27459. label: {
  27460. rotate: "radial",
  27461. show: !0,
  27462. opacity: 1,
  27463. align: "center",
  27464. position: "inside",
  27465. distance: 5,
  27466. silent: !0,
  27467. emphasis: {}
  27468. },
  27469. itemStyle: {
  27470. borderWidth: 1,
  27471. borderColor: "white",
  27472. borderType: "solid",
  27473. shadowBlur: 0,
  27474. shadowColor: "rgba(0, 0, 0, 0.2)",
  27475. shadowOffsetX: 0,
  27476. shadowOffsetY: 0,
  27477. opacity: 1,
  27478. emphasis: {},
  27479. highlight: {
  27480. opacity: 1
  27481. },
  27482. downplay: {
  27483. opacity: .9
  27484. }
  27485. },
  27486. animationType: "expansion",
  27487. animationDuration: 1e3,
  27488. animationDurationUpdate: 500,
  27489. animationEasing: "cubicOut",
  27490. data: [],
  27491. levels: [],
  27492. sort: "desc"
  27493. },
  27494. getViewRoot: function() {
  27495. return this._viewRoot
  27496. },
  27497. resetViewRoot: function(t) {
  27498. t ? this._viewRoot = t : t = this._viewRoot;
  27499. var e = this.getRawData().tree.root;
  27500. t && (t === e || e.contains(t)) || (this._viewRoot = e)
  27501. }
  27502. });
  27503. var yP = {
  27504. NONE: "none",
  27505. DESCENDANT: "descendant",
  27506. ANCESTOR: "ancestor",
  27507. SELF: "self"
  27508. },
  27509. xP = 2,
  27510. _P = 4,
  27511. wP = Pm.prototype;
  27512. wP.updateData = function(t, e, i, o, s) {
  27513. this.node = e, e.piece = this, o = o || this._seriesModel, s = s || this._ecModel;
  27514. var l = this.childAt(0);
  27515. l.dataIndex = e.dataIndex;
  27516. var u = e.getModel(),
  27517. h = e.getLayout();
  27518. h || console.log(e.getLayout());
  27519. var c = a({}, h);
  27520. c.label = null;
  27521. var d, f = Nm(e, 0, s),
  27522. p = u.getModel("itemStyle").getItemStyle();
  27523. d = r({
  27524. lineJoin: "bevel",
  27525. fill: (d = "normal" === i ? p : n(u.getModel(i + ".itemStyle").getItemStyle(), p)).fill || f
  27526. }, d), t ? (l.setShape(c), l.shape.r = h.r0, bo(l, {
  27527. shape: {
  27528. r: h.r
  27529. }
  27530. }, o, e.dataIndex), l.useStyle(d)) : "object" == typeof d.fill && d.fill.type || "object" == typeof l.style.fill &&
  27531. l.style.fill.type ? (bo(l, {
  27532. shape: c
  27533. }, o), l.useStyle(d)) : bo(l, {
  27534. shape: c,
  27535. style: d
  27536. }, o), this._updateLabel(o, f, i);
  27537. var g = u.getShallow("cursor");
  27538. if (g && l.attr("cursor", g), t) {
  27539. var m = o.getShallow("highlightPolicy");
  27540. this._initEvents(l, e, o, m)
  27541. }
  27542. this._seriesModel = o || this._seriesModel, this._ecModel = s || this._ecModel
  27543. }, wP.onEmphasis = function(t) {
  27544. var e = this;
  27545. this.node.hostTree.root.eachNode(function(i) {
  27546. i.piece && (e.node === i ? i.piece.updateData(!1, i, "emphasis") : Em(i, e.node, t) ? i.piece.childAt(0).trigger(
  27547. "highlight") : t !== yP.NONE && i.piece.childAt(0).trigger("downplay"))
  27548. })
  27549. }, wP.onNormal = function() {
  27550. this.node.hostTree.root.eachNode(function(t) {
  27551. t.piece && t.piece.updateData(!1, t, "normal")
  27552. })
  27553. }, wP.onHighlight = function() {
  27554. this.updateData(!1, this.node, "highlight")
  27555. }, wP.onDownplay = function() {
  27556. this.updateData(!1, this.node, "downplay")
  27557. }, wP._updateLabel = function(t, e, i) {
  27558. function n(t) {
  27559. var e = r.get(t);
  27560. return null == e ? a.get(t) : e
  27561. }
  27562. var o = this.node.getModel(),
  27563. a = o.getModel("label"),
  27564. r = "normal" === i || "emphasis" === i ? a : o.getModel(i + ".label"),
  27565. s = o.getModel("emphasis.label"),
  27566. l = T(t.getFormattedLabel(this.node.dataIndex, "normal", null, null, "label"), this.node.name);
  27567. !1 === n("show") && (l = "");
  27568. var u = this.node.getLayout(),
  27569. h = r.get("minAngle");
  27570. null == h && (h = a.get("minAngle")), h = h / 180 * Math.PI;
  27571. var c = u.endAngle - u.startAngle;
  27572. null != h && Math.abs(c) < h && (l = "");
  27573. var d = this.childAt(1);
  27574. co(d.style, d.hoverStyle || {}, a, s, {
  27575. defaultText: r.getShallow("show") ? l : null,
  27576. autoColor: e,
  27577. useInsideStyle: !0
  27578. });
  27579. var f, p = (u.startAngle + u.endAngle) / 2,
  27580. g = Math.cos(p),
  27581. m = Math.sin(p),
  27582. v = n("position"),
  27583. y = n("distance") || 0,
  27584. x = n("align");
  27585. "outside" === v ? (f = u.r + y, x = p > Math.PI / 2 ? "right" : "left") : x && "center" !== x ? "left" === x ? (f =
  27586. u.r0 + y, p > Math.PI / 2 && (x = "right")) : "right" === x && (f = u.r - y, p > Math.PI / 2 && (x = "left")) : (
  27587. f = (u.r + u.r0) / 2, x = "center"), d.attr("style", {
  27588. text: l,
  27589. textAlign: x,
  27590. textVerticalAlign: n("verticalAlign") || "middle",
  27591. opacity: n("opacity")
  27592. });
  27593. var _ = f * g + u.cx,
  27594. w = f * m + u.cy;
  27595. d.attr("position", [_, w]);
  27596. var b = n("rotate"),
  27597. S = 0;
  27598. "radial" === b ? (S = -p) < -Math.PI / 2 && (S += Math.PI) : "tangential" === b ? (S = Math.PI / 2 - p) > Math.PI /
  27599. 2 ? S -= Math.PI : S < -Math.PI / 2 && (S += Math.PI) : "number" == typeof b && (S = b * Math.PI / 180), d.attr(
  27600. "rotation", S)
  27601. }, wP._initEvents = function(t, e, i, n) {
  27602. t.off("mouseover").off("mouseout").off("emphasis").off("normal");
  27603. var o = this,
  27604. a = function() {
  27605. o.onEmphasis(n)
  27606. },
  27607. r = function() {
  27608. o.onNormal()
  27609. };
  27610. i.isAnimationEnabled() && t.on("mouseover", a).on("mouseout", r).on("emphasis", a).on("normal", r).on("downplay",
  27611. function() {
  27612. o.onDownplay()
  27613. }).on("highlight", function() {
  27614. o.onHighlight()
  27615. })
  27616. }, u(Pm, Zw);
  27617. Mr.extend({
  27618. type: "sunburst",
  27619. init: function() {},
  27620. render: function(t, e, i, n) {
  27621. function o(i, n) {
  27622. if (c || !i || i.getValue() || (i = null), i !== l && n !== l)
  27623. if (n && n.piece) i ? (n.piece.updateData(!1, i, "normal", t, e), s.setItemGraphicEl(i.dataIndex, n.piece)) :
  27624. a(n);
  27625. else if (i) {
  27626. var o = new Pm(i, t, e);
  27627. h.add(o), s.setItemGraphicEl(i.dataIndex, o)
  27628. }
  27629. }
  27630. function a(t) {
  27631. t && t.piece && (h.remove(t.piece), t.piece = null)
  27632. }
  27633. var r = this;
  27634. this.seriesModel = t, this.api = i, this.ecModel = e;
  27635. var s = t.getData(),
  27636. l = s.tree.root,
  27637. u = t.getViewRoot(),
  27638. h = this.group,
  27639. c = t.get("renderLabelForZeroData"),
  27640. d = [];
  27641. u.eachNode(function(t) {
  27642. d.push(t)
  27643. });
  27644. var f = this._oldChildren || [];
  27645. if (function(t, e) {
  27646. function i(t) {
  27647. return t.getId()
  27648. }
  27649. function n(i, n) {
  27650. o(null == i ? null : t[i], null == n ? null : e[n])
  27651. }
  27652. 0 === t.length && 0 === e.length || new Hs(e, t, i, i).add(n).update(n).remove(v(n, null)).execute()
  27653. }(d, f), function(i, n) {
  27654. if (n.depth > 0) {
  27655. r.virtualPiece ? r.virtualPiece.updateData(!1, i, "normal", t, e) : (r.virtualPiece = new Pm(i, t, e), h.add(
  27656. r.virtualPiece)), n.piece._onclickEvent && n.piece.off("click", n.piece._onclickEvent);
  27657. var o = function(t) {
  27658. r._rootToNode(n.parentNode)
  27659. };
  27660. n.piece._onclickEvent = o, r.virtualPiece.on("click", o)
  27661. } else r.virtualPiece && (h.remove(r.virtualPiece), r.virtualPiece = null)
  27662. }(l, u), n && n.highlight && n.highlight.piece) {
  27663. var p = t.getShallow("highlightPolicy");
  27664. n.highlight.piece.onEmphasis(p)
  27665. } else if (n && n.unhighlight) {
  27666. var g = this.virtualPiece;
  27667. !g && l.children.length && (g = l.children[0].piece), g && g.onNormal()
  27668. }
  27669. this._initEvents(), this._oldChildren = d
  27670. },
  27671. dispose: function() {},
  27672. _initEvents: function() {
  27673. var t = this,
  27674. e = function(e) {
  27675. var i = !1;
  27676. t.seriesModel.getViewRoot().eachNode(function(n) {
  27677. if (!i && n.piece && n.piece.childAt(0) === e.target) {
  27678. var o = n.getModel().get("nodeClick");
  27679. if ("rootToNode" === o) t._rootToNode(n);
  27680. else if ("link" === o) {
  27681. var a = n.getModel(),
  27682. r = a.get("link");
  27683. if (r) {
  27684. var s = a.get("target", !0) || "_blank";
  27685. window.open(r, s)
  27686. }
  27687. }
  27688. i = !0
  27689. }
  27690. })
  27691. };
  27692. this.group._onclickEvent && this.group.off("click", this.group._onclickEvent), this.group.on("click", e), this.group
  27693. ._onclickEvent = e
  27694. },
  27695. _rootToNode: function(t) {
  27696. t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
  27697. type: "sunburstRootToNode",
  27698. from: this.uid,
  27699. seriesId: this.seriesModel.id,
  27700. targetNode: t
  27701. })
  27702. },
  27703. containPoint: function(t, e) {
  27704. var i = e.getData().getItemLayout(0);
  27705. if (i) {
  27706. var n = t[0] - i.cx,
  27707. o = t[1] - i.cy,
  27708. a = Math.sqrt(n * n + o * o);
  27709. return a <= i.r && a >= i.r0
  27710. }
  27711. }
  27712. });
  27713. var bP = "sunburstRootToNode";
  27714. Ps({
  27715. type: bP,
  27716. update: "updateView"
  27717. }, function(t, e) {
  27718. e.eachComponent({
  27719. mainType: "series",
  27720. subType: "sunburst",
  27721. query: t
  27722. }, function(e, i) {
  27723. var n = td(t, [bP], e);
  27724. if (n) {
  27725. var o = e.getViewRoot();
  27726. o && (t.direction = id(o, n.node) ? "rollUp" : "drillDown"), e.resetViewRoot(n.node)
  27727. }
  27728. })
  27729. });
  27730. var SP = "sunburstHighlight";
  27731. Ps({
  27732. type: SP,
  27733. update: "updateView"
  27734. }, function(t, e) {
  27735. e.eachComponent({
  27736. mainType: "series",
  27737. subType: "sunburst",
  27738. query: t
  27739. }, function(e, i) {
  27740. var n = td(t, [SP], e);
  27741. n && (t.highlight = n.node)
  27742. })
  27743. });
  27744. Ps({
  27745. type: "sunburstUnhighlight",
  27746. update: "updateView"
  27747. }, function(t, e) {
  27748. e.eachComponent({
  27749. mainType: "series",
  27750. subType: "sunburst",
  27751. query: t
  27752. }, function(e, i) {
  27753. t.unhighlight = !0
  27754. })
  27755. });
  27756. var MP = Math.PI / 180;
  27757. Es(v(jD, "sunburst")), Os(v(function(t, e, i, n) {
  27758. e.eachSeriesByType(t, function(t) {
  27759. var e = t.get("center"),
  27760. n = t.get("radius");
  27761. y(n) || (n = [0, n]), y(e) || (e = [e, e]);
  27762. var o = i.getWidth(),
  27763. a = i.getHeight(),
  27764. r = Math.min(o, a),
  27765. s = Ro(e[0], o),
  27766. l = Ro(e[1], a),
  27767. u = Ro(n[0], r / 2),
  27768. h = Ro(n[1], r / 2),
  27769. c = -t.get("startAngle") * MP,
  27770. f = t.get("minAngle") * MP,
  27771. p = t.getData().tree.root,
  27772. g = t.getViewRoot(),
  27773. m = g.depth,
  27774. v = t.get("sort");
  27775. null != v && Rm(g, v);
  27776. var x = 0;
  27777. d(g.children, function(t) {
  27778. !isNaN(t.getValue()) && x++
  27779. });
  27780. var _ = g.getValue(),
  27781. w = Math.PI / (_ || x) * 2,
  27782. b = g.depth > 0,
  27783. S = g.height - (b ? -1 : 1),
  27784. M = (h - u) / (S || 1),
  27785. I = t.get("clockwise"),
  27786. T = t.get("stillShowZeroSum"),
  27787. A = I ? 1 : -1,
  27788. D = function(t, e) {
  27789. if (t) {
  27790. var i = e;
  27791. if (t !== p) {
  27792. var n = t.getValue(),
  27793. o = 0 === _ && T ? w : n * w;
  27794. o < f && (o = f), i = e + A * o;
  27795. var a = t.depth - m - (b ? -1 : 1),
  27796. h = u + M * a,
  27797. c = u + M * (a + 1),
  27798. g = t.getModel();
  27799. null != g.get("r0") && (h = Ro(g.get("r0"), r / 2)), null != g.get("r") && (c = Ro(g.get("r"), r / 2)), t.setLayout({
  27800. angle: o,
  27801. startAngle: e,
  27802. endAngle: i,
  27803. clockwise: I,
  27804. cx: s,
  27805. cy: l,
  27806. r0: h,
  27807. r: c
  27808. })
  27809. }
  27810. if (t.children && t.children.length) {
  27811. var v = 0;
  27812. d(t.children, function(t) {
  27813. v += D(t, e + v)
  27814. })
  27815. }
  27816. return i - e
  27817. }
  27818. };
  27819. if (b) {
  27820. var C = u,
  27821. L = u + M,
  27822. k = 2 * Math.PI;
  27823. p.setLayout({
  27824. angle: k,
  27825. startAngle: c,
  27826. endAngle: c + k,
  27827. clockwise: I,
  27828. cx: s,
  27829. cy: l,
  27830. r0: C,
  27831. r: L
  27832. })
  27833. }
  27834. D(g, c)
  27835. })
  27836. }, "sunburst")), ks(v($D, "sunburst"));
  27837. var IP = ["itemStyle"],
  27838. TP = ["emphasis", "itemStyle"],
  27839. AP = ["label"],
  27840. DP = ["emphasis", "label"],
  27841. CP = "e\0\0",
  27842. LP = {
  27843. cartesian2d: function(t) {
  27844. var e = t.grid.getRect();
  27845. return {
  27846. coordSys: {
  27847. type: "cartesian2d",
  27848. x: e.x,
  27849. y: e.y,
  27850. width: e.width,
  27851. height: e.height
  27852. },
  27853. api: {
  27854. coord: function(e) {
  27855. return t.dataToPoint(e)
  27856. },
  27857. size: m(Bm, t)
  27858. }
  27859. }
  27860. },
  27861. geo: function(t) {
  27862. var e = t.getBoundingRect();
  27863. return {
  27864. coordSys: {
  27865. type: "geo",
  27866. x: e.x,
  27867. y: e.y,
  27868. width: e.width,
  27869. height: e.height,
  27870. zoom: t.getZoom()
  27871. },
  27872. api: {
  27873. coord: function(e) {
  27874. return t.dataToPoint(e)
  27875. },
  27876. size: m(Vm, t)
  27877. }
  27878. }
  27879. },
  27880. singleAxis: function(t) {
  27881. var e = t.getRect();
  27882. return {
  27883. coordSys: {
  27884. type: "singleAxis",
  27885. x: e.x,
  27886. y: e.y,
  27887. width: e.width,
  27888. height: e.height
  27889. },
  27890. api: {
  27891. coord: function(e) {
  27892. return t.dataToPoint(e)
  27893. },
  27894. size: m(Gm, t)
  27895. }
  27896. }
  27897. },
  27898. polar: function(t) {
  27899. var e = t.getRadiusAxis(),
  27900. i = t.getAngleAxis(),
  27901. n = e.getExtent();
  27902. return n[0] > n[1] && n.reverse(), {
  27903. coordSys: {
  27904. type: "polar",
  27905. cx: t.cx,
  27906. cy: t.cy,
  27907. r: n[1],
  27908. r0: n[0]
  27909. },
  27910. api: {
  27911. coord: m(function(n) {
  27912. var o = e.dataToRadius(n[0]),
  27913. a = i.dataToAngle(n[1]),
  27914. r = t.coordToPoint([o, a]);
  27915. return r.push(o, a * Math.PI / 180), r
  27916. }),
  27917. size: m(Fm, t)
  27918. }
  27919. }
  27920. },
  27921. calendar: function(t) {
  27922. var e = t.getRect(),
  27923. i = t.getRangeInfo();
  27924. return {
  27925. coordSys: {
  27926. type: "calendar",
  27927. x: e.x,
  27928. y: e.y,
  27929. width: e.width,
  27930. height: e.height,
  27931. cellWidth: t.getCellWidth(),
  27932. cellHeight: t.getCellHeight(),
  27933. rangeInfo: {
  27934. start: i.start,
  27935. end: i.end,
  27936. weeks: i.weeks,
  27937. dayCount: i.allDay
  27938. }
  27939. },
  27940. api: {
  27941. coord: function(e, i) {
  27942. return t.dataToPoint(e, i)
  27943. }
  27944. }
  27945. }
  27946. }
  27947. };
  27948. OI.extend({
  27949. type: "series.custom",
  27950. dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"],
  27951. defaultOption: {
  27952. coordinateSystem: "cartesian2d",
  27953. zlevel: 0,
  27954. z: 2,
  27955. legendHoverLink: !0,
  27956. useTransform: !0
  27957. },
  27958. getInitialData: function(t, e) {
  27959. return dl(this.getSource(), this)
  27960. },
  27961. getDataParams: function(t, e, i) {
  27962. var n = OI.prototype.getDataParams.apply(this, arguments);
  27963. return i && (n.info = i.info), n
  27964. }
  27965. }), Mr.extend({
  27966. type: "custom",
  27967. _data: null,
  27968. render: function(t, e, i, n) {
  27969. var o = this._data,
  27970. a = t.getData(),
  27971. r = this.group,
  27972. s = Um(t, a, e, i);
  27973. a.diff(o).add(function(e) {
  27974. jm(null, e, s(e, n), t, r, a)
  27975. }).update(function(e, i) {
  27976. jm(o.getItemGraphicEl(i), e, s(e, n), t, r, a)
  27977. }).remove(function(t) {
  27978. var e = o.getItemGraphicEl(t);
  27979. e && r.remove(e)
  27980. }).execute(), this._data = a
  27981. },
  27982. incrementalPrepareRender: function(t, e, i) {
  27983. this.group.removeAll(), this._data = null
  27984. },
  27985. incrementalRender: function(t, e, i, n, o) {
  27986. for (var a = e.getData(), r = Um(e, a, i, n), s = t.start; s < t.end; s++) jm(null, s, r(s, o), e, this.group, a)
  27987. .traverse(function(t) {
  27988. t.isGroup || (t.incremental = !0, t.useHoverLayer = !0)
  27989. })
  27990. },
  27991. dispose: B,
  27992. filterForExposedEvent: function(t, e, i, n) {
  27993. var o = e.element;
  27994. if (null == o || i.name === o) return !0;
  27995. for (;
  27996. (i = i.parent) && i !== this.group;)
  27997. if (i.name === o) return !0;
  27998. return !1
  27999. }
  28000. }), Ls(function(t) {
  28001. var e = t.graphic;
  28002. y(e) ? e[0] && e[0].elements ? t.graphic = [t.graphic[0]] : t.graphic = [{
  28003. elements: e
  28004. }] : e && !e.elements && (t.graphic = [{
  28005. elements: [e]
  28006. }])
  28007. });
  28008. var kP = Bs({
  28009. type: "graphic",
  28010. defaultOption: {
  28011. elements: [],
  28012. parentId: null
  28013. },
  28014. _elOptionsToUpdate: null,
  28015. mergeOption: function(t) {
  28016. var e = this.option.elements;
  28017. this.option.elements = null, kP.superApply(this, "mergeOption", arguments), this.option.elements = e
  28018. },
  28019. optionUpdated: function(t, e) {
  28020. var i = this.option,
  28021. n = (e ? i : t).elements,
  28022. o = i.elements = e ? [] : i.elements,
  28023. a = [];
  28024. this._flatten(n, a);
  28025. var r = Pi(o, a);
  28026. Ni(r);
  28027. var s = this._elOptionsToUpdate = [];
  28028. d(r, function(t, e) {
  28029. var i = t.option;
  28030. i && (s.push(i), sv(t, i), lv(o, e, i), uv(o[e], i))
  28031. }, this);
  28032. for (var l = o.length - 1; l >= 0; l--) null == o[l] ? o.splice(l, 1) : delete o[l].$action
  28033. },
  28034. _flatten: function(t, e, i) {
  28035. d(t, function(t) {
  28036. if (t) {
  28037. i && (t.parentOption = i), e.push(t);
  28038. var n = t.children;
  28039. "group" === t.type && n && this._flatten(n, e, t), delete t.children
  28040. }
  28041. }, this)
  28042. },
  28043. useElOptionsToUpdate: function() {
  28044. var t = this._elOptionsToUpdate;
  28045. return this._elOptionsToUpdate = null, t
  28046. }
  28047. });
  28048. Vs({
  28049. type: "graphic",
  28050. init: function(t, e) {
  28051. this._elMap = R(), this._lastGraphicModel
  28052. },
  28053. render: function(t, e, i) {
  28054. t !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = t, this._updateElements(t), this._relocate(
  28055. t, i)
  28056. },
  28057. _updateElements: function(t) {
  28058. var e = t.useElOptionsToUpdate();
  28059. if (e) {
  28060. var i = this._elMap,
  28061. n = this.group;
  28062. d(e, function(e) {
  28063. var o = e.$action,
  28064. a = e.id,
  28065. r = i.get(a),
  28066. s = e.parentId,
  28067. l = null != s ? i.get(s) : n,
  28068. u = e.style;
  28069. "text" === e.type && u && (e.hv && e.hv[1] && (u.textVerticalAlign = u.textBaseline = null), !u.hasOwnProperty(
  28070. "textFill") && u.fill && (u.textFill = u.fill), !u.hasOwnProperty("textStroke") && u.stroke && (u.textStroke =
  28071. u.stroke));
  28072. var h = av(e);
  28073. o && "merge" !== o ? "replace" === o ? (ov(r, i), nv(a, l, h, i)) : "remove" === o && ov(r, i) : r ? r.attr(
  28074. h) : nv(a, l, h, i);
  28075. var c = i.get(a);
  28076. c && (c.__ecGraphicWidth = e.width, c.__ecGraphicHeight = e.height, hv(c, t))
  28077. })
  28078. }
  28079. },
  28080. _relocate: function(t, e) {
  28081. for (var i = t.option.elements, n = this.group, o = this._elMap, a = i.length - 1; a >= 0; a--) {
  28082. var r = i[a],
  28083. s = o.get(r.id);
  28084. if (s) {
  28085. var l = s.parent;
  28086. ua(s, r, l === n ? {
  28087. width: e.getWidth(),
  28088. height: e.getHeight()
  28089. } : {
  28090. width: l.__ecGraphicWidth || 0,
  28091. height: l.__ecGraphicHeight || 0
  28092. }, null, {
  28093. hv: r.hv,
  28094. boundingMode: r.bounding
  28095. })
  28096. }
  28097. }
  28098. },
  28099. _clear: function() {
  28100. var t = this._elMap;
  28101. t.each(function(e) {
  28102. ov(e, t)
  28103. }), this._elMap = R()
  28104. },
  28105. dispose: function() {
  28106. this._clear()
  28107. }
  28108. });
  28109. var PP = Bs({
  28110. type: "legend.plain",
  28111. dependencies: ["series"],
  28112. layoutMode: {
  28113. type: "box",
  28114. ignoreSize: !0
  28115. },
  28116. init: function(t, e, i) {
  28117. this.mergeDefaultAndTheme(t, i), t.selected = t.selected || {}
  28118. },
  28119. mergeOption: function(t) {
  28120. PP.superCall(this, "mergeOption", t)
  28121. },
  28122. optionUpdated: function() {
  28123. this._updateData(this.ecModel);
  28124. var t = this._data;
  28125. if (t[0] && "single" === this.get("selectedMode")) {
  28126. for (var e = !1, i = 0; i < t.length; i++) {
  28127. var n = t[i].get("name");
  28128. if (this.isSelected(n)) {
  28129. this.select(n), e = !0;
  28130. break
  28131. }
  28132. }!e && this.select(t[0].get("name"))
  28133. }
  28134. },
  28135. _updateData: function(t) {
  28136. var e = [],
  28137. i = [];
  28138. t.eachRawSeries(function(n) {
  28139. var o = n.name;
  28140. i.push(o);
  28141. var a;
  28142. if (n.legendDataProvider) {
  28143. var r = n.legendDataProvider(),
  28144. s = r.mapArray(r.getName);
  28145. t.isSeriesFiltered(n) || (i = i.concat(s)), s.length ? e = e.concat(s) : a = !0
  28146. } else a = !0;
  28147. a && Oi(n) && e.push(n.name)
  28148. }), this._availableNames = i;
  28149. var n = f(this.get("data") || e, function(t) {
  28150. return "string" != typeof t && "number" != typeof t || (t = {
  28151. name: t
  28152. }), new Lo(t, this, this.ecModel)
  28153. }, this);
  28154. this._data = n
  28155. },
  28156. getData: function() {
  28157. return this._data
  28158. },
  28159. select: function(t) {
  28160. var e = this.option.selected;
  28161. "single" === this.get("selectedMode") && d(this._data, function(t) {
  28162. e[t.get("name")] = !1
  28163. }), e[t] = !0
  28164. },
  28165. unSelect: function(t) {
  28166. "single" !== this.get("selectedMode") && (this.option.selected[t] = !1)
  28167. },
  28168. toggleSelected: function(t) {
  28169. var e = this.option.selected;
  28170. e.hasOwnProperty(t) || (e[t] = !0), this[e[t] ? "unSelect" : "select"](t)
  28171. },
  28172. isSelected: function(t) {
  28173. var e = this.option.selected;
  28174. return !(e.hasOwnProperty(t) && !e[t]) && l(this._availableNames, t) >= 0
  28175. },
  28176. defaultOption: {
  28177. zlevel: 0,
  28178. z: 4,
  28179. show: !0,
  28180. orient: "horizontal",
  28181. left: "center",
  28182. top: 0,
  28183. align: "auto",
  28184. backgroundColor: "rgba(0,0,0,0)",
  28185. borderColor: "#ccc",
  28186. borderRadius: 0,
  28187. borderWidth: 0,
  28188. padding: 5,
  28189. itemGap: 10,
  28190. itemWidth: 25,
  28191. itemHeight: 14,
  28192. inactiveColor: "#ccc",
  28193. textStyle: {
  28194. color: "#333"
  28195. },
  28196. selectedMode: !0,
  28197. tooltip: {
  28198. show: !1
  28199. }
  28200. }
  28201. });
  28202. Ps("legendToggleSelect", "legendselectchanged", v(cv, "toggleSelected")), Ps("legendSelect", "legendselected", v(cv,
  28203. "select")), Ps("legendUnSelect", "legendunselected", v(cv, "unSelect"));
  28204. var NP = v,
  28205. OP = d,
  28206. EP = Zw,
  28207. RP = Vs({
  28208. type: "legend.plain",
  28209. newlineDisabled: !1,
  28210. init: function() {
  28211. this.group.add(this._contentGroup = new EP), this._backgroundEl
  28212. },
  28213. getContentGroup: function() {
  28214. return this._contentGroup
  28215. },
  28216. render: function(t, e, i) {
  28217. if (this.resetInner(), t.get("show", !0)) {
  28218. var n = t.get("align");
  28219. n && "auto" !== n || (n = "right" === t.get("left") && "vertical" === t.get("orient") ? "right" : "left"), this
  28220. .renderInner(n, t, e, i);
  28221. var o = t.getBoxLayoutParams(),
  28222. a = {
  28223. width: i.getWidth(),
  28224. height: i.getHeight()
  28225. },
  28226. s = t.get("padding"),
  28227. l = la(o, a, s),
  28228. u = this.layoutInner(t, n, l),
  28229. h = la(r({
  28230. width: u.width,
  28231. height: u.height
  28232. }, o), a, s);
  28233. this.group.attr("position", [h.x - u.x, h.y - u.y]), this.group.add(this._backgroundEl = fv(u, t))
  28234. }
  28235. },
  28236. resetInner: function() {
  28237. this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl)
  28238. },
  28239. renderInner: function(t, e, i, n) {
  28240. var o = this.getContentGroup(),
  28241. a = R(),
  28242. r = e.get("selectedMode"),
  28243. s = [];
  28244. i.eachRawSeries(function(t) {
  28245. !t.get("legendHoverLink") && s.push(t.id)
  28246. }), OP(e.getData(), function(l, u) {
  28247. var h = l.get("name");
  28248. if (this.newlineDisabled || "" !== h && "\n" !== h) {
  28249. var c = i.getSeriesByName(h)[0];
  28250. if (!a.get(h))
  28251. if (c) {
  28252. var d = c.getData(),
  28253. f = d.getVisual("color");
  28254. "function" == typeof f && (f = f(c.getDataParams(0)));
  28255. var p = d.getVisual("legendSymbol") || "roundRect",
  28256. g = d.getVisual("symbol");
  28257. this._createItem(h, u, l, e, p, g, t, f, r).on("click", NP(pv, h, n)).on("mouseover", NP(gv, c.name, null,
  28258. n, s)).on("mouseout", NP(mv, c.name, null, n, s)), a.set(h, !0)
  28259. } else i.eachRawSeries(function(i) {
  28260. if (!a.get(h) && i.legendDataProvider) {
  28261. var o = i.legendDataProvider(),
  28262. c = o.indexOfName(h);
  28263. if (c < 0) return;
  28264. var d = o.getItemVisual(c, "color");
  28265. this._createItem(h, u, l, e, "roundRect", null, t, d, r).on("click", NP(pv, h, n)).on("mouseover", NP(
  28266. gv, null, h, n, s)).on("mouseout", NP(mv, null, h, n, s)), a.set(h, !0)
  28267. }
  28268. }, this)
  28269. } else o.add(new EP({
  28270. newline: !0
  28271. }))
  28272. }, this)
  28273. },
  28274. _createItem: function(t, e, i, n, o, r, s, l, u) {
  28275. var h = n.get("itemWidth"),
  28276. c = n.get("itemHeight"),
  28277. d = n.get("inactiveColor"),
  28278. f = n.get("symbolKeepAspect"),
  28279. p = n.isSelected(t),
  28280. g = new EP,
  28281. m = i.getModel("textStyle"),
  28282. v = i.get("icon"),
  28283. y = i.getModel("tooltip"),
  28284. x = y.parentModel;
  28285. if (o = v || o, g.add(Xl(o, 0, 0, h, c, p ? l : d, null == f || f)), !v && r && (r !== o || "none" === r)) {
  28286. var _ = .8 * c;
  28287. "none" === r && (r = "circle"), g.add(Xl(r, (h - _) / 2, (c - _) / 2, _, _, p ? l : d, null == f || f))
  28288. }
  28289. var w = "left" === s ? h + 5 : -5,
  28290. b = s,
  28291. S = n.get("formatter"),
  28292. M = t;
  28293. "string" == typeof S && S ? M = S.replace("{name}", null != t ? t : "") : "function" == typeof S && (M = S(t)),
  28294. g.add(new qS({
  28295. style: fo({}, m, {
  28296. text: M,
  28297. x: w,
  28298. y: c / 2,
  28299. textFill: p ? m.getTextColor() : d,
  28300. textAlign: b,
  28301. textVerticalAlign: "middle"
  28302. })
  28303. }));
  28304. var I = new aM({
  28305. shape: g.getBoundingRect(),
  28306. invisible: !0,
  28307. tooltip: y.get("show") ? a({
  28308. content: t,
  28309. formatter: x.get("formatter", !0) || function() {
  28310. return t
  28311. },
  28312. formatterParams: {
  28313. componentType: "legend",
  28314. legendIndex: n.componentIndex,
  28315. name: t,
  28316. $vars: ["name"]
  28317. }
  28318. }, y.option) : null
  28319. });
  28320. return g.add(I), g.eachChild(function(t) {
  28321. t.silent = !0
  28322. }), I.silent = !u, this.getContentGroup().add(g), uo(g), g.__legendDataIndex = e, g
  28323. },
  28324. layoutInner: function(t, e, i) {
  28325. var n = this.getContentGroup();
  28326. UM(t.get("orient"), n, t.get("itemGap"), i.width, i.height);
  28327. var o = n.getBoundingRect();
  28328. return n.attr("position", [-o.x, -o.y]), this.group.getBoundingRect()
  28329. }
  28330. });
  28331. ks(function(t) {
  28332. var e = t.findComponents({
  28333. mainType: "legend"
  28334. });
  28335. e && e.length && t.filterSeries(function(t) {
  28336. for (var i = 0; i < e.length; i++)
  28337. if (!e[i].isSelected(t.name)) return !1;
  28338. return !0
  28339. })
  28340. }), YM.registerSubTypeDefaulter("legend", function() {
  28341. return "plain"
  28342. });
  28343. var zP = PP.extend({
  28344. type: "legend.scroll",
  28345. setScrollDataIndex: function(t) {
  28346. this.option.scrollDataIndex = t
  28347. },
  28348. defaultOption: {
  28349. scrollDataIndex: 0,
  28350. pageButtonItemGap: 5,
  28351. pageButtonGap: null,
  28352. pageButtonPosition: "end",
  28353. pageFormatter: "{current}/{total}",
  28354. pageIcons: {
  28355. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  28356. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  28357. },
  28358. pageIconColor: "#2f4554",
  28359. pageIconInactiveColor: "#aaa",
  28360. pageIconSize: 15,
  28361. pageTextStyle: {
  28362. color: "#333"
  28363. },
  28364. animationDurationUpdate: 800
  28365. },
  28366. init: function(t, e, i, n) {
  28367. var o = da(t);
  28368. zP.superCall(this, "init", t, e, i, n), vv(this, t, o)
  28369. },
  28370. mergeOption: function(t, e) {
  28371. zP.superCall(this, "mergeOption", t, e), vv(this, this.option, t)
  28372. },
  28373. getOrient: function() {
  28374. return "vertical" === this.get("orient") ? {
  28375. index: 1,
  28376. name: "vertical"
  28377. } : {
  28378. index: 0,
  28379. name: "horizontal"
  28380. }
  28381. }
  28382. }),
  28383. BP = Zw,
  28384. VP = ["width", "height"],
  28385. GP = ["x", "y"],
  28386. FP = RP.extend({
  28387. type: "legend.scroll",
  28388. newlineDisabled: !0,
  28389. init: function() {
  28390. FP.superCall(this, "init"), this._currentIndex = 0, this.group.add(this._containerGroup = new BP), this._containerGroup
  28391. .add(this.getContentGroup()), this.group.add(this._controllerGroup = new BP), this._showController
  28392. },
  28393. resetInner: function() {
  28394. FP.superCall(this, "resetInner"), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this
  28395. ._containerGroup.__rectSize = null
  28396. },
  28397. renderInner: function(t, e, i, n) {
  28398. function o(t, i) {
  28399. var o = t + "DataIndex",
  28400. l = Co(e.get("pageIcons", !0)[e.getOrient().name][i], {
  28401. onclick: m(a._pageGo, a, o, e, n)
  28402. }, {
  28403. x: -s[0] / 2,
  28404. y: -s[1] / 2,
  28405. width: s[0],
  28406. height: s[1]
  28407. });
  28408. l.name = t, r.add(l)
  28409. }
  28410. var a = this;
  28411. FP.superCall(this, "renderInner", t, e, i, n);
  28412. var r = this._controllerGroup,
  28413. s = e.get("pageIconSize", !0);
  28414. y(s) || (s = [s, s]), o("pagePrev", 0);
  28415. var l = e.getModel("pageTextStyle");
  28416. r.add(new qS({
  28417. name: "pageText",
  28418. style: {
  28419. textFill: l.getTextColor(),
  28420. font: l.getFont(),
  28421. textVerticalAlign: "middle",
  28422. textAlign: "center"
  28423. },
  28424. silent: !0
  28425. })), o("pageNext", 1)
  28426. },
  28427. layoutInner: function(t, e, i) {
  28428. var n = this.getContentGroup(),
  28429. o = this._containerGroup,
  28430. a = this._controllerGroup,
  28431. r = t.getOrient().index,
  28432. s = VP[r],
  28433. l = VP[1 - r],
  28434. u = GP[1 - r];
  28435. UM(t.get("orient"), n, t.get("itemGap"), r ? i.width : null, r ? null : i.height), UM("horizontal", a, t.get(
  28436. "pageButtonItemGap", !0));
  28437. var h = n.getBoundingRect(),
  28438. c = a.getBoundingRect(),
  28439. d = this._showController = h[s] > i[s],
  28440. f = [-h.x, -h.y];
  28441. f[r] = n.position[r];
  28442. var p = [0, 0],
  28443. g = [-c.x, -c.y],
  28444. m = A(t.get("pageButtonGap", !0), t.get("itemGap", !0));
  28445. d && ("end" === t.get("pageButtonPosition", !0) ? g[r] += i[s] - c[s] : p[r] += c[s] + m), g[1 - r] += h[l] / 2 -
  28446. c[l] / 2, n.attr("position", f), o.attr("position", p), a.attr("position", g);
  28447. var v = this.group.getBoundingRect();
  28448. if ((v = {
  28449. x: 0,
  28450. y: 0
  28451. })[s] = d ? i[s] : h[s], v[l] = Math.max(h[l], c[l]), v[u] = Math.min(0, c[u] + g[1 - r]), o.__rectSize = i[s],
  28452. d) {
  28453. var y = {
  28454. x: 0,
  28455. y: 0
  28456. };
  28457. y[s] = Math.max(i[s] - c[s] - m, 0), y[l] = v[l], o.setClipPath(new aM({
  28458. shape: y
  28459. })), o.__rectSize = y[s]
  28460. } else a.eachChild(function(t) {
  28461. t.attr({
  28462. invisible: !0,
  28463. silent: !0
  28464. })
  28465. });
  28466. var x = this._getPageInfo(t);
  28467. return null != x.pageIndex && bo(n, {
  28468. position: x.contentPosition
  28469. }, !!d && t), this._updatePageInfoView(t, x), v
  28470. },
  28471. _pageGo: function(t, e, i) {
  28472. var n = this._getPageInfo(e)[t];
  28473. null != n && i.dispatchAction({
  28474. type: "legendScroll",
  28475. scrollDataIndex: n,
  28476. legendId: e.id
  28477. })
  28478. },
  28479. _updatePageInfoView: function(t, e) {
  28480. var i = this._controllerGroup;
  28481. d(["pagePrev", "pageNext"], function(n) {
  28482. var o = null != e[n + "DataIndex"],
  28483. a = i.childOfName(n);
  28484. a && (a.setStyle("fill", o ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), a.cursor = o ?
  28485. "pointer" : "default")
  28486. });
  28487. var n = i.childOfName("pageText"),
  28488. o = t.get("pageFormatter"),
  28489. a = e.pageIndex,
  28490. r = null != a ? a + 1 : 0,
  28491. s = e.pageCount;
  28492. n && o && n.setStyle("text", _(o) ? o.replace("{current}", r).replace("{total}", s) : o({
  28493. current: r,
  28494. total: s
  28495. }))
  28496. },
  28497. _getPageInfo: function(t) {
  28498. function e(t) {
  28499. var e = t.getBoundingRect().clone();
  28500. return e[f] += t.position[h], e
  28501. }
  28502. var i, n, o, a, r = t.get("scrollDataIndex", !0),
  28503. s = this.getContentGroup(),
  28504. l = s.getBoundingRect(),
  28505. u = this._containerGroup.__rectSize,
  28506. h = t.getOrient().index,
  28507. c = VP[h],
  28508. d = VP[1 - h],
  28509. f = GP[h],
  28510. p = s.position.slice();
  28511. this._showController ? s.eachChild(function(t) {
  28512. t.__legendDataIndex === r && (a = t)
  28513. }) : a = s.childAt(0);
  28514. var g = u ? Math.ceil(l[c] / u) : 0;
  28515. if (a) {
  28516. var m = a.getBoundingRect(),
  28517. v = a.position[h] + m[f];
  28518. p[h] = -v - l[f], i = Math.floor(g * (v + m[f] + u / 2) / l[c]), i = l[c] && g ? Math.max(0, Math.min(g - 1, i)) :
  28519. -1;
  28520. var y = {
  28521. x: 0,
  28522. y: 0
  28523. };
  28524. y[c] = u, y[d] = l[d], y[f] = -p[h] - l[f];
  28525. var x, _ = s.children();
  28526. if (s.eachChild(function(t, i) {
  28527. var n = e(t);
  28528. n.intersect(y) && (null == x && (x = i), o = t.__legendDataIndex), i === _.length - 1 && n[f] + n[c] <= y[f] +
  28529. y[c] && (o = null)
  28530. }), null != x) {
  28531. var w = e(_[x]);
  28532. if (y[f] = w[f] + w[c] - y[c], x <= 0 && w[f] >= y[f]) n = null;
  28533. else {
  28534. for (; x > 0 && e(_[x - 1]).intersect(y);) x--;
  28535. n = _[x].__legendDataIndex
  28536. }
  28537. }
  28538. }
  28539. return {
  28540. contentPosition: p,
  28541. pageIndex: i,
  28542. pageCount: g,
  28543. pagePrevDataIndex: n,
  28544. pageNextDataIndex: o
  28545. }
  28546. }
  28547. });
  28548. Ps("legendScroll", "legendscroll", function(t, e) {
  28549. var i = t.scrollDataIndex;
  28550. null != i && e.eachComponent({
  28551. mainType: "legend",
  28552. subType: "scroll",
  28553. query: t
  28554. }, function(t) {
  28555. t.setScrollDataIndex(i)
  28556. })
  28557. }), Bs({
  28558. type: "tooltip",
  28559. dependencies: ["axisPointer"],
  28560. defaultOption: {
  28561. zlevel: 0,
  28562. z: 60,
  28563. show: !0,
  28564. showContent: !0,
  28565. trigger: "item",
  28566. triggerOn: "mousemove|click",
  28567. alwaysShowContent: !1,
  28568. displayMode: "single",
  28569. renderMode: "auto",
  28570. confine: !1,
  28571. showDelay: 0,
  28572. hideDelay: 100,
  28573. transitionDuration: .4,
  28574. enterable: !1,
  28575. backgroundColor: "rgba(50,50,50,0.7)",
  28576. borderColor: "#333",
  28577. borderRadius: 4,
  28578. borderWidth: 0,
  28579. padding: 5,
  28580. extraCssText: "",
  28581. axisPointer: {
  28582. type: "line",
  28583. axis: "auto",
  28584. animation: "auto",
  28585. animationDurationUpdate: 200,
  28586. animationEasingUpdate: "exponentialOut",
  28587. crossStyle: {
  28588. color: "#999",
  28589. width: 1,
  28590. type: "dashed",
  28591. textStyle: {}
  28592. }
  28593. },
  28594. textStyle: {
  28595. color: "#fff",
  28596. fontSize: 14
  28597. }
  28598. }
  28599. });
  28600. var WP = d,
  28601. HP = Jo,
  28602. ZP = ["", "-webkit-", "-moz-", "-o-"];
  28603. wv.prototype = {
  28604. constructor: wv,
  28605. _enterable: !0,
  28606. update: function() {
  28607. var t = this._container,
  28608. e = t.currentStyle || document.defaultView.getComputedStyle(t),
  28609. i = t.style;
  28610. "absolute" !== i.position && "absolute" !== e.position && (i.position = "relative")
  28611. },
  28612. show: function(t) {
  28613. clearTimeout(this._hideTimeout);
  28614. var e = this.el;
  28615. e.style.cssText = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + _v(t) +
  28616. ";left:" + this._x + "px;top:" + this._y + "px;" + (t.get("extraCssText") || ""), e.style.display = e.innerHTML ?
  28617. "block" : "none", e.style.pointerEvents = this._enterable ? "auto" : "none", this._show = !0
  28618. },
  28619. setContent: function(t) {
  28620. this.el.innerHTML = null == t ? "" : t
  28621. },
  28622. setEnterable: function(t) {
  28623. this._enterable = t
  28624. },
  28625. getSize: function() {
  28626. var t = this.el;
  28627. return [t.clientWidth, t.clientHeight]
  28628. },
  28629. moveTo: function(t, e) {
  28630. var i, n = this._zr;
  28631. n && n.painter && (i = n.painter.getViewportRootOffset()) && (t += i.offsetLeft, e += i.offsetTop);
  28632. var o = this.el.style;
  28633. o.left = t + "px", o.top = e + "px", this._x = t, this._y = e
  28634. },
  28635. hide: function() {
  28636. this.el.style.display = "none", this._show = !1
  28637. },
  28638. hideLater: function(t) {
  28639. !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout =
  28640. setTimeout(m(this.hide, this), t)) : this.hide())
  28641. },
  28642. isShow: function() {
  28643. return this._show
  28644. },
  28645. getOuterSize: function() {
  28646. var t = this.el.clientWidth,
  28647. e = this.el.clientHeight;
  28648. if (document.defaultView && document.defaultView.getComputedStyle) {
  28649. var i = document.defaultView.getComputedStyle(this.el);
  28650. i && (t += parseInt(i.paddingLeft, 10) + parseInt(i.paddingRight, 10) + parseInt(i.borderLeftWidth, 10) +
  28651. parseInt(i.borderRightWidth, 10), e += parseInt(i.paddingTop, 10) + parseInt(i.paddingBottom, 10) + parseInt(i
  28652. .borderTopWidth, 10) + parseInt(i.borderBottomWidth, 10))
  28653. }
  28654. return {
  28655. width: t,
  28656. height: e
  28657. }
  28658. }
  28659. }, bv.prototype = {
  28660. constructor: bv,
  28661. _enterable: !0,
  28662. update: function() {},
  28663. show: function(t) {
  28664. this._hideTimeout && clearTimeout(this._hideTimeout), this.el.attr("show", !0), this._show = !0
  28665. },
  28666. setContent: function(t, e, i) {
  28667. this.el && this._zr.remove(this.el);
  28668. for (var n = {}, o = t, a = o.indexOf("{marker"); a >= 0;) {
  28669. var r = o.indexOf("|}"),
  28670. s = o.substr(a + "{marker".length, r - a - "{marker".length);
  28671. s.indexOf("sub") > -1 ? n["marker" + s] = {
  28672. textWidth: 4,
  28673. textHeight: 4,
  28674. textBorderRadius: 2,
  28675. textBackgroundColor: e[s],
  28676. textOffset: [3, 0]
  28677. } : n["marker" + s] = {
  28678. textWidth: 10,
  28679. textHeight: 10,
  28680. textBorderRadius: 5,
  28681. textBackgroundColor: e[s]
  28682. }, a = (o = o.substr(r + 1)).indexOf("{marker")
  28683. }
  28684. this.el = new qS({
  28685. style: {
  28686. rich: n,
  28687. text: t,
  28688. textLineHeight: 20,
  28689. textBackgroundColor: i.get("backgroundColor"),
  28690. textBorderRadius: i.get("borderRadius"),
  28691. textFill: i.get("textStyle.color"),
  28692. textPadding: i.get("padding")
  28693. },
  28694. z: i.get("z")
  28695. }), this._zr.add(this.el);
  28696. var l = this;
  28697. this.el.on("mouseover", function() {
  28698. l._enterable && (clearTimeout(l._hideTimeout), l._show = !0), l._inContent = !0
  28699. }), this.el.on("mouseout", function() {
  28700. l._enterable && l._show && l.hideLater(l._hideDelay), l._inContent = !1
  28701. })
  28702. },
  28703. setEnterable: function(t) {
  28704. this._enterable = t
  28705. },
  28706. getSize: function() {
  28707. var t = this.el.getBoundingRect();
  28708. return [t.width, t.height]
  28709. },
  28710. moveTo: function(t, e) {
  28711. this.el && this.el.attr("position", [t, e])
  28712. },
  28713. hide: function() {
  28714. this.el.hide(), this._show = !1
  28715. },
  28716. hideLater: function(t) {
  28717. !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout =
  28718. setTimeout(m(this.hide, this), t)) : this.hide())
  28719. },
  28720. isShow: function() {
  28721. return this._show
  28722. },
  28723. getOuterSize: function() {
  28724. return this.getSize()
  28725. }
  28726. };
  28727. var UP = m,
  28728. XP = d,
  28729. jP = Ro,
  28730. YP = new aM({
  28731. shape: {
  28732. x: -1,
  28733. y: -1,
  28734. width: 2,
  28735. height: 2
  28736. }
  28737. });
  28738. Vs({
  28739. type: "tooltip",
  28740. init: function(t, e) {
  28741. if (!z_.node) {
  28742. var i = t.getComponent("tooltip").get("renderMode");
  28743. this._renderMode = Hi(i);
  28744. var n;
  28745. "html" === this._renderMode ? (n = new wv(e.getDom(), e), this._newLine = "<br/>") : (n = new bv(e), this._newLine =
  28746. "\n"), this._tooltipContent = n
  28747. }
  28748. },
  28749. render: function(t, e, i) {
  28750. if (!z_.node) {
  28751. this.group.removeAll(), this._tooltipModel = t, this._ecModel = e, this._api = i, this._lastDataByCoordSys =
  28752. null, this._alwaysShowContent = t.get("alwaysShowContent");
  28753. var n = this._tooltipContent;
  28754. n.update(), n.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow()
  28755. }
  28756. },
  28757. _initGlobalListener: function() {
  28758. var t = this._tooltipModel.get("triggerOn");
  28759. im("itemTooltip", this._api, UP(function(e, i, n) {
  28760. "none" !== t && (t.indexOf(e) >= 0 ? this._tryShow(i, n) : "leave" === e && this._hide(n))
  28761. }, this))
  28762. },
  28763. _keepShow: function() {
  28764. var t = this._tooltipModel,
  28765. e = this._ecModel,
  28766. i = this._api;
  28767. if (null != this._lastX && null != this._lastY && "none" !== t.get("triggerOn")) {
  28768. var n = this;
  28769. clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
  28770. n.manuallyShowTip(t, e, i, {
  28771. x: n._lastX,
  28772. y: n._lastY
  28773. })
  28774. })
  28775. }
  28776. },
  28777. manuallyShowTip: function(t, e, i, n) {
  28778. if (n.from !== this.uid && !z_.node) {
  28779. var o = Mv(n, i);
  28780. this._ticket = "";
  28781. var a = n.dataByCoordSys;
  28782. if (n.tooltip && null != n.x && null != n.y) {
  28783. var r = YP;
  28784. r.position = [n.x, n.y], r.update(), r.tooltip = n.tooltip, this._tryShow({
  28785. offsetX: n.x,
  28786. offsetY: n.y,
  28787. target: r
  28788. }, o)
  28789. } else if (a) this._tryShow({
  28790. offsetX: n.x,
  28791. offsetY: n.y,
  28792. position: n.position,
  28793. event: {},
  28794. dataByCoordSys: n.dataByCoordSys,
  28795. tooltipOption: n.tooltipOption
  28796. }, o);
  28797. else if (null != n.seriesIndex) {
  28798. if (this._manuallyAxisShowTip(t, e, i, n)) return;
  28799. var s = eP(n, e),
  28800. l = s.point[0],
  28801. u = s.point[1];
  28802. null != l && null != u && this._tryShow({
  28803. offsetX: l,
  28804. offsetY: u,
  28805. position: n.position,
  28806. target: s.el,
  28807. event: {}
  28808. }, o)
  28809. } else null != n.x && null != n.y && (i.dispatchAction({
  28810. type: "updateAxisPointer",
  28811. x: n.x,
  28812. y: n.y
  28813. }), this._tryShow({
  28814. offsetX: n.x,
  28815. offsetY: n.y,
  28816. position: n.position,
  28817. target: i.getZr().findHover(n.x, n.y).target,
  28818. event: {}
  28819. }, o))
  28820. }
  28821. },
  28822. manuallyHideTip: function(t, e, i, n) {
  28823. var o = this._tooltipContent;
  28824. !this._alwaysShowContent && this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX =
  28825. this._lastY = null, n.from !== this.uid && this._hide(Mv(n, i))
  28826. },
  28827. _manuallyAxisShowTip: function(t, e, i, n) {
  28828. var o = n.seriesIndex,
  28829. a = n.dataIndex,
  28830. r = e.getComponent("axisPointer").coordSysAxesInfo;
  28831. if (null != o && null != a && null != r) {
  28832. var s = e.getSeriesByIndex(o);
  28833. if (s && "axis" === (t = Sv([s.getData().getItemModel(a), s, (s.coordinateSystem || {}).model, t])).get(
  28834. "trigger")) return i.dispatchAction({
  28835. type: "updateAxisPointer",
  28836. seriesIndex: o,
  28837. dataIndex: a,
  28838. position: n.position
  28839. }), !0
  28840. }
  28841. },
  28842. _tryShow: function(t, e) {
  28843. var i = t.target;
  28844. if (this._tooltipModel) {
  28845. this._lastX = t.offsetX, this._lastY = t.offsetY;
  28846. var n = t.dataByCoordSys;
  28847. n && n.length ? this._showAxisTooltip(n, t) : i && null != i.dataIndex ? (this._lastDataByCoordSys = null, this
  28848. ._showSeriesItemTooltip(t, i, e)) : i && i.tooltip ? (this._lastDataByCoordSys = null, this._showComponentItemTooltip(
  28849. t, i, e)) : (this._lastDataByCoordSys = null, this._hide(e))
  28850. }
  28851. },
  28852. _showOrMove: function(t, e) {
  28853. var i = t.get("showDelay");
  28854. e = m(e, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(e, i) : e()
  28855. },
  28856. _showAxisTooltip: function(t, e) {
  28857. var i = this._ecModel,
  28858. o = this._tooltipModel,
  28859. a = [e.offsetX, e.offsetY],
  28860. r = [],
  28861. s = [],
  28862. l = Sv([e.tooltipOption, o]),
  28863. u = this._renderMode,
  28864. h = this._newLine,
  28865. c = {};
  28866. XP(t, function(t) {
  28867. XP(t.dataByAxis, function(t) {
  28868. var e = i.getComponent(t.axisDim + "Axis", t.axisIndex),
  28869. o = t.value,
  28870. a = [];
  28871. if (e && null != o) {
  28872. var l = ym(o, e.axis, i, t.seriesDataIndices, t.valueLabelOpt);
  28873. d(t.seriesDataIndices, function(r) {
  28874. var h = i.getSeriesByIndex(r.seriesIndex),
  28875. d = r.dataIndexInside,
  28876. f = h && h.getDataParams(d);
  28877. if (f.axisDim = t.axisDim, f.axisIndex = t.axisIndex, f.axisType = t.axisType, f.axisId = t.axisId, f.axisValue =
  28878. Wl(e.axis, o), f.axisValueLabel = l, f) {
  28879. s.push(f);
  28880. var p, g = h.formatTooltip(d, !0, null, u);
  28881. if (w(g)) {
  28882. p = g.html;
  28883. var m = g.markers;
  28884. n(c, m)
  28885. } else p = g;
  28886. a.push(p)
  28887. }
  28888. });
  28889. var f = l;
  28890. "html" !== u ? r.push(a.join(h)) : r.push((f ? Qo(f) + h : "") + a.join(h))
  28891. }
  28892. })
  28893. }, this), r.reverse(), r = r.join(this._newLine + this._newLine);
  28894. var f = e.position;
  28895. this._showOrMove(l, function() {
  28896. this._updateContentNotChangedOnAxis(t) ? this._updatePosition(l, f, a[0], a[1], this._tooltipContent, s) :
  28897. this._showTooltipContent(l, r, s, Math.random(), a[0], a[1], f, void 0, c)
  28898. })
  28899. },
  28900. _showSeriesItemTooltip: function(t, e, i) {
  28901. var n = this._ecModel,
  28902. o = e.seriesIndex,
  28903. a = n.getSeriesByIndex(o),
  28904. r = e.dataModel || a,
  28905. s = e.dataIndex,
  28906. l = e.dataType,
  28907. u = r.getData(),
  28908. h = Sv([u.getItemModel(s), r, a && (a.coordinateSystem || {}).model, this._tooltipModel]),
  28909. c = h.get("trigger");
  28910. if (null == c || "item" === c) {
  28911. var d, f, p = r.getDataParams(s, l),
  28912. g = r.formatTooltip(s, !1, l, this._renderMode);
  28913. w(g) ? (d = g.html, f = g.markers) : (d = g, f = null);
  28914. var m = "item_" + r.name + "_" + s;
  28915. this._showOrMove(h, function() {
  28916. this._showTooltipContent(h, d, p, m, t.offsetX, t.offsetY, t.position, t.target, f)
  28917. }), i({
  28918. type: "showTip",
  28919. dataIndexInside: s,
  28920. dataIndex: u.getRawIndex(s),
  28921. seriesIndex: o,
  28922. from: this.uid
  28923. })
  28924. }
  28925. },
  28926. _showComponentItemTooltip: function(t, e, i) {
  28927. var n = e.tooltip;
  28928. if ("string" == typeof n) {
  28929. var o = n;
  28930. n = {
  28931. content: o,
  28932. formatter: o
  28933. }
  28934. }
  28935. var a = new Lo(n, this._tooltipModel, this._ecModel),
  28936. r = a.get("content"),
  28937. s = Math.random();
  28938. this._showOrMove(a, function() {
  28939. this._showTooltipContent(a, r, a.get("formatterParams") || {}, s, t.offsetX, t.offsetY, t.position, e)
  28940. }), i({
  28941. type: "showTip",
  28942. from: this.uid
  28943. })
  28944. },
  28945. _showTooltipContent: function(t, e, i, n, o, a, r, s, l) {
  28946. if (this._ticket = "", t.get("showContent") && t.get("show")) {
  28947. var u = this._tooltipContent,
  28948. h = t.get("formatter");
  28949. r = r || t.get("position");
  28950. var c = e;
  28951. if (h && "string" == typeof h) c = ta(h, i, !0);
  28952. else if ("function" == typeof h) {
  28953. var d = UP(function(e, n) {
  28954. e === this._ticket && (u.setContent(n, l, t), this._updatePosition(t, r, o, a, u, i, s))
  28955. }, this);
  28956. this._ticket = n, c = h(i, n, d)
  28957. }
  28958. u.setContent(c, l, t), u.show(t), this._updatePosition(t, r, o, a, u, i, s)
  28959. }
  28960. },
  28961. _updatePosition: function(t, e, i, n, o, a, r) {
  28962. var s = this._api.getWidth(),
  28963. l = this._api.getHeight();
  28964. e = e || t.get("position");
  28965. var u = o.getSize(),
  28966. h = t.get("align"),
  28967. c = t.get("verticalAlign"),
  28968. d = r && r.getBoundingRect().clone();
  28969. if (r && d.applyTransform(r.transform), "function" == typeof e && (e = e([i, n], a, o.el, d, {
  28970. viewSize: [s, l],
  28971. contentSize: u.slice()
  28972. })), y(e)) i = jP(e[0], s), n = jP(e[1], l);
  28973. else if (w(e)) {
  28974. e.width = u[0], e.height = u[1];
  28975. var f = la(e, {
  28976. width: s,
  28977. height: l
  28978. });
  28979. i = f.x, n = f.y, h = null, c = null
  28980. } else "string" == typeof e && r ? (i = (p = Av(e, d, u))[0], n = p[1]) : (i = (p = Iv(i, n, o, s, l, h ? null :
  28981. 20, c ? null : 20))[0], n = p[1]);
  28982. if (h && (i -= Dv(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (n -= Dv(c) ? u[1] / 2 : "bottom" === c ? u[1] :
  28983. 0), t.get("confine")) {
  28984. var p = Tv(i, n, o, s, l);
  28985. i = p[0], n = p[1]
  28986. }
  28987. o.moveTo(i, n)
  28988. },
  28989. _updateContentNotChangedOnAxis: function(t) {
  28990. var e = this._lastDataByCoordSys,
  28991. i = !!e && e.length === t.length;
  28992. return i && XP(e, function(e, n) {
  28993. var o = e.dataByAxis || {},
  28994. a = (t[n] || {}).dataByAxis || [];
  28995. (i &= o.length === a.length) && XP(o, function(t, e) {
  28996. var n = a[e] || {},
  28997. o = t.seriesDataIndices || [],
  28998. r = n.seriesDataIndices || [];
  28999. (i &= t.value === n.value && t.axisType === n.axisType && t.axisId === n.axisId && o.length === r.length) &&
  29000. XP(o, function(t, e) {
  29001. var n = r[e];
  29002. i &= t.seriesIndex === n.seriesIndex && t.dataIndex === n.dataIndex
  29003. })
  29004. })
  29005. }), this._lastDataByCoordSys = t, !!i
  29006. },
  29007. _hide: function(t) {
  29008. this._lastDataByCoordSys = null, t({
  29009. type: "hideTip",
  29010. from: this.uid
  29011. })
  29012. },
  29013. dispose: function(t, e) {
  29014. z_.node || (this._tooltipContent.hide(), lm("itemTooltip", e))
  29015. }
  29016. }), Ps({
  29017. type: "showTip",
  29018. event: "showTip",
  29019. update: "tooltip:manuallyShowTip"
  29020. }, function() {}), Ps({
  29021. type: "hideTip",
  29022. event: "hideTip",
  29023. update: "tooltip:manuallyHideTip"
  29024. }, function() {}), Pv.prototype = {
  29025. constructor: Pv,
  29026. pointToData: function(t, e) {
  29027. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  29028. },
  29029. dataToRadius: HA.prototype.dataToCoord,
  29030. radiusToData: HA.prototype.coordToData
  29031. }, u(Pv, HA);
  29032. var qP = Bi();
  29033. Nv.prototype = {
  29034. constructor: Nv,
  29035. pointToData: function(t, e) {
  29036. return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1]
  29037. },
  29038. dataToAngle: HA.prototype.dataToCoord,
  29039. angleToData: HA.prototype.coordToData,
  29040. calculateCategoryInterval: function() {
  29041. var t = this,
  29042. e = t.getLabelModel(),
  29043. i = t.scale,
  29044. n = i.getExtent(),
  29045. o = i.count();
  29046. if (n[1] - n[0] < 1) return 0;
  29047. var a = n[0],
  29048. r = t.dataToCoord(a + 1) - t.dataToCoord(a),
  29049. s = Math.abs(r),
  29050. l = De(a, e.getFont(), "center", "top"),
  29051. u = Math.max(l.height, 7) / s;
  29052. isNaN(u) && (u = 1 / 0);
  29053. var h = Math.max(0, Math.floor(u)),
  29054. c = qP(t.model),
  29055. d = c.lastAutoInterval,
  29056. f = c.lastTickCount;
  29057. return null != d && null != f && Math.abs(d - h) <= 1 && Math.abs(f - o) <= 1 && d > h ? h = d : (c.lastTickCount =
  29058. o, c.lastAutoInterval = h), h
  29059. }
  29060. }, u(Nv, HA);
  29061. var KP = function(t) {
  29062. this.name = t || "", this.cx = 0, this.cy = 0, this._radiusAxis = new Pv, this._angleAxis = new Nv, this._radiusAxis
  29063. .polar = this._angleAxis.polar = this
  29064. };
  29065. KP.prototype = {
  29066. type: "polar",
  29067. axisPointerEnabled: !0,
  29068. constructor: KP,
  29069. dimensions: ["radius", "angle"],
  29070. model: null,
  29071. containPoint: function(t) {
  29072. var e = this.pointToCoord(t);
  29073. return this._radiusAxis.contain(e[0]) && this._angleAxis.contain(e[1])
  29074. },
  29075. containData: function(t) {
  29076. return this._radiusAxis.containData(t[0]) && this._angleAxis.containData(t[1])
  29077. },
  29078. getAxis: function(t) {
  29079. return this["_" + t + "Axis"]
  29080. },
  29081. getAxes: function() {
  29082. return [this._radiusAxis, this._angleAxis]
  29083. },
  29084. getAxesByScale: function(t) {
  29085. var e = [],
  29086. i = this._angleAxis,
  29087. n = this._radiusAxis;
  29088. return i.scale.type === t && e.push(i), n.scale.type === t && e.push(n), e
  29089. },
  29090. getAngleAxis: function() {
  29091. return this._angleAxis
  29092. },
  29093. getRadiusAxis: function() {
  29094. return this._radiusAxis
  29095. },
  29096. getOtherAxis: function(t) {
  29097. var e = this._angleAxis;
  29098. return t === e ? this._radiusAxis : e
  29099. },
  29100. getBaseAxis: function() {
  29101. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis()
  29102. },
  29103. getTooltipAxes: function(t) {
  29104. var e = null != t && "auto" !== t ? this.getAxis(t) : this.getBaseAxis();
  29105. return {
  29106. baseAxes: [e],
  29107. otherAxes: [this.getOtherAxis(e)]
  29108. }
  29109. },
  29110. dataToPoint: function(t, e) {
  29111. return this.coordToPoint([this._radiusAxis.dataToRadius(t[0], e), this._angleAxis.dataToAngle(t[1], e)])
  29112. },
  29113. pointToData: function(t, e) {
  29114. var i = this.pointToCoord(t);
  29115. return [this._radiusAxis.radiusToData(i[0], e), this._angleAxis.angleToData(i[1], e)]
  29116. },
  29117. pointToCoord: function(t) {
  29118. var e = t[0] - this.cx,
  29119. i = t[1] - this.cy,
  29120. n = this.getAngleAxis(),
  29121. o = n.getExtent(),
  29122. a = Math.min(o[0], o[1]),
  29123. r = Math.max(o[0], o[1]);
  29124. n.inverse ? a = r - 360 : r = a + 360;
  29125. var s = Math.sqrt(e * e + i * i);
  29126. e /= s, i /= s;
  29127. for (var l = Math.atan2(-i, e) / Math.PI * 180, u = l < a ? 1 : -1; l < a || l > r;) l += 360 * u;
  29128. return [s, l]
  29129. },
  29130. coordToPoint: function(t) {
  29131. var e = t[0],
  29132. i = t[1] / 180 * Math.PI;
  29133. return [Math.cos(i) * e + this.cx, -Math.sin(i) * e + this.cy]
  29134. }
  29135. };
  29136. var $P = YM.extend({
  29137. type: "polarAxis",
  29138. axis: null,
  29139. getCoordSysModel: function() {
  29140. return this.ecModel.queryComponents({
  29141. mainType: "polar",
  29142. index: this.option.polarIndex,
  29143. id: this.option.polarId
  29144. })[0]
  29145. }
  29146. });
  29147. n($P.prototype, CA);
  29148. var JP = {
  29149. angle: {
  29150. startAngle: 90,
  29151. clockwise: !0,
  29152. splitNumber: 12,
  29153. axisLabel: {
  29154. rotate: !1
  29155. }
  29156. },
  29157. radius: {
  29158. splitNumber: 5
  29159. }
  29160. };
  29161. xD("angle", $P, Ov, JP.angle), xD("radius", $P, Ov, JP.radius), Bs({
  29162. type: "polar",
  29163. dependencies: ["polarAxis", "angleAxis"],
  29164. coordinateSystem: null,
  29165. findAxisModel: function(t) {
  29166. var e;
  29167. return this.ecModel.eachComponent(t, function(t) {
  29168. t.getCoordSysModel() === this && (e = t)
  29169. }, this), e
  29170. },
  29171. defaultOption: {
  29172. zlevel: 0,
  29173. z: 0,
  29174. center: ["50%", "50%"],
  29175. radius: "80%"
  29176. }
  29177. });
  29178. var QP = {
  29179. dimensions: KP.prototype.dimensions,
  29180. create: function(t, e) {
  29181. var i = [];
  29182. return t.eachComponent("polar", function(t, n) {
  29183. var o = new KP(n);
  29184. o.update = Rv;
  29185. var a = o.getRadiusAxis(),
  29186. r = o.getAngleAxis(),
  29187. s = t.findAxisModel("radiusAxis"),
  29188. l = t.findAxisModel("angleAxis");
  29189. zv(a, s), zv(r, l), Ev(o, t, e), i.push(o), t.coordinateSystem = o, o.model = t
  29190. }), t.eachSeries(function(e) {
  29191. if ("polar" === e.get("coordinateSystem")) {
  29192. var i = t.queryComponents({
  29193. mainType: "polar",
  29194. index: e.get("polarIndex"),
  29195. id: e.get("polarId")
  29196. })[0];
  29197. e.coordinateSystem = i.coordinateSystem
  29198. }
  29199. }), i
  29200. }
  29201. };
  29202. Ba.register("polar", QP);
  29203. var tN = ["axisLine", "axisLabel", "axisTick", "splitLine", "splitArea"];
  29204. LD.extend({
  29205. type: "angleAxis",
  29206. axisPointerClass: "PolarAxisPointer",
  29207. render: function(t, e) {
  29208. if (this.group.removeAll(), t.get("show")) {
  29209. var n = t.axis,
  29210. o = n.polar,
  29211. a = o.getRadiusAxis().getExtent(),
  29212. r = n.getTicksCoords(),
  29213. s = f(n.getViewLabels(), function(t) {
  29214. return (t = i(t)).coord = n.dataToCoord(t.tickValue), t
  29215. });
  29216. Gv(s), Gv(r), d(tN, function(e) {
  29217. !t.get(e + ".show") || n.scale.isBlank() && "axisLine" !== e || this["_" + e](t, o, r, a, s)
  29218. }, this)
  29219. }
  29220. },
  29221. _axisLine: function(t, e, i, n) {
  29222. var o = t.getModel("axisLine.lineStyle"),
  29223. a = new KS({
  29224. shape: {
  29225. cx: e.cx,
  29226. cy: e.cy,
  29227. r: n[Vv(e)]
  29228. },
  29229. style: o.getLineStyle(),
  29230. z2: 1,
  29231. silent: !0
  29232. });
  29233. a.style.fill = null, this.group.add(a)
  29234. },
  29235. _axisTick: function(t, e, i, n) {
  29236. var o = t.getModel("axisTick"),
  29237. a = (o.get("inside") ? -1 : 1) * o.get("length"),
  29238. s = n[Vv(e)],
  29239. l = f(i, function(t) {
  29240. return new rM({
  29241. shape: Bv(e, [s, s + a], t.coord)
  29242. })
  29243. });
  29244. this.group.add(xM(l, {
  29245. style: r(o.getModel("lineStyle").getLineStyle(), {
  29246. stroke: t.get("axisLine.lineStyle.color")
  29247. })
  29248. }))
  29249. },
  29250. _axisLabel: function(t, e, i, n, o) {
  29251. var a = t.getCategories(!0),
  29252. r = t.getModel("axisLabel"),
  29253. s = r.get("margin");
  29254. d(o, function(i, o) {
  29255. var l = r,
  29256. u = i.tickValue,
  29257. h = n[Vv(e)],
  29258. c = e.coordToPoint([h + s, i.coord]),
  29259. d = e.cx,
  29260. f = e.cy,
  29261. p = Math.abs(c[0] - d) / h < .3 ? "center" : c[0] > d ? "left" : "right",
  29262. g = Math.abs(c[1] - f) / h < .3 ? "middle" : c[1] > f ? "top" : "bottom";
  29263. a && a[u] && a[u].textStyle && (l = new Lo(a[u].textStyle, r, r.ecModel));
  29264. var m = new qS({
  29265. silent: !0
  29266. });
  29267. this.group.add(m), fo(m.style, l, {
  29268. x: c[0],
  29269. y: c[1],
  29270. textFill: l.getTextColor() || t.get("axisLine.lineStyle.color"),
  29271. text: i.formattedLabel,
  29272. textAlign: p,
  29273. textVerticalAlign: g
  29274. })
  29275. }, this)
  29276. },
  29277. _splitLine: function(t, e, i, n) {
  29278. var o = t.getModel("splitLine").getModel("lineStyle"),
  29279. a = o.get("color"),
  29280. s = 0;
  29281. a = a instanceof Array ? a : [a];
  29282. for (var l = [], u = 0; u < i.length; u++) {
  29283. var h = s++ % a.length;
  29284. l[h] = l[h] || [], l[h].push(new rM({
  29285. shape: Bv(e, n, i[u].coord)
  29286. }))
  29287. }
  29288. for (u = 0; u < l.length; u++) this.group.add(xM(l[u], {
  29289. style: r({
  29290. stroke: a[u % a.length]
  29291. }, o.getLineStyle()),
  29292. silent: !0,
  29293. z: t.get("z")
  29294. }))
  29295. },
  29296. _splitArea: function(t, e, i, n) {
  29297. if (i.length) {
  29298. var o = t.getModel("splitArea").getModel("areaStyle"),
  29299. a = o.get("color"),
  29300. s = 0;
  29301. a = a instanceof Array ? a : [a];
  29302. for (var l = [], u = Math.PI / 180, h = -i[0].coord * u, c = Math.min(n[0], n[1]), d = Math.max(n[0], n[1]), f =
  29303. t.get("clockwise"), p = 1; p < i.length; p++) {
  29304. var g = s++ % a.length;
  29305. l[g] = l[g] || [], l[g].push(new QS({
  29306. shape: {
  29307. cx: e.cx,
  29308. cy: e.cy,
  29309. r0: c,
  29310. r: d,
  29311. startAngle: h,
  29312. endAngle: -i[p].coord * u,
  29313. clockwise: f
  29314. },
  29315. silent: !0
  29316. })), h = -i[p].coord * u
  29317. }
  29318. for (p = 0; p < l.length; p++) this.group.add(xM(l[p], {
  29319. style: r({
  29320. fill: a[p % a.length]
  29321. }, o.getAreaStyle()),
  29322. silent: !0
  29323. }))
  29324. }
  29325. }
  29326. });
  29327. var eN = ["axisLine", "axisTickLabel", "axisName"],
  29328. iN = ["splitLine", "splitArea"];
  29329. LD.extend({
  29330. type: "radiusAxis",
  29331. axisPointerClass: "PolarAxisPointer",
  29332. render: function(t, e) {
  29333. if (this.group.removeAll(), t.get("show")) {
  29334. var i = t.axis,
  29335. n = i.polar,
  29336. o = n.getAngleAxis(),
  29337. a = i.getTicksCoords(),
  29338. r = o.getExtent()[0],
  29339. s = i.getExtent(),
  29340. l = Fv(n, t, r),
  29341. u = new ID(t, l);
  29342. d(eN, u.add, u), this.group.add(u.getGroup()), d(iN, function(e) {
  29343. t.get(e + ".show") && !i.scale.isBlank() && this["_" + e](t, n, r, s, a)
  29344. }, this)
  29345. }
  29346. },
  29347. _splitLine: function(t, e, i, n, o) {
  29348. var a = t.getModel("splitLine").getModel("lineStyle"),
  29349. s = a.get("color"),
  29350. l = 0;
  29351. s = s instanceof Array ? s : [s];
  29352. for (var u = [], h = 0; h < o.length; h++) {
  29353. var c = l++ % s.length;
  29354. u[c] = u[c] || [], u[c].push(new KS({
  29355. shape: {
  29356. cx: e.cx,
  29357. cy: e.cy,
  29358. r: o[h].coord
  29359. },
  29360. silent: !0
  29361. }))
  29362. }
  29363. for (h = 0; h < u.length; h++) this.group.add(xM(u[h], {
  29364. style: r({
  29365. stroke: s[h % s.length],
  29366. fill: null
  29367. }, a.getLineStyle()),
  29368. silent: !0
  29369. }))
  29370. },
  29371. _splitArea: function(t, e, i, n, o) {
  29372. if (o.length) {
  29373. var a = t.getModel("splitArea").getModel("areaStyle"),
  29374. s = a.get("color"),
  29375. l = 0;
  29376. s = s instanceof Array ? s : [s];
  29377. for (var u = [], h = o[0].coord, c = 1; c < o.length; c++) {
  29378. var d = l++ % s.length;
  29379. u[d] = u[d] || [], u[d].push(new QS({
  29380. shape: {
  29381. cx: e.cx,
  29382. cy: e.cy,
  29383. r0: h,
  29384. r: o[c].coord,
  29385. startAngle: 0,
  29386. endAngle: 2 * Math.PI
  29387. },
  29388. silent: !0
  29389. })), h = o[c].coord
  29390. }
  29391. for (c = 0; c < u.length; c++) this.group.add(xM(u[c], {
  29392. style: r({
  29393. fill: s[c % s.length]
  29394. }, a.getAreaStyle()),
  29395. silent: !0
  29396. }))
  29397. }
  29398. }
  29399. });
  29400. var nN = um.extend({
  29401. makeElOption: function(t, e, i, n, o) {
  29402. var a = i.axis;
  29403. "angle" === a.dim && (this.animationThreshold = Math.PI / 18);
  29404. var r, s = a.polar,
  29405. l = s.getOtherAxis(a).getExtent();
  29406. r = a["dataTo" + aa(a.dim)](e);
  29407. var u = n.get("type");
  29408. if (u && "none" !== u) {
  29409. var h = gm(n),
  29410. c = oN[u](a, s, r, l, h);
  29411. c.style = h, t.graphicKey = c.type, t.pointer = c
  29412. }
  29413. mm(t, i, n, o, Wv(e, i, 0, s, n.get("label.margin")))
  29414. }
  29415. }),
  29416. oN = {
  29417. line: function(t, e, i, n, o) {
  29418. return "angle" === t.dim ? {
  29419. type: "Line",
  29420. shape: wm(e.coordToPoint([n[0], i]), e.coordToPoint([n[1], i]))
  29421. } : {
  29422. type: "Circle",
  29423. shape: {
  29424. cx: e.cx,
  29425. cy: e.cy,
  29426. r: i
  29427. }
  29428. }
  29429. },
  29430. shadow: function(t, e, i, n, o) {
  29431. var a = Math.max(1, t.getBandWidth()),
  29432. r = Math.PI / 180;
  29433. return "angle" === t.dim ? {
  29434. type: "Sector",
  29435. shape: Sm(e.cx, e.cy, n[0], n[1], (-i - a / 2) * r, (a / 2 - i) * r)
  29436. } : {
  29437. type: "Sector",
  29438. shape: Sm(e.cx, e.cy, i - a / 2, i + a / 2, 0, 2 * Math.PI)
  29439. }
  29440. }
  29441. };
  29442. LD.registerAxisPointerClass("PolarAxisPointer", nN), Os(v(function(t, e, i) {
  29443. var n = {},
  29444. o = kv(g(e.getSeriesByType(t), function(t) {
  29445. return !e.isSeriesFiltered(t) && t.coordinateSystem && "polar" === t.coordinateSystem.type
  29446. }));
  29447. e.eachSeriesByType(t, function(t) {
  29448. if ("polar" === t.coordinateSystem.type) {
  29449. var e = t.getData(),
  29450. i = t.coordinateSystem,
  29451. a = i.getBaseAxis(),
  29452. r = Cv(t),
  29453. s = o[Lv(a)][r],
  29454. l = s.offset,
  29455. u = s.width,
  29456. h = i.getOtherAxis(a),
  29457. c = t.coordinateSystem.cx,
  29458. d = t.coordinateSystem.cy,
  29459. f = t.get("barMinHeight") || 0,
  29460. p = t.get("barMinAngle") || 0;
  29461. n[r] = n[r] || [];
  29462. for (var g = e.mapDimension(h.dim), m = e.mapDimension(a.dim), v = hl(e, g), y = h.getExtent()[0], x = 0, _ =
  29463. e.count(); x < _; x++) {
  29464. var w = e.get(g, x),
  29465. b = e.get(m, x);
  29466. if (!isNaN(w)) {
  29467. var S = w >= 0 ? "p" : "n",
  29468. M = y;
  29469. v && (n[r][b] || (n[r][b] = {
  29470. p: y,
  29471. n: y
  29472. }), M = n[r][b][S]);
  29473. var I, T, A, D;
  29474. if ("radius" === h.dim) {
  29475. var C = h.dataToRadius(w) - y,
  29476. L = a.dataToAngle(b);
  29477. Math.abs(C) < f && (C = (C < 0 ? -1 : 1) * f), I = M, T = M + C, D = (A = L - l) - u, v && (n[r][b][S] = T)
  29478. } else {
  29479. var k = h.dataToAngle(w, !0) - y,
  29480. P = a.dataToRadius(b);
  29481. Math.abs(k) < p && (k = (k < 0 ? -1 : 1) * p), T = (I = P + l) + u, A = M, D = M + k, v && (n[r][b][S] = D)
  29482. }
  29483. e.setItemLayout(x, {
  29484. cx: c,
  29485. cy: d,
  29486. r0: I,
  29487. r: T,
  29488. startAngle: -A * Math.PI / 180,
  29489. endAngle: -D * Math.PI / 180
  29490. })
  29491. }
  29492. }
  29493. }
  29494. }, this)
  29495. }, "bar")), Vs({
  29496. type: "polar"
  29497. }), h(YM.extend({
  29498. type: "geo",
  29499. coordinateSystem: null,
  29500. layoutMode: "box",
  29501. init: function(t) {
  29502. YM.prototype.init.apply(this, arguments), Ci(t, "label", ["show"])
  29503. },
  29504. optionUpdated: function() {
  29505. var t = this.option,
  29506. e = this;
  29507. t.regions = _C.getFilledRegions(t.regions, t.map, t.nameMap), this._optionModelMap = p(t.regions || [],
  29508. function(t, i) {
  29509. return i.name && t.set(i.name, new Lo(i, e)), t
  29510. }, R()), this.updateSelectedMap(t.regions)
  29511. },
  29512. defaultOption: {
  29513. zlevel: 0,
  29514. z: 0,
  29515. show: !0,
  29516. left: "center",
  29517. top: "center",
  29518. aspectScale: null,
  29519. silent: !1,
  29520. map: "",
  29521. boundingCoords: null,
  29522. center: null,
  29523. zoom: 1,
  29524. scaleLimit: null,
  29525. label: {
  29526. show: !1,
  29527. color: "#000"
  29528. },
  29529. itemStyle: {
  29530. borderWidth: .5,
  29531. borderColor: "#444",
  29532. color: "#eee"
  29533. },
  29534. emphasis: {
  29535. label: {
  29536. show: !0,
  29537. color: "rgb(100,0,0)"
  29538. },
  29539. itemStyle: {
  29540. color: "rgba(255,215,0,0.8)"
  29541. }
  29542. },
  29543. regions: []
  29544. },
  29545. getRegionModel: function(t) {
  29546. return this._optionModelMap.get(t) || new Lo(null, this, this.ecModel)
  29547. },
  29548. getFormattedLabel: function(t, e) {
  29549. var i = this.getRegionModel(t).get("label." + e + ".formatter"),
  29550. n = {
  29551. name: t
  29552. };
  29553. return "function" == typeof i ? (n.status = e, i(n)) : "string" == typeof i ? i.replace("{a}", null != t ? t :
  29554. "") : void 0
  29555. },
  29556. setZoom: function(t) {
  29557. this.option.zoom = t
  29558. },
  29559. setCenter: function(t) {
  29560. this.option.center = t
  29561. }
  29562. }), HD), Vs({
  29563. type: "geo",
  29564. init: function(t, e) {
  29565. var i = new _c(e, !0);
  29566. this._mapDraw = i, this.group.add(i.group)
  29567. },
  29568. render: function(t, e, i, n) {
  29569. if (!n || "geoToggleSelect" !== n.type || n.from !== this.uid) {
  29570. var o = this._mapDraw;
  29571. t.get("show") ? o.draw(t, e, i, this, n) : this._mapDraw.group.removeAll(), this.group.silent = t.get("silent")
  29572. }
  29573. },
  29574. dispose: function() {
  29575. this._mapDraw && this._mapDraw.remove()
  29576. }
  29577. }), Hv("toggleSelected", {
  29578. type: "geoToggleSelect",
  29579. event: "geoselectchanged"
  29580. }), Hv("select", {
  29581. type: "geoSelect",
  29582. event: "geoselected"
  29583. }), Hv("unSelect", {
  29584. type: "geoUnSelect",
  29585. event: "geounselected"
  29586. });
  29587. var aN = ["rect", "polygon", "keep", "clear"],
  29588. rN = d,
  29589. sN = {
  29590. lineX: Kv(0),
  29591. lineY: Kv(1),
  29592. rect: {
  29593. point: function(t, e, i) {
  29594. return t && i.boundingRect.contain(t[0], t[1])
  29595. },
  29596. rect: function(t, e, i) {
  29597. return t && i.boundingRect.intersect(t)
  29598. }
  29599. },
  29600. polygon: {
  29601. point: function(t, e, i) {
  29602. return t && i.boundingRect.contain(t[0], t[1]) && Yl(i.range, t[0], t[1])
  29603. },
  29604. rect: function(t, e, i) {
  29605. var n = i.range;
  29606. if (!t || n.length <= 1) return !1;
  29607. var o = t.x,
  29608. a = t.y,
  29609. r = t.width,
  29610. s = t.height,
  29611. l = n[0];
  29612. return !!(Yl(n, o, a) || Yl(n, o + r, a) || Yl(n, o, a + s) || Yl(n, o + r, a + s) || ue.create(t).contain(l[0],
  29613. l[1]) || Jv(o, a, o + r, a, n) || Jv(o, a, o, a + s, n) || Jv(o + r, a, o + r, a + s, n) || Jv(o, a + s, o +
  29614. r, a + s, n)) || void 0
  29615. }
  29616. }
  29617. },
  29618. lN = d,
  29619. uN = l,
  29620. hN = v,
  29621. cN = ["dataToPoint", "pointToData"],
  29622. dN = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"],
  29623. fN = iy.prototype;
  29624. fN.setOutputRanges = function(t, e) {
  29625. this.matchOutputRanges(t, e, function(t, e, i) {
  29626. if ((t.coordRanges || (t.coordRanges = [])).push(e), !t.coordRange) {
  29627. t.coordRange = e;
  29628. var n = vN[t.brushType](0, i, e);
  29629. t.__rangeOffset = {
  29630. offset: yN[t.brushType](n.values, t.range, [1, 1]),
  29631. xyMinMax: n.xyMinMax
  29632. }
  29633. }
  29634. })
  29635. }, fN.matchOutputRanges = function(t, e, i) {
  29636. lN(t, function(t) {
  29637. var n = this.findTargetInfo(t, e);
  29638. n && !0 !== n && d(n.coordSyses, function(n) {
  29639. var o = vN[t.brushType](1, n, t.range);
  29640. i(t, o.values, n, e)
  29641. })
  29642. }, this)
  29643. }, fN.setInputRanges = function(t, e) {
  29644. lN(t, function(t) {
  29645. var i = this.findTargetInfo(t, e);
  29646. if (t.range = t.range || [], i && !0 !== i) {
  29647. t.panelId = i.panelId;
  29648. var n = vN[t.brushType](0, i.coordSys, t.coordRange),
  29649. o = t.__rangeOffset;
  29650. t.range = o ? yN[t.brushType](n.values, o.offset, sy(n.xyMinMax, o.xyMinMax)) : n.values
  29651. }
  29652. }, this)
  29653. }, fN.makePanelOpts = function(t, e) {
  29654. return f(this._targetInfoList, function(i) {
  29655. var n = i.getPanelRect();
  29656. return {
  29657. panelId: i.panelId,
  29658. defaultBrushType: e && e(i),
  29659. clipPath: hp(n),
  29660. isTargetByCursor: dp(n, t, i.coordSysModel),
  29661. getLinearBrushOtherExtent: cp(n)
  29662. }
  29663. })
  29664. }, fN.controlSeries = function(t, e, i) {
  29665. var n = this.findTargetInfo(t, i);
  29666. return !0 === n || n && uN(n.coordSyses, e.coordinateSystem) >= 0
  29667. }, fN.findTargetInfo = function(t, e) {
  29668. for (var i = this._targetInfoList, n = oy(e, t), o = 0; o < i.length; o++) {
  29669. var a = i[o],
  29670. r = t.panelId;
  29671. if (r) {
  29672. if (a.panelId === r) return a
  29673. } else
  29674. for (o = 0; o < gN.length; o++)
  29675. if (gN[o](n, a)) return a
  29676. }
  29677. return !0
  29678. };
  29679. var pN = {
  29680. grid: function(t, e) {
  29681. var i = t.xAxisModels,
  29682. n = t.yAxisModels,
  29683. o = t.gridModels,
  29684. a = R(),
  29685. r = {},
  29686. s = {};
  29687. (i || n || o) && (lN(i, function(t) {
  29688. var e = t.axis.grid.model;
  29689. a.set(e.id, e), r[e.id] = !0
  29690. }), lN(n, function(t) {
  29691. var e = t.axis.grid.model;
  29692. a.set(e.id, e), s[e.id] = !0
  29693. }), lN(o, function(t) {
  29694. a.set(t.id, t), r[t.id] = !0, s[t.id] = !0
  29695. }), a.each(function(t) {
  29696. var o = t.coordinateSystem,
  29697. a = [];
  29698. lN(o.getCartesians(), function(t, e) {
  29699. (uN(i, t.getAxis("x").model) >= 0 || uN(n, t.getAxis("y").model) >= 0) && a.push(t)
  29700. }), e.push({
  29701. panelId: "grid--" + t.id,
  29702. gridModel: t,
  29703. coordSysModel: t,
  29704. coordSys: a[0],
  29705. coordSyses: a,
  29706. getPanelRect: mN.grid,
  29707. xAxisDeclared: r[t.id],
  29708. yAxisDeclared: s[t.id]
  29709. })
  29710. }))
  29711. },
  29712. geo: function(t, e) {
  29713. lN(t.geoModels, function(t) {
  29714. var i = t.coordinateSystem;
  29715. e.push({
  29716. panelId: "geo--" + t.id,
  29717. geoModel: t,
  29718. coordSysModel: t,
  29719. coordSys: i,
  29720. coordSyses: [i],
  29721. getPanelRect: mN.geo
  29722. })
  29723. })
  29724. }
  29725. },
  29726. gN = [function(t, e) {
  29727. var i = t.xAxisModel,
  29728. n = t.yAxisModel,
  29729. o = t.gridModel;
  29730. return !o && i && (o = i.axis.grid.model), !o && n && (o = n.axis.grid.model), o && o === e.gridModel
  29731. }, function(t, e) {
  29732. var i = t.geoModel;
  29733. return i && i === e.geoModel
  29734. }],
  29735. mN = {
  29736. grid: function() {
  29737. return this.coordSys.grid.getRect().clone()
  29738. },
  29739. geo: function() {
  29740. var t = this.coordSys,
  29741. e = t.getBoundingRect().clone();
  29742. return e.applyTransform(Mo(t)), e
  29743. }
  29744. },
  29745. vN = {
  29746. lineX: hN(ay, 0),
  29747. lineY: hN(ay, 1),
  29748. rect: function(t, e, i) {
  29749. var n = e[cN[t]]([i[0][0], i[1][0]]),
  29750. o = e[cN[t]]([i[0][1], i[1][1]]),
  29751. a = [ny([n[0], o[0]]), ny([n[1], o[1]])];
  29752. return {
  29753. values: a,
  29754. xyMinMax: a
  29755. }
  29756. },
  29757. polygon: function(t, e, i) {
  29758. var n = [
  29759. [1 / 0, -1 / 0],
  29760. [1 / 0, -1 / 0]
  29761. ];
  29762. return {
  29763. values: f(i, function(i) {
  29764. var o = e[cN[t]](i);
  29765. return n[0][0] = Math.min(n[0][0], o[0]), n[1][0] = Math.min(n[1][0], o[1]), n[0][1] = Math.max(n[0][1], o[0]),
  29766. n[1][1] = Math.max(n[1][1], o[1]), o
  29767. }),
  29768. xyMinMax: n
  29769. }
  29770. }
  29771. },
  29772. yN = {
  29773. lineX: hN(ry, 0),
  29774. lineY: hN(ry, 1),
  29775. rect: function(t, e, i) {
  29776. return [
  29777. [t[0][0] - i[0] * e[0][0], t[0][1] - i[0] * e[0][1]],
  29778. [t[1][0] - i[1] * e[1][0], t[1][1] - i[1] * e[1][1]]
  29779. ]
  29780. },
  29781. polygon: function(t, e, i) {
  29782. return f(t, function(t, n) {
  29783. return [t[0] - i[0] * e[n][0], t[1] - i[1] * e[n][1]]
  29784. })
  29785. }
  29786. },
  29787. xN = ["inBrush", "outOfBrush"],
  29788. _N = "__ecBrushSelect",
  29789. wN = "__ecInBrushSelectEvent",
  29790. bN = IT.VISUAL.BRUSH;
  29791. Os(bN, function(t, e, i) {
  29792. t.eachComponent({
  29793. mainType: "brush"
  29794. }, function(e) {
  29795. i && "takeGlobalCursor" === i.type && e.setBrushOption("brush" === i.key ? i.brushOption : {
  29796. brushType: !1
  29797. }), (e.brushTargetManager = new iy(e.option, t)).setInputRanges(e.areas, t)
  29798. })
  29799. }), Es(bN, function(t, e, n) {
  29800. var o, a, s = [];
  29801. t.eachComponent({
  29802. mainType: "brush"
  29803. }, function(e, n) {
  29804. function l(t) {
  29805. return "all" === m || v[t]
  29806. }
  29807. function u(t) {
  29808. return !!t.length
  29809. }
  29810. function h(t, e) {
  29811. var i = t.coordinateSystem;
  29812. w |= i.hasAxisBrushed(), l(e) && i.eachActiveState(t.getData(), function(t, e) {
  29813. "active" === t && (x[e] = 1)
  29814. })
  29815. }
  29816. function c(i, n, o) {
  29817. var a = dy(i);
  29818. if (a && !fy(e, n) && (d(b, function(n) {
  29819. a[n.brushType] && e.brushTargetManager.controlSeries(n, i, t) && o.push(n), w |= u(o)
  29820. }), l(n) && u(o))) {
  29821. var r = i.getData();
  29822. r.each(function(t) {
  29823. cy(a, o, r, t) && (x[t] = 1)
  29824. })
  29825. }
  29826. }
  29827. var p = {
  29828. brushId: e.id,
  29829. brushIndex: n,
  29830. brushName: e.name,
  29831. areas: i(e.areas),
  29832. selected: []
  29833. };
  29834. s.push(p);
  29835. var g = e.option,
  29836. m = g.brushLink,
  29837. v = [],
  29838. x = [],
  29839. _ = [],
  29840. w = 0;
  29841. n || (o = g.throttleType, a = g.throttleDelay);
  29842. var b = f(e.areas, function(t) {
  29843. return py(r({
  29844. boundingRect: SN[t.brushType](t)
  29845. }, t))
  29846. }),
  29847. S = Xv(e.option, xN, function(t) {
  29848. t.mappingMethod = "fixed"
  29849. });
  29850. y(m) && d(m, function(t) {
  29851. v[t] = 1
  29852. }), t.eachSeries(function(t, e) {
  29853. var i = _[e] = [];
  29854. "parallel" === t.subType ? h(t, e) : c(t, e, i)
  29855. }), t.eachSeries(function(t, e) {
  29856. var i = {
  29857. seriesId: t.id,
  29858. seriesIndex: e,
  29859. seriesName: t.name,
  29860. dataIndex: []
  29861. };
  29862. p.selected.push(i);
  29863. var n = dy(t),
  29864. o = _[e],
  29865. a = t.getData(),
  29866. r = l(e) ? function(t) {
  29867. return x[t] ? (i.dataIndex.push(a.getRawIndex(t)), "inBrush") : "outOfBrush"
  29868. } : function(t) {
  29869. return cy(n, o, a, t) ? (i.dataIndex.push(a.getRawIndex(t)), "inBrush") : "outOfBrush"
  29870. };
  29871. (l(e) ? w : u(o)) && Yv(xN, S, a, r)
  29872. })
  29873. }), uy(e, o, a, s, n)
  29874. });
  29875. var SN = {
  29876. lineX: B,
  29877. lineY: B,
  29878. rect: function(t) {
  29879. return gy(t.range)
  29880. },
  29881. polygon: function(t) {
  29882. for (var e, i = t.range, n = 0, o = i.length; n < o; n++) {
  29883. e = e || [
  29884. [1 / 0, -1 / 0],
  29885. [1 / 0, -1 / 0]
  29886. ];
  29887. var a = i[n];
  29888. a[0] < e[0][0] && (e[0][0] = a[0]), a[0] > e[0][1] && (e[0][1] = a[0]), a[1] < e[1][0] && (e[1][0] = a[1]), a[1] >
  29889. e[1][1] && (e[1][1] = a[1])
  29890. }
  29891. return e && gy(e)
  29892. }
  29893. },
  29894. MN = ["#ddd"];
  29895. Bs({
  29896. type: "brush",
  29897. dependencies: ["geo", "grid", "xAxis", "yAxis", "parallel", "series"],
  29898. defaultOption: {
  29899. toolbox: null,
  29900. brushLink: null,
  29901. seriesIndex: "all",
  29902. geoIndex: null,
  29903. xAxisIndex: null,
  29904. yAxisIndex: null,
  29905. brushType: "rect",
  29906. brushMode: "single",
  29907. transformable: !0,
  29908. brushStyle: {
  29909. borderWidth: 1,
  29910. color: "rgba(120,140,180,0.3)",
  29911. borderColor: "rgba(120,140,180,0.8)"
  29912. },
  29913. throttleType: "fixRate",
  29914. throttleDelay: 0,
  29915. removeOnClick: !0,
  29916. z: 1e4
  29917. },
  29918. areas: [],
  29919. brushType: null,
  29920. brushOption: {},
  29921. coordInfoList: [],
  29922. optionUpdated: function(t, e) {
  29923. var i = this.option;
  29924. !e && jv(i, t, ["inBrush", "outOfBrush"]);
  29925. var n = i.inBrush = i.inBrush || {};
  29926. i.outOfBrush = i.outOfBrush || {
  29927. color: MN
  29928. }, n.hasOwnProperty("liftZ") || (n.liftZ = 5)
  29929. },
  29930. setAreas: function(t) {
  29931. t && (this.areas = f(t, function(t) {
  29932. return my(this.option, t)
  29933. }, this))
  29934. },
  29935. setBrushOption: function(t) {
  29936. this.brushOption = my(this.option, t), this.brushType = this.brushOption.brushType
  29937. }
  29938. });
  29939. Vs({
  29940. type: "brush",
  29941. init: function(t, e) {
  29942. this.ecModel = t, this.api = e, this.model, (this._brushController = new Cf(e.getZr())).on("brush", m(this._onBrush,
  29943. this)).mount()
  29944. },
  29945. render: function(t) {
  29946. return this.model = t, vy.apply(this, arguments)
  29947. },
  29948. updateTransform: vy,
  29949. updateView: vy,
  29950. dispose: function() {
  29951. this._brushController.dispose()
  29952. },
  29953. _onBrush: function(t, e) {
  29954. var n = this.model.id;
  29955. this.model.brushTargetManager.setOutputRanges(t, this.ecModel), (!e.isEnd || e.removeOnClick) && this.api.dispatchAction({
  29956. type: "brush",
  29957. brushId: n,
  29958. areas: i(t),
  29959. $from: n
  29960. })
  29961. }
  29962. }), Ps({
  29963. type: "brush",
  29964. event: "brush"
  29965. }, function(t, e) {
  29966. e.eachComponent({
  29967. mainType: "brush",
  29968. query: t
  29969. }, function(e) {
  29970. e.setAreas(t.areas)
  29971. })
  29972. }), Ps({
  29973. type: "brushSelect",
  29974. event: "brushSelected",
  29975. update: "none"
  29976. }, function() {});
  29977. var IN = {},
  29978. TN = XI.toolbox.brush;
  29979. _y.defaultOption = {
  29980. show: !0,
  29981. type: ["rect", "polygon", "lineX", "lineY", "keep", "clear"],
  29982. icon: {
  29983. 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",
  29984. 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",
  29985. 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",
  29986. 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",
  29987. 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",
  29988. 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"
  29989. },
  29990. title: i(TN.title)
  29991. };
  29992. var AN = _y.prototype;
  29993. AN.render = AN.updateView = function(t, e, i) {
  29994. var n, o, a;
  29995. e.eachComponent({
  29996. mainType: "brush"
  29997. }, function(t) {
  29998. n = t.brushType, o = t.brushOption.brushMode || "single", a |= t.areas.length
  29999. }), this._brushType = n, this._brushMode = o, d(t.get("type", !0), function(e) {
  30000. t.setIconStatus(e, ("keep" === e ? "multiple" === o : "clear" === e ? a : e === n) ? "emphasis" : "normal")
  30001. })
  30002. }, AN.getIcons = function() {
  30003. var t = this.model,
  30004. e = t.get("icon", !0),
  30005. i = {};
  30006. return d(t.get("type", !0), function(t) {
  30007. e[t] && (i[t] = e[t])
  30008. }), i
  30009. }, AN.onclick = function(t, e, i) {
  30010. var n = this._brushType,
  30011. o = this._brushMode;
  30012. "clear" === i ? (e.dispatchAction({
  30013. type: "axisAreaSelect",
  30014. intervals: []
  30015. }), e.dispatchAction({
  30016. type: "brush",
  30017. command: "clear",
  30018. areas: []
  30019. })) : e.dispatchAction({
  30020. type: "takeGlobalCursor",
  30021. key: "brush",
  30022. brushOption: {
  30023. brushType: "keep" === i ? n : n !== i && i,
  30024. brushMode: "keep" === i ? "multiple" === o ? "single" : "multiple" : o
  30025. }
  30026. })
  30027. }, yy("brush", _y), Ls(function(t, e) {
  30028. var i = t && t.brush;
  30029. if (y(i) || (i = i ? [i] : []), i.length) {
  30030. var n = [];
  30031. d(i, function(t) {
  30032. var e = t.hasOwnProperty("toolbox") ? t.toolbox : [];
  30033. e instanceof Array && (n = n.concat(e))
  30034. });
  30035. var o = t && t.toolbox;
  30036. y(o) && (o = o[0]), o || (o = {
  30037. feature: {}
  30038. }, t.toolbox = [o]);
  30039. var a = o.feature || (o.feature = {}),
  30040. r = a.brush || (a.brush = {}),
  30041. s = r.type || (r.type = []);
  30042. s.push.apply(s, n), Zv(s), e && !s.length && s.push.apply(s, aN)
  30043. }
  30044. });
  30045. wy.prototype = {
  30046. constructor: wy,
  30047. type: "calendar",
  30048. dimensions: ["time", "value"],
  30049. getDimensionsInfo: function() {
  30050. return [{
  30051. name: "time",
  30052. type: "time"
  30053. }, "value"]
  30054. },
  30055. getRangeInfo: function() {
  30056. return this._rangeInfo
  30057. },
  30058. getModel: function() {
  30059. return this._model
  30060. },
  30061. getRect: function() {
  30062. return this._rect
  30063. },
  30064. getCellWidth: function() {
  30065. return this._sw
  30066. },
  30067. getCellHeight: function() {
  30068. return this._sh
  30069. },
  30070. getOrient: function() {
  30071. return this._orient
  30072. },
  30073. getFirstDayOfWeek: function() {
  30074. return this._firstDayOfWeek
  30075. },
  30076. getDateInfo: function(t) {
  30077. var e = (t = Uo(t)).getFullYear(),
  30078. i = t.getMonth() + 1;
  30079. i = i < 10 ? "0" + i : i;
  30080. var n = t.getDate();
  30081. n = n < 10 ? "0" + n : n;
  30082. var o = t.getDay();
  30083. return o = Math.abs((o + 7 - this.getFirstDayOfWeek()) % 7), {
  30084. y: e,
  30085. m: i,
  30086. d: n,
  30087. day: o,
  30088. time: t.getTime(),
  30089. formatedDate: e + "-" + i + "-" + n,
  30090. date: t
  30091. }
  30092. },
  30093. getNextNDay: function(t, e) {
  30094. return 0 === (e = e || 0) ? this.getDateInfo(t) : ((t = new Date(this.getDateInfo(t).time)).setDate(t.getDate() +
  30095. e), this.getDateInfo(t))
  30096. },
  30097. update: function(t, e) {
  30098. function i(t, e) {
  30099. return null != t[e] && "auto" !== t[e]
  30100. }
  30101. this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"),
  30102. this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(
  30103. this._initRangeOption());
  30104. var n = this._rangeInfo.weeks || 1,
  30105. o = ["width", "height"],
  30106. a = this._model.get("cellSize").slice(),
  30107. r = this._model.getBoxLayoutParams(),
  30108. s = "horizontal" === this._orient ? [n, 7] : [7, n];
  30109. d([0, 1], function(t) {
  30110. i(a, t) && (r[o[t]] = a[t] * s[t])
  30111. });
  30112. var l = {
  30113. width: e.getWidth(),
  30114. height: e.getHeight()
  30115. },
  30116. u = this._rect = la(r, l);
  30117. d([0, 1], function(t) {
  30118. i(a, t) || (a[t] = u[o[t]] / s[t])
  30119. }), this._sw = a[0], this._sh = a[1]
  30120. },
  30121. dataToPoint: function(t, e) {
  30122. y(t) && (t = t[0]), null == e && (e = !0);
  30123. var i = this.getDateInfo(t),
  30124. n = this._rangeInfo,
  30125. o = i.formatedDate;
  30126. if (e && !(i.time >= n.start.time && i.time < n.end.time + 864e5)) return [NaN, NaN];
  30127. var a = i.day,
  30128. r = this._getRangeInfo([n.start.time, o]).nthWeek;
  30129. return "vertical" === this._orient ? [this._rect.x + a * this._sw + this._sw / 2, this._rect.y + r * this._sh +
  30130. this._sh / 2
  30131. ] : [this._rect.x + r * this._sw + this._sw / 2, this._rect.y + a * this._sh + this._sh / 2]
  30132. },
  30133. pointToData: function(t) {
  30134. var e = this.pointToDate(t);
  30135. return e && e.time
  30136. },
  30137. dataToRect: function(t, e) {
  30138. var i = this.dataToPoint(t, e);
  30139. return {
  30140. contentShape: {
  30141. x: i[0] - (this._sw - this._lineWidth) / 2,
  30142. y: i[1] - (this._sh - this._lineWidth) / 2,
  30143. width: this._sw - this._lineWidth,
  30144. height: this._sh - this._lineWidth
  30145. },
  30146. center: i,
  30147. tl: [i[0] - this._sw / 2, i[1] - this._sh / 2],
  30148. tr: [i[0] + this._sw / 2, i[1] - this._sh / 2],
  30149. br: [i[0] + this._sw / 2, i[1] + this._sh / 2],
  30150. bl: [i[0] - this._sw / 2, i[1] + this._sh / 2]
  30151. }
  30152. },
  30153. pointToDate: function(t) {
  30154. var e = Math.floor((t[0] - this._rect.x) / this._sw) + 1,
  30155. i = Math.floor((t[1] - this._rect.y) / this._sh) + 1,
  30156. n = this._rangeInfo.range;
  30157. return "vertical" === this._orient ? this._getDateByWeeksAndDay(i, e - 1, n) : this._getDateByWeeksAndDay(e, i -
  30158. 1, n)
  30159. },
  30160. convertToPixel: v(by, "dataToPoint"),
  30161. convertFromPixel: v(by, "pointToData"),
  30162. _initRangeOption: function() {
  30163. var t = this._model.get("range"),
  30164. e = t;
  30165. if (y(e) && 1 === e.length && (e = e[0]), /^\d{4}$/.test(e) && (t = [e + "-01-01", e + "-12-31"]),
  30166. /^\d{4}[\/|-]\d{1,2}$/.test(e)) {
  30167. var i = this.getDateInfo(e),
  30168. n = i.date;
  30169. n.setMonth(n.getMonth() + 1);
  30170. var o = this.getNextNDay(n, -1);
  30171. t = [i.formatedDate, o.formatedDate]
  30172. }
  30173. /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e) && (t = [e, e]);
  30174. var a = this._getRangeInfo(t);
  30175. return a.start.time > a.end.time && t.reverse(), t
  30176. },
  30177. _getRangeInfo: function(t) {
  30178. var e;
  30179. (t = [this.getDateInfo(t[0]), this.getDateInfo(t[1])])[0].time > t[1].time && (e = !0, t.reverse());
  30180. var i = Math.floor(t[1].time / 864e5) - Math.floor(t[0].time / 864e5) + 1,
  30181. n = new Date(t[0].time),
  30182. o = n.getDate(),
  30183. a = t[1].date.getDate();
  30184. if (n.setDate(o + i - 1), n.getDate() !== a)
  30185. for (var r = n.getTime() - t[1].time > 0 ? 1 : -1; n.getDate() !== a && (n.getTime() - t[1].time) * r > 0;) i -=
  30186. r, n.setDate(o + i - 1);
  30187. var s = Math.floor((i + t[0].day + 6) / 7),
  30188. l = e ? 1 - s : s - 1;
  30189. return e && t.reverse(), {
  30190. range: [t[0].formatedDate, t[1].formatedDate],
  30191. start: t[0],
  30192. end: t[1],
  30193. allDay: i,
  30194. weeks: s,
  30195. nthWeek: l,
  30196. fweek: t[0].day,
  30197. lweek: t[1].day
  30198. }
  30199. },
  30200. _getDateByWeeksAndDay: function(t, e, i) {
  30201. var n = this._getRangeInfo(i);
  30202. if (t > n.weeks || 0 === t && e < n.fweek || t === n.weeks && e > n.lweek) return !1;
  30203. var o = 7 * (t - 1) - n.fweek + e,
  30204. a = new Date(n.start.time);
  30205. return a.setDate(n.start.d + o), this.getDateInfo(a)
  30206. }
  30207. }, wy.dimensions = wy.prototype.dimensions, wy.getDimensionsInfo = wy.prototype.getDimensionsInfo, wy.create =
  30208. function(t, e) {
  30209. var i = [];
  30210. return t.eachComponent("calendar", function(n) {
  30211. var o = new wy(n, t, e);
  30212. i.push(o), n.coordinateSystem = o
  30213. }), t.eachSeries(function(t) {
  30214. "calendar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("calendarIndex") || 0])
  30215. }), i
  30216. }, Ba.register("calendar", wy);
  30217. var DN = YM.extend({
  30218. type: "calendar",
  30219. coordinateSystem: null,
  30220. defaultOption: {
  30221. zlevel: 0,
  30222. z: 2,
  30223. left: 80,
  30224. top: 60,
  30225. cellSize: 20,
  30226. orient: "horizontal",
  30227. splitLine: {
  30228. show: !0,
  30229. lineStyle: {
  30230. color: "#000",
  30231. width: 1,
  30232. type: "solid"
  30233. }
  30234. },
  30235. itemStyle: {
  30236. color: "#fff",
  30237. borderWidth: 1,
  30238. borderColor: "#ccc"
  30239. },
  30240. dayLabel: {
  30241. show: !0,
  30242. firstDay: 0,
  30243. position: "start",
  30244. margin: "50%",
  30245. nameMap: "en",
  30246. color: "#000"
  30247. },
  30248. monthLabel: {
  30249. show: !0,
  30250. position: "start",
  30251. margin: 5,
  30252. align: "center",
  30253. nameMap: "en",
  30254. formatter: null,
  30255. color: "#000"
  30256. },
  30257. yearLabel: {
  30258. show: !0,
  30259. position: null,
  30260. margin: 30,
  30261. formatter: null,
  30262. color: "#ccc",
  30263. fontFamily: "sans-serif",
  30264. fontWeight: "bolder",
  30265. fontSize: 20
  30266. }
  30267. },
  30268. init: function(t, e, i, n) {
  30269. var o = da(t);
  30270. DN.superApply(this, "init", arguments), Sy(t, o)
  30271. },
  30272. mergeOption: function(t, e) {
  30273. DN.superApply(this, "mergeOption", arguments), Sy(this.option, t)
  30274. }
  30275. }),
  30276. CN = {
  30277. EN: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  30278. CN: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
  30279. },
  30280. LN = {
  30281. EN: ["S", "M", "T", "W", "T", "F", "S"],
  30282. CN: ["日", "一", "二", "三", "四", "五", "六"]
  30283. };
  30284. Vs({
  30285. type: "calendar",
  30286. _tlpoints: null,
  30287. _blpoints: null,
  30288. _firstDayOfMonth: null,
  30289. _firstDayPoints: null,
  30290. render: function(t, e, i) {
  30291. var n = this.group;
  30292. n.removeAll();
  30293. var o = t.coordinateSystem,
  30294. a = o.getRangeInfo(),
  30295. r = o.getOrient();
  30296. this._renderDayRect(t, a, n), this._renderLines(t, a, r, n), this._renderYearText(t, a, r, n), this._renderMonthText(
  30297. t, r, n), this._renderWeekText(t, a, r, n)
  30298. },
  30299. _renderDayRect: function(t, e, i) {
  30300. for (var n = t.coordinateSystem, o = t.getModel("itemStyle").getItemStyle(), a = n.getCellWidth(), r = n.getCellHeight(),
  30301. s = e.start.time; s <= e.end.time; s = n.getNextNDay(s, 1).time) {
  30302. var l = n.dataToRect([s], !1).tl,
  30303. u = new aM({
  30304. shape: {
  30305. x: l[0],
  30306. y: l[1],
  30307. width: a,
  30308. height: r
  30309. },
  30310. cursor: "default",
  30311. style: o
  30312. });
  30313. i.add(u)
  30314. }
  30315. },
  30316. _renderLines: function(t, e, i, n) {
  30317. function o(e) {
  30318. a._firstDayOfMonth.push(r.getDateInfo(e)), a._firstDayPoints.push(r.dataToRect([e], !1).tl);
  30319. var o = a._getLinePointsOfOneWeek(t, e, i);
  30320. a._tlpoints.push(o[0]), a._blpoints.push(o[o.length - 1]), l && a._drawSplitline(o, s, n)
  30321. }
  30322. var a = this,
  30323. r = t.coordinateSystem,
  30324. s = t.getModel("splitLine.lineStyle").getLineStyle(),
  30325. l = t.get("splitLine.show"),
  30326. u = s.lineWidth;
  30327. this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
  30328. for (var h = e.start, c = 0; h.time <= e.end.time; c++) {
  30329. o(h.formatedDate), 0 === c && (h = r.getDateInfo(e.start.y + "-" + e.start.m));
  30330. var d = h.date;
  30331. d.setMonth(d.getMonth() + 1), h = r.getDateInfo(d)
  30332. }
  30333. o(r.getNextNDay(e.end.time, 1).formatedDate), l && this._drawSplitline(a._getEdgesPoints(a._tlpoints, u, i), s,
  30334. n), l && this._drawSplitline(a._getEdgesPoints(a._blpoints, u, i), s, n)
  30335. },
  30336. _getEdgesPoints: function(t, e, i) {
  30337. var n = [t[0].slice(), t[t.length - 1].slice()],
  30338. o = "horizontal" === i ? 0 : 1;
  30339. return n[0][o] = n[0][o] - e / 2, n[1][o] = n[1][o] + e / 2, n
  30340. },
  30341. _drawSplitline: function(t, e, i) {
  30342. var n = new oM({
  30343. z2: 20,
  30344. shape: {
  30345. points: t
  30346. },
  30347. style: e
  30348. });
  30349. i.add(n)
  30350. },
  30351. _getLinePointsOfOneWeek: function(t, e, i) {
  30352. var n = t.coordinateSystem;
  30353. e = n.getDateInfo(e);
  30354. for (var o = [], a = 0; a < 7; a++) {
  30355. var r = n.getNextNDay(e.time, a),
  30356. s = n.dataToRect([r.time], !1);
  30357. o[2 * r.day] = s.tl, o[2 * r.day + 1] = s["horizontal" === i ? "bl" : "tr"]
  30358. }
  30359. return o
  30360. },
  30361. _formatterLabel: function(t, e) {
  30362. return "string" == typeof t && t ? ea(t, e) : "function" == typeof t ? t(e) : e.nameMap
  30363. },
  30364. _yearTextPositionControl: function(t, e, i, n, o) {
  30365. e = e.slice();
  30366. var a = ["center", "bottom"];
  30367. "bottom" === n ? (e[1] += o, a = ["center", "top"]) : "left" === n ? e[0] -= o : "right" === n ? (e[0] += o, a = [
  30368. "center", "top"
  30369. ]) : e[1] -= o;
  30370. var r = 0;
  30371. return "left" !== n && "right" !== n || (r = Math.PI / 2), {
  30372. rotation: r,
  30373. position: e,
  30374. style: {
  30375. textAlign: a[0],
  30376. textVerticalAlign: a[1]
  30377. }
  30378. }
  30379. },
  30380. _renderYearText: function(t, e, i, n) {
  30381. var o = t.getModel("yearLabel");
  30382. if (o.get("show")) {
  30383. var a = o.get("margin"),
  30384. r = o.get("position");
  30385. r || (r = "horizontal" !== i ? "top" : "left");
  30386. var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]],
  30387. l = (s[0][0] + s[1][0]) / 2,
  30388. u = (s[0][1] + s[1][1]) / 2,
  30389. h = "horizontal" === i ? 0 : 1,
  30390. c = {
  30391. top: [l, s[h][1]],
  30392. bottom: [l, s[1 - h][1]],
  30393. left: [s[1 - h][0], u],
  30394. right: [s[h][0], u]
  30395. },
  30396. d = e.start.y; + e.end.y > +e.start.y && (d = d + "-" + e.end.y);
  30397. var f = o.get("formatter"),
  30398. p = {
  30399. start: e.start.y,
  30400. end: e.end.y,
  30401. nameMap: d
  30402. },
  30403. g = this._formatterLabel(f, p),
  30404. m = new qS({
  30405. z2: 30
  30406. });
  30407. fo(m.style, o, {
  30408. text: g
  30409. }), m.attr(this._yearTextPositionControl(m, c[r], i, r, a)), n.add(m)
  30410. }
  30411. },
  30412. _monthTextPositionControl: function(t, e, i, n, o) {
  30413. var a = "left",
  30414. r = "top",
  30415. s = t[0],
  30416. l = t[1];
  30417. return "horizontal" === i ? (l += o, e && (a = "center"), "start" === n && (r = "bottom")) : (s += o, e && (r =
  30418. "middle"), "start" === n && (a = "right")), {
  30419. x: s,
  30420. y: l,
  30421. textAlign: a,
  30422. textVerticalAlign: r
  30423. }
  30424. },
  30425. _renderMonthText: function(t, e, i) {
  30426. var n = t.getModel("monthLabel");
  30427. if (n.get("show")) {
  30428. var o = n.get("nameMap"),
  30429. r = n.get("margin"),
  30430. s = n.get("position"),
  30431. l = n.get("align"),
  30432. u = [this._tlpoints, this._blpoints];
  30433. _(o) && (o = CN[o.toUpperCase()] || []);
  30434. var h = "start" === s ? 0 : 1,
  30435. c = "horizontal" === e ? 0 : 1;
  30436. r = "start" === s ? -r : r;
  30437. for (var d = "center" === l, f = 0; f < u[h].length - 1; f++) {
  30438. var p = u[h][f].slice(),
  30439. g = this._firstDayOfMonth[f];
  30440. if (d) {
  30441. var m = this._firstDayPoints[f];
  30442. p[c] = (m[c] + u[0][f + 1][c]) / 2
  30443. }
  30444. var v = n.get("formatter"),
  30445. y = o[+g.m - 1],
  30446. x = {
  30447. yyyy: g.y,
  30448. yy: (g.y + "").slice(2),
  30449. MM: g.m,
  30450. M: +g.m,
  30451. nameMap: y
  30452. },
  30453. w = this._formatterLabel(v, x),
  30454. b = new qS({
  30455. z2: 30
  30456. });
  30457. a(fo(b.style, n, {
  30458. text: w
  30459. }), this._monthTextPositionControl(p, d, e, s, r)), i.add(b)
  30460. }
  30461. }
  30462. },
  30463. _weekTextPositionControl: function(t, e, i, n, o) {
  30464. var a = "center",
  30465. r = "middle",
  30466. s = t[0],
  30467. l = t[1],
  30468. u = "start" === i;
  30469. return "horizontal" === e ? (s = s + n + (u ? 1 : -1) * o[0] / 2, a = u ? "right" : "left") : (l = l + n + (u ?
  30470. 1 : -1) * o[1] / 2, r = u ? "bottom" : "top"), {
  30471. x: s,
  30472. y: l,
  30473. textAlign: a,
  30474. textVerticalAlign: r
  30475. }
  30476. },
  30477. _renderWeekText: function(t, e, i, n) {
  30478. var o = t.getModel("dayLabel");
  30479. if (o.get("show")) {
  30480. var r = t.coordinateSystem,
  30481. s = o.get("position"),
  30482. l = o.get("nameMap"),
  30483. u = o.get("margin"),
  30484. h = r.getFirstDayOfWeek();
  30485. _(l) && (l = LN[l.toUpperCase()] || []);
  30486. var c = r.getNextNDay(e.end.time, 7 - e.lweek).time,
  30487. d = [r.getCellWidth(), r.getCellHeight()];
  30488. u = Ro(u, d["horizontal" === i ? 0 : 1]), "start" === s && (c = r.getNextNDay(e.start.time, -(7 + e.fweek)).time,
  30489. u = -u);
  30490. for (var f = 0; f < 7; f++) {
  30491. var p = r.getNextNDay(c, f),
  30492. g = r.dataToRect([p.time], !1).center,
  30493. m = f;
  30494. m = Math.abs((f + h) % 7);
  30495. var v = new qS({
  30496. z2: 30
  30497. });
  30498. a(fo(v.style, o, {
  30499. text: l[m]
  30500. }), this._weekTextPositionControl(g, i, s, u, d)), n.add(v)
  30501. }
  30502. }
  30503. }
  30504. }), Bs({
  30505. type: "title",
  30506. layoutMode: {
  30507. type: "box",
  30508. ignoreSize: !0
  30509. },
  30510. defaultOption: {
  30511. zlevel: 0,
  30512. z: 6,
  30513. show: !0,
  30514. text: "",
  30515. target: "blank",
  30516. subtext: "",
  30517. subtarget: "blank",
  30518. left: 0,
  30519. top: 0,
  30520. backgroundColor: "rgba(0,0,0,0)",
  30521. borderColor: "#ccc",
  30522. borderWidth: 0,
  30523. padding: 5,
  30524. itemGap: 10,
  30525. textStyle: {
  30526. fontSize: 18,
  30527. fontWeight: "bolder",
  30528. color: "#333"
  30529. },
  30530. subtextStyle: {
  30531. color: "#aaa"
  30532. }
  30533. }
  30534. }), Vs({
  30535. type: "title",
  30536. render: function(t, e, i) {
  30537. if (this.group.removeAll(), t.get("show")) {
  30538. var n = this.group,
  30539. o = t.getModel("textStyle"),
  30540. a = t.getModel("subtextStyle"),
  30541. r = t.get("textAlign"),
  30542. s = t.get("textBaseline"),
  30543. l = new qS({
  30544. style: fo({}, o, {
  30545. text: t.get("text"),
  30546. textFill: o.getTextColor()
  30547. }, {
  30548. disableBox: !0
  30549. }),
  30550. z2: 10
  30551. }),
  30552. u = l.getBoundingRect(),
  30553. h = t.get("subtext"),
  30554. c = new qS({
  30555. style: fo({}, a, {
  30556. text: h,
  30557. textFill: a.getTextColor(),
  30558. y: u.height + t.get("itemGap"),
  30559. textVerticalAlign: "top"
  30560. }, {
  30561. disableBox: !0
  30562. }),
  30563. z2: 10
  30564. }),
  30565. d = t.get("link"),
  30566. f = t.get("sublink"),
  30567. p = t.get("triggerEvent", !0);
  30568. l.silent = !d && !p, c.silent = !f && !p, d && l.on("click", function() {
  30569. window.open(d, "_" + t.get("target"))
  30570. }), f && c.on("click", function() {
  30571. window.open(f, "_" + t.get("subtarget"))
  30572. }), l.eventData = c.eventData = p ? {
  30573. componentType: "title",
  30574. componentIndex: t.componentIndex
  30575. } : null, n.add(l), h && n.add(c);
  30576. var g = n.getBoundingRect(),
  30577. m = t.getBoxLayoutParams();
  30578. m.width = g.width, m.height = g.height;
  30579. var v = la(m, {
  30580. width: i.getWidth(),
  30581. height: i.getHeight()
  30582. }, t.get("padding"));
  30583. r || ("middle" === (r = t.get("left") || t.get("right")) && (r = "center"), "right" === r ? v.x += v.width :
  30584. "center" === r && (v.x += v.width / 2)), s || ("center" === (s = t.get("top") || t.get("bottom")) && (s =
  30585. "middle"), "bottom" === s ? v.y += v.height : "middle" === s && (v.y += v.height / 2), s = s || "top"), n.attr(
  30586. "position", [v.x, v.y]);
  30587. var y = {
  30588. textAlign: r,
  30589. textVerticalAlign: s
  30590. };
  30591. l.setStyle(y), c.setStyle(y), g = n.getBoundingRect();
  30592. var x = v.margin,
  30593. _ = t.getItemStyle(["color", "opacity"]);
  30594. _.fill = t.get("backgroundColor");
  30595. var w = new aM({
  30596. shape: {
  30597. x: g.x - x[3],
  30598. y: g.y - x[0],
  30599. width: g.width + x[1] + x[3],
  30600. height: g.height + x[0] + x[2],
  30601. r: t.get("borderRadius")
  30602. },
  30603. style: _,
  30604. silent: !0
  30605. });
  30606. jn(w), n.add(w)
  30607. }
  30608. }
  30609. }), YM.registerSubTypeDefaulter("dataZoom", function() {
  30610. return "slider"
  30611. });
  30612. var kN = ["cartesian2d", "polar", "singleAxis"],
  30613. PN = function(t, e) {
  30614. var i = f(t = t.slice(), aa),
  30615. n = f(e = (e || []).slice(), aa);
  30616. return function(o, a) {
  30617. d(t, function(t, r) {
  30618. for (var s = {
  30619. name: t,
  30620. capital: i[r]
  30621. }, l = 0; l < e.length; l++) s[e[l]] = t + n[l];
  30622. o.call(a, s)
  30623. })
  30624. }
  30625. }(["x", "y", "z", "radius", "angle", "single"], ["axisIndex", "axis", "index", "id"]),
  30626. NN = d,
  30627. ON = Bo,
  30628. EN = function(t, e, i, n) {
  30629. this._dimName = t, this._axisIndex = e, this._valueWindow, this._percentWindow, this._dataExtent, this._minMaxSpan,
  30630. this.ecModel = n, this._dataZoomModel = i
  30631. };
  30632. EN.prototype = {
  30633. constructor: EN,
  30634. hostedBy: function(t) {
  30635. return this._dataZoomModel === t
  30636. },
  30637. getDataValueWindow: function() {
  30638. return this._valueWindow.slice()
  30639. },
  30640. getDataPercentWindow: function() {
  30641. return this._percentWindow.slice()
  30642. },
  30643. getTargetSeriesModels: function() {
  30644. var t = [],
  30645. e = this.ecModel;
  30646. return e.eachSeries(function(i) {
  30647. if (My(i.get("coordinateSystem"))) {
  30648. var n = this._dimName,
  30649. o = e.queryComponents({
  30650. mainType: n + "Axis",
  30651. index: i.get(n + "AxisIndex"),
  30652. id: i.get(n + "AxisId")
  30653. })[0];
  30654. this._axisIndex === (o && o.componentIndex) && t.push(i)
  30655. }
  30656. }, this), t
  30657. },
  30658. getAxisModel: function() {
  30659. return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex)
  30660. },
  30661. getOtherAxisModel: function() {
  30662. var t, e, i = this._dimName,
  30663. n = this.ecModel,
  30664. o = this.getAxisModel();
  30665. "x" === i || "y" === i ? (e = "gridIndex", t = "x" === i ? "y" : "x") : (e = "polarIndex", t = "angle" === i ?
  30666. "radius" : "angle");
  30667. var a;
  30668. return n.eachComponent(t + "Axis", function(t) {
  30669. (t.get(e) || 0) === (o.get(e) || 0) && (a = t)
  30670. }), a
  30671. },
  30672. getMinMaxSpan: function() {
  30673. return i(this._minMaxSpan)
  30674. },
  30675. calculateDataWindow: function(t) {
  30676. var e = this._dataExtent,
  30677. i = this.getAxisModel().axis.scale,
  30678. n = this._dataZoomModel.getRangePropMode(),
  30679. o = [0, 100],
  30680. a = [t.start, t.end],
  30681. r = [];
  30682. return NN(["startValue", "endValue"], function(e) {
  30683. r.push(null != t[e] ? i.parse(t[e]) : null)
  30684. }), NN([0, 1], function(t) {
  30685. var s = r[t],
  30686. l = a[t];
  30687. "percent" === n[t] ? (null == l && (l = o[t]), s = i.parse(Eo(l, o, e, !0))) : l = Eo(s, e, o, !0), r[t] = s,
  30688. a[t] = l
  30689. }), {
  30690. valueWindow: ON(r),
  30691. percentWindow: ON(a)
  30692. }
  30693. },
  30694. reset: function(t) {
  30695. if (t === this._dataZoomModel) {
  30696. var e = this.getTargetSeriesModels();
  30697. this._dataExtent = Ty(this, this._dimName, e);
  30698. var i = this.calculateDataWindow(t.option);
  30699. this._valueWindow = i.valueWindow, this._percentWindow = i.percentWindow, Cy(this), Dy(this)
  30700. }
  30701. },
  30702. restore: function(t) {
  30703. t === this._dataZoomModel && (this._valueWindow = this._percentWindow = null, Dy(this, !0))
  30704. },
  30705. filterData: function(t, e) {
  30706. function i(t) {
  30707. return t >= r[0] && t <= r[1]
  30708. }
  30709. if (t === this._dataZoomModel) {
  30710. var n = this._dimName,
  30711. o = this.getTargetSeriesModels(),
  30712. a = t.get("filterMode"),
  30713. r = this._valueWindow;
  30714. "none" !== a && NN(o, function(t) {
  30715. var e = t.getData(),
  30716. o = e.mapDimension(n, !0);
  30717. o.length && ("weakFilter" === a ? e.filterSelf(function(t) {
  30718. for (var i, n, a, s = 0; s < o.length; s++) {
  30719. var l = e.get(o[s], t),
  30720. u = !isNaN(l),
  30721. h = l < r[0],
  30722. c = l > r[1];
  30723. if (u && !h && !c) return !0;
  30724. u && (a = !0), h && (i = !0), c && (n = !0)
  30725. }
  30726. return a && i && n
  30727. }) : NN(o, function(n) {
  30728. if ("empty" === a) t.setData(e.map(n, function(t) {
  30729. return i(t) ? t : NaN
  30730. }));
  30731. else {
  30732. var o = {};
  30733. o[n] = r, e.selectRange(o)
  30734. }
  30735. }), NN(o, function(t) {
  30736. e.setApproximateExtent(r, t)
  30737. }))
  30738. })
  30739. }
  30740. }
  30741. };
  30742. var RN = d,
  30743. zN = PN,
  30744. BN = Bs({
  30745. type: "dataZoom",
  30746. dependencies: ["xAxis", "yAxis", "zAxis", "radiusAxis", "angleAxis", "singleAxis", "series"],
  30747. defaultOption: {
  30748. zlevel: 0,
  30749. z: 4,
  30750. orient: null,
  30751. xAxisIndex: null,
  30752. yAxisIndex: null,
  30753. filterMode: "filter",
  30754. throttle: null,
  30755. start: 0,
  30756. end: 100,
  30757. startValue: null,
  30758. endValue: null,
  30759. minSpan: null,
  30760. maxSpan: null,
  30761. minValueSpan: null,
  30762. maxValueSpan: null,
  30763. rangeMode: null
  30764. },
  30765. init: function(t, e, i) {
  30766. this._dataIntervalByAxis = {}, this._dataInfo = {}, this._axisProxies = {}, this.textStyleModel, this._autoThrottle = !
  30767. 0, this._rangePropMode = ["percent", "percent"];
  30768. var n = Ly(t);
  30769. this.mergeDefaultAndTheme(t, i), this.doInit(n)
  30770. },
  30771. mergeOption: function(t) {
  30772. var e = Ly(t);
  30773. n(this.option, t, !0), this.doInit(e)
  30774. },
  30775. doInit: function(t) {
  30776. var e = this.option;
  30777. z_.canvasSupported || (e.realtime = !1), this._setDefaultThrottle(t), ky(this, t), RN([
  30778. ["start", "startValue"],
  30779. ["end", "endValue"]
  30780. ], function(t, i) {
  30781. "value" === this._rangePropMode[i] && (e[t[0]] = null)
  30782. }, this), this.textStyleModel = this.getModel("textStyle"), this._resetTarget(), this._giveAxisProxies()
  30783. },
  30784. _giveAxisProxies: function() {
  30785. var t = this._axisProxies;
  30786. this.eachTargetAxis(function(e, i, n, o) {
  30787. var a = this.dependentModels[e.axis][i],
  30788. r = a.__dzAxisProxy || (a.__dzAxisProxy = new EN(e.name, i, this, o));
  30789. t[e.name + "_" + i] = r
  30790. }, this)
  30791. },
  30792. _resetTarget: function() {
  30793. var t = this.option,
  30794. e = this._judgeAutoMode();
  30795. zN(function(e) {
  30796. var i = e.axisIndex;
  30797. t[i] = Di(t[i])
  30798. }, this), "axisIndex" === e ? this._autoSetAxisIndex() : "orient" === e && this._autoSetOrient()
  30799. },
  30800. _judgeAutoMode: function() {
  30801. var t = this.option,
  30802. e = !1;
  30803. zN(function(i) {
  30804. null != t[i.axisIndex] && (e = !0)
  30805. }, this);
  30806. var i = t.orient;
  30807. return null == i && e ? "orient" : e ? void 0 : (null == i && (t.orient = "horizontal"), "axisIndex")
  30808. },
  30809. _autoSetAxisIndex: function() {
  30810. var t = !0,
  30811. e = this.get("orient", !0),
  30812. i = this.option,
  30813. n = this.dependentModels;
  30814. if (t) {
  30815. var o = "vertical" === e ? "y" : "x";
  30816. n[o + "Axis"].length ? (i[o + "AxisIndex"] = [0], t = !1) : RN(n.singleAxis, function(n) {
  30817. t && n.get("orient", !0) === e && (i.singleAxisIndex = [n.componentIndex], t = !1)
  30818. })
  30819. }
  30820. t && zN(function(e) {
  30821. if (t) {
  30822. var n = [],
  30823. o = this.dependentModels[e.axis];
  30824. if (o.length && !n.length)
  30825. for (var a = 0, r = o.length; a < r; a++) "category" === o[a].get("type") && n.push(a);
  30826. i[e.axisIndex] = n, n.length && (t = !1)
  30827. }
  30828. }, this), t && this.ecModel.eachSeries(function(t) {
  30829. this._isSeriesHasAllAxesTypeOf(t, "value") && zN(function(e) {
  30830. var n = i[e.axisIndex],
  30831. o = t.get(e.axisIndex),
  30832. a = t.get(e.axisId);
  30833. l(n, o = t.ecModel.queryComponents({
  30834. mainType: e.axis,
  30835. index: o,
  30836. id: a
  30837. })[0].componentIndex) < 0 && n.push(o)
  30838. })
  30839. }, this)
  30840. },
  30841. _autoSetOrient: function() {
  30842. var t;
  30843. this.eachTargetAxis(function(e) {
  30844. !t && (t = e.name)
  30845. }, this), this.option.orient = "y" === t ? "vertical" : "horizontal"
  30846. },
  30847. _isSeriesHasAllAxesTypeOf: function(t, e) {
  30848. var i = !0;
  30849. return zN(function(n) {
  30850. var o = t.get(n.axisIndex),
  30851. a = this.dependentModels[n.axis][o];
  30852. a && a.get("type") === e || (i = !1)
  30853. }, this), i
  30854. },
  30855. _setDefaultThrottle: function(t) {
  30856. if (t.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
  30857. var e = this.ecModel.option;
  30858. this.option.throttle = e.animation && e.animationDurationUpdate > 0 ? 100 : 20
  30859. }
  30860. },
  30861. getFirstTargetAxisModel: function() {
  30862. var t;
  30863. return zN(function(e) {
  30864. if (null == t) {
  30865. var i = this.get(e.axisIndex);
  30866. i.length && (t = this.dependentModels[e.axis][i[0]])
  30867. }
  30868. }, this), t
  30869. },
  30870. eachTargetAxis: function(t, e) {
  30871. var i = this.ecModel;
  30872. zN(function(n) {
  30873. RN(this.get(n.axisIndex), function(o) {
  30874. t.call(e, n, o, this, i)
  30875. }, this)
  30876. }, this)
  30877. },
  30878. getAxisProxy: function(t, e) {
  30879. return this._axisProxies[t + "_" + e]
  30880. },
  30881. getAxisModel: function(t, e) {
  30882. var i = this.getAxisProxy(t, e);
  30883. return i && i.getAxisModel()
  30884. },
  30885. setRawRange: function(t, e) {
  30886. var i = this.option;
  30887. RN([
  30888. ["start", "startValue"],
  30889. ["end", "endValue"]
  30890. ], function(e) {
  30891. null == t[e[0]] && null == t[e[1]] || (i[e[0]] = t[e[0]], i[e[1]] = t[e[1]])
  30892. }, this), !e && ky(this, t)
  30893. },
  30894. getPercentRange: function() {
  30895. var t = this.findRepresentativeAxisProxy();
  30896. if (t) return t.getDataPercentWindow()
  30897. },
  30898. getValueRange: function(t, e) {
  30899. if (null != t || null != e) return this.getAxisProxy(t, e).getDataValueWindow();
  30900. var i = this.findRepresentativeAxisProxy();
  30901. return i ? i.getDataValueWindow() : void 0
  30902. },
  30903. findRepresentativeAxisProxy: function(t) {
  30904. if (t) return t.__dzAxisProxy;
  30905. var e = this._axisProxies;
  30906. for (var i in e)
  30907. if (e.hasOwnProperty(i) && e[i].hostedBy(this)) return e[i];
  30908. for (var i in e)
  30909. if (e.hasOwnProperty(i) && !e[i].hostedBy(this)) return e[i]
  30910. },
  30911. getRangePropMode: function() {
  30912. return this._rangePropMode.slice()
  30913. }
  30914. }),
  30915. VN = EI.extend({
  30916. type: "dataZoom",
  30917. render: function(t, e, i, n) {
  30918. this.dataZoomModel = t, this.ecModel = e, this.api = i
  30919. },
  30920. getTargetCoordInfo: function() {
  30921. function t(t, e, i, n) {
  30922. for (var o, a = 0; a < i.length; a++)
  30923. if (i[a].model === t) {
  30924. o = i[a];
  30925. break
  30926. } o || i.push(o = {
  30927. model: t,
  30928. axisModels: [],
  30929. coordIndex: n
  30930. }), o.axisModels.push(e)
  30931. }
  30932. var e = this.dataZoomModel,
  30933. i = this.ecModel,
  30934. n = {};
  30935. return e.eachTargetAxis(function(e, o) {
  30936. var a = i.getComponent(e.axis, o);
  30937. if (a) {
  30938. var r = a.getCoordSysModel();
  30939. r && t(r, a, n[r.mainType] || (n[r.mainType] = []), r.componentIndex)
  30940. }
  30941. }, this), n
  30942. }
  30943. }),
  30944. GN = (BN.extend({
  30945. type: "dataZoom.slider",
  30946. layoutMode: "box",
  30947. defaultOption: {
  30948. show: !0,
  30949. right: "ph",
  30950. top: "ph",
  30951. width: "ph",
  30952. height: "ph",
  30953. left: null,
  30954. bottom: null,
  30955. backgroundColor: "rgba(47,69,84,0)",
  30956. dataBackground: {
  30957. lineStyle: {
  30958. color: "#2f4554",
  30959. width: .5,
  30960. opacity: .3
  30961. },
  30962. areaStyle: {
  30963. color: "rgba(47,69,84,0.3)",
  30964. opacity: .3
  30965. }
  30966. },
  30967. borderColor: "#ddd",
  30968. fillerColor: "rgba(167,183,204,0.4)",
  30969. 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",
  30970. handleSize: "100%",
  30971. handleStyle: {
  30972. color: "#a7b7cc"
  30973. },
  30974. labelPrecision: null,
  30975. labelFormatter: null,
  30976. showDetail: !0,
  30977. showDataShadow: "auto",
  30978. realtime: !0,
  30979. zoomLock: !1,
  30980. textStyle: {
  30981. color: "#333"
  30982. }
  30983. }
  30984. }), aM),
  30985. FN = Eo,
  30986. WN = Bo,
  30987. HN = m,
  30988. ZN = d,
  30989. UN = "horizontal",
  30990. XN = 5,
  30991. jN = ["line", "bar", "candlestick", "scatter"],
  30992. YN = VN.extend({
  30993. type: "dataZoom.slider",
  30994. init: function(t, e) {
  30995. this._displayables = {}, this._orient, this._range, this._handleEnds, this._size, this._handleWidth, this._handleHeight,
  30996. this._location, this._dragging, this._dataShadowInfo, this.api = e
  30997. },
  30998. render: function(t, e, i, n) {
  30999. YN.superApply(this, "render", arguments), Lr(this, "_dispatchZoomAction", this.dataZoomModel.get("throttle"),
  31000. "fixRate"), this._orient = t.get("orient"), !1 !== this.dataZoomModel.get("show") ? (n && "dataZoom" === n.type &&
  31001. n.from === this.uid || this._buildView(), this._updateView()) : this.group.removeAll()
  31002. },
  31003. remove: function() {
  31004. YN.superApply(this, "remove", arguments), kr(this, "_dispatchZoomAction")
  31005. },
  31006. dispose: function() {
  31007. YN.superApply(this, "dispose", arguments), kr(this, "_dispatchZoomAction")
  31008. },
  31009. _buildView: function() {
  31010. var t = this.group;
  31011. t.removeAll(), this._resetLocation(), this._resetInterval();
  31012. var e = this._displayables.barGroup = new Zw;
  31013. this._renderBackground(), this._renderHandle(), this._renderDataShadow(), t.add(e), this._positionGroup()
  31014. },
  31015. _resetLocation: function() {
  31016. var t = this.dataZoomModel,
  31017. e = this.api,
  31018. i = this._findCoordRect(),
  31019. n = {
  31020. width: e.getWidth(),
  31021. height: e.getHeight()
  31022. },
  31023. o = this._orient === UN ? {
  31024. right: n.width - i.x - i.width,
  31025. top: n.height - 30 - 7,
  31026. width: i.width,
  31027. height: 30
  31028. } : {
  31029. right: 7,
  31030. top: i.y,
  31031. width: 30,
  31032. height: i.height
  31033. },
  31034. a = da(t.option);
  31035. d(["right", "top", "width", "height"], function(t) {
  31036. "ph" === a[t] && (a[t] = o[t])
  31037. });
  31038. var r = la(a, n, t.padding);
  31039. this._location = {
  31040. x: r.x,
  31041. y: r.y
  31042. }, this._size = [r.width, r.height], "vertical" === this._orient && this._size.reverse()
  31043. },
  31044. _positionGroup: function() {
  31045. var t = this.group,
  31046. e = this._location,
  31047. i = this._orient,
  31048. n = this.dataZoomModel.getFirstTargetAxisModel(),
  31049. o = n && n.get("inverse"),
  31050. a = this._displayables.barGroup,
  31051. r = (this._dataShadowInfo || {}).otherAxisInverse;
  31052. a.attr(i !== UN || o ? i === UN && o ? {
  31053. scale: r ? [-1, 1] : [-1, -1]
  31054. } : "vertical" !== i || o ? {
  31055. scale: r ? [-1, -1] : [-1, 1],
  31056. rotation: Math.PI / 2
  31057. } : {
  31058. scale: r ? [1, -1] : [1, 1],
  31059. rotation: Math.PI / 2
  31060. } : {
  31061. scale: r ? [1, 1] : [1, -1]
  31062. });
  31063. var s = t.getBoundingRect([a]);
  31064. t.attr("position", [e.x - s.x, e.y - s.y])
  31065. },
  31066. _getViewExtent: function() {
  31067. return [0, this._size[0]]
  31068. },
  31069. _renderBackground: function() {
  31070. var t = this.dataZoomModel,
  31071. e = this._size,
  31072. i = this._displayables.barGroup;
  31073. i.add(new GN({
  31074. silent: !0,
  31075. shape: {
  31076. x: 0,
  31077. y: 0,
  31078. width: e[0],
  31079. height: e[1]
  31080. },
  31081. style: {
  31082. fill: t.get("backgroundColor")
  31083. },
  31084. z2: -40
  31085. })), i.add(new GN({
  31086. shape: {
  31087. x: 0,
  31088. y: 0,
  31089. width: e[0],
  31090. height: e[1]
  31091. },
  31092. style: {
  31093. fill: "transparent"
  31094. },
  31095. z2: 0,
  31096. onclick: m(this._onClickPanelClick, this)
  31097. }))
  31098. },
  31099. _renderDataShadow: function() {
  31100. var t = this._dataShadowInfo = this._prepareDataShadowInfo();
  31101. if (t) {
  31102. var e = this._size,
  31103. i = t.series,
  31104. n = i.getRawData(),
  31105. o = i.getShadowDim ? i.getShadowDim() : t.otherDim;
  31106. if (null != o) {
  31107. var a = n.getDataExtent(o),
  31108. s = .3 * (a[1] - a[0]);
  31109. a = [a[0] - s, a[1] + s];
  31110. var l, u = [0, e[1]],
  31111. h = [0, e[0]],
  31112. c = [
  31113. [e[0], 0],
  31114. [0, 0]
  31115. ],
  31116. d = [],
  31117. f = h[1] / (n.count() - 1),
  31118. p = 0,
  31119. g = Math.round(n.count() / e[0]);
  31120. n.each([o], function(t, e) {
  31121. if (g > 0 && e % g) p += f;
  31122. else {
  31123. var i = null == t || isNaN(t) || "" === t,
  31124. n = i ? 0 : FN(t, a, u, !0);
  31125. i && !l && e ? (c.push([c[c.length - 1][0], 0]), d.push([d[d.length - 1][0], 0])) : !i && l && (c.push([p,
  31126. 0
  31127. ]), d.push([p, 0])), c.push([p, n]), d.push([p, n]), p += f, l = i
  31128. }
  31129. });
  31130. var m = this.dataZoomModel;
  31131. this._displayables.barGroup.add(new nM({
  31132. shape: {
  31133. points: c
  31134. },
  31135. style: r({
  31136. fill: m.get("dataBackgroundColor")
  31137. }, m.getModel("dataBackground.areaStyle").getAreaStyle()),
  31138. silent: !0,
  31139. z2: -20
  31140. })), this._displayables.barGroup.add(new oM({
  31141. shape: {
  31142. points: d
  31143. },
  31144. style: m.getModel("dataBackground.lineStyle").getLineStyle(),
  31145. silent: !0,
  31146. z2: -19
  31147. }))
  31148. }
  31149. }
  31150. },
  31151. _prepareDataShadowInfo: function() {
  31152. var t = this.dataZoomModel,
  31153. e = t.get("showDataShadow");
  31154. if (!1 !== e) {
  31155. var i, n = this.ecModel;
  31156. return t.eachTargetAxis(function(o, a) {
  31157. d(t.getAxisProxy(o.name, a).getTargetSeriesModels(), function(t) {
  31158. if (!(i || !0 !== e && l(jN, t.get("type")) < 0)) {
  31159. var r, s = n.getComponent(o.axis, a).axis,
  31160. u = Py(o.name),
  31161. h = t.coordinateSystem;
  31162. null != u && h.getOtherAxis && (r = h.getOtherAxis(s).inverse), u = t.getData().mapDimension(u), i = {
  31163. thisAxis: s,
  31164. series: t,
  31165. thisDim: o.name,
  31166. otherDim: u,
  31167. otherAxisInverse: r
  31168. }
  31169. }
  31170. }, this)
  31171. }, this), i
  31172. }
  31173. },
  31174. _renderHandle: function() {
  31175. var t = this._displayables,
  31176. e = t.handles = [],
  31177. i = t.handleLabels = [],
  31178. n = this._displayables.barGroup,
  31179. o = this._size,
  31180. a = this.dataZoomModel;
  31181. n.add(t.filler = new GN({
  31182. draggable: !0,
  31183. cursor: Ny(this._orient),
  31184. drift: HN(this._onDragMove, this, "all"),
  31185. onmousemove: function(t) {
  31186. lw(t.event)
  31187. },
  31188. ondragstart: HN(this._showDataInfo, this, !0),
  31189. ondragend: HN(this._onDragEnd, this),
  31190. onmouseover: HN(this._showDataInfo, this, !0),
  31191. onmouseout: HN(this._showDataInfo, this, !1),
  31192. style: {
  31193. fill: a.get("fillerColor"),
  31194. textPosition: "inside"
  31195. }
  31196. })), n.add(new GN(jn({
  31197. silent: !0,
  31198. shape: {
  31199. x: 0,
  31200. y: 0,
  31201. width: o[0],
  31202. height: o[1]
  31203. },
  31204. style: {
  31205. stroke: a.get("dataBackgroundColor") || a.get("borderColor"),
  31206. lineWidth: 1,
  31207. fill: "rgba(0,0,0,0)"
  31208. }
  31209. }))), ZN([0, 1], function(t) {
  31210. var o = Co(a.get("handleIcon"), {
  31211. cursor: Ny(this._orient),
  31212. draggable: !0,
  31213. drift: HN(this._onDragMove, this, t),
  31214. onmousemove: function(t) {
  31215. lw(t.event)
  31216. },
  31217. ondragend: HN(this._onDragEnd, this),
  31218. onmouseover: HN(this._showDataInfo, this, !0),
  31219. onmouseout: HN(this._showDataInfo, this, !1)
  31220. }, {
  31221. x: -1,
  31222. y: 0,
  31223. width: 2,
  31224. height: 2
  31225. }),
  31226. r = o.getBoundingRect();
  31227. this._handleHeight = Ro(a.get("handleSize"), this._size[1]), this._handleWidth = r.width / r.height * this._handleHeight,
  31228. o.setStyle(a.getModel("handleStyle").getItemStyle());
  31229. var s = a.get("handleColor");
  31230. null != s && (o.style.fill = s), n.add(e[t] = o);
  31231. var l = a.textStyleModel;
  31232. this.group.add(i[t] = new qS({
  31233. silent: !0,
  31234. invisible: !0,
  31235. style: {
  31236. x: 0,
  31237. y: 0,
  31238. text: "",
  31239. textVerticalAlign: "middle",
  31240. textAlign: "center",
  31241. textFill: l.getTextColor(),
  31242. textFont: l.getFont()
  31243. },
  31244. z2: 10
  31245. }))
  31246. }, this)
  31247. },
  31248. _resetInterval: function() {
  31249. var t = this._range = this.dataZoomModel.getPercentRange(),
  31250. e = this._getViewExtent();
  31251. this._handleEnds = [FN(t[0], [0, 100], e, !0), FN(t[1], [0, 100], e, !0)]
  31252. },
  31253. _updateInterval: function(t, e) {
  31254. var i = this.dataZoomModel,
  31255. n = this._handleEnds,
  31256. o = this._getViewExtent(),
  31257. a = i.findRepresentativeAxisProxy().getMinMaxSpan(),
  31258. r = [0, 100];
  31259. EL(e, n, o, i.get("zoomLock") ? "all" : t, null != a.minSpan ? FN(a.minSpan, r, o, !0) : null, null != a.maxSpan ?
  31260. FN(a.maxSpan, r, o, !0) : null);
  31261. var s = this._range,
  31262. l = this._range = WN([FN(n[0], o, r, !0), FN(n[1], o, r, !0)]);
  31263. return !s || s[0] !== l[0] || s[1] !== l[1]
  31264. },
  31265. _updateView: function(t) {
  31266. var e = this._displayables,
  31267. i = this._handleEnds,
  31268. n = WN(i.slice()),
  31269. o = this._size;
  31270. ZN([0, 1], function(t) {
  31271. var n = e.handles[t],
  31272. a = this._handleHeight;
  31273. n.attr({
  31274. scale: [a / 2, a / 2],
  31275. position: [i[t], o[1] / 2 - a / 2]
  31276. })
  31277. }, this), e.filler.setShape({
  31278. x: n[0],
  31279. y: 0,
  31280. width: n[1] - n[0],
  31281. height: o[1]
  31282. }), this._updateDataInfo(t)
  31283. },
  31284. _updateDataInfo: function(t) {
  31285. function e(t) {
  31286. var e = Mo(n.handles[t].parent, this.group),
  31287. i = To(0 === t ? "right" : "left", e),
  31288. s = this._handleWidth / 2 + XN,
  31289. l = Io([c[t] + (0 === t ? -s : s), this._size[1] / 2], e);
  31290. o[t].setStyle({
  31291. x: l[0],
  31292. y: l[1],
  31293. textVerticalAlign: a === UN ? "middle" : i,
  31294. textAlign: a === UN ? i : "center",
  31295. text: r[t]
  31296. })
  31297. }
  31298. var i = this.dataZoomModel,
  31299. n = this._displayables,
  31300. o = n.handleLabels,
  31301. a = this._orient,
  31302. r = ["", ""];
  31303. if (i.get("showDetail")) {
  31304. var s = i.findRepresentativeAxisProxy();
  31305. if (s) {
  31306. var l = s.getAxisModel().axis,
  31307. u = this._range,
  31308. h = t ? s.calculateDataWindow({
  31309. start: u[0],
  31310. end: u[1]
  31311. }).valueWindow : s.getDataValueWindow();
  31312. r = [this._formatLabel(h[0], l), this._formatLabel(h[1], l)]
  31313. }
  31314. }
  31315. var c = WN(this._handleEnds.slice());
  31316. e.call(this, 0), e.call(this, 1)
  31317. },
  31318. _formatLabel: function(t, e) {
  31319. var i = this.dataZoomModel,
  31320. n = i.get("labelFormatter"),
  31321. o = i.get("labelPrecision");
  31322. null != o && "auto" !== o || (o = e.getPixelPrecision());
  31323. var a = null == t || isNaN(t) ? "" : "category" === e.type || "time" === e.type ? e.scale.getLabel(Math.round(t)) :
  31324. t.toFixed(Math.min(o, 20));
  31325. return x(n) ? n(t, a) : _(n) ? n.replace("{value}", a) : a
  31326. },
  31327. _showDataInfo: function(t) {
  31328. t = this._dragging || t;
  31329. var e = this._displayables.handleLabels;
  31330. e[0].attr("invisible", !t), e[1].attr("invisible", !t)
  31331. },
  31332. _onDragMove: function(t, e, i) {
  31333. this._dragging = !0;
  31334. var n = Io([e, i], this._displayables.barGroup.getLocalTransform(), !0),
  31335. o = this._updateInterval(t, n[0]),
  31336. a = this.dataZoomModel.get("realtime");
  31337. this._updateView(!a), o && a && this._dispatchZoomAction()
  31338. },
  31339. _onDragEnd: function() {
  31340. this._dragging = !1, this._showDataInfo(!1), !this.dataZoomModel.get("realtime") && this._dispatchZoomAction()
  31341. },
  31342. _onClickPanelClick: function(t) {
  31343. var e = this._size,
  31344. i = this._displayables.barGroup.transformCoordToLocal(t.offsetX, t.offsetY);
  31345. if (!(i[0] < 0 || i[0] > e[0] || i[1] < 0 || i[1] > e[1])) {
  31346. var n = this._handleEnds,
  31347. o = (n[0] + n[1]) / 2,
  31348. a = this._updateInterval("all", i[0] - o);
  31349. this._updateView(), a && this._dispatchZoomAction()
  31350. }
  31351. },
  31352. _dispatchZoomAction: function() {
  31353. var t = this._range;
  31354. this.api.dispatchAction({
  31355. type: "dataZoom",
  31356. from: this.uid,
  31357. dataZoomId: this.dataZoomModel.id,
  31358. start: t[0],
  31359. end: t[1]
  31360. })
  31361. },
  31362. _findCoordRect: function() {
  31363. var t;
  31364. if (ZN(this.getTargetCoordInfo(), function(e) {
  31365. if (!t && e.length) {
  31366. var i = e[0].model.coordinateSystem;
  31367. t = i.getRect && i.getRect()
  31368. }
  31369. }), !t) {
  31370. var e = this.api.getWidth(),
  31371. i = this.api.getHeight();
  31372. t = {
  31373. x: .2 * e,
  31374. y: .2 * i,
  31375. width: .6 * e,
  31376. height: .6 * i
  31377. }
  31378. }
  31379. return t
  31380. }
  31381. });
  31382. BN.extend({
  31383. type: "dataZoom.inside",
  31384. defaultOption: {
  31385. disabled: !1,
  31386. zoomLock: !1,
  31387. zoomOnMouseWheel: !0,
  31388. moveOnMouseMove: !0,
  31389. moveOnMouseWheel: !1,
  31390. preventDefaultMouseMove: !0
  31391. }
  31392. });
  31393. var qN = "\0_ec_dataZoom_roams",
  31394. KN = m,
  31395. $N = VN.extend({
  31396. type: "dataZoom.inside",
  31397. init: function(t, e) {
  31398. this._range
  31399. },
  31400. render: function(t, e, i, n) {
  31401. $N.superApply(this, "render", arguments), this._range = t.getPercentRange(), d(this.getTargetCoordInfo(),
  31402. function(e, n) {
  31403. var o = f(e, function(t) {
  31404. return Ry(t.model)
  31405. });
  31406. d(e, function(e) {
  31407. var a = e.model,
  31408. r = {};
  31409. d(["pan", "zoom", "scrollMove"], function(t) {
  31410. r[t] = KN(JN[t], this, e, n)
  31411. }, this), Oy(i, {
  31412. coordId: Ry(a),
  31413. allCoordIds: o,
  31414. containsPoint: function(t, e, i) {
  31415. return a.coordinateSystem.containPoint([e, i])
  31416. },
  31417. dataZoomId: t.id,
  31418. dataZoomModel: t,
  31419. getRange: r
  31420. })
  31421. }, this)
  31422. }, this)
  31423. },
  31424. dispose: function() {
  31425. Ey(this.api, this.dataZoomModel.id), $N.superApply(this, "dispose", arguments), this._range = null
  31426. }
  31427. }),
  31428. JN = {
  31429. zoom: function(t, e, i, n) {
  31430. var o = this._range,
  31431. a = o.slice(),
  31432. r = t.axisModels[0];
  31433. if (r) {
  31434. var s = QN[e](null, [n.originX, n.originY], r, i, t),
  31435. l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (a[1] -
  31436. a[0]) + a[0],
  31437. u = Math.max(1 / n.scale, 0);
  31438. a[0] = (a[0] - l) * u + l, a[1] = (a[1] - l) * u + l;
  31439. var h = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
  31440. return EL(0, a, [0, 100], 0, h.minSpan, h.maxSpan), this._range = a, o[0] !== a[0] || o[1] !== a[1] ? a : void 0
  31441. }
  31442. },
  31443. pan: Wy(function(t, e, i, n, o, a) {
  31444. var r = QN[n]([a.oldX, a.oldY], [a.newX, a.newY], e, o, i);
  31445. return r.signal * (t[1] - t[0]) * r.pixel / r.pixelLength
  31446. }),
  31447. scrollMove: Wy(function(t, e, i, n, o, a) {
  31448. return QN[n]([0, 0], [a.scrollDelta, a.scrollDelta], e, o, i).signal * (t[1] - t[0]) * a.scrollDelta
  31449. })
  31450. },
  31451. QN = {
  31452. grid: function(t, e, i, n, o) {
  31453. var a = i.axis,
  31454. r = {},
  31455. s = o.model.coordinateSystem.getRect();
  31456. return t = t || [0, 0], "x" === a.dim ? (r.pixel = e[0] - t[0], r.pixelLength = s.width, r.pixelStart = s.x, r.signal =
  31457. a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1], r.pixelLength = s.height, r.pixelStart = s.y, r.signal = a.inverse ?
  31458. -1 : 1), r
  31459. },
  31460. polar: function(t, e, i, n, o) {
  31461. var a = i.axis,
  31462. r = {},
  31463. s = o.model.coordinateSystem,
  31464. l = s.getRadiusAxis().getExtent(),
  31465. u = s.getAngleAxis().getExtent();
  31466. return t = t ? s.pointToCoord(t) : [0, 0], e = s.pointToCoord(e), "radiusAxis" === i.mainType ? (r.pixel = e[0] -
  31467. t[0], r.pixelLength = l[1] - l[0], r.pixelStart = l[0], r.signal = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1],
  31468. r.pixelLength = u[1] - u[0], r.pixelStart = u[0], r.signal = a.inverse ? -1 : 1), r
  31469. },
  31470. singleAxis: function(t, e, i, n, o) {
  31471. var a = i.axis,
  31472. r = o.model.coordinateSystem.getRect(),
  31473. s = {};
  31474. return t = t || [0, 0], "horizontal" === a.orient ? (s.pixel = e[0] - t[0], s.pixelLength = r.width, s.pixelStart =
  31475. r.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = r.height, s.pixelStart = r.y, s.signal =
  31476. a.inverse ? -1 : 1), s
  31477. }
  31478. };
  31479. ks({
  31480. getTargetSeries: function(t) {
  31481. var e = R();
  31482. return t.eachComponent("dataZoom", function(t) {
  31483. t.eachTargetAxis(function(t, i, n) {
  31484. d(n.getAxisProxy(t.name, i).getTargetSeriesModels(), function(t) {
  31485. e.set(t.uid, t)
  31486. })
  31487. })
  31488. }), e
  31489. },
  31490. modifyOutputEnd: !0,
  31491. overallReset: function(t, e) {
  31492. t.eachComponent("dataZoom", function(t) {
  31493. t.eachTargetAxis(function(t, i, n) {
  31494. n.getAxisProxy(t.name, i).reset(n, e)
  31495. }), t.eachTargetAxis(function(t, i, n) {
  31496. n.getAxisProxy(t.name, i).filterData(n, e)
  31497. })
  31498. }), t.eachComponent("dataZoom", function(t) {
  31499. var e = t.findRepresentativeAxisProxy(),
  31500. i = e.getDataPercentWindow(),
  31501. n = e.getDataValueWindow();
  31502. t.setRawRange({
  31503. start: i[0],
  31504. end: i[1],
  31505. startValue: n[0],
  31506. endValue: n[1]
  31507. }, !0)
  31508. })
  31509. }
  31510. }), Ps("dataZoom", function(t, e) {
  31511. var i = Iy(m(e.eachComponent, e, "dataZoom"), PN, function(t, e) {
  31512. return t.get(e.axisIndex)
  31513. }),
  31514. n = [];
  31515. e.eachComponent({
  31516. mainType: "dataZoom",
  31517. query: t
  31518. }, function(t, e) {
  31519. n.push.apply(n, i(t).nodes)
  31520. }), d(n, function(e, i) {
  31521. e.setRawRange({
  31522. start: t.start,
  31523. end: t.end,
  31524. startValue: t.startValue,
  31525. endValue: t.endValue
  31526. })
  31527. })
  31528. });
  31529. var tO = d,
  31530. eO = function(t) {
  31531. var e = t && t.visualMap;
  31532. y(e) || (e = e ? [e] : []), tO(e, function(t) {
  31533. if (t) {
  31534. Hy(t, "splitList") && !Hy(t, "pieces") && (t.pieces = t.splitList, delete t.splitList);
  31535. var e = t.pieces;
  31536. e && y(e) && tO(e, function(t) {
  31537. w(t) && (Hy(t, "start") && !Hy(t, "min") && (t.min = t.start), Hy(t, "end") && !Hy(t, "max") && (t.max = t.end))
  31538. })
  31539. }
  31540. })
  31541. };
  31542. YM.registerSubTypeDefaulter("visualMap", function(t) {
  31543. return t.categories || (t.pieces ? t.pieces.length > 0 : t.splitNumber > 0) && !t.calculable ? "piecewise" :
  31544. "continuous"
  31545. });
  31546. var iO = IT.VISUAL.COMPONENT;
  31547. Es(iO, {
  31548. createOnAllSeries: !0,
  31549. reset: function(t, e) {
  31550. var i = [];
  31551. return e.eachComponent("visualMap", function(e) {
  31552. var n = t.pipelineContext;
  31553. !e.isTargetSeries(t) || n && n.large || i.push(qv(e.stateList, e.targetVisuals, m(e.getValueState, e), e.getDataDimension(
  31554. t.getData())))
  31555. }), i
  31556. }
  31557. }), Es(iO, {
  31558. createOnAllSeries: !0,
  31559. reset: function(t, e) {
  31560. var i = t.getData(),
  31561. n = [];
  31562. e.eachComponent("visualMap", function(e) {
  31563. if (e.isTargetSeries(t)) {
  31564. var o = e.getVisualMeta(m(Zy, null, t, e)) || {
  31565. stops: [],
  31566. outerColors: []
  31567. },
  31568. a = e.getDataDimension(i),
  31569. r = i.getDimensionInfo(a);
  31570. null != r && (o.dimension = r.index, n.push(o))
  31571. }
  31572. }), t.getData().setVisual("visualMeta", n)
  31573. }
  31574. });
  31575. var nO = {
  31576. get: function(t, e, n) {
  31577. var o = i((oO[t] || {})[e]);
  31578. return n && y(o) ? o[o.length - 1] : o
  31579. }
  31580. },
  31581. oO = {
  31582. color: {
  31583. active: ["#006edd", "#e0ffff"],
  31584. inactive: ["rgba(0,0,0,0)"]
  31585. },
  31586. colorHue: {
  31587. active: [0, 360],
  31588. inactive: [0, 0]
  31589. },
  31590. colorSaturation: {
  31591. active: [.3, 1],
  31592. inactive: [0, 0]
  31593. },
  31594. colorLightness: {
  31595. active: [.9, .5],
  31596. inactive: [0, 0]
  31597. },
  31598. colorAlpha: {
  31599. active: [.3, 1],
  31600. inactive: [0, 0]
  31601. },
  31602. opacity: {
  31603. active: [.3, 1],
  31604. inactive: [0, 0]
  31605. },
  31606. symbol: {
  31607. active: ["circle", "roundRect", "diamond"],
  31608. inactive: ["none"]
  31609. },
  31610. symbolSize: {
  31611. active: [10, 50],
  31612. inactive: [0, 0]
  31613. }
  31614. },
  31615. aO = jC.mapVisual,
  31616. rO = jC.eachVisual,
  31617. sO = y,
  31618. lO = d,
  31619. uO = Bo,
  31620. hO = Eo,
  31621. cO = B,
  31622. dO = Bs({
  31623. type: "visualMap",
  31624. dependencies: ["series"],
  31625. stateList: ["inRange", "outOfRange"],
  31626. replacableOptionKeys: ["inRange", "outOfRange", "target", "controller", "color"],
  31627. dataBound: [-1 / 0, 1 / 0],
  31628. layoutMode: {
  31629. type: "box",
  31630. ignoreSize: !0
  31631. },
  31632. defaultOption: {
  31633. show: !0,
  31634. zlevel: 0,
  31635. z: 4,
  31636. seriesIndex: "all",
  31637. min: 0,
  31638. max: 200,
  31639. dimension: null,
  31640. inRange: null,
  31641. outOfRange: null,
  31642. left: 0,
  31643. right: null,
  31644. top: null,
  31645. bottom: 0,
  31646. itemWidth: null,
  31647. itemHeight: null,
  31648. inverse: !1,
  31649. orient: "vertical",
  31650. backgroundColor: "rgba(0,0,0,0)",
  31651. borderColor: "#ccc",
  31652. contentColor: "#5793f3",
  31653. inactiveColor: "#aaa",
  31654. borderWidth: 0,
  31655. padding: 5,
  31656. textGap: 10,
  31657. precision: 0,
  31658. color: null,
  31659. formatter: null,
  31660. text: null,
  31661. textStyle: {
  31662. color: "#333"
  31663. }
  31664. },
  31665. init: function(t, e, i) {
  31666. this._dataExtent, this.targetVisuals = {}, this.controllerVisuals = {}, this.textStyleModel, this.itemSize, this
  31667. .mergeDefaultAndTheme(t, i)
  31668. },
  31669. optionUpdated: function(t, e) {
  31670. var i = this.option;
  31671. z_.canvasSupported || (i.realtime = !1), !e && jv(i, t, this.replacableOptionKeys), this.textStyleModel = this.getModel(
  31672. "textStyle"), this.resetItemSize(), this.completeVisualOption()
  31673. },
  31674. resetVisual: function(t) {
  31675. var e = this.stateList;
  31676. t = m(t, this), this.controllerVisuals = Xv(this.option.controller, e, t), this.targetVisuals = Xv(this.option.target,
  31677. e, t)
  31678. },
  31679. getTargetSeriesIndices: function() {
  31680. var t = this.option.seriesIndex,
  31681. e = [];
  31682. return null == t || "all" === t ? this.ecModel.eachSeries(function(t, i) {
  31683. e.push(i)
  31684. }) : e = Di(t), e
  31685. },
  31686. eachTargetSeries: function(t, e) {
  31687. d(this.getTargetSeriesIndices(), function(i) {
  31688. t.call(e, this.ecModel.getSeriesByIndex(i))
  31689. }, this)
  31690. },
  31691. isTargetSeries: function(t) {
  31692. var e = !1;
  31693. return this.eachTargetSeries(function(i) {
  31694. i === t && (e = !0)
  31695. }), e
  31696. },
  31697. formatValueText: function(t, e, i) {
  31698. function n(t) {
  31699. return t === l[0] ? "min" : t === l[1] ? "max" : (+t).toFixed(Math.min(s, 20))
  31700. }
  31701. var o, a, r = this.option,
  31702. s = r.precision,
  31703. l = this.dataBound,
  31704. u = r.formatter;
  31705. return i = i || ["<", ">"], y(t) && (t = t.slice(), o = !0), a = e ? t : o ? [n(t[0]), n(t[1])] : n(t), _(u) ? u
  31706. .replace("{value}", o ? a[0] : a).replace("{value2}", o ? a[1] : a) : x(u) ? o ? u(t[0], t[1]) : u(t) : o ? t[0] ===
  31707. l[0] ? i[0] + " " + a[1] : t[1] === l[1] ? i[1] + " " + a[0] : a[0] + " - " + a[1] : a
  31708. },
  31709. resetExtent: function() {
  31710. var t = this.option,
  31711. e = uO([t.min, t.max]);
  31712. this._dataExtent = e
  31713. },
  31714. getDataDimension: function(t) {
  31715. var e = this.option.dimension,
  31716. i = t.dimensions;
  31717. if (null != e || i.length) {
  31718. if (null != e) return t.getDimension(e);
  31719. for (var n = t.dimensions, o = n.length - 1; o >= 0; o--) {
  31720. var a = n[o];
  31721. if (!t.getDimensionInfo(a).isCalculationCoord) return a
  31722. }
  31723. }
  31724. },
  31725. getExtent: function() {
  31726. return this._dataExtent.slice()
  31727. },
  31728. completeVisualOption: function() {
  31729. function t(t) {
  31730. sO(o.color) && !t.inRange && (t.inRange = {
  31731. color: o.color.slice().reverse()
  31732. }), t.inRange = t.inRange || {
  31733. color: e.get("gradientColor")
  31734. }, lO(this.stateList, function(e) {
  31735. var i = t[e];
  31736. if (_(i)) {
  31737. var n = nO.get(i, "active", l);
  31738. n ? (t[e] = {}, t[e][i] = n) : delete t[e]
  31739. }
  31740. }, this)
  31741. }
  31742. var e = this.ecModel,
  31743. o = this.option,
  31744. a = {
  31745. inRange: o.inRange,
  31746. outOfRange: o.outOfRange
  31747. },
  31748. r = o.target || (o.target = {}),
  31749. s = o.controller || (o.controller = {});
  31750. n(r, a), n(s, a);
  31751. var l = this.isCategory();
  31752. t.call(this, r), t.call(this, s),
  31753. function(t, e, i) {
  31754. var n = t[e],
  31755. o = t[i];
  31756. n && !o && (o = t[i] = {}, lO(n, function(t, e) {
  31757. if (jC.isValidType(e)) {
  31758. var i = nO.get(e, "inactive", l);
  31759. null != i && (o[e] = i, "color" !== e || o.hasOwnProperty("opacity") || o.hasOwnProperty("colorAlpha") ||
  31760. (o.opacity = [0, 0]))
  31761. }
  31762. }))
  31763. }.call(this, r, "inRange", "outOfRange"),
  31764. function(t) {
  31765. var e = (t.inRange || {}).symbol || (t.outOfRange || {}).symbol,
  31766. n = (t.inRange || {}).symbolSize || (t.outOfRange || {}).symbolSize,
  31767. o = this.get("inactiveColor");
  31768. lO(this.stateList, function(a) {
  31769. var r = this.itemSize,
  31770. s = t[a];
  31771. s || (s = t[a] = {
  31772. color: l ? o : [o]
  31773. }), null == s.symbol && (s.symbol = e && i(e) || (l ? "roundRect" : ["roundRect"])), null == s.symbolSize &&
  31774. (s.symbolSize = n && i(n) || (l ? r[0] : [r[0], r[0]])), s.symbol = aO(s.symbol, function(t) {
  31775. return "none" === t || "square" === t ? "roundRect" : t
  31776. });
  31777. var u = s.symbolSize;
  31778. if (null != u) {
  31779. var h = -1 / 0;
  31780. rO(u, function(t) {
  31781. t > h && (h = t)
  31782. }), s.symbolSize = aO(u, function(t) {
  31783. return hO(t, [0, h], [0, r[0]], !0)
  31784. })
  31785. }
  31786. }, this)
  31787. }.call(this, s)
  31788. },
  31789. resetItemSize: function() {
  31790. this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))]
  31791. },
  31792. isCategory: function() {
  31793. return !!this.option.categories
  31794. },
  31795. setSelected: cO,
  31796. getValueState: cO,
  31797. getVisualMeta: cO
  31798. }),
  31799. fO = [20, 140],
  31800. pO = dO.extend({
  31801. type: "visualMap.continuous",
  31802. defaultOption: {
  31803. align: "auto",
  31804. calculable: !1,
  31805. range: null,
  31806. realtime: !0,
  31807. itemHeight: null,
  31808. itemWidth: null,
  31809. hoverLink: !0,
  31810. hoverLinkDataSize: null,
  31811. hoverLinkOnHandle: null
  31812. },
  31813. optionUpdated: function(t, e) {
  31814. pO.superApply(this, "optionUpdated", arguments), this.resetExtent(), this.resetVisual(function(t) {
  31815. t.mappingMethod = "linear", t.dataExtent = this.getExtent()
  31816. }), this._resetRange()
  31817. },
  31818. resetItemSize: function() {
  31819. pO.superApply(this, "resetItemSize", arguments);
  31820. var t = this.itemSize;
  31821. "horizontal" === this._orient && t.reverse(), (null == t[0] || isNaN(t[0])) && (t[0] = fO[0]), (null == t[1] ||
  31822. isNaN(t[1])) && (t[1] = fO[1])
  31823. },
  31824. _resetRange: function() {
  31825. var t = this.getExtent(),
  31826. e = this.option.range;
  31827. !e || e.auto ? (t.auto = 1, this.option.range = t) : y(e) && (e[0] > e[1] && e.reverse(), e[0] = Math.max(e[0],
  31828. t[0]), e[1] = Math.min(e[1], t[1]))
  31829. },
  31830. completeVisualOption: function() {
  31831. dO.prototype.completeVisualOption.apply(this, arguments), d(this.stateList, function(t) {
  31832. var e = this.option.controller[t].symbolSize;
  31833. e && e[0] !== e[1] && (e[0] = 0)
  31834. }, this)
  31835. },
  31836. setSelected: function(t) {
  31837. this.option.range = t.slice(), this._resetRange()
  31838. },
  31839. getSelected: function() {
  31840. var t = this.getExtent(),
  31841. e = Bo((this.get("range") || []).slice());
  31842. return e[0] > t[1] && (e[0] = t[1]), e[1] > t[1] && (e[1] = t[1]), e[0] < t[0] && (e[0] = t[0]), e[1] < t[0] &&
  31843. (e[1] = t[0]), e
  31844. },
  31845. getValueState: function(t) {
  31846. var e = this.option.range,
  31847. i = this.getExtent();
  31848. return (e[0] <= i[0] || e[0] <= t) && (e[1] >= i[1] || t <= e[1]) ? "inRange" : "outOfRange"
  31849. },
  31850. findTargetDataIndices: function(t) {
  31851. var e = [];
  31852. return this.eachTargetSeries(function(i) {
  31853. var n = [],
  31854. o = i.getData();
  31855. o.each(this.getDataDimension(o), function(e, i) {
  31856. t[0] <= e && e <= t[1] && n.push(i)
  31857. }, this), e.push({
  31858. seriesId: i.id,
  31859. dataIndex: n
  31860. })
  31861. }, this), e
  31862. },
  31863. getVisualMeta: function(t) {
  31864. function e(e, i) {
  31865. o.push({
  31866. value: e,
  31867. color: t(e, i)
  31868. })
  31869. }
  31870. for (var i = Uy(0, 0, this.getExtent()), n = Uy(0, 0, this.option.range.slice()), o = [], a = 0, r = 0, s = n.length,
  31871. l = i.length; r < l && (!n.length || i[r] <= n[0]); r++) i[r] < n[a] && e(i[r], "outOfRange");
  31872. for (u = 1; a < s; a++, u = 0) u && o.length && e(n[a], "outOfRange"), e(n[a], "inRange");
  31873. for (var u = 1; r < l; r++)(!n.length || n[n.length - 1] < i[r]) && (u && (o.length && e(o[o.length - 1].value,
  31874. "outOfRange"), u = 0), e(i[r], "outOfRange"));
  31875. var h = o.length;
  31876. return {
  31877. stops: o,
  31878. outerColors: [h ? o[0].color : "transparent", h ? o[h - 1].color : "transparent"]
  31879. }
  31880. }
  31881. }),
  31882. gO = Vs({
  31883. type: "visualMap",
  31884. autoPositionValues: {
  31885. left: 1,
  31886. right: 1,
  31887. top: 1,
  31888. bottom: 1
  31889. },
  31890. init: function(t, e) {
  31891. this.ecModel = t, this.api = e, this.visualMapModel
  31892. },
  31893. render: function(t, e, i, n) {
  31894. this.visualMapModel = t, !1 !== t.get("show") ? this.doRender.apply(this, arguments) : this.group.removeAll()
  31895. },
  31896. renderBackground: function(t) {
  31897. var e = this.visualMapModel,
  31898. i = OM(e.get("padding") || 0),
  31899. n = t.getBoundingRect();
  31900. t.add(new aM({
  31901. z2: -1,
  31902. silent: !0,
  31903. shape: {
  31904. x: n.x - i[3],
  31905. y: n.y - i[0],
  31906. width: n.width + i[3] + i[1],
  31907. height: n.height + i[0] + i[2]
  31908. },
  31909. style: {
  31910. fill: e.get("backgroundColor"),
  31911. stroke: e.get("borderColor"),
  31912. lineWidth: e.get("borderWidth")
  31913. }
  31914. }))
  31915. },
  31916. getControllerVisual: function(t, e, i) {
  31917. function n(t) {
  31918. return s[t]
  31919. }
  31920. function o(t, e) {
  31921. s[t] = e
  31922. }
  31923. var a = (i = i || {}).forceState,
  31924. r = this.visualMapModel,
  31925. s = {};
  31926. if ("symbol" === e && (s.symbol = r.get("itemSymbol")), "color" === e) {
  31927. var l = r.get("contentColor");
  31928. s.color = l
  31929. }
  31930. var u = r.controllerVisuals[a || r.getValueState(t)];
  31931. return d(jC.prepareVisualTypes(u), function(a) {
  31932. var r = u[a];
  31933. i.convertOpacityToAlpha && "opacity" === a && (a = "colorAlpha", r = u.__alphaForOpacity), jC.dependsOn(a, e) &&
  31934. r && r.applyVisual(t, n, o)
  31935. }), s[e]
  31936. },
  31937. positionGroup: function(t) {
  31938. var e = this.visualMapModel,
  31939. i = this.api;
  31940. ua(t, e.getBoxLayoutParams(), {
  31941. width: i.getWidth(),
  31942. height: i.getHeight()
  31943. })
  31944. },
  31945. doRender: B
  31946. }),
  31947. mO = Eo,
  31948. vO = d,
  31949. yO = Math.min,
  31950. xO = Math.max,
  31951. _O = 12,
  31952. wO = 6,
  31953. bO = gO.extend({
  31954. type: "visualMap.continuous",
  31955. init: function() {
  31956. bO.superApply(this, "init", arguments), this._shapes = {}, this._dataInterval = [], this._handleEnds = [], this._orient,
  31957. this._useHandle, this._hoverLinkDataIndices = [], this._dragging, this._hovering
  31958. },
  31959. doRender: function(t, e, i, n) {
  31960. n && "selectDataRange" === n.type && n.from === this.uid || this._buildView()
  31961. },
  31962. _buildView: function() {
  31963. this.group.removeAll();
  31964. var t = this.visualMapModel,
  31965. e = this.group;
  31966. this._orient = t.get("orient"), this._useHandle = t.get("calculable"), this._resetInterval(), this._renderBar(e);
  31967. var i = t.get("text");
  31968. this._renderEndsText(e, i, 0), this._renderEndsText(e, i, 1), this._updateView(!0), this.renderBackground(e),
  31969. this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(e)
  31970. },
  31971. _renderEndsText: function(t, e, i) {
  31972. if (e) {
  31973. var n = e[1 - i];
  31974. n = null != n ? n + "" : "";
  31975. var o = this.visualMapModel,
  31976. a = o.get("textGap"),
  31977. r = o.itemSize,
  31978. s = this._shapes.barGroup,
  31979. l = this._applyTransform([r[0] / 2, 0 === i ? -a : r[1] + a], s),
  31980. u = this._applyTransform(0 === i ? "bottom" : "top", s),
  31981. h = this._orient,
  31982. c = this.visualMapModel.textStyleModel;
  31983. this.group.add(new qS({
  31984. style: {
  31985. x: l[0],
  31986. y: l[1],
  31987. textVerticalAlign: "horizontal" === h ? "middle" : u,
  31988. textAlign: "horizontal" === h ? u : "center",
  31989. text: n,
  31990. textFont: c.getFont(),
  31991. textFill: c.getTextColor()
  31992. }
  31993. }))
  31994. }
  31995. },
  31996. _renderBar: function(t) {
  31997. var e = this.visualMapModel,
  31998. i = this._shapes,
  31999. n = e.itemSize,
  32000. o = this._orient,
  32001. a = this._useHandle,
  32002. r = Xy(e, this.api, n),
  32003. s = i.barGroup = this._createBarGroup(r);
  32004. s.add(i.outOfRange = Yy()), s.add(i.inRange = Yy(null, a ? Qy(this._orient) : null, m(this._dragHandle, this,
  32005. "all", !1), m(this._dragHandle, this, "all", !0)));
  32006. var l = e.textStyleModel.getTextRect("国"),
  32007. u = xO(l.width, l.height);
  32008. a && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(s, 0, n, u, o, r),
  32009. this._createHandle(s, 1, n, u, o, r)), this._createIndicator(s, n, u, o), t.add(s)
  32010. },
  32011. _createHandle: function(t, e, i, n, o) {
  32012. var a = m(this._dragHandle, this, e, !1),
  32013. r = m(this._dragHandle, this, e, !0),
  32014. s = Yy(qy(e, n), Qy(this._orient), a, r);
  32015. s.position[0] = i[0], t.add(s);
  32016. var l = this.visualMapModel.textStyleModel,
  32017. u = new qS({
  32018. draggable: !0,
  32019. drift: a,
  32020. onmousemove: function(t) {
  32021. lw(t.event)
  32022. },
  32023. ondragend: r,
  32024. style: {
  32025. x: 0,
  32026. y: 0,
  32027. text: "",
  32028. textFont: l.getFont(),
  32029. textFill: l.getTextColor()
  32030. }
  32031. });
  32032. this.group.add(u);
  32033. var h = ["horizontal" === o ? n / 2 : 1.5 * n, "horizontal" === o ? 0 === e ? -1.5 * n : 1.5 * n : 0 === e ? -n /
  32034. 2 : n / 2
  32035. ],
  32036. c = this._shapes;
  32037. c.handleThumbs[e] = s, c.handleLabelPoints[e] = h, c.handleLabels[e] = u
  32038. },
  32039. _createIndicator: function(t, e, i, n) {
  32040. var o = Yy([
  32041. [0, 0]
  32042. ], "move");
  32043. o.position[0] = e[0], o.attr({
  32044. invisible: !0,
  32045. silent: !0
  32046. }), t.add(o);
  32047. var a = this.visualMapModel.textStyleModel,
  32048. r = new qS({
  32049. silent: !0,
  32050. invisible: !0,
  32051. style: {
  32052. x: 0,
  32053. y: 0,
  32054. text: "",
  32055. textFont: a.getFont(),
  32056. textFill: a.getTextColor()
  32057. }
  32058. });
  32059. this.group.add(r);
  32060. var s = ["horizontal" === n ? i / 2 : wO + 3, 0],
  32061. l = this._shapes;
  32062. l.indicator = o, l.indicatorLabel = r, l.indicatorLabelPoint = s
  32063. },
  32064. _dragHandle: function(t, e, i, n) {
  32065. if (this._useHandle) {
  32066. if (this._dragging = !e, !e) {
  32067. var o = this._applyTransform([i, n], this._shapes.barGroup, !0);
  32068. this._updateInterval(t, o[1]), this._updateView()
  32069. }
  32070. e === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
  32071. type: "selectDataRange",
  32072. from: this.uid,
  32073. visualMapId: this.visualMapModel.id,
  32074. selected: this._dataInterval.slice()
  32075. }), e ? !this._hovering && this._clearHoverLinkToSeries() : Jy(this.visualMapModel) && this._doHoverLinkToSeries(
  32076. this._handleEnds[t], !1)
  32077. }
  32078. },
  32079. _resetInterval: function() {
  32080. var t = this.visualMapModel,
  32081. e = this._dataInterval = t.getSelected(),
  32082. i = t.getExtent(),
  32083. n = [0, t.itemSize[1]];
  32084. this._handleEnds = [mO(e[0], i, n, !0), mO(e[1], i, n, !0)]
  32085. },
  32086. _updateInterval: function(t, e) {
  32087. e = e || 0;
  32088. var i = this.visualMapModel,
  32089. n = this._handleEnds,
  32090. o = [0, i.itemSize[1]];
  32091. EL(e, n, o, t, 0);
  32092. var a = i.getExtent();
  32093. this._dataInterval = [mO(n[0], o, a, !0), mO(n[1], o, a, !0)]
  32094. },
  32095. _updateView: function(t) {
  32096. var e = this.visualMapModel,
  32097. i = e.getExtent(),
  32098. n = this._shapes,
  32099. o = [0, e.itemSize[1]],
  32100. a = t ? o : this._handleEnds,
  32101. r = this._createBarVisual(this._dataInterval, i, a, "inRange"),
  32102. s = this._createBarVisual(i, i, o, "outOfRange");
  32103. n.inRange.setStyle({
  32104. fill: r.barColor,
  32105. opacity: r.opacity
  32106. }).setShape("points", r.barPoints), n.outOfRange.setStyle({
  32107. fill: s.barColor,
  32108. opacity: s.opacity
  32109. }).setShape("points", s.barPoints), this._updateHandle(a, r)
  32110. },
  32111. _createBarVisual: function(t, e, i, n) {
  32112. var o = {
  32113. forceState: n,
  32114. convertOpacityToAlpha: !0
  32115. },
  32116. a = this._makeColorGradient(t, o),
  32117. r = [this.getControllerVisual(t[0], "symbolSize", o), this.getControllerVisual(t[1], "symbolSize", o)],
  32118. s = this._createBarPoints(i, r);
  32119. return {
  32120. barColor: new dM(0, 0, 0, 1, a),
  32121. barPoints: s,
  32122. handlesColor: [a[0].color, a[a.length - 1].color]
  32123. }
  32124. },
  32125. _makeColorGradient: function(t, e) {
  32126. var i = [],
  32127. n = (t[1] - t[0]) / 100;
  32128. i.push({
  32129. color: this.getControllerVisual(t[0], "color", e),
  32130. offset: 0
  32131. });
  32132. for (var o = 1; o < 100; o++) {
  32133. var a = t[0] + n * o;
  32134. if (a > t[1]) break;
  32135. i.push({
  32136. color: this.getControllerVisual(a, "color", e),
  32137. offset: o / 100
  32138. })
  32139. }
  32140. return i.push({
  32141. color: this.getControllerVisual(t[1], "color", e),
  32142. offset: 1
  32143. }), i
  32144. },
  32145. _createBarPoints: function(t, e) {
  32146. var i = this.visualMapModel.itemSize;
  32147. return [
  32148. [i[0] - e[0], t[0]],
  32149. [i[0], t[0]],
  32150. [i[0], t[1]],
  32151. [i[0] - e[1], t[1]]
  32152. ]
  32153. },
  32154. _createBarGroup: function(t) {
  32155. var e = this._orient,
  32156. i = this.visualMapModel.get("inverse");
  32157. return new Zw("horizontal" !== e || i ? "horizontal" === e && i ? {
  32158. scale: "bottom" === t ? [-1, 1] : [1, 1],
  32159. rotation: -Math.PI / 2
  32160. } : "vertical" !== e || i ? {
  32161. scale: "left" === t ? [1, 1] : [-1, 1]
  32162. } : {
  32163. scale: "left" === t ? [1, -1] : [-1, -1]
  32164. } : {
  32165. scale: "bottom" === t ? [1, 1] : [-1, 1],
  32166. rotation: Math.PI / 2
  32167. })
  32168. },
  32169. _updateHandle: function(t, e) {
  32170. if (this._useHandle) {
  32171. var i = this._shapes,
  32172. n = this.visualMapModel,
  32173. o = i.handleThumbs,
  32174. a = i.handleLabels;
  32175. vO([0, 1], function(r) {
  32176. var s = o[r];
  32177. s.setStyle("fill", e.handlesColor[r]), s.position[1] = t[r];
  32178. var l = Io(i.handleLabelPoints[r], Mo(s, this.group));
  32179. a[r].setStyle({
  32180. x: l[0],
  32181. y: l[1],
  32182. text: n.formatValueText(this._dataInterval[r]),
  32183. textVerticalAlign: "middle",
  32184. textAlign: this._applyTransform("horizontal" === this._orient ? 0 === r ? "bottom" : "top" : "left", i.barGroup)
  32185. })
  32186. }, this)
  32187. }
  32188. },
  32189. _showIndicator: function(t, e, i, n) {
  32190. var o = this.visualMapModel,
  32191. a = o.getExtent(),
  32192. r = o.itemSize,
  32193. s = [0, r[1]],
  32194. l = mO(t, a, s, !0),
  32195. u = this._shapes,
  32196. h = u.indicator;
  32197. if (h) {
  32198. h.position[1] = l, h.attr("invisible", !1), h.setShape("points", Ky(!!i, n, l, r[1]));
  32199. var c = {
  32200. convertOpacityToAlpha: !0
  32201. },
  32202. d = this.getControllerVisual(t, "color", c);
  32203. h.setStyle("fill", d);
  32204. var f = Io(u.indicatorLabelPoint, Mo(h, this.group)),
  32205. p = u.indicatorLabel;
  32206. p.attr("invisible", !1);
  32207. var g = this._applyTransform("left", u.barGroup),
  32208. m = this._orient;
  32209. p.setStyle({
  32210. text: (i || "") + o.formatValueText(e),
  32211. textVerticalAlign: "horizontal" === m ? g : "middle",
  32212. textAlign: "horizontal" === m ? "center" : g,
  32213. x: f[0],
  32214. y: f[1]
  32215. })
  32216. }
  32217. },
  32218. _enableHoverLinkToSeries: function() {
  32219. var t = this;
  32220. this._shapes.barGroup.on("mousemove", function(e) {
  32221. if (t._hovering = !0, !t._dragging) {
  32222. var i = t.visualMapModel.itemSize,
  32223. n = t._applyTransform([e.offsetX, e.offsetY], t._shapes.barGroup, !0, !0);
  32224. n[1] = yO(xO(0, n[1]), i[1]), t._doHoverLinkToSeries(n[1], 0 <= n[0] && n[0] <= i[0])
  32225. }
  32226. }).on("mouseout", function() {
  32227. t._hovering = !1, !t._dragging && t._clearHoverLinkToSeries()
  32228. })
  32229. },
  32230. _enableHoverLinkFromSeries: function() {
  32231. var t = this.api.getZr();
  32232. this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), t.on(
  32233. "mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries()
  32234. },
  32235. _doHoverLinkToSeries: function(t, e) {
  32236. var i = this.visualMapModel,
  32237. n = i.itemSize;
  32238. if (i.option.hoverLink) {
  32239. var o = [0, n[1]],
  32240. a = i.getExtent();
  32241. t = yO(xO(o[0], t), o[1]);
  32242. var r = $y(i, a, o),
  32243. s = [t - r, t + r],
  32244. l = mO(t, o, a, !0),
  32245. u = [mO(s[0], o, a, !0), mO(s[1], o, a, !0)];
  32246. s[0] < o[0] && (u[0] = -1 / 0), s[1] > o[1] && (u[1] = 1 / 0), e && (u[0] === -1 / 0 ? this._showIndicator(l, u[
  32247. 1], "< ", r) : u[1] === 1 / 0 ? this._showIndicator(l, u[0], "> ", r) : this._showIndicator(l, l, "≈ ", r));
  32248. var h = this._hoverLinkDataIndices,
  32249. c = [];
  32250. (e || Jy(i)) && (c = this._hoverLinkDataIndices = i.findTargetDataIndices(u));
  32251. var d = Ri(h, c);
  32252. this._dispatchHighDown("downplay", jy(d[0])), this._dispatchHighDown("highlight", jy(d[1]))
  32253. }
  32254. },
  32255. _hoverLinkFromSeriesMouseOver: function(t) {
  32256. var e = t.target,
  32257. i = this.visualMapModel;
  32258. if (e && null != e.dataIndex) {
  32259. var n = this.ecModel.getSeriesByIndex(e.seriesIndex);
  32260. if (i.isTargetSeries(n)) {
  32261. var o = n.getData(e.dataType),
  32262. a = o.get(i.getDataDimension(o), e.dataIndex, !0);
  32263. isNaN(a) || this._showIndicator(a, a)
  32264. }
  32265. }
  32266. },
  32267. _hideIndicator: function() {
  32268. var t = this._shapes;
  32269. t.indicator && t.indicator.attr("invisible", !0), t.indicatorLabel && t.indicatorLabel.attr("invisible", !0)
  32270. },
  32271. _clearHoverLinkToSeries: function() {
  32272. this._hideIndicator();
  32273. var t = this._hoverLinkDataIndices;
  32274. this._dispatchHighDown("downplay", jy(t)), t.length = 0
  32275. },
  32276. _clearHoverLinkFromSeries: function() {
  32277. this._hideIndicator();
  32278. var t = this.api.getZr();
  32279. t.off("mouseover", this._hoverLinkFromSeriesMouseOver), t.off("mouseout", this._hideIndicator)
  32280. },
  32281. _applyTransform: function(t, e, i, n) {
  32282. var o = Mo(e, n ? null : this.group);
  32283. return bM[y(t) ? "applyTransform" : "transformDirection"](t, o, i)
  32284. },
  32285. _dispatchHighDown: function(t, e) {
  32286. e && e.length && this.api.dispatchAction({
  32287. type: t,
  32288. batch: e
  32289. })
  32290. },
  32291. dispose: function() {
  32292. this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries()
  32293. },
  32294. remove: function() {
  32295. this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries()
  32296. }
  32297. });
  32298. Ps({
  32299. type: "selectDataRange",
  32300. event: "dataRangeSelected",
  32301. update: "update"
  32302. }, function(t, e) {
  32303. e.eachComponent({
  32304. mainType: "visualMap",
  32305. query: t
  32306. }, function(e) {
  32307. e.setSelected(t.selected)
  32308. })
  32309. }), Ls(eO);
  32310. var SO = dO.extend({
  32311. type: "visualMap.piecewise",
  32312. defaultOption: {
  32313. selected: null,
  32314. minOpen: !1,
  32315. maxOpen: !1,
  32316. align: "auto",
  32317. itemWidth: 20,
  32318. itemHeight: 14,
  32319. itemSymbol: "roundRect",
  32320. pieceList: null,
  32321. categories: null,
  32322. splitNumber: 5,
  32323. selectedMode: "multiple",
  32324. itemGap: 10,
  32325. hoverLink: !0,
  32326. showLabel: null
  32327. },
  32328. optionUpdated: function(t, e) {
  32329. SO.superApply(this, "optionUpdated", arguments), this._pieceList = [], this.resetExtent();
  32330. var n = this._mode = this._determineMode();
  32331. MO[this._mode].call(this), this._resetSelected(t, e);
  32332. var o = this.option.categories;
  32333. this.resetVisual(function(t, e) {
  32334. "categories" === n ? (t.mappingMethod = "category", t.categories = i(o)) : (t.dataExtent = this.getExtent(),
  32335. t.mappingMethod = "piecewise", t.pieceList = f(this._pieceList, function(t) {
  32336. var t = i(t);
  32337. return "inRange" !== e && (t.visual = null), t
  32338. }))
  32339. })
  32340. },
  32341. completeVisualOption: function() {
  32342. function t(t, e, i) {
  32343. return t && t[e] && (w(t[e]) ? t[e].hasOwnProperty(i) : t[e] === i)
  32344. }
  32345. var e = this.option,
  32346. i = {},
  32347. n = jC.listVisualTypes(),
  32348. o = this.isCategory();
  32349. d(e.pieces, function(t) {
  32350. d(n, function(e) {
  32351. t.hasOwnProperty(e) && (i[e] = 1)
  32352. })
  32353. }), d(i, function(i, n) {
  32354. var a = 0;
  32355. d(this.stateList, function(i) {
  32356. a |= t(e, i, n) || t(e.target, i, n)
  32357. }, this), !a && d(this.stateList, function(t) {
  32358. (e[t] || (e[t] = {}))[n] = nO.get(n, "inRange" === t ? "active" : "inactive", o)
  32359. })
  32360. }, this), dO.prototype.completeVisualOption.apply(this, arguments)
  32361. },
  32362. _resetSelected: function(t, e) {
  32363. var i = this.option,
  32364. n = this._pieceList,
  32365. o = (e ? i : t).selected || {};
  32366. if (i.selected = o, d(n, function(t, e) {
  32367. var i = this.getSelectedMapKey(t);
  32368. o.hasOwnProperty(i) || (o[i] = !0)
  32369. }, this), "single" === i.selectedMode) {
  32370. var a = !1;
  32371. d(n, function(t, e) {
  32372. var i = this.getSelectedMapKey(t);
  32373. o[i] && (a ? o[i] = !1 : a = !0)
  32374. }, this)
  32375. }
  32376. },
  32377. getSelectedMapKey: function(t) {
  32378. return "categories" === this._mode ? t.value + "" : t.index + ""
  32379. },
  32380. getPieceList: function() {
  32381. return this._pieceList
  32382. },
  32383. _determineMode: function() {
  32384. var t = this.option;
  32385. return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber"
  32386. },
  32387. setSelected: function(t) {
  32388. this.option.selected = i(t)
  32389. },
  32390. getValueState: function(t) {
  32391. var e = jC.findPieceIndex(t, this._pieceList);
  32392. return null != e && this.option.selected[this.getSelectedMapKey(this._pieceList[e])] ? "inRange" : "outOfRange"
  32393. },
  32394. findTargetDataIndices: function(t) {
  32395. var e = [];
  32396. return this.eachTargetSeries(function(i) {
  32397. var n = [],
  32398. o = i.getData();
  32399. o.each(this.getDataDimension(o), function(e, i) {
  32400. jC.findPieceIndex(e, this._pieceList) === t && n.push(i)
  32401. }, this), e.push({
  32402. seriesId: i.id,
  32403. dataIndex: n
  32404. })
  32405. }, this), e
  32406. },
  32407. getRepresentValue: function(t) {
  32408. var e;
  32409. if (this.isCategory()) e = t.value;
  32410. else if (null != t.value) e = t.value;
  32411. else {
  32412. var i = t.interval || [];
  32413. e = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2
  32414. }
  32415. return e
  32416. },
  32417. getVisualMeta: function(t) {
  32418. function e(e, a) {
  32419. var r = o.getRepresentValue({
  32420. interval: e
  32421. });
  32422. a || (a = o.getValueState(r));
  32423. var s = t(r, a);
  32424. e[0] === -1 / 0 ? n[0] = s : e[1] === 1 / 0 ? n[1] = s : i.push({
  32425. value: e[0],
  32426. color: s
  32427. }, {
  32428. value: e[1],
  32429. color: s
  32430. })
  32431. }
  32432. if (!this.isCategory()) {
  32433. var i = [],
  32434. n = [],
  32435. o = this,
  32436. a = this._pieceList.slice();
  32437. if (a.length) {
  32438. var r = a[0].interval[0];
  32439. r !== -1 / 0 && a.unshift({
  32440. interval: [-1 / 0, r]
  32441. }), (r = a[a.length - 1].interval[1]) !== 1 / 0 && a.push({
  32442. interval: [r, 1 / 0]
  32443. })
  32444. } else a.push({
  32445. interval: [-1 / 0, 1 / 0]
  32446. });
  32447. var s = -1 / 0;
  32448. return d(a, function(t) {
  32449. var i = t.interval;
  32450. i && (i[0] > s && e([s, i[0]], "outOfRange"), e(i.slice()), s = i[1])
  32451. }, this), {
  32452. stops: i,
  32453. outerColors: n
  32454. }
  32455. }
  32456. }
  32457. }),
  32458. MO = {
  32459. splitNumber: function() {
  32460. var t = this.option,
  32461. e = this._pieceList,
  32462. i = Math.min(t.precision, 20),
  32463. n = this.getExtent(),
  32464. o = t.splitNumber;
  32465. o = Math.max(parseInt(o, 10), 1), t.splitNumber = o;
  32466. for (var a = (n[1] - n[0]) / o; + a.toFixed(i) !== a && i < 5;) i++;
  32467. t.precision = i, a = +a.toFixed(i);
  32468. var r = 0;
  32469. t.minOpen && e.push({
  32470. index: r++,
  32471. interval: [-1 / 0, n[0]],
  32472. close: [0, 0]
  32473. });
  32474. for (var s = n[0], l = r + o; r < l; s += a) {
  32475. var u = r === o - 1 ? n[1] : s + a;
  32476. e.push({
  32477. index: r++,
  32478. interval: [s, u],
  32479. close: [1, 1]
  32480. })
  32481. }
  32482. t.maxOpen && e.push({
  32483. index: r++,
  32484. interval: [n[1], 1 / 0],
  32485. close: [0, 0]
  32486. }), qo(e), d(e, function(t) {
  32487. t.text = this.formatValueText(t.interval)
  32488. }, this)
  32489. },
  32490. categories: function() {
  32491. var t = this.option;
  32492. d(t.categories, function(t) {
  32493. this._pieceList.push({
  32494. text: this.formatValueText(t, !0),
  32495. value: t
  32496. })
  32497. }, this), tx(t, this._pieceList)
  32498. },
  32499. pieces: function() {
  32500. var t = this.option,
  32501. e = this._pieceList;
  32502. d(t.pieces, function(t, i) {
  32503. w(t) || (t = {
  32504. value: t
  32505. });
  32506. var n = {
  32507. text: "",
  32508. index: i
  32509. };
  32510. if (null != t.label && (n.text = t.label), t.hasOwnProperty("value")) {
  32511. var o = n.value = t.value;
  32512. n.interval = [o, o], n.close = [1, 1]
  32513. } else {
  32514. for (var a = n.interval = [], r = n.close = [0, 0], s = [1, 0, 1], l = [-1 / 0, 1 / 0], u = [], h = 0; h < 2; h++) {
  32515. for (var c = [
  32516. ["gte", "gt", "min"],
  32517. ["lte", "lt", "max"]
  32518. ][h], d = 0; d < 3 && null == a[h]; d++) a[h] = t[c[d]], r[h] = s[d], u[h] = 2 === d;
  32519. null == a[h] && (a[h] = l[h])
  32520. }
  32521. u[0] && a[1] === 1 / 0 && (r[0] = 0), u[1] && a[0] === -1 / 0 && (r[1] = 0), a[0] === a[1] && r[0] && r[1] &&
  32522. (n.value = a[0])
  32523. }
  32524. n.visual = jC.retrieveVisuals(t), e.push(n)
  32525. }, this), tx(t, e), qo(e), d(e, function(t) {
  32526. var e = t.close,
  32527. i = [
  32528. ["<", "≤"][e[1]],
  32529. [">", "≥"][e[0]]
  32530. ];
  32531. t.text = t.text || this.formatValueText(null != t.value ? t.value : t.interval, !1, i)
  32532. }, this)
  32533. }
  32534. };
  32535. gO.extend({
  32536. type: "visualMap.piecewise",
  32537. doRender: function() {
  32538. var t = this.group;
  32539. t.removeAll();
  32540. var e = this.visualMapModel,
  32541. i = e.get("textGap"),
  32542. n = e.textStyleModel,
  32543. o = n.getFont(),
  32544. a = n.getTextColor(),
  32545. r = this._getItemAlign(),
  32546. s = e.itemSize,
  32547. l = this._getViewData(),
  32548. u = l.endsText,
  32549. h = T(e.get("showLabel", !0), !u);
  32550. u && this._renderEndsText(t, u[0], s, h, r), d(l.viewPieceList, function(n) {
  32551. var l = n.piece,
  32552. u = new Zw;
  32553. u.onclick = m(this._onItemClick, this, l), this._enableHoverLink(u, n.indexInModelPieceList);
  32554. var c = e.getRepresentValue(l);
  32555. if (this._createItemSymbol(u, c, [0, 0, s[0], s[1]]), h) {
  32556. var d = this.visualMapModel.getValueState(c);
  32557. u.add(new qS({
  32558. style: {
  32559. x: "right" === r ? -i : s[0] + i,
  32560. y: s[1] / 2,
  32561. text: l.text,
  32562. textVerticalAlign: "middle",
  32563. textAlign: r,
  32564. textFont: o,
  32565. textFill: a,
  32566. opacity: "outOfRange" === d ? .5 : 1
  32567. }
  32568. }))
  32569. }
  32570. t.add(u)
  32571. }, this), u && this._renderEndsText(t, u[1], s, h, r), UM(e.get("orient"), t, e.get("itemGap")), this.renderBackground(
  32572. t), this.positionGroup(t)
  32573. },
  32574. _enableHoverLink: function(t, e) {
  32575. function i(t) {
  32576. var i = this.visualMapModel;
  32577. i.option.hoverLink && this.api.dispatchAction({
  32578. type: t,
  32579. batch: jy(i.findTargetDataIndices(e))
  32580. })
  32581. }
  32582. t.on("mouseover", m(i, this, "highlight")).on("mouseout", m(i, this, "downplay"))
  32583. },
  32584. _getItemAlign: function() {
  32585. var t = this.visualMapModel,
  32586. e = t.option;
  32587. if ("vertical" === e.orient) return Xy(t, this.api, t.itemSize);
  32588. var i = e.align;
  32589. return i && "auto" !== i || (i = "left"), i
  32590. },
  32591. _renderEndsText: function(t, e, i, n, o) {
  32592. if (e) {
  32593. var a = new Zw,
  32594. r = this.visualMapModel.textStyleModel;
  32595. a.add(new qS({
  32596. style: {
  32597. x: n ? "right" === o ? i[0] : 0 : i[0] / 2,
  32598. y: i[1] / 2,
  32599. textVerticalAlign: "middle",
  32600. textAlign: n ? o : "center",
  32601. text: e,
  32602. textFont: r.getFont(),
  32603. textFill: r.getTextColor()
  32604. }
  32605. })), t.add(a)
  32606. }
  32607. },
  32608. _getViewData: function() {
  32609. var t = this.visualMapModel,
  32610. e = f(t.getPieceList(), function(t, e) {
  32611. return {
  32612. piece: t,
  32613. indexInModelPieceList: e
  32614. }
  32615. }),
  32616. i = t.get("text"),
  32617. n = t.get("orient"),
  32618. o = t.get("inverse");
  32619. return ("horizontal" === n ? o : !o) ? e.reverse() : i && (i = i.slice().reverse()), {
  32620. viewPieceList: e,
  32621. endsText: i
  32622. }
  32623. },
  32624. _createItemSymbol: function(t, e, i) {
  32625. t.add(Xl(this.getControllerVisual(e, "symbol"), i[0], i[1], i[2], i[3], this.getControllerVisual(e, "color")))
  32626. },
  32627. _onItemClick: function(t) {
  32628. var e = this.visualMapModel,
  32629. n = e.option,
  32630. o = i(n.selected),
  32631. a = e.getSelectedMapKey(t);
  32632. "single" === n.selectedMode ? (o[a] = !0, d(o, function(t, e) {
  32633. o[e] = e === a
  32634. })) : o[a] = !o[a], this.api.dispatchAction({
  32635. type: "selectDataRange",
  32636. from: this.uid,
  32637. visualMapId: this.visualMapModel.id,
  32638. selected: o
  32639. })
  32640. }
  32641. });
  32642. Ls(eO);
  32643. var IO = $o,
  32644. TO = Qo,
  32645. AO = Bs({
  32646. type: "marker",
  32647. dependencies: ["series", "grid", "polar", "geo"],
  32648. init: function(t, e, i, n) {
  32649. this.mergeDefaultAndTheme(t, i), this.mergeOption(t, i, n.createdBySelf, !0)
  32650. },
  32651. isAnimationEnabled: function() {
  32652. if (z_.node) return !1;
  32653. var t = this.__hostSeries;
  32654. return this.getShallow("animation") && t && t.isAnimationEnabled()
  32655. },
  32656. mergeOption: function(t, e, i, n) {
  32657. var o = this.constructor,
  32658. r = this.mainType + "Model";
  32659. i || e.eachSeries(function(t) {
  32660. var i = t.get(this.mainType, !0),
  32661. s = t[r];
  32662. i && i.data ? (s ? s.mergeOption(i, e, !0) : (n && ex(i), d(i.data, function(t) {
  32663. t instanceof Array ? (ex(t[0]), ex(t[1])) : ex(t)
  32664. }), a(s = new o(i, this, e), {
  32665. mainType: this.mainType,
  32666. seriesIndex: t.seriesIndex,
  32667. name: t.name,
  32668. createdBySelf: !0
  32669. }), s.__hostSeries = t), t[r] = s) : t[r] = null
  32670. }, this)
  32671. },
  32672. formatTooltip: function(t) {
  32673. var e = this.getData(),
  32674. i = this.getRawValue(t),
  32675. n = y(i) ? f(i, IO).join(", ") : IO(i),
  32676. o = e.getName(t),
  32677. a = TO(this.name);
  32678. return (null != i || o) && (a += "<br />"), o && (a += TO(o), null != i && (a += " : ")), null != i && (a += TO(
  32679. n)), a
  32680. },
  32681. getData: function() {
  32682. return this._data
  32683. },
  32684. setData: function(t) {
  32685. this._data = t
  32686. }
  32687. });
  32688. h(AO, LI), AO.extend({
  32689. type: "markPoint",
  32690. defaultOption: {
  32691. zlevel: 0,
  32692. z: 5,
  32693. symbol: "pin",
  32694. symbolSize: 50,
  32695. tooltip: {
  32696. trigger: "item"
  32697. },
  32698. label: {
  32699. show: !0,
  32700. position: "inside"
  32701. },
  32702. itemStyle: {
  32703. borderWidth: 2
  32704. },
  32705. emphasis: {
  32706. label: {
  32707. show: !0
  32708. }
  32709. }
  32710. }
  32711. });
  32712. var DO = l,
  32713. CO = v,
  32714. LO = {
  32715. min: CO(ox, "min"),
  32716. max: CO(ox, "max"),
  32717. average: CO(ox, "average")
  32718. },
  32719. kO = Vs({
  32720. type: "marker",
  32721. init: function() {
  32722. this.markerGroupMap = R()
  32723. },
  32724. render: function(t, e, i) {
  32725. var n = this.markerGroupMap;
  32726. n.each(function(t) {
  32727. t.__keep = !1
  32728. });
  32729. var o = this.type + "Model";
  32730. e.eachSeries(function(t) {
  32731. var n = t[o];
  32732. n && this.renderSeries(t, n, e, i)
  32733. }, this), n.each(function(t) {
  32734. !t.__keep && this.group.remove(t.group)
  32735. }, this)
  32736. },
  32737. renderSeries: function() {}
  32738. });
  32739. kO.extend({
  32740. type: "markPoint",
  32741. updateTransform: function(t, e, i) {
  32742. e.eachSeries(function(t) {
  32743. var e = t.markPointModel;
  32744. e && (cx(e.getData(), t, i), this.markerGroupMap.get(t.id).updateLayout(e))
  32745. }, this)
  32746. },
  32747. renderSeries: function(t, e, i, n) {
  32748. var o = t.coordinateSystem,
  32749. a = t.id,
  32750. r = t.getData(),
  32751. s = this.markerGroupMap,
  32752. l = s.get(a) || s.set(a, new Su),
  32753. u = dx(o, t, e);
  32754. e.setData(u), cx(e.getData(), t, n), u.each(function(t) {
  32755. var i = u.getItemModel(t),
  32756. n = i.getShallow("symbolSize");
  32757. "function" == typeof n && (n = n(e.getRawValue(t), e.getDataParams(t))), u.setItemVisual(t, {
  32758. symbolSize: n,
  32759. color: i.get("itemStyle.color") || r.getVisual("color"),
  32760. symbol: i.getShallow("symbol")
  32761. })
  32762. }), l.updateData(u), this.group.add(l.group), u.eachItemGraphicEl(function(t) {
  32763. t.traverse(function(t) {
  32764. t.dataModel = e
  32765. })
  32766. }), l.__keep = !0, l.group.silent = e.get("silent") || t.get("silent")
  32767. }
  32768. }), Ls(function(t) {
  32769. t.markPoint = t.markPoint || {}
  32770. }), AO.extend({
  32771. type: "markLine",
  32772. defaultOption: {
  32773. zlevel: 0,
  32774. z: 5,
  32775. symbol: ["circle", "arrow"],
  32776. symbolSize: [8, 16],
  32777. precision: 2,
  32778. tooltip: {
  32779. trigger: "item"
  32780. },
  32781. label: {
  32782. show: !0,
  32783. position: "end"
  32784. },
  32785. lineStyle: {
  32786. type: "dashed"
  32787. },
  32788. emphasis: {
  32789. label: {
  32790. show: !0
  32791. },
  32792. lineStyle: {
  32793. width: 3
  32794. }
  32795. },
  32796. animationEasing: "linear"
  32797. }
  32798. });
  32799. var PO = function(t, e, o, r) {
  32800. var s = t.getData(),
  32801. l = r.type;
  32802. if (!y(r) && ("min" === l || "max" === l || "average" === l || "median" === l || null != r.xAxis || null != r.yAxis)) {
  32803. var u, h;
  32804. if (null != r.yAxis || null != r.xAxis) u = null != r.yAxis ? "y" : "x", e.getAxis(u), h = T(r.yAxis, r.xAxis);
  32805. else {
  32806. var c = rx(r, s, e, t);
  32807. u = c.valueDataDim, c.valueAxis, h = hx(s, u, l)
  32808. }
  32809. var d = "x" === u ? 0 : 1,
  32810. f = 1 - d,
  32811. p = i(r),
  32812. g = {};
  32813. p.type = null, p.coord = [], g.coord = [], p.coord[f] = -1 / 0, g.coord[f] = 1 / 0;
  32814. var m = o.get("precision");
  32815. m >= 0 && "number" == typeof h && (h = +h.toFixed(Math.min(m, 20))), p.coord[d] = g.coord[d] = h, r = [p, g, {
  32816. type: l,
  32817. valueIndex: r.valueIndex,
  32818. value: h
  32819. }]
  32820. }
  32821. return r = [ax(t, r[0]), ax(t, r[1]), a({}, r[2])], r[2].type = r[2].type || "", n(r[2], r[0]), n(r[2], r[1]), r
  32822. };
  32823. kO.extend({
  32824. type: "markLine",
  32825. updateTransform: function(t, e, i) {
  32826. e.eachSeries(function(t) {
  32827. var e = t.markLineModel;
  32828. if (e) {
  32829. var n = e.getData(),
  32830. o = e.__from,
  32831. a = e.__to;
  32832. o.each(function(e) {
  32833. mx(o, e, !0, t, i), mx(a, e, !1, t, i)
  32834. }), n.each(function(t) {
  32835. n.setItemLayout(t, [o.getItemLayout(t), a.getItemLayout(t)])
  32836. }), this.markerGroupMap.get(t.id).updateLayout()
  32837. }
  32838. }, this)
  32839. },
  32840. renderSeries: function(t, e, i, n) {
  32841. function o(e, i, o) {
  32842. var a = e.getItemModel(i);
  32843. mx(e, i, o, t, n), e.setItemVisual(i, {
  32844. symbolSize: a.get("symbolSize") || g[o ? 0 : 1],
  32845. symbol: a.get("symbol", !0) || p[o ? 0 : 1],
  32846. color: a.get("itemStyle.color") || s.getVisual("color")
  32847. })
  32848. }
  32849. var a = t.coordinateSystem,
  32850. r = t.id,
  32851. s = t.getData(),
  32852. l = this.markerGroupMap,
  32853. u = l.get(r) || l.set(r, new Jd);
  32854. this.group.add(u.group);
  32855. var h = vx(a, t, e),
  32856. c = h.from,
  32857. d = h.to,
  32858. f = h.line;
  32859. e.__from = c, e.__to = d, e.setData(f);
  32860. var p = e.get("symbol"),
  32861. g = e.get("symbolSize");
  32862. y(p) || (p = [p, p]), "number" == typeof g && (g = [g, g]), h.from.each(function(t) {
  32863. o(c, t, !0), o(d, t, !1)
  32864. }), f.each(function(t) {
  32865. var e = f.getItemModel(t).get("lineStyle.color");
  32866. f.setItemVisual(t, {
  32867. color: e || c.getItemVisual(t, "color")
  32868. }), f.setItemLayout(t, [c.getItemLayout(t), d.getItemLayout(t)]), f.setItemVisual(t, {
  32869. fromSymbolSize: c.getItemVisual(t, "symbolSize"),
  32870. fromSymbol: c.getItemVisual(t, "symbol"),
  32871. toSymbolSize: d.getItemVisual(t, "symbolSize"),
  32872. toSymbol: d.getItemVisual(t, "symbol")
  32873. })
  32874. }), u.updateData(f), h.line.eachItemGraphicEl(function(t, i) {
  32875. t.traverse(function(t) {
  32876. t.dataModel = e
  32877. })
  32878. }), u.__keep = !0, u.group.silent = e.get("silent") || t.get("silent")
  32879. }
  32880. }), Ls(function(t) {
  32881. t.markLine = t.markLine || {}
  32882. }), AO.extend({
  32883. type: "markArea",
  32884. defaultOption: {
  32885. zlevel: 0,
  32886. z: 1,
  32887. tooltip: {
  32888. trigger: "item"
  32889. },
  32890. animation: !1,
  32891. label: {
  32892. show: !0,
  32893. position: "top"
  32894. },
  32895. itemStyle: {
  32896. borderWidth: 0
  32897. },
  32898. emphasis: {
  32899. label: {
  32900. show: !0,
  32901. position: "top"
  32902. }
  32903. }
  32904. }
  32905. });
  32906. var NO = function(t, e, i, n) {
  32907. var a = ax(t, n[0]),
  32908. r = ax(t, n[1]),
  32909. s = T,
  32910. l = a.coord,
  32911. u = r.coord;
  32912. l[0] = s(l[0], -1 / 0), l[1] = s(l[1], -1 / 0), u[0] = s(u[0], 1 / 0), u[1] = s(u[1], 1 / 0);
  32913. var h = o([{}, a, r]);
  32914. return h.coord = [a.coord, r.coord], h.x0 = a.x, h.y0 = a.y, h.x1 = r.x, h.y1 = r.y, h
  32915. },
  32916. OO = [
  32917. ["x0", "y0"],
  32918. ["x1", "y0"],
  32919. ["x1", "y1"],
  32920. ["x0", "y1"]
  32921. ];
  32922. kO.extend({
  32923. type: "markArea",
  32924. updateTransform: function(t, e, i) {
  32925. e.eachSeries(function(t) {
  32926. var e = t.markAreaModel;
  32927. if (e) {
  32928. var n = e.getData();
  32929. n.each(function(e) {
  32930. var o = f(OO, function(o) {
  32931. return bx(n, e, o, t, i)
  32932. });
  32933. n.setItemLayout(e, o), n.getItemGraphicEl(e).setShape("points", o)
  32934. })
  32935. }
  32936. }, this)
  32937. },
  32938. renderSeries: function(t, e, i, n) {
  32939. var o = t.coordinateSystem,
  32940. a = t.id,
  32941. s = t.getData(),
  32942. l = this.markerGroupMap,
  32943. u = l.get(a) || l.set(a, {
  32944. group: new Zw
  32945. });
  32946. this.group.add(u.group), u.__keep = !0;
  32947. var h = Sx(o, t, e);
  32948. e.setData(h), h.each(function(e) {
  32949. h.setItemLayout(e, f(OO, function(i) {
  32950. return bx(h, e, i, t, n)
  32951. })), h.setItemVisual(e, {
  32952. color: s.getVisual("color")
  32953. })
  32954. }), h.diff(u.__data).add(function(t) {
  32955. var e = new nM({
  32956. shape: {
  32957. points: h.getItemLayout(t)
  32958. }
  32959. });
  32960. h.setItemGraphicEl(t, e), u.group.add(e)
  32961. }).update(function(t, i) {
  32962. var n = u.__data.getItemGraphicEl(i);
  32963. bo(n, {
  32964. shape: {
  32965. points: h.getItemLayout(t)
  32966. }
  32967. }, e, t), u.group.add(n), h.setItemGraphicEl(t, n)
  32968. }).remove(function(t) {
  32969. var e = u.__data.getItemGraphicEl(t);
  32970. u.group.remove(e)
  32971. }).execute(), h.eachItemGraphicEl(function(t, i) {
  32972. var n = h.getItemModel(i),
  32973. o = n.getModel("label"),
  32974. a = n.getModel("emphasis.label"),
  32975. s = h.getItemVisual(i, "color");
  32976. t.useStyle(r(n.getModel("itemStyle").getItemStyle(), {
  32977. fill: Ut(s, .4),
  32978. stroke: s
  32979. })), t.hoverStyle = n.getModel("emphasis.itemStyle").getItemStyle(), co(t.style, t.hoverStyle, o, a, {
  32980. labelFetcher: e,
  32981. labelDataIndex: i,
  32982. defaultText: h.getName(i) || "",
  32983. isRectText: !0,
  32984. autoColor: s
  32985. }), uo(t, {}), t.dataModel = e
  32986. }), u.__data = h, u.group.silent = e.get("silent") || t.get("silent")
  32987. }
  32988. }), Ls(function(t) {
  32989. t.markArea = t.markArea || {}
  32990. });
  32991. YM.registerSubTypeDefaulter("timeline", function() {
  32992. return "slider"
  32993. }), Ps({
  32994. type: "timelineChange",
  32995. event: "timelineChanged",
  32996. update: "prepareAndUpdate"
  32997. }, function(t, e) {
  32998. var i = e.getComponent("timeline");
  32999. return i && null != t.currentIndex && (i.setCurrentIndex(t.currentIndex), !i.get("loop", !0) && i.isIndexMax() &&
  33000. i.setPlayState(!1)), e.resetOption("timeline"), r({
  33001. currentIndex: i.option.currentIndex
  33002. }, t)
  33003. }), Ps({
  33004. type: "timelinePlayChange",
  33005. event: "timelinePlayChanged",
  33006. update: "update"
  33007. }, function(t, e) {
  33008. var i = e.getComponent("timeline");
  33009. i && null != t.playState && i.setPlayState(t.playState)
  33010. });
  33011. var EO = YM.extend({
  33012. type: "timeline",
  33013. layoutMode: "box",
  33014. defaultOption: {
  33015. zlevel: 0,
  33016. z: 4,
  33017. show: !0,
  33018. axisType: "time",
  33019. realtime: !0,
  33020. left: "20%",
  33021. top: null,
  33022. right: "20%",
  33023. bottom: 0,
  33024. width: null,
  33025. height: 40,
  33026. padding: 5,
  33027. controlPosition: "left",
  33028. autoPlay: !1,
  33029. rewind: !1,
  33030. loop: !0,
  33031. playInterval: 2e3,
  33032. currentIndex: 0,
  33033. itemStyle: {},
  33034. label: {
  33035. color: "#000"
  33036. },
  33037. data: []
  33038. },
  33039. init: function(t, e, i) {
  33040. this._data, this._names, this.mergeDefaultAndTheme(t, i), this._initData()
  33041. },
  33042. mergeOption: function(t) {
  33043. EO.superApply(this, "mergeOption", arguments), this._initData()
  33044. },
  33045. setCurrentIndex: function(t) {
  33046. null == t && (t = this.option.currentIndex);
  33047. var e = this._data.count();
  33048. this.option.loop ? t = (t % e + e) % e : (t >= e && (t = e - 1), t < 0 && (t = 0)), this.option.currentIndex = t
  33049. },
  33050. getCurrentIndex: function() {
  33051. return this.option.currentIndex
  33052. },
  33053. isIndexMax: function() {
  33054. return this.getCurrentIndex() >= this._data.count() - 1
  33055. },
  33056. setPlayState: function(t) {
  33057. this.option.autoPlay = !!t
  33058. },
  33059. getPlayState: function() {
  33060. return !!this.option.autoPlay
  33061. },
  33062. _initData: function() {
  33063. var t = this.option,
  33064. e = t.data || [],
  33065. n = t.axisType,
  33066. o = this._names = [];
  33067. if ("category" === n) {
  33068. var a = [];
  33069. d(e, function(t, e) {
  33070. var n, r = Li(t);
  33071. w(t) ? (n = i(t)).value = e : n = e, a.push(n), _(r) || null != r && !isNaN(r) || (r = ""), o.push(r + "")
  33072. }), e = a
  33073. }
  33074. var r = {
  33075. category: "ordinal",
  33076. time: "time"
  33077. } [n] || "number";
  33078. (this._data = new eA([{
  33079. name: "value",
  33080. type: r
  33081. }], this)).initData(e, o)
  33082. },
  33083. getData: function() {
  33084. return this._data
  33085. },
  33086. getCategories: function() {
  33087. if ("category" === this.get("axisType")) return this._names.slice()
  33088. }
  33089. });
  33090. h(EO.extend({
  33091. type: "timeline.slider",
  33092. defaultOption: {
  33093. backgroundColor: "rgba(0,0,0,0)",
  33094. borderColor: "#ccc",
  33095. borderWidth: 0,
  33096. orient: "horizontal",
  33097. inverse: !1,
  33098. tooltip: {
  33099. trigger: "item"
  33100. },
  33101. symbol: "emptyCircle",
  33102. symbolSize: 10,
  33103. lineStyle: {
  33104. show: !0,
  33105. width: 2,
  33106. color: "#304654"
  33107. },
  33108. label: {
  33109. position: "auto",
  33110. show: !0,
  33111. interval: "auto",
  33112. rotate: 0,
  33113. color: "#304654"
  33114. },
  33115. itemStyle: {
  33116. color: "#304654",
  33117. borderWidth: 1
  33118. },
  33119. checkpointStyle: {
  33120. symbol: "circle",
  33121. symbolSize: 13,
  33122. color: "#c23531",
  33123. borderWidth: 5,
  33124. borderColor: "rgba(194,53,49, 0.5)",
  33125. animation: !0,
  33126. animationDuration: 300,
  33127. animationEasing: "quinticInOut"
  33128. },
  33129. controlStyle: {
  33130. show: !0,
  33131. showPlayBtn: !0,
  33132. showPrevBtn: !0,
  33133. showNextBtn: !0,
  33134. itemSize: 22,
  33135. itemGap: 12,
  33136. position: "left",
  33137. 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",
  33138. 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",
  33139. 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",
  33140. 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",
  33141. color: "#304654",
  33142. borderColor: "#304654",
  33143. borderWidth: 1
  33144. },
  33145. emphasis: {
  33146. label: {
  33147. show: !0,
  33148. color: "#c23531"
  33149. },
  33150. itemStyle: {
  33151. color: "#c23531"
  33152. },
  33153. controlStyle: {
  33154. color: "#c23531",
  33155. borderColor: "#c23531",
  33156. borderWidth: 2
  33157. }
  33158. },
  33159. data: []
  33160. }
  33161. }), LI);
  33162. var RO = EI.extend({
  33163. type: "timeline"
  33164. }),
  33165. zO = function(t, e, i, n) {
  33166. HA.call(this, t, e, i), this.type = n || "value", this.model = null
  33167. };
  33168. zO.prototype = {
  33169. constructor: zO,
  33170. getLabelModel: function() {
  33171. return this.model.getModel("label")
  33172. },
  33173. isHorizontal: function() {
  33174. return "horizontal" === this.model.get("orient")
  33175. }
  33176. }, u(zO, HA);
  33177. var BO = m,
  33178. VO = d,
  33179. GO = Math.PI;
  33180. RO.extend({
  33181. type: "timeline.slider",
  33182. init: function(t, e) {
  33183. this.api = e, this._axis, this._viewRect, this._timer, this._currentPointer, this._mainGroup, this._labelGroup
  33184. },
  33185. render: function(t, e, i, n) {
  33186. if (this.model = t, this.api = i, this.ecModel = e, this.group.removeAll(), t.get("show", !0)) {
  33187. var o = this._layout(t, i),
  33188. a = this._createGroup("mainGroup"),
  33189. r = this._createGroup("labelGroup"),
  33190. s = this._axis = this._createAxis(o, t);
  33191. t.formatTooltip = function(t) {
  33192. return Qo(s.scale.getLabel(t))
  33193. }, VO(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(e) {
  33194. this["_render" + e](o, a, s, t)
  33195. }, this), this._renderAxisLabel(o, r, s, t), this._position(o, t)
  33196. }
  33197. this._doPlayStop()
  33198. },
  33199. remove: function() {
  33200. this._clearTimer(), this.group.removeAll()
  33201. },
  33202. dispose: function() {
  33203. this._clearTimer()
  33204. },
  33205. _layout: function(t, e) {
  33206. var i = t.get("label.position"),
  33207. n = t.get("orient"),
  33208. o = Ax(t, e);
  33209. null == i || "auto" === i ? i = "horizontal" === n ? o.y + o.height / 2 < e.getHeight() / 2 ? "-" : "+" : o.x +
  33210. o.width / 2 < e.getWidth() / 2 ? "+" : "-" : isNaN(i) && (i = {
  33211. horizontal: {
  33212. top: "-",
  33213. bottom: "+"
  33214. },
  33215. vertical: {
  33216. left: "-",
  33217. right: "+"
  33218. }
  33219. } [n][i]);
  33220. var a = {
  33221. horizontal: "center",
  33222. vertical: i >= 0 || "+" === i ? "left" : "right"
  33223. },
  33224. r = {
  33225. horizontal: i >= 0 || "+" === i ? "top" : "bottom",
  33226. vertical: "middle"
  33227. },
  33228. s = {
  33229. horizontal: 0,
  33230. vertical: GO / 2
  33231. },
  33232. l = "vertical" === n ? o.height : o.width,
  33233. u = t.getModel("controlStyle"),
  33234. h = u.get("show", !0),
  33235. c = h ? u.get("itemSize") : 0,
  33236. d = h ? u.get("itemGap") : 0,
  33237. f = c + d,
  33238. p = t.get("label.rotate") || 0;
  33239. p = p * GO / 180;
  33240. var g, m, v, y, x = u.get("position", !0),
  33241. _ = h && u.get("showPlayBtn", !0),
  33242. w = h && u.get("showPrevBtn", !0),
  33243. b = h && u.get("showNextBtn", !0),
  33244. S = 0,
  33245. M = l;
  33246. return "left" === x || "bottom" === x ? (_ && (g = [0, 0], S += f), w && (m = [S, 0], S += f), b && (v = [M - c,
  33247. 0
  33248. ], M -= f)) : (_ && (g = [M - c, 0], M -= f), w && (m = [0, 0], S += f), b && (v = [M - c, 0], M -= f)), y = [S,
  33249. M
  33250. ], t.get("inverse") && y.reverse(), {
  33251. viewRect: o,
  33252. mainLength: l,
  33253. orient: n,
  33254. rotation: s[n],
  33255. labelRotation: p,
  33256. labelPosOpt: i,
  33257. labelAlign: t.get("label.align") || a[n],
  33258. labelBaseline: t.get("label.verticalAlign") || t.get("label.baseline") || r[n],
  33259. playPosition: g,
  33260. prevBtnPosition: m,
  33261. nextBtnPosition: v,
  33262. axisExtent: y,
  33263. controlSize: c,
  33264. controlGap: d
  33265. }
  33266. },
  33267. _position: function(t, e) {
  33268. function i(t) {
  33269. var e = t.position;
  33270. t.origin = [c[0][0] - e[0], c[1][0] - e[1]]
  33271. }
  33272. function n(t) {
  33273. return [
  33274. [t.x, t.x + t.width],
  33275. [t.y, t.y + t.height]
  33276. ]
  33277. }
  33278. function o(t, e, i, n, o) {
  33279. t[n] += i[n][o] - e[n][o]
  33280. }
  33281. var a = this._mainGroup,
  33282. r = this._labelGroup,
  33283. s = t.viewRect;
  33284. if ("vertical" === t.orient) {
  33285. var l = mt(),
  33286. u = s.x,
  33287. h = s.y + s.height;
  33288. _t(l, l, [-u, -h]), wt(l, l, -GO / 2), _t(l, l, [u, h]), (s = s.clone()).applyTransform(l)
  33289. }
  33290. var c = n(s),
  33291. d = n(a.getBoundingRect()),
  33292. f = n(r.getBoundingRect()),
  33293. p = a.position,
  33294. g = r.position;
  33295. g[0] = p[0] = c[0][0];
  33296. var m = t.labelPosOpt;
  33297. if (isNaN(m)) o(p, d, c, 1, v = "+" === m ? 0 : 1), o(g, f, c, 1, 1 - v);
  33298. else {
  33299. var v = m >= 0 ? 0 : 1;
  33300. o(p, d, c, 1, v), g[1] = p[1] + m
  33301. }
  33302. a.attr("position", p), r.attr("position", g), a.rotation = r.rotation = t.rotation, i(a), i(r)
  33303. },
  33304. _createAxis: function(t, e) {
  33305. var i = e.getData(),
  33306. n = e.get("axisType"),
  33307. o = Vl(e, n);
  33308. o.getTicks = function() {
  33309. return i.mapArray(["value"], function(t) {
  33310. return t
  33311. })
  33312. };
  33313. var a = i.getDataExtent("value");
  33314. o.setExtent(a[0], a[1]), o.niceTicks();
  33315. var r = new zO("value", o, t.axisExtent, n);
  33316. return r.model = e, r
  33317. },
  33318. _createGroup: function(t) {
  33319. var e = this["_" + t] = new Zw;
  33320. return this.group.add(e), e
  33321. },
  33322. _renderAxisLine: function(t, e, i, n) {
  33323. var o = i.getExtent();
  33324. n.get("lineStyle.show") && e.add(new rM({
  33325. shape: {
  33326. x1: o[0],
  33327. y1: 0,
  33328. x2: o[1],
  33329. y2: 0
  33330. },
  33331. style: a({
  33332. lineCap: "round"
  33333. }, n.getModel("lineStyle").getLineStyle()),
  33334. silent: !0,
  33335. z2: 1
  33336. }))
  33337. },
  33338. _renderAxisTick: function(t, e, i, n) {
  33339. var o = n.getData(),
  33340. a = i.scale.getTicks();
  33341. VO(a, function(t) {
  33342. var a = i.dataToCoord(t),
  33343. r = o.getItemModel(t),
  33344. s = r.getModel("itemStyle"),
  33345. l = r.getModel("emphasis.itemStyle"),
  33346. u = {
  33347. position: [a, 0],
  33348. onclick: BO(this._changeTimeline, this, t)
  33349. },
  33350. h = Cx(r, s, e, u);
  33351. uo(h, l.getItemStyle()), r.get("tooltip") ? (h.dataIndex = t, h.dataModel = n) : h.dataIndex = h.dataModel =
  33352. null
  33353. }, this)
  33354. },
  33355. _renderAxisLabel: function(t, e, i, n) {
  33356. if (i.getLabelModel().get("show")) {
  33357. var o = n.getData(),
  33358. a = i.getViewLabels();
  33359. VO(a, function(n) {
  33360. var a = n.tickValue,
  33361. r = o.getItemModel(a),
  33362. s = r.getModel("label"),
  33363. l = r.getModel("emphasis.label"),
  33364. u = i.dataToCoord(n.tickValue),
  33365. h = new qS({
  33366. position: [u, 0],
  33367. rotation: t.labelRotation - t.rotation,
  33368. onclick: BO(this._changeTimeline, this, a),
  33369. silent: !1
  33370. });
  33371. fo(h.style, s, {
  33372. text: n.formattedLabel,
  33373. textAlign: t.labelAlign,
  33374. textVerticalAlign: t.labelBaseline
  33375. }), e.add(h), uo(h, fo({}, l))
  33376. }, this)
  33377. }
  33378. },
  33379. _renderControl: function(t, e, i, n) {
  33380. function o(t, i, o, h) {
  33381. if (t) {
  33382. var c = Dx(n, i, u, {
  33383. position: t,
  33384. origin: [a / 2, 0],
  33385. rotation: h ? -r : 0,
  33386. rectHover: !0,
  33387. style: s,
  33388. onclick: o
  33389. });
  33390. e.add(c), uo(c, l)
  33391. }
  33392. }
  33393. var a = t.controlSize,
  33394. r = t.rotation,
  33395. s = n.getModel("controlStyle").getItemStyle(),
  33396. l = n.getModel("emphasis.controlStyle").getItemStyle(),
  33397. u = [0, -a / 2, a, a],
  33398. h = n.getPlayState(),
  33399. c = n.get("inverse", !0);
  33400. o(t.nextBtnPosition, "controlStyle.nextIcon", BO(this._changeTimeline, this, c ? "-" : "+")), o(t.prevBtnPosition,
  33401. "controlStyle.prevIcon", BO(this._changeTimeline, this, c ? "+" : "-")), o(t.playPosition, "controlStyle." + (
  33402. h ? "stopIcon" : "playIcon"), BO(this._handlePlayClick, this, !h), !0)
  33403. },
  33404. _renderCurrentPointer: function(t, e, i, n) {
  33405. var o = n.getData(),
  33406. a = n.getCurrentIndex(),
  33407. r = o.getItemModel(a).getModel("checkpointStyle"),
  33408. s = this,
  33409. l = {
  33410. onCreate: function(t) {
  33411. t.draggable = !0, t.drift = BO(s._handlePointerDrag, s), t.ondragend = BO(s._handlePointerDragend, s), Lx(t,
  33412. a, i, n, !0)
  33413. },
  33414. onUpdate: function(t) {
  33415. Lx(t, a, i, n)
  33416. }
  33417. };
  33418. this._currentPointer = Cx(r, r, this._mainGroup, {}, this._currentPointer, l)
  33419. },
  33420. _handlePlayClick: function(t) {
  33421. this._clearTimer(), this.api.dispatchAction({
  33422. type: "timelinePlayChange",
  33423. playState: t,
  33424. from: this.uid
  33425. })
  33426. },
  33427. _handlePointerDrag: function(t, e, i) {
  33428. this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY])
  33429. },
  33430. _handlePointerDragend: function(t) {
  33431. this._pointerChangeTimeline([t.offsetX, t.offsetY], !0)
  33432. },
  33433. _pointerChangeTimeline: function(t, e) {
  33434. var i = this._toAxisCoord(t)[0],
  33435. n = Bo(this._axis.getExtent().slice());
  33436. i > n[1] && (i = n[1]), i < n[0] && (i = n[0]), this._currentPointer.position[0] = i, this._currentPointer.dirty();
  33437. var o = this._findNearestTick(i),
  33438. a = this.model;
  33439. (e || o !== a.getCurrentIndex() && a.get("realtime")) && this._changeTimeline(o)
  33440. },
  33441. _doPlayStop: function() {
  33442. this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(BO(function() {
  33443. var t = this.model;
  33444. this._changeTimeline(t.getCurrentIndex() + (t.get("rewind", !0) ? -1 : 1))
  33445. }, this), this.model.get("playInterval")))
  33446. },
  33447. _toAxisCoord: function(t) {
  33448. return Io(t, this._mainGroup.getLocalTransform(), !0)
  33449. },
  33450. _findNearestTick: function(t) {
  33451. var e, i = this.model.getData(),
  33452. n = 1 / 0,
  33453. o = this._axis;
  33454. return i.each(["value"], function(i, a) {
  33455. var r = o.dataToCoord(i),
  33456. s = Math.abs(r - t);
  33457. s < n && (n = s, e = a)
  33458. }), e
  33459. },
  33460. _clearTimer: function() {
  33461. this._timer && (clearTimeout(this._timer), this._timer = null)
  33462. },
  33463. _changeTimeline: function(t) {
  33464. var e = this.model.getCurrentIndex();
  33465. "+" === t ? t = e + 1 : "-" === t && (t = e - 1), this.api.dispatchAction({
  33466. type: "timelineChange",
  33467. currentIndex: t,
  33468. from: this.uid
  33469. })
  33470. }
  33471. }), Ls(function(t) {
  33472. var e = t && t.timeline;
  33473. y(e) || (e = e ? [e] : []), d(e, function(t) {
  33474. t && Mx(t)
  33475. })
  33476. });
  33477. var FO = Bs({
  33478. type: "toolbox",
  33479. layoutMode: {
  33480. type: "box",
  33481. ignoreSize: !0
  33482. },
  33483. optionUpdated: function() {
  33484. FO.superApply(this, "optionUpdated", arguments), d(this.option.feature, function(t, e) {
  33485. var i = xy(e);
  33486. i && n(t, i.defaultOption)
  33487. })
  33488. },
  33489. defaultOption: {
  33490. show: !0,
  33491. z: 6,
  33492. zlevel: 0,
  33493. orient: "horizontal",
  33494. left: "right",
  33495. top: "top",
  33496. backgroundColor: "transparent",
  33497. borderColor: "#ccc",
  33498. borderRadius: 0,
  33499. borderWidth: 0,
  33500. padding: 5,
  33501. itemSize: 15,
  33502. itemGap: 8,
  33503. showTitle: !0,
  33504. iconStyle: {
  33505. borderColor: "#666",
  33506. color: "none"
  33507. },
  33508. emphasis: {
  33509. iconStyle: {
  33510. borderColor: "#3E98C5"
  33511. }
  33512. }
  33513. }
  33514. });
  33515. Vs({
  33516. type: "toolbox",
  33517. render: function(t, e, i, n) {
  33518. function o(o, r) {
  33519. var s, c = h[o],
  33520. d = h[r],
  33521. f = new Lo(l[c], t, t.ecModel);
  33522. if (c && !d) {
  33523. if (kx(c)) s = {
  33524. model: f,
  33525. onclick: f.option.onclick,
  33526. featureName: c
  33527. };
  33528. else {
  33529. var p = xy(c);
  33530. if (!p) return;
  33531. s = new p(f, e, i)
  33532. }
  33533. u[c] = s
  33534. } else {
  33535. if (!(s = u[d])) return;
  33536. s.model = f, s.ecModel = e, s.api = i
  33537. }
  33538. c || !d ? f.get("show") && !s.unusable ? (a(f, s, c), f.setIconStatus = function(t, e) {
  33539. var i = this.option,
  33540. n = this.iconPaths;
  33541. i.iconStatus = i.iconStatus || {}, i.iconStatus[t] = e, n[t] && n[t].trigger(e)
  33542. }, s.render && s.render(f, e, i, n)) : s.remove && s.remove(e, i) : s.dispose && s.dispose(e, i)
  33543. }
  33544. function a(n, o, a) {
  33545. var l = n.getModel("iconStyle"),
  33546. u = n.getModel("emphasis.iconStyle"),
  33547. h = o.getIcons ? o.getIcons() : n.get("icon"),
  33548. c = n.get("title") || {};
  33549. if ("string" == typeof h) {
  33550. var f = h,
  33551. p = c;
  33552. c = {}, (h = {})[a] = f, c[a] = p
  33553. }
  33554. var g = n.iconPaths = {};
  33555. d(h, function(a, h) {
  33556. var d = Co(a, {}, {
  33557. x: -s / 2,
  33558. y: -s / 2,
  33559. width: s,
  33560. height: s
  33561. });
  33562. d.setStyle(l.getItemStyle()), d.hoverStyle = u.getItemStyle(), uo(d), t.get("showTitle") && (d.__title = c[h],
  33563. d.on("mouseover", function() {
  33564. var t = u.getItemStyle();
  33565. d.setStyle({
  33566. text: c[h],
  33567. textPosition: t.textPosition || "bottom",
  33568. textFill: t.fill || t.stroke || "#000",
  33569. textAlign: t.textAlign || "center"
  33570. })
  33571. }).on("mouseout", function() {
  33572. d.setStyle({
  33573. textFill: null
  33574. })
  33575. })), d.trigger(n.get("iconStatus." + h) || "normal"), r.add(d), d.on("click", m(o.onclick, o, e, i, h)), g[
  33576. h] = d
  33577. })
  33578. }
  33579. var r = this.group;
  33580. if (r.removeAll(), t.get("show")) {
  33581. var s = +t.get("itemSize"),
  33582. l = t.get("feature") || {},
  33583. u = this._features || (this._features = {}),
  33584. h = [];
  33585. d(l, function(t, e) {
  33586. h.push(e)
  33587. }), new Hs(this._featureNames || [], h).add(o).update(o).remove(v(o, null)).execute(), this._featureNames = h,
  33588. dv(r, t, i), r.add(fv(r.getBoundingRect(), t)), r.eachChild(function(t) {
  33589. var e = t.__title,
  33590. n = t.hoverStyle;
  33591. if (n && e) {
  33592. var o = De(e, He(n)),
  33593. a = t.position[0] + r.position[0],
  33594. l = !1;
  33595. t.position[1] + r.position[1] + s + o.height > i.getHeight() && (n.textPosition = "top", l = !0);
  33596. var u = l ? -5 - o.height : s + 8;
  33597. a + o.width / 2 > i.getWidth() ? (n.textPosition = ["100%", u], n.textAlign = "right") : a - o.width / 2 <
  33598. 0 && (n.textPosition = [0, u], n.textAlign = "left")
  33599. }
  33600. })
  33601. }
  33602. },
  33603. updateView: function(t, e, i, n) {
  33604. d(this._features, function(t) {
  33605. t.updateView && t.updateView(t.model, e, i, n)
  33606. })
  33607. },
  33608. remove: function(t, e) {
  33609. d(this._features, function(i) {
  33610. i.remove && i.remove(t, e)
  33611. }), this.group.removeAll()
  33612. },
  33613. dispose: function(t, e) {
  33614. d(this._features, function(i) {
  33615. i.dispose && i.dispose(t, e)
  33616. })
  33617. }
  33618. });
  33619. var WO = XI.toolbox.saveAsImage;
  33620. Px.defaultOption = {
  33621. show: !0,
  33622. 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",
  33623. title: WO.title,
  33624. type: "png",
  33625. name: "",
  33626. excludeComponents: ["toolbox"],
  33627. pixelRatio: 1,
  33628. lang: WO.lang.slice()
  33629. }, Px.prototype.unusable = !z_.canvasSupported, Px.prototype.onclick = function(t, e) {
  33630. var i = this.model,
  33631. n = i.get("name") || t.get("title.0.text") || "echarts",
  33632. o = document.createElement("a"),
  33633. a = i.get("type", !0) || "png";
  33634. o.download = n + "." + a, o.target = "_blank";
  33635. var r = e.getConnectedDataURL({
  33636. type: a,
  33637. backgroundColor: i.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff",
  33638. excludeComponents: i.get("excludeComponents"),
  33639. pixelRatio: i.get("pixelRatio")
  33640. });
  33641. if (o.href = r, "function" != typeof MouseEvent || z_.browser.ie || z_.browser.edge)
  33642. if (window.navigator.msSaveOrOpenBlob) {
  33643. for (var s = atob(r.split(",")[1]), l = s.length, u = new Uint8Array(l); l--;) u[l] = s.charCodeAt(l);
  33644. var h = new Blob([u]);
  33645. window.navigator.msSaveOrOpenBlob(h, n + "." + a)
  33646. } else {
  33647. var c = i.get("lang"),
  33648. d = '<body style="margin:0;"><img src="' + r + '" style="max-width:100%;" title="' + (c && c[0] || "") +
  33649. '" /></body>';
  33650. window.open().document.write(d)
  33651. }
  33652. else {
  33653. var f = new MouseEvent("click", {
  33654. view: window,
  33655. bubbles: !0,
  33656. cancelable: !1
  33657. });
  33658. o.dispatchEvent(f)
  33659. }
  33660. }, yy("saveAsImage", Px);
  33661. var HO = XI.toolbox.magicType;
  33662. Nx.defaultOption = {
  33663. show: !0,
  33664. type: [],
  33665. icon: {
  33666. line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
  33667. bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
  33668. 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",
  33669. tiled: "M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"
  33670. },
  33671. title: i(HO.title),
  33672. option: {},
  33673. seriesIndex: {}
  33674. };
  33675. var ZO = Nx.prototype;
  33676. ZO.getIcons = function() {
  33677. var t = this.model,
  33678. e = t.get("icon"),
  33679. i = {};
  33680. return d(t.get("type"), function(t) {
  33681. e[t] && (i[t] = e[t])
  33682. }), i
  33683. };
  33684. var UO = {
  33685. line: function(t, e, i, o) {
  33686. if ("bar" === t) return n({
  33687. id: e,
  33688. type: "line",
  33689. data: i.get("data"),
  33690. stack: i.get("stack"),
  33691. markPoint: i.get("markPoint"),
  33692. markLine: i.get("markLine")
  33693. }, o.get("option.line") || {}, !0)
  33694. },
  33695. bar: function(t, e, i, o) {
  33696. if ("line" === t) return n({
  33697. id: e,
  33698. type: "bar",
  33699. data: i.get("data"),
  33700. stack: i.get("stack"),
  33701. markPoint: i.get("markPoint"),
  33702. markLine: i.get("markLine")
  33703. }, o.get("option.bar") || {}, !0)
  33704. },
  33705. stack: function(t, e, i, o) {
  33706. if ("line" === t || "bar" === t) return n({
  33707. id: e,
  33708. stack: "__ec_magicType_stack__"
  33709. }, o.get("option.stack") || {}, !0)
  33710. },
  33711. tiled: function(t, e, i, o) {
  33712. if ("line" === t || "bar" === t) return n({
  33713. id: e,
  33714. stack: ""
  33715. }, o.get("option.tiled") || {}, !0)
  33716. }
  33717. },
  33718. XO = [
  33719. ["line", "bar"],
  33720. ["stack", "tiled"]
  33721. ];
  33722. ZO.onclick = function(t, e, i) {
  33723. var n = this.model,
  33724. o = n.get("seriesIndex." + i);
  33725. if (UO[i]) {
  33726. var a = {
  33727. series: []
  33728. };
  33729. d(XO, function(t) {
  33730. l(t, i) >= 0 && d(t, function(t) {
  33731. n.setIconStatus(t, "normal")
  33732. })
  33733. }), n.setIconStatus(i, "emphasis"), t.eachComponent({
  33734. mainType: "series",
  33735. query: null == o ? null : {
  33736. seriesIndex: o
  33737. }
  33738. }, function(e) {
  33739. var o = e.subType,
  33740. s = e.id,
  33741. l = UO[i](o, s, e, n);
  33742. l && (r(l, e.option), a.series.push(l));
  33743. var u = e.coordinateSystem;
  33744. if (u && "cartesian2d" === u.type && ("line" === i || "bar" === i)) {
  33745. var h = u.getAxesByScale("ordinal")[0];
  33746. if (h) {
  33747. var c = h.dim + "Axis",
  33748. d = t.queryComponents({
  33749. mainType: c,
  33750. index: e.get(name + "Index"),
  33751. id: e.get(name + "Id")
  33752. })[0].componentIndex;
  33753. a[c] = a[c] || [];
  33754. for (var f = 0; f <= d; f++) a[c][d] = a[c][d] || {};
  33755. a[c][d].boundaryGap = "bar" === i
  33756. }
  33757. }
  33758. }), e.dispatchAction({
  33759. type: "changeMagicType",
  33760. currentType: i,
  33761. newOption: a
  33762. })
  33763. }
  33764. }, Ps({
  33765. type: "changeMagicType",
  33766. event: "magicTypeChanged",
  33767. update: "prepareAndUpdate"
  33768. }, function(t, e) {
  33769. e.mergeOption(t.newOption)
  33770. }), yy("magicType", Nx);
  33771. var jO = XI.toolbox.dataView,
  33772. YO = new Array(60).join("-"),
  33773. qO = "\t",
  33774. KO = new RegExp("[" + qO + "]+", "g");
  33775. Hx.defaultOption = {
  33776. show: !0,
  33777. readOnly: !1,
  33778. optionToContent: null,
  33779. contentToOption: null,
  33780. 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",
  33781. title: i(jO.title),
  33782. lang: i(jO.lang),
  33783. backgroundColor: "#fff",
  33784. textColor: "#000",
  33785. textareaColor: "#fff",
  33786. textareaBorderColor: "#333",
  33787. buttonColor: "#c23531",
  33788. buttonTextColor: "#fff"
  33789. }, Hx.prototype.onclick = function(t, e) {
  33790. function i() {
  33791. n.removeChild(a), x._dom = null
  33792. }
  33793. var n = e.getDom(),
  33794. o = this.model;
  33795. this._dom && n.removeChild(this._dom);
  33796. var a = document.createElement("div");
  33797. a.style.cssText = "position:absolute;left:5px;top:5px;bottom:5px;right:5px;", a.style.backgroundColor = o.get(
  33798. "backgroundColor") || "#fff";
  33799. var r = document.createElement("h4"),
  33800. s = o.get("lang") || [];
  33801. r.innerHTML = s[0] || o.get("title"), r.style.cssText = "margin: 10px 20px;", r.style.color = o.get("textColor");
  33802. var l = document.createElement("div"),
  33803. u = document.createElement("textarea");
  33804. l.style.cssText = "display:block;width:100%;overflow:auto;";
  33805. var h = o.get("optionToContent"),
  33806. c = o.get("contentToOption"),
  33807. d = zx(t);
  33808. if ("function" == typeof h) {
  33809. var f = h(e.getOption());
  33810. "string" == typeof f ? l.innerHTML = f : M(f) && l.appendChild(f)
  33811. } else l.appendChild(u), u.readOnly = o.get("readOnly"), u.style.cssText =
  33812. "width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;", u.style.color = o.get(
  33813. "textColor"), u.style.borderColor = o.get("textareaBorderColor"), u.style.backgroundColor = o.get("textareaColor"),
  33814. u.value = d.value;
  33815. var p = d.meta,
  33816. g = document.createElement("div");
  33817. g.style.cssText = "position:absolute;bottom:0;left:0;right:0;";
  33818. var m = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",
  33819. v = document.createElement("div"),
  33820. y = document.createElement("div");
  33821. m += ";background-color:" + o.get("buttonColor"), m += ";color:" + o.get("buttonTextColor");
  33822. var x = this;
  33823. ut(v, "click", i), ut(y, "click", function() {
  33824. var t;
  33825. try {
  33826. t = "function" == typeof c ? c(l, e.getOption()) : Wx(u.value, p)
  33827. } catch (t) {
  33828. throw i(), new Error("Data view format error " + t)
  33829. }
  33830. t && e.dispatchAction({
  33831. type: "changeDataView",
  33832. newOption: t
  33833. }), i()
  33834. }), v.innerHTML = s[1], y.innerHTML = s[2], y.style.cssText = m, v.style.cssText = m, !o.get("readOnly") && g.appendChild(
  33835. y), g.appendChild(v), ut(u, "keydown", function(t) {
  33836. if (9 === (t.keyCode || t.which)) {
  33837. var e = this.value,
  33838. i = this.selectionStart,
  33839. n = this.selectionEnd;
  33840. this.value = e.substring(0, i) + qO + e.substring(n), this.selectionStart = this.selectionEnd = i + 1, lw(t)
  33841. }
  33842. }), a.appendChild(r), a.appendChild(l), a.appendChild(g), l.style.height = n.clientHeight - 80 + "px", n.appendChild(
  33843. a), this._dom = a
  33844. }, Hx.prototype.remove = function(t, e) {
  33845. this._dom && e.getDom().removeChild(this._dom)
  33846. }, Hx.prototype.dispose = function(t, e) {
  33847. this.remove(t, e)
  33848. }, yy("dataView", Hx), Ps({
  33849. type: "changeDataView",
  33850. event: "dataViewChanged",
  33851. update: "prepareAndUpdate"
  33852. }, function(t, e) {
  33853. var i = [];
  33854. d(t.newOption.series, function(t) {
  33855. var n = e.getSeriesByName(t.name)[0];
  33856. if (n) {
  33857. var o = n.get("data");
  33858. i.push({
  33859. name: t.name,
  33860. data: Zx(t.data, o)
  33861. })
  33862. } else i.push(a({
  33863. type: "scatter"
  33864. }, t))
  33865. }), e.mergeOption(r({
  33866. series: i
  33867. }, t.newOption))
  33868. });
  33869. var $O = d,
  33870. JO = "\0_ec_hist_store";
  33871. BN.extend({
  33872. type: "dataZoom.select"
  33873. }), VN.extend({
  33874. type: "dataZoom.select"
  33875. });
  33876. var QO = XI.toolbox.dataZoom,
  33877. tE = d,
  33878. eE = "\0_ec_\0toolbox-dataZoom_";
  33879. Kx.defaultOption = {
  33880. show: !0,
  33881. icon: {
  33882. zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
  33883. back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
  33884. },
  33885. title: i(QO.title)
  33886. };
  33887. var iE = Kx.prototype;
  33888. iE.render = function(t, e, i, n) {
  33889. this.model = t, this.ecModel = e, this.api = i, Qx(t, e, this, n, i), Jx(t, e)
  33890. }, iE.onclick = function(t, e, i) {
  33891. nE[i].call(this)
  33892. }, iE.remove = function(t, e) {
  33893. this._brushController.unmount()
  33894. }, iE.dispose = function(t, e) {
  33895. this._brushController.dispose()
  33896. };
  33897. var nE = {
  33898. zoom: function() {
  33899. var t = !this._isZoomActive;
  33900. this.api.dispatchAction({
  33901. type: "takeGlobalCursor",
  33902. key: "dataZoomSelect",
  33903. dataZoomSelectActive: t
  33904. })
  33905. },
  33906. back: function() {
  33907. this._dispatchZoomAction(Xx(this.ecModel))
  33908. }
  33909. };
  33910. iE._onBrush = function(t, e) {
  33911. function i(t, e, i) {
  33912. var r = e.getAxis(t),
  33913. s = r.model,
  33914. l = n(t, s, a),
  33915. u = l.findRepresentativeAxisProxy(s).getMinMaxSpan();
  33916. null == u.minValueSpan && null == u.maxValueSpan || (i = EL(0, i.slice(), r.scale.getExtent(), 0, u.minValueSpan,
  33917. u.maxValueSpan)), l && (o[l.id] = {
  33918. dataZoomId: l.id,
  33919. startValue: i[0],
  33920. endValue: i[1]
  33921. })
  33922. }
  33923. function n(t, e, i) {
  33924. var n;
  33925. return i.eachComponent({
  33926. mainType: "dataZoom",
  33927. subType: "select"
  33928. }, function(i) {
  33929. i.getAxisModel(t, e.componentIndex) && (n = i)
  33930. }), n
  33931. }
  33932. if (e.isEnd && t.length) {
  33933. var o = {},
  33934. a = this.ecModel;
  33935. this._brushController.updateCovers([]), new iy($x(this.model.option), a, {
  33936. include: ["grid"]
  33937. }).matchOutputRanges(t, a, function(t, e, n) {
  33938. if ("cartesian2d" === n.type) {
  33939. var o = t.brushType;
  33940. "rect" === o ? (i("x", n, e[0]), i("y", n, e[1])) : i({
  33941. lineX: "x",
  33942. lineY: "y"
  33943. } [o], n, e)
  33944. }
  33945. }), Ux(a, o), this._dispatchZoomAction(o)
  33946. }
  33947. }, iE._dispatchZoomAction = function(t) {
  33948. var e = [];
  33949. tE(t, function(t, n) {
  33950. e.push(i(t))
  33951. }), e.length && this.api.dispatchAction({
  33952. type: "dataZoom",
  33953. from: this.uid,
  33954. batch: e
  33955. })
  33956. }, yy("dataZoom", Kx), Ls(function(t) {
  33957. function e(t, e) {
  33958. if (e) {
  33959. var o = t + "Index",
  33960. a = e[o];
  33961. null == a || "all" === a || y(a) || (a = !1 === a || "none" === a ? [] : [a]), i(t, function(e, i) {
  33962. if (null == a || "all" === a || -1 !== l(a, i)) {
  33963. var r = {
  33964. type: "select",
  33965. $fromToolbox: !0,
  33966. id: eE + t + i
  33967. };
  33968. r[o] = i, n.push(r)
  33969. }
  33970. })
  33971. }
  33972. }
  33973. function i(e, i) {
  33974. var n = t[e];
  33975. y(n) || (n = n ? [n] : []), tE(n, i)
  33976. }
  33977. if (t) {
  33978. var n = t.dataZoom || (t.dataZoom = []);
  33979. y(n) || (t.dataZoom = n = [n]);
  33980. var o = t.toolbox;
  33981. if (o && (y(o) && (o = o[0]), o && o.feature)) {
  33982. var a = o.feature.dataZoom;
  33983. e("xAxis", a), e("yAxis", a)
  33984. }
  33985. }
  33986. });
  33987. var oE = XI.toolbox.restore;
  33988. t_.defaultOption = {
  33989. show: !0,
  33990. 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",
  33991. title: oE.title
  33992. }, t_.prototype.onclick = function(t, e, i) {
  33993. jx(t), e.dispatchAction({
  33994. type: "restore",
  33995. from: this.uid
  33996. })
  33997. }, yy("restore", t_), Ps({
  33998. type: "restore",
  33999. event: "restore",
  34000. update: "prepareAndUpdate"
  34001. }, function(t, e) {
  34002. e.resetOption("recreate")
  34003. });
  34004. var aE, rE = "urn:schemas-microsoft-com:vml",
  34005. sE = "undefined" == typeof window ? null : window,
  34006. lE = !1,
  34007. uE = sE && sE.document;
  34008. if (uE && !z_.canvasSupported) try {
  34009. !uE.namespaces.zrvml && uE.namespaces.add("zrvml", rE), aE = function(t) {
  34010. return uE.createElement("<zrvml:" + t + ' class="zrvml">')
  34011. }
  34012. } catch (t) {
  34013. aE = function(t) {
  34014. return uE.createElement("<" + t + ' xmlns="' + rE + '" class="zrvml">')
  34015. }
  34016. }
  34017. var hE = MS.CMD,
  34018. cE = Math.round,
  34019. dE = Math.sqrt,
  34020. fE = Math.abs,
  34021. pE = Math.cos,
  34022. gE = Math.sin,
  34023. mE = Math.max;
  34024. if (!z_.canvasSupported) {
  34025. var vE = 21600,
  34026. yE = vE / 2,
  34027. xE = function(t) {
  34028. t.style.cssText = "position:absolute;left:0;top:0;width:1px;height:1px;", t.coordsize = vE + "," + vE, t.coordorigin =
  34029. "0,0"
  34030. },
  34031. _E = function(t) {
  34032. return String(t).replace(/&/g, "&amp;").replace(/"/g, "&quot;")
  34033. },
  34034. wE = function(t, e, i) {
  34035. return "rgb(" + [t, e, i].join(",") + ")"
  34036. },
  34037. bE = function(t, e) {
  34038. e && t && e.parentNode !== t && t.appendChild(e)
  34039. },
  34040. SE = function(t, e) {
  34041. e && t && e.parentNode === t && t.removeChild(e)
  34042. },
  34043. ME = function(t, e, i) {
  34044. return 1e5 * (parseFloat(t) || 0) + 1e3 * (parseFloat(e) || 0) + i
  34045. },
  34046. IE = function(t, e) {
  34047. return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t
  34048. },
  34049. TE = function(t, e, i) {
  34050. var n = zt(e);
  34051. i = +i, isNaN(i) && (i = 1), n && (t.color = wE(n[0], n[1], n[2]), t.opacity = i * n[3])
  34052. },
  34053. AE = function(t) {
  34054. var e = zt(t);
  34055. return [wE(e[0], e[1], e[2]), e[3]]
  34056. },
  34057. DE = function(t, e, i) {
  34058. var n = e.fill;
  34059. if (null != n)
  34060. if (n instanceof cM) {
  34061. var o, a = 0,
  34062. r = [0, 0],
  34063. s = 0,
  34064. l = 1,
  34065. u = i.getBoundingRect(),
  34066. h = u.width,
  34067. c = u.height;
  34068. if ("linear" === n.type) {
  34069. o = "gradient";
  34070. var d = i.transform,
  34071. f = [n.x * h, n.y * c],
  34072. p = [n.x2 * h, n.y2 * c];
  34073. d && (Q(f, f, d), Q(p, p, d));
  34074. var g = p[0] - f[0],
  34075. m = p[1] - f[1];
  34076. (a = 180 * Math.atan2(g, m) / Math.PI) < 0 && (a += 360), a < 1e-6 && (a = 0)
  34077. } else {
  34078. o = "gradientradial";
  34079. var f = [n.x * h, n.y * c],
  34080. d = i.transform,
  34081. v = i.scale,
  34082. y = h,
  34083. x = c;
  34084. r = [(f[0] - u.x) / y, (f[1] - u.y) / x], d && Q(f, f, d), y /= v[0] * vE, x /= v[1] * vE;
  34085. var _ = mE(y, x);
  34086. s = 0 / _, l = 2 * n.r / _ - s
  34087. }
  34088. var w = n.colorStops.slice();
  34089. w.sort(function(t, e) {
  34090. return t.offset - e.offset
  34091. });
  34092. for (var b = w.length, S = [], M = [], I = 0; I < b; I++) {
  34093. var T = w[I],
  34094. A = AE(T.color);
  34095. M.push(T.offset * l + s + " " + A[0]), 0 !== I && I !== b - 1 || S.push(A)
  34096. }
  34097. if (b >= 2) {
  34098. var D = S[0][0],
  34099. C = S[1][0],
  34100. L = S[0][1] * e.opacity,
  34101. k = S[1][1] * e.opacity;
  34102. t.type = o, t.method = "none", t.focus = "100%", t.angle = a, t.color = D, t.color2 = C, t.colors = M.join(","),
  34103. t.opacity = k, t.opacity2 = L
  34104. }
  34105. "radial" === o && (t.focusposition = r.join(","))
  34106. } else TE(t, n, e.opacity)
  34107. },
  34108. CE = function(t, e) {
  34109. null != e.lineDash && (t.dashstyle = e.lineDash.join(" ")), null == e.stroke || e.stroke instanceof cM || TE(t, e.stroke,
  34110. e.opacity)
  34111. },
  34112. LE = function(t, e, i, n) {
  34113. var o = "fill" == e,
  34114. a = t.getElementsByTagName(e)[0];
  34115. null != i[e] && "none" !== i[e] && (o || !o && i.lineWidth) ? (t[o ? "filled" : "stroked"] = "true", i[e] instanceof cM &&
  34116. SE(t, a), a || (a = e_(e)), o ? DE(a, i, n) : CE(a, i), bE(t, a)) : (t[o ? "filled" : "stroked"] = "false", SE(t,
  34117. a))
  34118. },
  34119. kE = [
  34120. [],
  34121. [],
  34122. []
  34123. ],
  34124. PE = function(t, e) {
  34125. var i, n, o, a, r, s, l = hE.M,
  34126. u = hE.C,
  34127. h = hE.L,
  34128. c = hE.A,
  34129. d = hE.Q,
  34130. f = [],
  34131. p = t.data,
  34132. g = t.len();
  34133. for (a = 0; a < g;) {
  34134. switch (o = p[a++], n = "", i = 0, o) {
  34135. case l:
  34136. n = " m ", i = 1, r = p[a++], s = p[a++], kE[0][0] = r, kE[0][1] = s;
  34137. break;
  34138. case h:
  34139. n = " l ", i = 1, r = p[a++], s = p[a++], kE[0][0] = r, kE[0][1] = s;
  34140. break;
  34141. case d:
  34142. case u:
  34143. n = " c ", i = 3;
  34144. var m, v, y = p[a++],
  34145. x = p[a++],
  34146. _ = p[a++],
  34147. w = p[a++];
  34148. o === d ? (m = _, v = w, _ = (_ + 2 * y) / 3, w = (w + 2 * x) / 3, y = (r + 2 * y) / 3, x = (s + 2 * x) / 3) :
  34149. (m = p[a++], v = p[a++]), kE[0][0] = y, kE[0][1] = x, kE[1][0] = _, kE[1][1] = w, kE[2][0] = m, kE[2][1] = v,
  34150. r = m, s = v;
  34151. break;
  34152. case c:
  34153. var b = 0,
  34154. S = 0,
  34155. M = 1,
  34156. I = 1,
  34157. T = 0;
  34158. e && (b = e[4], S = e[5], M = dE(e[0] * e[0] + e[1] * e[1]), I = dE(e[2] * e[2] + e[3] * e[3]), T = Math.atan2(
  34159. -e[1] / I, e[0] / M));
  34160. var A = p[a++],
  34161. D = p[a++],
  34162. C = p[a++],
  34163. L = p[a++],
  34164. k = p[a++] + T,
  34165. P = p[a++] + k + T;
  34166. a++;
  34167. var N = p[a++],
  34168. O = A + pE(k) * C,
  34169. E = D + gE(k) * L,
  34170. y = A + pE(P) * C,
  34171. x = D + gE(P) * L,
  34172. R = N ? " wa " : " at ";
  34173. Math.abs(O - y) < 1e-4 && (Math.abs(P - k) > .01 ? N && (O += .0125) : Math.abs(E - D) < 1e-4 ? N && O < A || !
  34174. N && O > A ? x -= .0125 : x += .0125 : N && E < D || !N && E > D ? y += .0125 : y -= .0125), f.push(R, cE(((A -
  34175. C) * M + b) * vE - yE), ",", cE(((D - L) * I + S) * vE - yE), ",", cE(((A + C) * M + b) * vE - yE), ",", cE(
  34176. ((D + L) * I + S) * vE - yE), ",", cE((O * M + b) * vE - yE), ",", cE((E * I + S) * vE - yE), ",", cE((y * M +
  34177. b) * vE - yE), ",", cE((x * I + S) * vE - yE)), r = y, s = x;
  34178. break;
  34179. case hE.R:
  34180. var z = kE[0],
  34181. B = kE[1];
  34182. z[0] = p[a++], z[1] = p[a++], B[0] = z[0] + p[a++], B[1] = z[1] + p[a++], e && (Q(z, z, e), Q(B, B, e)), z[0] =
  34183. cE(z[0] * vE - yE), B[0] = cE(B[0] * vE - yE), z[1] = cE(z[1] * vE - yE), B[1] = cE(B[1] * vE - yE), f.push(
  34184. " m ", z[0], ",", z[1], " l ", B[0], ",", z[1], " l ", B[0], ",", B[1], " l ", z[0], ",", B[1]);
  34185. break;
  34186. case hE.Z:
  34187. f.push(" x ")
  34188. }
  34189. if (i > 0) {
  34190. f.push(n);
  34191. for (var V = 0; V < i; V++) {
  34192. var G = kE[V];
  34193. e && Q(G, G, e), f.push(cE(G[0] * vE - yE), ",", cE(G[1] * vE - yE), V < i - 1 ? "," : "")
  34194. }
  34195. }
  34196. }
  34197. return f.join("")
  34198. };
  34199. kn.prototype.brushVML = function(t) {
  34200. var e = this.style,
  34201. i = this._vmlEl;
  34202. i || (i = e_("shape"), xE(i), this._vmlEl = i), LE(i, "fill", e, this), LE(i, "stroke", e, this);
  34203. var n = this.transform,
  34204. o = null != n,
  34205. a = i.getElementsByTagName("stroke")[0];
  34206. if (a) {
  34207. var r = e.lineWidth;
  34208. if (o && !e.strokeNoScale) {
  34209. var s = n[0] * n[3] - n[1] * n[2];
  34210. r *= dE(fE(s))
  34211. }
  34212. a.weight = r + "px"
  34213. }
  34214. var l = this.path || (this.path = new MS);
  34215. this.__dirtyPath && (l.beginPath(), this.buildPath(l, this.shape), l.toStatic(), this.__dirtyPath = !1), i.path =
  34216. PE(l, this.transform), i.style.zIndex = ME(this.zlevel, this.z, this.z2), bE(t, i), null != e.text ? this.drawRectText(
  34217. t, this.getBoundingRect()) : this.removeRectText(t)
  34218. }, kn.prototype.onRemove = function(t) {
  34219. SE(t, this._vmlEl), this.removeRectText(t)
  34220. }, kn.prototype.onAdd = function(t) {
  34221. bE(t, this._vmlEl), this.appendRectText(t)
  34222. };
  34223. var NE = function(t) {
  34224. return "object" == typeof t && t.tagName && "IMG" === t.tagName.toUpperCase()
  34225. };
  34226. hi.prototype.brushVML = function(t) {
  34227. var e, i, n = this.style,
  34228. o = n.image;
  34229. if (NE(o)) {
  34230. var a = o.src;
  34231. if (a === this._imageSrc) e = this._imageWidth, i = this._imageHeight;
  34232. else {
  34233. var r = o.runtimeStyle,
  34234. s = r.width,
  34235. l = r.height;
  34236. r.width = "auto", r.height = "auto", e = o.width, i = o.height, r.width = s, r.height = l, this._imageSrc = a,
  34237. this._imageWidth = e, this._imageHeight = i
  34238. }
  34239. o = a
  34240. } else o === this._imageSrc && (e = this._imageWidth, i = this._imageHeight);
  34241. if (o) {
  34242. var u = n.x || 0,
  34243. h = n.y || 0,
  34244. c = n.width,
  34245. d = n.height,
  34246. f = n.sWidth,
  34247. p = n.sHeight,
  34248. g = n.sx || 0,
  34249. m = n.sy || 0,
  34250. v = f && p,
  34251. y = this._vmlEl;
  34252. y || (y = uE.createElement("div"), xE(y), this._vmlEl = y);
  34253. var x, _ = y.style,
  34254. w = !1,
  34255. b = 1,
  34256. S = 1;
  34257. if (this.transform && (x = this.transform, b = dE(x[0] * x[0] + x[1] * x[1]), S = dE(x[2] * x[2] + x[3] * x[3]),
  34258. w = x[1] || x[2]), w) {
  34259. var M = [u, h],
  34260. I = [u + c, h],
  34261. T = [u, h + d],
  34262. A = [u + c, h + d];
  34263. Q(M, M, x), Q(I, I, x), Q(T, T, x), Q(A, A, x);
  34264. var D = mE(M[0], I[0], T[0], A[0]),
  34265. C = mE(M[1], I[1], T[1], A[1]),
  34266. L = [];
  34267. L.push("M11=", x[0] / b, ",", "M12=", x[2] / S, ",", "M21=", x[1] / b, ",", "M22=", x[3] / S, ",", "Dx=", cE(u *
  34268. b + x[4]), ",", "Dy=", cE(h * S + x[5])), _.padding = "0 " + cE(D) + "px " + cE(C) + "px 0", _.filter =
  34269. "progid:DXImageTransform.Microsoft.Matrix(" + L.join("") + ", SizingMethod=clip)"
  34270. } else x && (u = u * b + x[4], h = h * S + x[5]), _.filter = "", _.left = cE(u) + "px", _.top = cE(h) + "px";
  34271. var k = this._imageEl,
  34272. P = this._cropEl;
  34273. k || (k = uE.createElement("div"), this._imageEl = k);
  34274. var N = k.style;
  34275. if (v) {
  34276. if (e && i) N.width = cE(b * e * c / f) + "px", N.height = cE(S * i * d / p) + "px";
  34277. else {
  34278. var O = new Image,
  34279. E = this;
  34280. O.onload = function() {
  34281. O.onload = null, e = O.width, i = O.height, N.width = cE(b * e * c / f) + "px", N.height = cE(S * i * d / p) +
  34282. "px", E._imageWidth = e, E._imageHeight = i, E._imageSrc = o
  34283. }, O.src = o
  34284. }
  34285. P || ((P = uE.createElement("div")).style.overflow = "hidden", this._cropEl = P);
  34286. var R = P.style;
  34287. R.width = cE((c + g * c / f) * b), R.height = cE((d + m * d / p) * S), R.filter =
  34288. "progid:DXImageTransform.Microsoft.Matrix(Dx=" + -g * c / f * b + ",Dy=" + -m * d / p * S + ")", P.parentNode ||
  34289. y.appendChild(P), k.parentNode != P && P.appendChild(k)
  34290. } else N.width = cE(b * c) + "px", N.height = cE(S * d) + "px", y.appendChild(k), P && P.parentNode && (y.removeChild(
  34291. P), this._cropEl = null);
  34292. var z = "",
  34293. B = n.opacity;
  34294. B < 1 && (z += ".Alpha(opacity=" + cE(100 * B) + ") "), z +=
  34295. "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + o + ", SizingMethod=scale)", N.filter = z, y.style.zIndex =
  34296. ME(this.zlevel, this.z, this.z2), bE(t, y), null != n.text && this.drawRectText(t, this.getBoundingRect())
  34297. }
  34298. }, hi.prototype.onRemove = function(t) {
  34299. SE(t, this._vmlEl), this._vmlEl = null, this._cropEl = null, this._imageEl = null, this.removeRectText(t)
  34300. }, hi.prototype.onAdd = function(t) {
  34301. bE(t, this._vmlEl), this.appendRectText(t)
  34302. };
  34303. var OE, EE = {},
  34304. RE = 0,
  34305. zE = document.createElement("div"),
  34306. BE = function(t) {
  34307. var e = EE[t];
  34308. if (!e) {
  34309. RE > 100 && (RE = 0, EE = {});
  34310. var i, n = zE.style;
  34311. try {
  34312. n.font = t, i = n.fontFamily.split(",")[0]
  34313. } catch (t) {}
  34314. e = {
  34315. style: n.fontStyle || "normal",
  34316. variant: n.fontVariant || "normal",
  34317. weight: n.fontWeight || "normal",
  34318. size: 0 | parseFloat(n.fontSize || 12),
  34319. family: i || "Microsoft YaHei"
  34320. }, EE[t] = e, RE++
  34321. }
  34322. return e
  34323. };
  34324. ! function(t, e) {
  34325. hb[t] = e
  34326. }("measureText", function(t, e) {
  34327. var i = uE;
  34328. OE || ((OE = i.createElement("div")).style.cssText =
  34329. "position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;", uE.body.appendChild(OE)
  34330. );
  34331. try {
  34332. OE.style.font = e
  34333. } catch (t) {}
  34334. return OE.innerHTML = "", OE.appendChild(i.createTextNode(t)), {
  34335. width: OE.offsetWidth
  34336. }
  34337. });
  34338. for (var VE = new ue, GE = [gb, ui, hi, kn, qS], FE = 0; FE < GE.length; FE++) {
  34339. var WE = GE[FE].prototype;
  34340. WE.drawRectText = function(t, e, i, n) {
  34341. var o = this.style;
  34342. this.__dirty && Ue(o);
  34343. var a = o.text;
  34344. if (null != a && (a += ""), a) {
  34345. if (o.rich) {
  34346. var r = Fe(a, o);
  34347. a = [];
  34348. for (var s = 0; s < r.lines.length; s++) {
  34349. for (var l = r.lines[s].tokens, u = [], h = 0; h < l.length; h++) u.push(l[h].text);
  34350. a.push(u.join(""))
  34351. }
  34352. a = a.join("\n")
  34353. }
  34354. var c, d, f = o.textAlign,
  34355. p = o.textVerticalAlign,
  34356. g = BE(o.font),
  34357. m = g.style + " " + g.variant + " " + g.weight + " " + g.size + 'px "' + g.family + '"';
  34358. i = i || De(a, m, f, p);
  34359. var v = this.transform;
  34360. if (v && !n && (VE.copy(e), VE.applyTransform(v), e = VE), n) c = e.x, d = e.y;
  34361. else {
  34362. var y = o.textPosition,
  34363. x = o.textDistance;
  34364. if (y instanceof Array) c = e.x + IE(y[0], e.width), d = e.y + IE(y[1], e.height), f = f || "left";
  34365. else {
  34366. var _ = Ne(y, e, x);
  34367. c = _.x, d = _.y, f = f || _.textAlign, p = p || _.textVerticalAlign
  34368. }
  34369. }
  34370. c = ke(c, i.width, f), d = Pe(d, i.height, p), d += i.height / 2;
  34371. var w, b, S, M = e_,
  34372. I = this._textVmlEl;
  34373. I ? b = (w = (S = I.firstChild).nextSibling).nextSibling : (I = M("line"), w = M("path"), b = M("textpath"), S =
  34374. M("skew"), b.style["v-text-align"] = "left", xE(I), w.textpathok = !0, b.on = !0, I.from = "0 0", I.to =
  34375. "1000 0.05", bE(I, S), bE(I, w), bE(I, b), this._textVmlEl = I);
  34376. var T = [c, d],
  34377. A = I.style;
  34378. v && n ? (Q(T, T, v), S.on = !0, S.matrix = v[0].toFixed(3) + "," + v[2].toFixed(3) + "," + v[1].toFixed(3) +
  34379. "," + v[3].toFixed(3) + ",0,0", S.offset = (cE(T[0]) || 0) + "," + (cE(T[1]) || 0), S.origin = "0 0", A.left =
  34380. "0px", A.top = "0px") : (S.on = !1, A.left = cE(c) + "px", A.top = cE(d) + "px"), b.string = _E(a);
  34381. try {
  34382. b.style.font = m
  34383. } catch (t) {}
  34384. LE(I, "fill", {
  34385. fill: o.textFill,
  34386. opacity: o.opacity
  34387. }, this), LE(I, "stroke", {
  34388. stroke: o.textStroke,
  34389. opacity: o.opacity,
  34390. lineDash: o.lineDash
  34391. }, this), I.style.zIndex = ME(this.zlevel, this.z, this.z2), bE(t, I)
  34392. }
  34393. }, WE.removeRectText = function(t) {
  34394. SE(t, this._textVmlEl), this._textVmlEl = null
  34395. }, WE.appendRectText = function(t) {
  34396. bE(t, this._textVmlEl)
  34397. }
  34398. }
  34399. qS.prototype.brushVML = function(t) {
  34400. var e = this.style;
  34401. null != e.text ? this.drawRectText(t, {
  34402. x: e.x || 0,
  34403. y: e.y || 0,
  34404. width: 0,
  34405. height: 0
  34406. }, this.getBoundingRect(), !0) : this.removeRectText(t)
  34407. }, qS.prototype.onRemove = function(t) {
  34408. this.removeRectText(t)
  34409. }, qS.prototype.onAdd = function(t) {
  34410. this.appendRectText(t)
  34411. }
  34412. }
  34413. o_.prototype = {
  34414. constructor: o_,
  34415. getType: function() {
  34416. return "vml"
  34417. },
  34418. getViewportRoot: function() {
  34419. return this._vmlViewport
  34420. },
  34421. getViewportRootOffset: function() {
  34422. var t = this.getViewportRoot();
  34423. if (t) return {
  34424. offsetLeft: t.offsetLeft || 0,
  34425. offsetTop: t.offsetTop || 0
  34426. }
  34427. },
  34428. refresh: function() {
  34429. var t = this.storage.getDisplayList(!0, !0);
  34430. this._paintList(t)
  34431. },
  34432. _paintList: function(t) {
  34433. for (var e = this._vmlRoot, i = 0; i < t.length; i++) {
  34434. var n = t[i];
  34435. n.invisible || n.ignore ? (n.__alreadyNotVisible || n.onRemove(e), n.__alreadyNotVisible = !0) : (n.__alreadyNotVisible &&
  34436. n.onAdd(e), n.__alreadyNotVisible = !1, n.__dirty && (n.beforeBrush && n.beforeBrush(), (n.brushVML || n.brush)
  34437. .call(n, e), n.afterBrush && n.afterBrush())), n.__dirty = !1
  34438. }
  34439. this._firstPaint && (this._vmlViewport.appendChild(e), this._firstPaint = !1)
  34440. },
  34441. resize: function(t, e) {
  34442. var t = null == t ? this._getWidth() : t,
  34443. e = null == e ? this._getHeight() : e;
  34444. if (this._width != t || this._height != e) {
  34445. this._width = t, this._height = e;
  34446. var i = this._vmlViewport.style;
  34447. i.width = t + "px", i.height = e + "px"
  34448. }
  34449. },
  34450. dispose: function() {
  34451. this.root.innerHTML = "", this._vmlRoot = this._vmlViewport = this.storage = null
  34452. },
  34453. getWidth: function() {
  34454. return this._width
  34455. },
  34456. getHeight: function() {
  34457. return this._height
  34458. },
  34459. clear: function() {
  34460. this._vmlViewport && this.root.removeChild(this._vmlViewport)
  34461. },
  34462. _getWidth: function() {
  34463. var t = this.root,
  34464. e = t.currentStyle;
  34465. return (t.clientWidth || n_(e.width)) - n_(e.paddingLeft) - n_(e.paddingRight) | 0
  34466. },
  34467. _getHeight: function() {
  34468. var t = this.root,
  34469. e = t.currentStyle;
  34470. return (t.clientHeight || n_(e.height)) - n_(e.paddingTop) - n_(e.paddingBottom) | 0
  34471. }
  34472. }, d(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer",
  34473. "delLayer", "clearLayer", "toDataURL", "pathToImage"
  34474. ], function(t) {
  34475. o_.prototype[t] = a_(t)
  34476. }), Ti("vml", o_);
  34477. var HE = "http://www.w3.org/2000/svg",
  34478. ZE = MS.CMD,
  34479. UE = Array.prototype.join,
  34480. XE = "none",
  34481. jE = Math.round,
  34482. YE = Math.sin,
  34483. qE = Math.cos,
  34484. KE = Math.PI,
  34485. $E = 2 * Math.PI,
  34486. JE = 180 / KE,
  34487. QE = 1e-4,
  34488. tR = {};
  34489. tR.brush = function(t) {
  34490. var e = t.style,
  34491. i = t.__svgEl;
  34492. i || (i = r_("path"), t.__svgEl = i), t.path || t.createPathProxy();
  34493. var n = t.path;
  34494. if (t.__dirtyPath) {
  34495. n.beginPath(), t.buildPath(n, t.shape), t.__dirtyPath = !1;
  34496. var o = g_(n);
  34497. o.indexOf("NaN") < 0 && d_(i, "d", o)
  34498. }
  34499. p_(i, e, !1, t), c_(i, t.transform), null != e.text && oR(t, t.getBoundingRect())
  34500. };
  34501. var eR = {};
  34502. eR.brush = function(t) {
  34503. var e = t.style,
  34504. i = e.image;
  34505. if (i instanceof HTMLImageElement && (i = i.src), i) {
  34506. var n = e.x || 0,
  34507. o = e.y || 0,
  34508. a = e.width,
  34509. r = e.height,
  34510. s = t.__svgEl;
  34511. s || (s = r_("image"), t.__svgEl = s), i !== t.__imageSrc && (f_(s, "href", i), t.__imageSrc = i), d_(s, "width",
  34512. a), d_(s, "height", r), d_(s, "x", n), d_(s, "y", o), c_(s, t.transform), null != e.text && oR(t, t.getBoundingRect())
  34513. }
  34514. };
  34515. var iR = {},
  34516. nR = new ue,
  34517. oR = function(t, e, i) {
  34518. var n = t.style;
  34519. t.__dirty && Ue(n);
  34520. var o = n.text;
  34521. if (null != o) {
  34522. o += "";
  34523. var a = t.__textSvgEl;
  34524. a || (a = r_("text"), t.__textSvgEl = a);
  34525. var r, s, l = n.textPosition,
  34526. u = n.textDistance,
  34527. h = n.textAlign || "left";
  34528. "number" == typeof n.fontSize && (n.fontSize += "px");
  34529. var c = n.font || [n.fontStyle || "", n.fontWeight || "", n.fontSize || "", n.fontFamily || ""].join(" ") || ub,
  34530. d = m_(n.textVerticalAlign),
  34531. f = (i = De(o, c, h, d)).lineHeight;
  34532. if (l instanceof Array) r = e.x + l[0], s = e.y + l[1];
  34533. else {
  34534. var p = Ne(l, e, u);
  34535. r = p.x, s = p.y, d = m_(p.textVerticalAlign), h = p.textAlign
  34536. }
  34537. d_(a, "alignment-baseline", d), c && (a.style.font = c);
  34538. var g = n.textPadding;
  34539. if (d_(a, "x", r), d_(a, "y", s), p_(a, n, !0, t), t instanceof qS || t.style.transformText) c_(a, t.transform);
  34540. else {
  34541. if (t.transform) nR.copy(e), nR.applyTransform(t.transform), e = nR;
  34542. else {
  34543. var m = t.transformCoordToGlobal(e.x, e.y);
  34544. e.x = m[0], e.y = m[1], t.transform = vt(mt())
  34545. }
  34546. var v = n.textOrigin;
  34547. "center" === v ? (r = i.width / 2 + r, s = i.height / 2 + s) : v && (r = v[0] + r, s = v[1] + s);
  34548. var y = -n.textRotation || 0,
  34549. x = mt();
  34550. wt(x, x, y), _t(x, x, m = [t.transform[4], t.transform[5]]), c_(a, x)
  34551. }
  34552. var _ = o.split("\n"),
  34553. w = _.length,
  34554. b = h;
  34555. "left" === b ? (b = "start", g && (r += g[3])) : "right" === b ? (b = "end", g && (r -= g[1])) : "center" === b &&
  34556. (b = "middle", g && (r += (g[3] - g[1]) / 2));
  34557. var S = 0;
  34558. if ("after-edge" === d ? (S = -i.height + f, g && (S -= g[2])) : "middle" === d ? (S = (-i.height + f) / 2, g && (
  34559. s += (g[0] - g[2]) / 2)) : g && (S += g[0]), t.__text !== o || t.__textFont !== c) {
  34560. var M = t.__tspanList || [];
  34561. t.__tspanList = M;
  34562. for (T = 0; T < w; T++)(A = M[T]) ? A.innerHTML = "" : (A = M[T] = r_("tspan"), a.appendChild(A), d_(A,
  34563. "alignment-baseline", d), d_(A, "text-anchor", b)), d_(A, "x", r), d_(A, "y", s + T * f + S), A.appendChild(
  34564. document.createTextNode(_[T]));
  34565. for (; T < M.length; T++) a.removeChild(M[T]);
  34566. M.length = w, t.__text = o, t.__textFont = c
  34567. } else if (t.__tspanList.length)
  34568. for (var I = t.__tspanList.length, T = 0; T < I; ++T) {
  34569. var A = t.__tspanList[T];
  34570. A && (d_(A, "x", r), d_(A, "y", s + T * f + S))
  34571. }
  34572. }
  34573. };
  34574. iR.drawRectText = oR, iR.brush = function(t) {
  34575. var e = t.style;
  34576. null != e.text && (e.textPosition = [0, 0], oR(t, {
  34577. x: e.x || 0,
  34578. y: e.y || 0,
  34579. width: 0,
  34580. height: 0
  34581. }, t.getBoundingRect()))
  34582. }, v_.prototype = {
  34583. diff: function(t, e, i) {
  34584. i || (i = function(t, e) {
  34585. return t === e
  34586. }), this.equals = i;
  34587. var n = this;
  34588. t = t.slice();
  34589. var o = (e = e.slice()).length,
  34590. a = t.length,
  34591. r = 1,
  34592. s = o + a,
  34593. l = [{
  34594. newPos: -1,
  34595. components: []
  34596. }],
  34597. u = this.extractCommon(l[0], e, t, 0);
  34598. if (l[0].newPos + 1 >= o && u + 1 >= a) {
  34599. for (var h = [], c = 0; c < e.length; c++) h.push(c);
  34600. return [{
  34601. indices: h,
  34602. count: e.length
  34603. }]
  34604. }
  34605. for (; r <= s;) {
  34606. var d = function() {
  34607. for (var i = -1 * r; i <= r; i += 2) {
  34608. var s, u = l[i - 1],
  34609. h = l[i + 1],
  34610. c = (h ? h.newPos : 0) - i;
  34611. u && (l[i - 1] = void 0);
  34612. var d = u && u.newPos + 1 < o,
  34613. f = h && 0 <= c && c < a;
  34614. if (d || f) {
  34615. if (!d || f && u.newPos < h.newPos ? (s = x_(h), n.pushComponent(s.components, void 0, !0)) : ((s = u).newPos++,
  34616. n.pushComponent(s.components, !0, void 0)), c = n.extractCommon(s, e, t, i), s.newPos + 1 >= o && c + 1 >=
  34617. a) return y_(0, s.components);
  34618. l[i] = s
  34619. } else l[i] = void 0
  34620. }
  34621. r++
  34622. }();
  34623. if (d) return d
  34624. }
  34625. },
  34626. pushComponent: function(t, e, i) {
  34627. var n = t[t.length - 1];
  34628. n && n.added === e && n.removed === i ? t[t.length - 1] = {
  34629. count: n.count + 1,
  34630. added: e,
  34631. removed: i
  34632. } : t.push({
  34633. count: 1,
  34634. added: e,
  34635. removed: i
  34636. })
  34637. },
  34638. extractCommon: function(t, e, i, n) {
  34639. 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 +
  34640. 1], i[s + 1]);) r++, s++, l++;
  34641. return l && t.components.push({
  34642. count: l
  34643. }), t.newPos = r, s
  34644. },
  34645. tokenize: function(t) {
  34646. return t.slice()
  34647. },
  34648. join: function(t) {
  34649. return t.slice()
  34650. }
  34651. };
  34652. var aR = new v_,
  34653. rR = function(t, e, i) {
  34654. return aR.diff(t, e, i)
  34655. };
  34656. __.prototype.createElement = r_, __.prototype.getDefs = function(t) {
  34657. var e = this._svgRoot,
  34658. i = this._svgRoot.getElementsByTagName("defs");
  34659. return 0 === i.length ? t ? ((i = e.insertBefore(this.createElement("defs"), e.firstChild)).contains || (i.contains =
  34660. function(t) {
  34661. var e = i.children;
  34662. if (!e) return !1;
  34663. for (var n = e.length - 1; n >= 0; --n)
  34664. if (e[n] === t) return !0;
  34665. return !1
  34666. }), i) : null : i[0]
  34667. }, __.prototype.update = function(t, e) {
  34668. if (t) {
  34669. var i = this.getDefs(!1);
  34670. if (t[this._domName] && i.contains(t[this._domName])) "function" == typeof e && e(t);
  34671. else {
  34672. var n = this.add(t);
  34673. n && (t[this._domName] = n)
  34674. }
  34675. }
  34676. }, __.prototype.addDom = function(t) {
  34677. this.getDefs(!0).appendChild(t)
  34678. }, __.prototype.removeDom = function(t) {
  34679. var e = this.getDefs(!1);
  34680. e && t[this._domName] && (e.removeChild(t[this._domName]), t[this._domName] = null)
  34681. }, __.prototype.getDoms = function() {
  34682. var t = this.getDefs(!1);
  34683. if (!t) return [];
  34684. var e = [];
  34685. return d(this._tagNames, function(i) {
  34686. var n = t.getElementsByTagName(i);
  34687. e = e.concat([].slice.call(n))
  34688. }), e
  34689. }, __.prototype.markAllUnused = function() {
  34690. var t = this;
  34691. d(this.getDoms(), function(e) {
  34692. e[t._markLabel] = "0"
  34693. })
  34694. }, __.prototype.markUsed = function(t) {
  34695. t && (t[this._markLabel] = "1")
  34696. }, __.prototype.removeUnused = function() {
  34697. var t = this.getDefs(!1);
  34698. if (t) {
  34699. var e = this;
  34700. d(this.getDoms(), function(i) {
  34701. "1" !== i[e._markLabel] && t.removeChild(i)
  34702. })
  34703. }
  34704. }, __.prototype.getSvgProxy = function(t) {
  34705. return t instanceof kn ? tR : t instanceof hi ? eR : t instanceof qS ? iR : tR
  34706. }, __.prototype.getTextSvgElement = function(t) {
  34707. return t.__textSvgEl
  34708. }, __.prototype.getSvgElement = function(t) {
  34709. return t.__svgEl
  34710. }, u(w_, __), w_.prototype.addWithoutUpdate = function(t, e) {
  34711. if (e && e.style) {
  34712. var i = this;
  34713. d(["fill", "stroke"], function(n) {
  34714. if (e.style[n] && ("linear" === e.style[n].type || "radial" === e.style[n].type)) {
  34715. var o, a = e.style[n],
  34716. r = i.getDefs(!0);
  34717. a._dom ? (o = a._dom, r.contains(a._dom) || i.addDom(o)) : o = i.add(a), i.markUsed(e);
  34718. var s = o.getAttribute("id");
  34719. t.setAttribute(n, "url(#" + s + ")")
  34720. }
  34721. })
  34722. }
  34723. }, w_.prototype.add = function(t) {
  34724. var e;
  34725. if ("linear" === t.type) e = this.createElement("linearGradient");
  34726. else {
  34727. if ("radial" !== t.type) return Bw("Illegal gradient type."), null;
  34728. e = this.createElement("radialGradient")
  34729. }
  34730. return t.id = t.id || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-gradient-" + t.id), this.updateDom(
  34731. t, e), this.addDom(e), e
  34732. }, w_.prototype.update = function(t) {
  34733. var e = this;
  34734. __.prototype.update.call(this, t, function() {
  34735. var i = t.type,
  34736. n = t._dom.tagName;
  34737. "linear" === i && "linearGradient" === n || "radial" === i && "radialGradient" === n ? e.updateDom(t, t._dom) :
  34738. (e.removeDom(t), e.add(t))
  34739. })
  34740. }, w_.prototype.updateDom = function(t, e) {
  34741. if ("linear" === t.type) e.setAttribute("x1", t.x), e.setAttribute("y1", t.y), e.setAttribute("x2", t.x2), e.setAttribute(
  34742. "y2", t.y2);
  34743. else {
  34744. if ("radial" !== t.type) return void Bw("Illegal gradient type.");
  34745. e.setAttribute("cx", t.x), e.setAttribute("cy", t.y), e.setAttribute("r", t.r)
  34746. }
  34747. t.global ? e.setAttribute("gradientUnits", "userSpaceOnUse") : e.setAttribute("gradientUnits", "objectBoundingBox"),
  34748. e.innerHTML = "";
  34749. for (var i = t.colorStops, n = 0, o = i.length; n < o; ++n) {
  34750. var a = this.createElement("stop");
  34751. a.setAttribute("offset", 100 * i[n].offset + "%"), a.setAttribute("stop-color", i[n].color), e.appendChild(a)
  34752. }
  34753. t._dom = e
  34754. }, w_.prototype.markUsed = function(t) {
  34755. if (t.style) {
  34756. var e = t.style.fill;
  34757. e && e._dom && __.prototype.markUsed.call(this, e._dom), (e = t.style.stroke) && e._dom && __.prototype.markUsed.call(
  34758. this, e._dom)
  34759. }
  34760. }, u(b_, __), b_.prototype.update = function(t) {
  34761. var e = this.getSvgElement(t);
  34762. e && this.updateDom(e, t.__clipPaths, !1);
  34763. var i = this.getTextSvgElement(t);
  34764. i && this.updateDom(i, t.__clipPaths, !0), this.markUsed(t)
  34765. }, b_.prototype.updateDom = function(t, e, i) {
  34766. if (e && e.length > 0) {
  34767. var n, o, a = this.getDefs(!0),
  34768. r = e[0],
  34769. s = i ? "_textDom" : "_dom";
  34770. r[s] ? (o = r[s].getAttribute("id"), n = r[s], a.contains(n) || a.appendChild(n)) : (o = "zr" + this._zrId +
  34771. "-clip-" + this.nextId, ++this.nextId, (n = this.createElement("clipPath")).setAttribute("id", o), a.appendChild(
  34772. n), r[s] = n);
  34773. var l = this.getSvgProxy(r);
  34774. if (r.transform && r.parent.invTransform && !i) {
  34775. var u = Array.prototype.slice.call(r.transform);
  34776. xt(r.transform, r.parent.invTransform, r.transform), l.brush(r), r.transform = u
  34777. } else l.brush(r);
  34778. var h = this.getSvgElement(r);
  34779. n.innerHTML = "", n.appendChild(h.cloneNode()), t.setAttribute("clip-path", "url(#" + o + ")"), e.length > 1 &&
  34780. this.updateDom(n, e.slice(1), i)
  34781. } else t && t.setAttribute("clip-path", "none")
  34782. }, b_.prototype.markUsed = function(t) {
  34783. var e = this;
  34784. t.__clipPaths && t.__clipPaths.length > 0 && d(t.__clipPaths, function(t) {
  34785. t._dom && __.prototype.markUsed.call(e, t._dom), t._textDom && __.prototype.markUsed.call(e, t._textDom)
  34786. })
  34787. }, u(S_, __), S_.prototype.addWithoutUpdate = function(t, e) {
  34788. if (e && M_(e.style)) {
  34789. var i, n = e.style;
  34790. n._shadowDom ? (i = n._shadowDom, this.getDefs(!0).contains(n._shadowDom) || this.addDom(i)) : i = this.add(e),
  34791. this.markUsed(e);
  34792. var o = i.getAttribute("id");
  34793. t.style.filter = "url(#" + o + ")"
  34794. }
  34795. }, S_.prototype.add = function(t) {
  34796. var e = this.createElement("filter"),
  34797. i = t.style;
  34798. return i._shadowDomId = i._shadowDomId || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-shadow-" + i._shadowDomId),
  34799. this.updateDom(t, e), this.addDom(e), e
  34800. }, S_.prototype.update = function(t, e) {
  34801. var i = e.style;
  34802. if (M_(i)) {
  34803. var n = this;
  34804. __.prototype.update.call(this, e, function(t) {
  34805. n.updateDom(e, t._shadowDom)
  34806. })
  34807. } else this.remove(t, i)
  34808. }, S_.prototype.remove = function(t, e) {
  34809. null != e._shadowDomId && (this.removeDom(e), t.style.filter = "")
  34810. }, S_.prototype.updateDom = function(t, e) {
  34811. var i = e.getElementsByTagName("feDropShadow");
  34812. i = 0 === i.length ? this.createElement("feDropShadow") : i[0];
  34813. var n, o, a, r, s = t.style,
  34814. l = t.scale ? t.scale[0] || 1 : 1,
  34815. u = t.scale ? t.scale[1] || 1 : 1;
  34816. if (s.shadowBlur || s.shadowOffsetX || s.shadowOffsetY) n = s.shadowOffsetX || 0, o = s.shadowOffsetY || 0, a = s.shadowBlur,
  34817. r = s.shadowColor;
  34818. else {
  34819. if (!s.textShadowBlur) return void this.removeDom(e, s);
  34820. n = s.textShadowOffsetX || 0, o = s.textShadowOffsetY || 0, a = s.textShadowBlur, r = s.textShadowColor
  34821. }
  34822. i.setAttribute("dx", n / l), i.setAttribute("dy", o / u), i.setAttribute("flood-color", r);
  34823. var h = a / 2 / l + " " + a / 2 / u;
  34824. i.setAttribute("stdDeviation", h), e.setAttribute("x", "-100%"), e.setAttribute("y", "-100%"), e.setAttribute(
  34825. "width", Math.ceil(a / 2 * 200) + "%"), e.setAttribute("height", Math.ceil(a / 2 * 200) + "%"), e.appendChild(i),
  34826. s._shadowDom = e
  34827. }, S_.prototype.markUsed = function(t) {
  34828. var e = t.style;
  34829. e && e._shadowDom && __.prototype.markUsed.call(this, e._shadowDom)
  34830. };
  34831. var sR = function(t, e, i, n) {
  34832. this.root = t, this.storage = e, this._opts = i = a({}, i || {});
  34833. var o = r_("svg");
  34834. o.setAttribute("xmlns", "http://www.w3.org/2000/svg"), o.setAttribute("version", "1.1"), o.setAttribute(
  34835. "baseProfile", "full"), o.style.cssText = "user-select:none;position:absolute;left:0;top:0;", this.gradientManager =
  34836. new w_(n, o), this.clipPathManager = new b_(n, o), this.shadowManager = new S_(n, o);
  34837. var r = document.createElement("div");
  34838. r.style.cssText = "overflow:hidden;position:relative", this._svgRoot = o, this._viewport = r, t.appendChild(r), r.appendChild(
  34839. o), this.resize(i.width, i.height), this._visibleList = []
  34840. };
  34841. sR.prototype = {
  34842. constructor: sR,
  34843. getType: function() {
  34844. return "svg"
  34845. },
  34846. getViewportRoot: function() {
  34847. return this._viewport
  34848. },
  34849. getViewportRootOffset: function() {
  34850. var t = this.getViewportRoot();
  34851. if (t) return {
  34852. offsetLeft: t.offsetLeft || 0,
  34853. offsetTop: t.offsetTop || 0
  34854. }
  34855. },
  34856. refresh: function() {
  34857. var t = this.storage.getDisplayList(!0);
  34858. this._paintList(t)
  34859. },
  34860. setBackgroundColor: function(t) {
  34861. this._viewport.style.background = t
  34862. },
  34863. _paintList: function(t) {
  34864. this.gradientManager.markAllUnused(), this.clipPathManager.markAllUnused(), this.shadowManager.markAllUnused();
  34865. var e, i = this._svgRoot,
  34866. n = this._visibleList,
  34867. o = t.length,
  34868. a = [];
  34869. for (e = 0; e < o; e++) {
  34870. var r = T_(f = t[e]),
  34871. s = P_(f) || k_(f);
  34872. f.invisible || (f.__dirty && (r && r.brush(f), this.clipPathManager.update(f), f.style && (this.gradientManager.update(
  34873. f.style.fill), this.gradientManager.update(f.style.stroke), this.shadowManager.update(s, f)), f.__dirty = !1),
  34874. a.push(f))
  34875. }
  34876. var l, u = rR(n, a);
  34877. for (e = 0; e < u.length; e++)
  34878. if ((c = u[e]).removed)
  34879. for (d = 0; d < c.count; d++) {
  34880. var s = P_(f = n[c.indices[d]]),
  34881. h = k_(f);
  34882. L_(i, s), L_(i, h)
  34883. }
  34884. for (e = 0; e < u.length; e++) {
  34885. var c = u[e];
  34886. if (c.added)
  34887. for (d = 0; d < c.count; d++) {
  34888. var s = P_(f = a[c.indices[d]]),
  34889. h = k_(f);
  34890. l ? D_(i, s, l) : C_(i, s), s ? D_(i, h, s) : l ? D_(i, h, l) : C_(i, h), D_(i, h, s), l = h || s || l, this.gradientManager
  34891. .addWithoutUpdate(s, f), this.shadowManager.addWithoutUpdate(l, f), this.clipPathManager.markUsed(f)
  34892. } else if (!c.removed)
  34893. for (var d = 0; d < c.count; d++) {
  34894. var f = a[c.indices[d]];
  34895. l = s = k_(f) || P_(f) || l, this.gradientManager.markUsed(f), this.gradientManager.addWithoutUpdate(s, f),
  34896. this.shadowManager.markUsed(f), this.shadowManager.addWithoutUpdate(s, f), this.clipPathManager.markUsed(f)
  34897. }
  34898. }
  34899. this.gradientManager.removeUnused(), this.clipPathManager.removeUnused(), this.shadowManager.removeUnused(), this
  34900. ._visibleList = a
  34901. },
  34902. _getDefs: function(t) {
  34903. var e = this._svgRoot,
  34904. i = this._svgRoot.getElementsByTagName("defs");
  34905. return 0 === i.length ? t ? ((i = e.insertBefore(r_("defs"), e.firstChild)).contains || (i.contains = function(t) {
  34906. var e = i.children;
  34907. if (!e) return !1;
  34908. for (var n = e.length - 1; n >= 0; --n)
  34909. if (e[n] === t) return !0;
  34910. return !1
  34911. }), i) : null : i[0]
  34912. },
  34913. resize: function(t, e) {
  34914. var i = this._viewport;
  34915. i.style.display = "none";
  34916. var n = this._opts;
  34917. if (null != t && (n.width = t), null != e && (n.height = e), t = this._getSize(0), e = this._getSize(1), i.style.display =
  34918. "", this._width !== t || this._height !== e) {
  34919. this._width = t, this._height = e;
  34920. var o = i.style;
  34921. o.width = t + "px", o.height = e + "px";
  34922. var a = this._svgRoot;
  34923. a.setAttribute("width", t), a.setAttribute("height", e)
  34924. }
  34925. },
  34926. getWidth: function() {
  34927. return this._width
  34928. },
  34929. getHeight: function() {
  34930. return this._height
  34931. },
  34932. _getSize: function(t) {
  34933. var e = this._opts,
  34934. i = ["width", "height"][t],
  34935. n = ["clientWidth", "clientHeight"][t],
  34936. o = ["paddingLeft", "paddingTop"][t],
  34937. a = ["paddingRight", "paddingBottom"][t];
  34938. if (null != e[i] && "auto" !== e[i]) return parseFloat(e[i]);
  34939. var r = this.root,
  34940. s = document.defaultView.getComputedStyle(r);
  34941. return (r[n] || I_(s[i]) || I_(r.style[i])) - (I_(s[o]) || 0) - (I_(s[a]) || 0) | 0
  34942. },
  34943. dispose: function() {
  34944. this.root.innerHTML = "", this._svgRoot = this._viewport = this.storage = null
  34945. },
  34946. clear: function() {
  34947. this._viewport && this.root.removeChild(this._viewport)
  34948. },
  34949. pathToDataUrl: function() {
  34950. return this.refresh(), "data:image/svg+xml;charset=UTF-8," + this._svgRoot.outerHTML
  34951. }
  34952. }, d(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer",
  34953. "delLayer", "clearLayer", "toDataURL", "pathToImage"
  34954. ], function(t) {
  34955. sR.prototype[t] = N_(t)
  34956. }), Ti("svg", sR), t.version = "4.2.0", t.dependencies = wT, t.PRIORITY = IT, t.init = function(t, e, i) {
  34957. var n = Ds(t);
  34958. if (n) return n;
  34959. var o = new rs(t, e, i);
  34960. return o.id = "ec_" + WT++, GT[o.id] = o, Fi(t, ZT, o.id), Ts(o), o
  34961. }, t.connect = function(t) {
  34962. if (y(t)) {
  34963. var e = t;
  34964. t = null, vT(e, function(e) {
  34965. null != e.group && (t = e.group)
  34966. }), t = t || "g_" + HT++, vT(e, function(e) {
  34967. e.group = t
  34968. })
  34969. }
  34970. return FT[t] = !0, t
  34971. }, t.disConnect = As, t.disconnect = UT, t.dispose = function(t) {
  34972. "string" == typeof t ? t = GT[t] : t instanceof rs || (t = Ds(t)), t instanceof rs && !t.isDisposed() && t.dispose()
  34973. }, t.getInstanceByDom = Ds, t.getInstanceById = function(t) {
  34974. return GT[t]
  34975. }, t.registerTheme = Cs, t.registerPreprocessor = Ls, t.registerProcessor = ks, t.registerPostUpdate = function(t) {
  34976. RT.push(t)
  34977. }, t.registerAction = Ps, t.registerCoordinateSystem = Ns, t.getCoordinateSystemDimensions = function(t) {
  34978. var e = Ba.get(t);
  34979. if (e) return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice()
  34980. }, t.registerLayout = Os, t.registerVisual = Es, t.registerLoading = zs, t.extendComponentModel = Bs, t.extendComponentView =
  34981. Vs, t.extendSeriesModel = Gs, t.extendChartView = Fs, t.setCanvasCreator = function(t) {
  34982. e("createCanvas", t)
  34983. }, t.registerMap = function(t, e, i) {
  34984. pT.registerMap(t, e, i)
  34985. }, t.getMap = function(t) {
  34986. var e = pT.retrieveMap(t);
  34987. return e && e[0] && {
  34988. geoJson: e[0].geoJSON,
  34989. specialAreas: e[0].specialAreas
  34990. }
  34991. }, t.dataTool = XT, t.zrender = Pb, t.number = NM, t.format = FM, t.throttle = Cr, t.helper = BA, t.matrix = fw, t.vector =
  34992. nw, t.color = Pw, t.parseGeoJSON = GA, t.parseGeoJson = ZA, t.util = UA, t.graphic = XA, t.List = eA, t.Model = Lo,
  34993. t.Axis = HA, t.env = z_
  34994. });